Merge pull request #7831 from ptibogxiv/patch-1

FIX createfromorder
This commit is contained in:
Laurent Destailleur 2017-11-22 11:17:00 +01:00 committed by GitHub
commit dc5127e619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -939,7 +939,8 @@ class Facture extends CommonInvoice
{
$this->db->commit();
return $this->id;
}
}
else
{
$this->db->rollback();
@ -989,6 +990,8 @@ class Facture extends CommonInvoice
$line->special_code = $object->lines[$i]->special_code;
$line->fk_parent_line = $object->lines[$i]->fk_parent_line;
$line->fk_unit = $object->lines[$i]->fk_unit;
$line->date_start = $object->lines[$i]->date_start;
$line->date_end = $object->lines[$i]->date_end;
$line->fk_fournprice = $object->lines[$i]->fk_fournprice;
$marginInfos = getMarginInfos($object->lines[$i]->subprice, $object->lines[$i]->remise_percent, $object->lines[$i]->tva_tx, $object->lines[$i]->localtax1_tx, $object->lines[$i]->localtax2_tx, $object->lines[$i]->fk_fournprice, $object->lines[$i]->pa_ht);