From 141d2d2aa903b4323d8f5ab47e7cff446d96a6d6 Mon Sep 17 00:00:00 2001 From: noec764 <58433943+noec764@users.noreply.github.com> Date: Fri, 23 Feb 2024 17:07:38 +0100 Subject: [PATCH] FIX: Label must not be copied in desc (#28377) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: NoƩ Co-authored-by: Laurent Destailleur --- htdocs/comm/propal/card.php | 2 +- htdocs/compta/facture/card.php | 1 + htdocs/fourn/commande/card.php | 2 +- htdocs/supplier_proposal/card.php | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 02b2b91f36f..0b549ebf80f 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -561,7 +561,7 @@ if (empty($reshook)) { $num = count($lines); for ($i = 0; $i < $num; $i++) { $label = (!empty($lines[$i]->label) ? $lines[$i]->label : ''); - $desc = (!empty($lines[$i]->desc) ? $lines[$i]->desc : $lines[$i]->label); + $desc = (!empty($lines[$i]->desc) ? $lines[$i]->desc : ''); // Positive line $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0); diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index be692510ca6..641fd97428e 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1690,6 +1690,7 @@ if (empty($reshook)) { $label = (!empty($lines[$i]->label) ? $lines[$i]->label : ''); $desc = (!empty($lines[$i]->desc) ? $lines[$i]->desc : ''); + if ($object->situation_counter == 1) { $lines[$i]->situation_percent = 0; } diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 1134d10caaf..398eaaff9c0 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1315,7 +1315,7 @@ if (empty($reshook)) { } $label = (!empty($lines[$i]->label) ? $lines[$i]->label : ''); - $desc = (!empty($lines[$i]->desc) ? $lines[$i]->desc : $lines[$i]->product_desc); + $desc = (!empty($lines[$i]->desc) ? $lines[$i]->desc : ''); $product_type = (!empty($lines[$i]->product_type) ? $lines[$i]->product_type : 0); // Reset fk_parent_line for no child products and special product diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 1127a921131..f9e829cac63 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -383,7 +383,7 @@ if (empty($reshook)) { $num = count($lines); for ($i = 0; $i < $num; $i++) { $label = (!empty($lines[$i]->label) ? $lines[$i]->label : ''); - $desc = (!empty($lines[$i]->desc) ? $lines[$i]->desc : $lines[$i]->libelle); + $desc = (!empty($lines[$i]->desc) ? $lines[$i]->desc : ''); // Positive line $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0);