From 01ef9b64eebecc2660495a48a74bb7fd5b369a55 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Tue, 15 Feb 2022 10:34:10 +0100 Subject: [PATCH] fix parent line on create with no originid --- htdocs/commande/class/commande.class.php | 2 +- htdocs/compta/facture/class/facture.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 53bf6dd29f2..983e3ae8205 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -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; } } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 63a7b2f8e21..4caa61e1aad 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -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; } }