modification de la description produit
This commit is contained in:
parent
e885a2c233
commit
7e5309d99a
@ -860,7 +860,7 @@ if ($_GET['action'] == 'create')
|
|||||||
print $objp->product?' - '.$objp->product:'';
|
print $objp->product?' - '.$objp->product:'';
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print dolibarr_trunc($objp->description,60);
|
print stripslashes(nl2br(dolibarr_trunc($objp->description,60)));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">'.$objp->tva_tx.'%</td>';
|
print '<td align="right">'.$objp->tva_tx.'%</td>';
|
||||||
print '<td align="right">'.price($objp->price).'</td>';
|
print '<td align="right">'.price($objp->price).'</td>';
|
||||||
|
|||||||
@ -210,8 +210,9 @@ 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_generic($p_desc, $p_price, $p_qty, $p_tva_tx, $remise_percent=0)
|
function insert_product_generic($p_desc, $p_product_desc, $p_price, $p_qty, $p_tva_tx, $remise_percent=0)
|
||||||
{
|
{
|
||||||
|
global $conf;
|
||||||
dolibarr_syslog("propal.class.php::insert_product_generic $p_desc, $p_price, $p_qty, $p_tva_tx, $remise_percent");
|
dolibarr_syslog("propal.class.php::insert_product_generic $p_desc, $p_price, $p_qty, $p_tva_tx, $remise_percent");
|
||||||
if ($this->statut == 0)
|
if ($this->statut == 0)
|
||||||
{
|
{
|
||||||
@ -230,8 +231,16 @@ class Propal
|
|||||||
$price = $p_price - $remise;
|
$price = $p_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.", 0,'". $p_qty."','". price2num($price)."','".$p_tva_tx."','".addslashes($p_desc)."','$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.", 0,'". $p_qty."','". price2num($price)."','".$p_tva_tx."','".addslashes($p_product_desc)."','$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.", 0,'". $p_qty."','". price2num($price)."','".$p_tva_tx."','".addslashes($p_desc)."','$remise_percent', '".price2num($subprice)."') ; ";
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->db->query($sql) )
|
if ($this->db->query($sql) )
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user