fix special_code PHP V8 by adding on addline fct
This commit is contained in:
parent
762cea2416
commit
bd0b28d30a
@ -1432,7 +1432,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
}
|
||||
|
||||
|
||||
$this->special_code = $line->special_code; // TODO : remove this in 9.0 and add special_code param to addline()
|
||||
//$this->special_code = $line->special_code; // TODO : remove this in 9.0 and add special_code param to addline()
|
||||
|
||||
// This include test on qty if option SUPPLIER_ORDER_WITH_NOPRICEDEFINED is not set
|
||||
$result = $this->addline(
|
||||
@ -1454,7 +1454,8 @@ class CommandeFournisseur extends CommonOrder
|
||||
$line->date_start,
|
||||
$line->date_end,
|
||||
$line->array_options,
|
||||
$line->fk_unit
|
||||
$line->fk_unit,
|
||||
$line->special_code
|
||||
);
|
||||
if ($result < 0) {
|
||||
dol_syslog(get_class($this)."::create ".$this->error, LOG_WARNING); // do not use dol_print_error here as it may be a functionnal error
|
||||
@ -1745,9 +1746,10 @@ class CommandeFournisseur extends CommonOrder
|
||||
* @param string $origin 'order', ...
|
||||
* @param int $origin_id Id of origin object
|
||||
* @param int $rang Rank
|
||||
* @param int $special_code Special code
|
||||
* @return int <=0 if KO, >0 if OK
|
||||
*/
|
||||
public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $fk_prod_fourn_price = 0, $ref_supplier = '', $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $type = 0, $info_bits = 0, $notrigger = false, $date_start = null, $date_end = null, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $origin = '', $origin_id = 0, $rang = -1)
|
||||
public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $fk_prod_fourn_price = 0, $ref_supplier = '', $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $type = 0, $info_bits = 0, $notrigger = false, $date_start = null, $date_end = null, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $origin = '', $origin_id = 0, $rang = -1, $special_code=0)
|
||||
{
|
||||
global $langs, $mysoc, $conf;
|
||||
|
||||
@ -1957,7 +1959,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$this->line->total_localtax2 = $total_localtax2;
|
||||
$this->line->total_ttc = $total_ttc;
|
||||
$this->line->product_type = $type;
|
||||
$this->line->special_code = $this->special_code;
|
||||
$this->line->special_code = $special_code;
|
||||
$this->line->origin = $origin;
|
||||
$this->line->origin_id = $origin_id;
|
||||
$this->line->fk_unit = $fk_unit;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user