From 7a5ddddd84dd63d5170bcb356827e6d59a0db211 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 13 May 2003 20:39:13 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20la=20classe=20account.class.php=20?= =?UTF-8?q?pour=20la=20g=E9n=E9ration=20de=20facture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/facture.php3 | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/htdocs/compta/facture.php3 b/htdocs/compta/facture.php3 index 19238fa7c62..d60f8192c5b 100644 --- a/htdocs/compta/facture.php3 +++ b/htdocs/compta/facture.php3 @@ -23,6 +23,7 @@ require("./pre.inc.php3"); require("../facture.class.php3"); require("../lib/CMailFile.class.php3"); require("../paiement.class.php"); +require("./bank/account.class.php"); llxHeader(); @@ -400,7 +401,7 @@ else print ""; print "".strftime("%d %B %Y",$objp->dp)."\n"; print "$objp->paiement_type $objp->num_paiement\n"; - print "".price($objp->amount)."$_MONNAIE\n"; + print ''.price($objp->amount)."$_MONNAIE\n"; print ""; $total = $total + $objp->amount; $i++; @@ -411,10 +412,10 @@ else print "Total :".price($total)."$_MONNAIE\n"; print "Facturé :".price($obj->total)."$_MONNAIE\n"; - $resteapayer = $obj->total - $total; + $resteapayer = price($obj->total - $total); - print "Reste a payer :"; - print "".price($resteapayer)."$_MONNAIE\n"; + print "Reste à payer :"; + print "".price($obj->total - $total)."$_MONNAIE\n"; } print ""; $db->free(); @@ -533,7 +534,7 @@ else { print "[Supprimer]"; } - elseif ($obj->statut == 1 && $resteapayer > 0) + elseif ($obj->statut == 1 && abs($resteapayer) > 0) { print "[Envoyer]"; } @@ -551,7 +552,7 @@ else print "-"; } - if ($obj->statut == 1 && abs($resteapayer == 0) && $obj->paye == 0) + if ($obj->statut == 1 && abs($resteapayer) == 0 && $obj->paye == 0) { print "[Classer 'Payée']"; } @@ -580,9 +581,9 @@ else * Documents générés * */ - print "
"; + print ""; @@ -750,6 +751,13 @@ else * * */ + if ($page == -1) + { + $page = 0 ; + } + $limit = $conf->liste_limit; + $offset = $limit * $page ; + print_barre_liste("Factures",$page,$PHP_SELF); $sql = "SELECT s.nom,s.idp,f.facnumber,f.amount,".$db->pdate("f.datef")." as df,f.paye,f.rowid as facid"; @@ -767,7 +775,8 @@ else } $sql .= " ORDER BY f.datef DESC, f.facnumber DESC "; - + $sql .= $db->plimit( $limit ,$offset); + $result = $db->query($sql); if ($result) { $num = $db->num_rows(); @@ -825,10 +834,6 @@ else print ''; } - $total = $total + $objp->amount; - $subtotal = $subtotal + $objp->amount; - - print "\n"; $i++; $j++; @@ -836,12 +841,7 @@ else } } if ($i == 0) { $i=1; } if ($j == 0) { $j=1; } - print ""; - print ""; - print ''; - print ""; - print ""; - print ''; + print "
"; - print_titre("Documents générés"); + print_titre("Documents"); print ''; $file = $conf->facture->outputdir . "/" . $obj->facnumber . "/" . $obj->facnumber . ".pdf"; @@ -609,7 +610,7 @@ else } - print ''; + print ''; print "
(liste...)
(liste...)
\n"; print "
 
$j factures Sous Total : ".price($subtotal)." 
$i factures Total (euros HT): ".price($total)." 
"; $db->free(); } else {