modification de la description produit
This commit is contained in:
parent
e34d27a3ff
commit
aa14cefed1
@ -318,7 +318,7 @@ if ($_POST['action'] == "addligne" && $user->rights->propale->creer)
|
|||||||
$_POST['idprod'],
|
$_POST['idprod'],
|
||||||
$_POST['qty'],
|
$_POST['qty'],
|
||||||
$_POST['remise'],
|
$_POST['remise'],
|
||||||
$_POST['np_desc']),
|
$_POST['np_desc'],
|
||||||
$_POST['np_product_desc']);
|
$_POST['np_product_desc']);
|
||||||
}
|
}
|
||||||
propale_pdf_create($db, $_POST['propalid'], $propal->modelpdf);
|
propale_pdf_create($db, $_POST['propalid'], $propal->modelpdf);
|
||||||
|
|||||||
@ -132,7 +132,7 @@ class Propal
|
|||||||
* \return int >0 si ok, <0 si ko
|
* \return int >0 si ok, <0 si ko
|
||||||
* \see add_product
|
* \see add_product
|
||||||
*/
|
*/
|
||||||
function insert_product($idproduct, $qty, $remise_percent=0, $p_desc='')
|
function insert_product($idproduct, $qty, $remise_percent=0, $p_desc='', $p_product_desc)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
dolibarr_syslog("propal.class.php::insert_product $idproduct, $qty, $remise_percent, $p_desc");
|
dolibarr_syslog("propal.class.php::insert_product $idproduct, $qty, $remise_percent, $p_desc");
|
||||||
@ -172,8 +172,16 @@ class Propal
|
|||||||
$price = $prod->price - $remise;
|
$price = $prod->price - $remise;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."propaldet (fk_propal, fk_product, qty, price, tva_tx, description, remise_percent, subprice) VALUES ";
|
if ($conf->global->CHANGE_PROD_DESC)
|
||||||
$sql .= " (".$this->id.",". $idproduct.",'". $qty."','". $price."','".$txtva."','".addslashes($p_desc?$p_desc:$prod->label)."','".price2num($remise_percent)."','".price2num($subprice)."')";
|
{
|
||||||
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."propaldet (fk_propal, fk_product, qty, price, tva_tx, description, remise_percent, subprice) VALUES ";
|
||||||
|
$sql .= " (".$this->id.",". $idproduct.",'". $qty."','". $price."','".$txtva."','".addslashes($prod->product_desc)."','".price2num($remise_percent)."','".price2num($subprice)."')";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."propaldet (fk_propal, fk_product, qty, price, tva_tx, description, remise_percent, subprice) VALUES ";
|
||||||
|
$sql .= " (".$this->id.",". $idproduct.",'". $qty."','". $price."','".$txtva."','".addslashes($p_desc?$p_desc:$prod->label)."','".price2num($remise_percent)."','".price2num($subprice)."')";
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->db->query($sql) )
|
if ($this->db->query($sql) )
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user