From ebada46a07c48705ffcc662a70758005561e2281 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Tue, 15 Feb 2022 12:14:48 +0100 Subject: [PATCH] fix context for createfromclone --- htdocs/compta/facture/class/facture.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 4caa61e1aad..55471afeccf 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -755,6 +755,9 @@ class Facture extends CommonInvoice foreach ($this->lines as $i => $val) { $newinvoiceline = $this->lines[$i]; + + $newinvoiceline->context = $this->context; + $newinvoiceline->fk_facture = $this->id; $newinvoiceline->origin = $this->lines[$i]->element;