From 5d49f806219623c397a50816475e2d15bf60b7da Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sun, 3 Apr 2005 14:16:43 +0000 Subject: [PATCH] Bugfix sur l'ajout d'un produit avec remise dans une facture --- htdocs/product/fiche.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 30536fd923a..51298972811 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -163,8 +163,9 @@ if ($_POST["action"] == 'addinpropal') Header("Location: ../comm/propal.php?propalid=".$propal->id); } - - +/* + * Ajout du produit dans une facture + */ if ($_POST["action"] == 'addinfacture' && $user->rights->facture->creer) { $product = new Product($db); @@ -173,11 +174,14 @@ if ($_POST["action"] == 'addinfacture' && $user->rights->facture->creer) $facture = New Facture($db); $facture->fetch($_POST["factureid"]); + $facture->addline($_POST["factureid"], addslashes($product->libelle), - $product->price, + $product->price, $_POST["qty"], - $product->tva_tx, $product->id); + $product->tva_tx, + $product->id, + $_POST["remise_percent"]); Header("Location: ../compta/facture.php?facid=".$facture->id);