From 95a8912c9485cf8abcbc30bcc626b3c0dce5187a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 8 May 2005 15:04:24 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Le=20r=E9sum=E9=20des=20facture=20sur=20?= =?UTF-8?q?fiche=20compta=20affichait=20le=20montant=20sans=20la=20remise.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/fiche.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index fbb98def8e6..4d04e031b0f 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -242,7 +242,7 @@ if ($socid > 0) print ""; - print 'Code compta'.$societe->code_compta.''; + print ''.$langs->trans("AccountancyCode").''.$societe->code_compta.''; print ''.$langs->trans("CustomerCode").''; print $societe->code_client; print ""; @@ -266,15 +266,17 @@ if ($socid > 0) { print ''; - $sql = "SELECT s.nom, s.idp, f.facnumber, f.amount, ".$db->pdate("f.datef")." as df, f.paye as paye, f.fk_statut as statut, f.rowid as facid "; + $sql = "SELECT s.nom, s.idp, f.facnumber, f.amount, f.total, f.total_ttc, ".$db->pdate("f.datef")." as df, f.paye as paye, f.fk_statut as statut, f.rowid as facid "; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f"; $sql .= " WHERE f.fk_soc = s.idp AND s.idp = ".$societe->id; $sql .= " ORDER BY f.datef DESC"; - if ( $db->query($sql) ) + $resql=$db->query($sql); + if ($resql) { $var=true; - $num = $db->num_rows(); $i = 0; + $num = $db->num_rows($resql); + $i = 0; if ($num > 0) { print ''; @@ -284,7 +286,7 @@ if ($socid > 0) while ($i < $num && $i < $MAXLIST) { - $objp = $db->fetch_object(); + $objp = $db->fetch_object($resql); $var=!$var; print ""; print "\n"; @@ -296,7 +298,7 @@ if ($socid > 0) { print "\n"; } - print "\n"; + print "\n"; $fac = new Facture($db); print "\n";
facid\">".img_object($langs->trans("ShowBill"),"bill")." ".$objp->facnumber."!!!".number_format($objp->amount, 2, ',', ' ')."".price($objp->total_ttc)."".($fac->LibStatut($objp->paye,$objp->statut))."