Merge pull request #6912 from atm-gauthier/5.0_fix_originid_on_supplierproposal

FIX : origin & originid on supplierproposal
This commit is contained in:
Laurent Destailleur 2017-05-31 19:01:29 +02:00 committed by GitHub
commit d7d8e51ab1

View File

@ -356,11 +356,13 @@ class SupplierProposal extends CommonObject
* @param array $array_option extrafields array * @param array $array_option extrafields array
* @param string $ref_fourn Supplier price reference * @param string $ref_fourn Supplier price reference
* @param int $fk_unit Id of the unit to use. * @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 * @return int >0 if OK, <0 if KO
* *
* @see add_product * @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=0)
{ {
global $mysoc; global $mysoc;
@ -462,7 +464,8 @@ class SupplierProposal extends CommonObject
$this->line->special_code=$special_code; $this->line->special_code=$special_code;
$this->line->fk_parent_line=$fk_parent_line; $this->line->fk_parent_line=$fk_parent_line;
$this->line->fk_unit=$fk_unit; $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); $this->line->ref_fourn = $this->db->escape($ref_fourn);
// infos marge // infos marge
@ -880,7 +883,10 @@ class SupplierProposal extends CommonObject
$this->lines[$i]->pa_ht, $this->lines[$i]->pa_ht,
$this->lines[$i]->label, $this->lines[$i]->label,
$this->lines[$i]->array_options, $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) if ($result < 0)