Merge pull request #14172 from atm-quentin/FIX_origin_element_is_always_order
FIX wrong origin
This commit is contained in:
commit
77b0800633
@ -1014,7 +1014,7 @@ class Commande extends CommonOrder
|
|||||||
// Complete vat rate with code
|
// Complete vat rate with code
|
||||||
$vatrate = $line->tva_tx;
|
$vatrate = $line->tva_tx;
|
||||||
if ($line->vat_src_code && !preg_match('/\(.*\)/', $vatrate)) $vatrate .= ' ('.$line->vat_src_code.')';
|
if ($line->vat_src_code && !preg_match('/\(.*\)/', $vatrate)) $vatrate .= ' ('.$line->vat_src_code.')';
|
||||||
|
$origin = (!empty($line->origin) ? $line->origin : $this->element);
|
||||||
$result = $this->addline(
|
$result = $this->addline(
|
||||||
$line->desc,
|
$line->desc,
|
||||||
$line->subprice,
|
$line->subprice,
|
||||||
@ -1039,7 +1039,7 @@ class Commande extends CommonOrder
|
|||||||
$line->label,
|
$line->label,
|
||||||
$line->array_options,
|
$line->array_options,
|
||||||
$line->fk_unit,
|
$line->fk_unit,
|
||||||
$this->element,
|
$origin,
|
||||||
$line->id
|
$line->id
|
||||||
);
|
);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user