diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 793ba2b54e1..7e8716ce271 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -162,14 +162,12 @@ if ($HTTP_POST_VARS["action"] == 'addproduct' && $user->rights->propale->creer) $propal = new Propal($db); $propal->fetch($propalid); - - if (empty ($HTTP_POST_VARS["np_qty"])) - $HTTP_POST_VARS["np_qty"]=1; - + $propal->insert_product_generic($HTTP_POST_VARS["np_desc"], $HTTP_POST_VARS["np_price"], $HTTP_POST_VARS["np_qty"], - $HTTP_POST_VARS["np_tva_tx"]); + $HTTP_POST_VARS["np_tva_tx"], + $HTTP_POST_VARS["np_remise"]); } } @@ -339,7 +337,7 @@ if ($propalid) print ''; print ""; print ""; - print ''; + print ''; if ($propal->statut == 0) { print ""; @@ -366,7 +364,7 @@ if ($propalid) print ''; print ''; print "\n"; - print ''; + print ''; print ''; if ($obj->statut == 0 && $user->rights->propale->creer) { @@ -382,7 +380,7 @@ if ($propalid) } } - $sql = "SELECT pt.rowid, pt.description, pt.price, pt.qty, pt.tva_tx, pt.remise_percent"; + $sql = "SELECT pt.rowid, pt.description, pt.price, pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice"; $sql .= " FROM llx_propaldet as pt WHERE pt.fk_propal = $propalid AND pt.fk_product = 0"; if ($db->query($sql)) @@ -398,7 +396,7 @@ if ($propalid) print ''; print "\n"; print ''; - print ""; + print ""; if ($obj->statut == 0 && $user->rights->propale->creer) { print ''; @@ -437,7 +435,7 @@ if ($propalid) } /* - * Produits + * Produits génériques * */ $var=!$var; @@ -449,13 +447,13 @@ if ($propalid) print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; /* - * Produits génériques + * Produits * */ $var=!$var; @@ -463,7 +461,7 @@ if ($propalid) print ''; print ""; print ''; - print ''; + print ''; print ''; print ''; print "\n";
RéfProduitTvaQté.RemiseP.U.TvaQté.RemiseP.U. '.$objp->product.''.$objp->tva_tx.' %".$objp->qty."'.$objp->remise_percent.' %'.$objp->remise_percent.' %'.price($objp->subprice).''.$objp->tva_tx.' %".$objp->qty."'.$objp->remise_percent.' %".price($objp->price)."".price($objp->subprice)."Supprimer'; print $html->select_tva("np_tva_tx") . ' % %
  % %