Bugfix sur l'ajout d'un produit avec remise dans une facture
This commit is contained in:
parent
841c32d9d8
commit
5d49f80621
@ -163,8 +163,9 @@ if ($_POST["action"] == 'addinpropal')
|
|||||||
|
|
||||||
Header("Location: ../comm/propal.php?propalid=".$propal->id);
|
Header("Location: ../comm/propal.php?propalid=".$propal->id);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* Ajout du produit dans une facture
|
||||||
|
*/
|
||||||
if ($_POST["action"] == 'addinfacture' && $user->rights->facture->creer)
|
if ($_POST["action"] == 'addinfacture' && $user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
@ -173,11 +174,14 @@ if ($_POST["action"] == 'addinfacture' && $user->rights->facture->creer)
|
|||||||
$facture = New Facture($db);
|
$facture = New Facture($db);
|
||||||
|
|
||||||
$facture->fetch($_POST["factureid"]);
|
$facture->fetch($_POST["factureid"]);
|
||||||
|
|
||||||
$facture->addline($_POST["factureid"],
|
$facture->addline($_POST["factureid"],
|
||||||
addslashes($product->libelle),
|
addslashes($product->libelle),
|
||||||
$product->price,
|
$product->price,
|
||||||
$_POST["qty"],
|
$_POST["qty"],
|
||||||
$product->tva_tx, $product->id);
|
$product->tva_tx,
|
||||||
|
$product->id,
|
||||||
|
$_POST["remise_percent"]);
|
||||||
|
|
||||||
Header("Location: ../compta/facture.php?facid=".$facture->id);
|
Header("Location: ../compta/facture.php?facid=".$facture->id);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user