From 78fd568ea0348ceba6ac9706084d6c1dc7176359 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Tue, 2 Nov 2010 13:14:04 +0000 Subject: [PATCH] Cosmetic: ======== Amount appereance in HTML --- html/ajax_history.php | 8 ++++---- include/class_acc_account_ledger.php | 16 ++++++++++------ include/class_fiche.php | 19 ++++++++++++------- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/html/ajax_history.php b/html/ajax_history.php index c652b6071..d11def7a2 100644 --- a/html/ajax_history.php +++ b/html/ajax_history.php @@ -92,8 +92,8 @@ $html=escape_xml($html); header('Content-type: text/xml; charset=UTF-8'); echo << - - $div - $html - + +$div +$html + EOF; diff --git a/include/class_acc_account_ledger.php b/include/class_acc_account_ledger.php index 23fe4b8d1..4b83b6f49 100644 --- a/include/class_acc_account_ledger.php +++ b/include/class_acc_account_ledger.php @@ -328,16 +328,17 @@ class Acc_Account_Ledger $op['jr_id'], dossier::id(), $op['jr_internal']); $let=''; if ( $op['letter'] !=-1) $let=$op['letter']; - $progress+=$op['deb_montant']-$op['cred_montant']; + $tmp_diff=bcsub($op['deb_montant'],$op['cred_montant']); + $progress=bcadd($progress,$tmp_diff); echo "". "".format_date($op['j_date'])."". td(h($op['jr_pj_number'])). "".$vw_operation."". "".h($op['description'])."". - "".sprintf("%.2f",$op['deb_montant'])."". - "".sprintf("%.2f",$op['cred_montant'])."". - td(sprintf('%.2f',abs($progress)),'style="text-align:right"'). + "".nbm($op['deb_montant'])."". + "".nbm($op['cred_montant'])."". + td(nbm(abs($progress)),'style="text-align:right"'). td($let,' style="color:red;text-align:right"'). ""; @@ -347,12 +348,15 @@ class Acc_Account_Ledger $solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur"; $diff=round(abs($tot_deb-$tot_cred),2); echo "". - "$solde_type". - "$diff". + "Totaux". + "". "". "$tot_deb". "$tot_cred". ""; + echo "$solde_type". + "$diff". + ""; echo ''; echo ''; diff --git a/include/class_fiche.php b/include/class_fiche.php index 061e9b483..2852ff259 100644 --- a/include/class_fiche.php +++ b/include/class_fiche.php @@ -1209,9 +1209,9 @@ class Fiche td(h($op['jr_pj_number'])). "".$vw_operation."". "".h($op['description'])."". - "".sprintf("%.2f",$op['deb_montant'])."". - "".sprintf("%.2f",$op['cred_montant'])."". - td(sprintf('%.2f',abs($progress)),'style="text-align:right"'). + "".nbm($op['deb_montant'])."". + "".nbm($op['cred_montant'])."". + td(nbm(abs($progress)),'style="text-align:right"'). td($let,' style="color:red;text-align:right"'). ""; @@ -1219,13 +1219,18 @@ class Fiche $solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur"; $diff=round(abs($tot_deb-$tot_cred),2); echo ''; - + echo "". + "Totaux". + "". + "". + "". + "".nbm($tot_deb)."". + "".nbm($tot_cred)."". + ""; echo "". "$solde_type". - "$diff". + "".nbm($diff)."". "". - "$tot_deb". - "$tot_cred". ""; echo ''; echo '';