FIX : origin & origin id on supplier order line

This commit is contained in:
gauthier 2017-03-23 12:35:43 +01:00
parent ee8112dde7
commit a790ef9f7c
2 changed files with 9 additions and 3 deletions

View File

@ -1340,9 +1340,11 @@ class CommandeFournisseur extends CommonOrder
* @param array $array_options extrafields array
* @param string $fk_unit Code of the unit to use. Null to use the default one
* @param string $pu_ht_devise Amount in currency
* @param string $origin 'order', ...
* @param int $origin_id Id of origin object
* @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, $fourn_ref='', $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)
public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $fk_prod_fourn_price=0, $fourn_ref='', $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)
{
global $langs,$mysoc,$conf;
@ -1511,7 +1513,8 @@ class CommandeFournisseur extends CommonOrder
$this->line->total_ttc=$total_ttc;
$this->line->product_type=$type;
$this->line->special_code=$this->special_code;
$this->line->origin=$this->origin;
$this->line->origin=$origin;
$this->line->origin_id=$origin_id;
$this->line->fk_unit=$fk_unit;
$this->line->date_start=$date_start;

View File

@ -1068,7 +1068,10 @@ if (empty($reshook))
null,
null,
array(),
$lines[$i]->fk_unit
$lines[$i]->fk_unit,
0,
$element,
!empty($lines[$i]->id) ? $lines[$i]->id : $lines[$i]->rowid
);
}