From 03732fd1aa0cfe75564111883677099b0bb02fad Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 9 May 2016 15:31:44 +0200 Subject: [PATCH 1/2] Fix contract line creation was adding all proposal lines desc --- htdocs/contrat/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 3fe0530ec77..3c38cdf4421 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -320,7 +320,7 @@ if ($action == 'add' && $user->rights->contrat->creer) } if ($conf->global->PRODUIT_DESC_IN_FORM) - $desc .= ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):''; + $desc = ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):''; } else { $desc = dol_htmlentitiesbr($lines[$i]->desc); From 6278610d0aad44063c20b274bf07e0e4d936ea7f Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 9 May 2016 15:32:21 +0200 Subject: [PATCH 2/2] Fix contract line creation should take desc even if not displayed on screen --- htdocs/contrat/card.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 3c38cdf4421..c55defb5ce8 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -319,8 +319,7 @@ if ($action == 'add' && $user->rights->contrat->creer) $label = $lines[$i]->product_label; } - if ($conf->global->PRODUIT_DESC_IN_FORM) - $desc = ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):''; + $desc = ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):''; } else { $desc = dol_htmlentitiesbr($lines[$i]->desc);