fix parent line on create with no originid

This commit is contained in:
Christophe Battarel 2022-02-15 10:34:10 +01:00
parent 6c6c854eae
commit 01ef9b64ee
2 changed files with 2 additions and 2 deletions

View File

@ -1054,7 +1054,7 @@ class Commande extends CommonOrder
return -1;
}
// Defined the new fk_parent_line
if ($result > 0 && $line->product_type == 9) {
if ($result > 0) {
$fk_parent_line = $result;
}
}

View File

@ -790,7 +790,7 @@ class Facture extends CommonInvoice
$result = $newinvoiceline->insert();
// Defined the new fk_parent_line
if ($result > 0 && $newinvoiceline->product_type == 9) {
if ($result > 0) {
$fk_parent_line = $result;
}
}