From 42f6070efe22034d4271e735414134a0faf6f5d9 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sat, 1 Feb 2003 21:12:52 +0000 Subject: [PATCH] *** empty log message *** --- htdocs/compta/facture.php3 | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture.php3 b/htdocs/compta/facture.php3 index 2e0eba975dd..eafc7cdfd24 100644 --- a/htdocs/compta/facture.php3 +++ b/htdocs/compta/facture.php3 @@ -47,9 +47,15 @@ if ($action == 'addligne') $result = $fac->addline($facid,$HTTP_POST_VARS["desc"],$HTTP_POST_VARS["pu"],$HTTP_POST_VARS["qty"]); } +if ($action == 'updateligne') +{ + $fac = new Facture($db,"",$facid); + $result = $fac->updateline($rowid,$HTTP_POST_VARS["desc"],$HTTP_POST_VARS["price"],$HTTP_POST_VARS["qty"]); +} + if ($action == 'deleteline') { - $fac = new Facture($db); + $fac = new Facture($db,"",$facid); $fac->id = $facid; $result = $fac->deleteline($rowid); } @@ -353,7 +359,7 @@ else print ""; print "Date"; print 'Quantité'; - print 'Montant '; + print 'Montant  '; print "\n"; $var=True; @@ -367,8 +373,24 @@ else if ($obj->statut == 0) { print 'del'; + print 'edit'; } print ""; + + if ($action == 'editline' && $rowid == $objp->rowid) + { + print "
"; + print ''; + print ''; + print ""; + print ''; + print ''; + print ''; + print ''; + print '' . "\n"; + print "
\n"; + } + $total = $total + ($objp->qty * $objp->price); $i++; }