From 6c6c854eae8553c7abb416dfb53caeb7f1d0ff70 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Tue, 15 Feb 2022 10:23:43 +0100 Subject: [PATCH] fix parent line on create with origin --- htdocs/commande/card.php | 2 +- htdocs/compta/facture/card.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index e00ff6a1763..640b990a3cb 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -401,7 +401,7 @@ if (empty($reshook)) } // Defined the new fk_parent_line - if ($result > 0 && $lines[$i]->product_type == 9) { + if ($result > 0) { $fk_parent_line = $result; } } diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index d3e5a0062b0..a219da84bd4 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1220,7 +1220,7 @@ if (empty($reshook)) $object->lines[] = $line; // insert new line in current object // Defined the new fk_parent_line - if ($result > 0 && $line->product_type == 9) { + if ($result > 0) { $fk_parent_line = $result; } } @@ -1666,7 +1666,7 @@ if (empty($reshook)) } // Defined the new fk_parent_line - if ($result > 0 && $lines[$i]->product_type == 9) { + if ($result > 0) { $fk_parent_line = $result; } }