Merge pull request #10752 from atm-gauthier/7.0_fix_fourninvoice_specialcode
FIX : we need to keep originline special_code
This commit is contained in:
commit
2ae3d75df4
@ -1386,7 +1386,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
*
|
||||
* FIXME Add field ref (that should be named ref_supplier) and label into update. For example can be filled when product line created from order.
|
||||
*/
|
||||
public function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0, $rang=-1, $notrigger=false, $array_options=0, $fk_unit=null, $origin_id=0, $pu_ht_devise=0, $ref_supplier='')
|
||||
public function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0, $rang=-1, $notrigger=false, $array_options=0, $fk_unit=null, $origin_id=0, $pu_ht_devise=0, $ref_supplier='', $special_code='')
|
||||
{
|
||||
dol_syslog(get_class($this)."::addline $desc,$pu,$qty,$txtva,$fk_product,$remise_percent,$date_start,$date_end,$ventil,$info_bits,$price_base_type,$type,$fk_unit", LOG_DEBUG);
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
@ -1481,7 +1481,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
$this->line->total_localtax1=$total_localtax1;
|
||||
$this->line->total_localtax2=$total_localtax2;
|
||||
$this->line->total_ttc= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ttc):$total_ttc);
|
||||
$this->line->special_code=$this->special_code;
|
||||
$this->line->special_code=((string) $special_code != '' ? $special_code : $this->special_code);
|
||||
$this->line->fk_parent_line=$this->fk_parent_line;
|
||||
$this->line->origin=$this->origin;
|
||||
$this->line->origin_id=$origin_id;
|
||||
|
||||
@ -716,7 +716,10 @@ if (empty($reshook))
|
||||
0,
|
||||
$lines[$i]->array_options,
|
||||
$lines[$i]->fk_unit,
|
||||
$lines[$i]->id
|
||||
$lines[$i]->id,
|
||||
0,
|
||||
'',
|
||||
$lines[$i]->special_code
|
||||
);
|
||||
|
||||
if ($result < 0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user