From 9a9b7ef49196b0a2fd0cf01200fd1b159e4e2069 Mon Sep 17 00:00:00 2001 From: atm-jonathan <146709163+atm-jonathan@users.noreply.github.com> Date: Thu, 26 Mar 2026 02:18:21 +0100 Subject: [PATCH] Fix line ordering during situation or replacement invoice creation (#37613) --- 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 083f597af4f..3f6ca093a7f 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1166,6 +1166,9 @@ class Facture extends CommonInvoice // Source invoice load $facture = new Facture($this->db); + // Avoid updating the row ranks + $facture->context['createfromclone'] = 1; + // Retrieve all extrafield // fetch optionals attributes and labels $this->fetch_optionals();