FIX : origin & originid on supplierproposal

This commit is contained in:
gauthier 2017-05-30 15:35:51 +02:00
parent 11f58c7bda
commit c66695bd56

View File

@ -356,11 +356,13 @@ class SupplierProposal extends CommonObject
* @param array $array_option extrafields array
* @param string $ref_fourn Supplier price reference
* @param int $fk_unit Id of the unit to use.
* @param string $origin 'order', 'supplier_proposal', ...
* @param int $origin_id Id of origin line
* @return int >0 if OK, <0 if KO
*
* @see add_product
*/
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $pu_ttc=0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$array_option=0, $ref_fourn='', $fk_unit='')
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $pu_ttc=0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$array_option=0, $ref_fourn='', $fk_unit='', $origin, $origin_id)
{
global $mysoc;
@ -462,7 +464,8 @@ class SupplierProposal extends CommonObject
$this->line->special_code=$special_code;
$this->line->fk_parent_line=$fk_parent_line;
$this->line->fk_unit=$fk_unit;
$this->line->origin=$origin;
$this->line->origin_id=$origin_id;
$this->line->ref_fourn = $this->db->escape($ref_fourn);
// infos marge
@ -880,7 +883,10 @@ class SupplierProposal extends CommonObject
$this->lines[$i]->pa_ht,
$this->lines[$i]->label,
$this->lines[$i]->array_options,
$this->lines[$i]->ref_fourn
$this->lines[$i]->ref_fourn,
$this->lines[$i]->fk_unit,
'supplier_proposal',
$this->lines[$i]->rowid
);
if ($result < 0)