forked from Wavyzz/dolibarr
Fix: The rounding mode is now forced when provided explicitly and no
more by default (we keep data intact when no mode provided).
This commit is contained in:
@@ -1052,9 +1052,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
global $mysoc, $conf, $langs;
|
||||
|
||||
$commandeid=$this->id;
|
||||
|
||||
dol_syslog(get_class($this)."::addline commandeid=$commandeid, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_percent=$remise_percent, info_bits=$info_bits, fk_remise_except=$fk_remise_except, price_base_type=$price_base_type, pu_ttc=$pu_ttc, date_start=$date_start, date_end=$date_end, type=$type", LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::addline commandeid=$this->id, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_percent=$remise_percent, info_bits=$info_bits, fk_remise_except=$fk_remise_except, price_base_type=$price_base_type, pu_ttc=$pu_ttc, date_start=$date_start, date_end=$date_end, type=$type", LOG_DEBUG);
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
@@ -1143,7 +1141,7 @@ class Commande extends CommonOrder
|
||||
// Insert line
|
||||
$this->line=new OrderLine($this->db);
|
||||
|
||||
$this->line->fk_commande=$commandeid;
|
||||
$this->line->fk_commande=$this->id;
|
||||
$this->line->label=$label;
|
||||
$this->line->desc=$desc;
|
||||
$this->line->qty=$qty;
|
||||
@@ -1190,8 +1188,7 @@ class Commande extends CommonOrder
|
||||
if (! empty($fk_parent_line)) $this->line_order(true,'DESC');
|
||||
|
||||
// Mise a jour informations denormalisees au niveau de la commande meme
|
||||
$this->id=$commandeid; // TODO A virer
|
||||
$result=$this->update_price(1);
|
||||
$result=$this->update_price(1,'auto'); // This method is designed to add line from user input so total calculation must be done using 'auto' mode.
|
||||
if ($result > 0)
|
||||
{
|
||||
$this->db->commit();
|
||||
|
||||
Reference in New Issue
Block a user