From 01bcd93580bd7fed89d3a3d6899021c34c484bda Mon Sep 17 00:00:00 2001 From: Guenter Lukas Date: Sun, 2 Apr 2023 12:01:48 +0200 Subject: [PATCH 1/7] FIX: #24414 --- htdocs/core/class/extrafields.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 6644548d87c..a878e39674b 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1083,6 +1083,11 @@ class ExtraFields if ((string) $okey == '') { continue; } + + if (($pipepos = strpos ($val, '|')) > 0) { + // Select-Field depending on other field, remove extra data from value + $val = substr ($val, 0, $pipepos); + } if ($langfile && $val) { $options[$okey] = $langs->trans($val); From 3c74a3272cfc2c72104835b7678b8c686e3de06a Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 2 Apr 2023 10:07:36 +0000 Subject: [PATCH 2/7] Fixing style errors. --- htdocs/core/class/extrafields.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index a878e39674b..e2e24c15a24 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1083,10 +1083,10 @@ class ExtraFields if ((string) $okey == '') { continue; } - - if (($pipepos = strpos ($val, '|')) > 0) { + + if (($pipepos = strpos($val, '|')) > 0) { // Select-Field depending on other field, remove extra data from value - $val = substr ($val, 0, $pipepos); + $val = substr($val, 0, $pipepos); } if ($langfile && $val) { From 0173688d0577ca9305d13fc36347528ec08698a7 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 3 Apr 2023 15:49:38 +0200 Subject: [PATCH 3/7] FIX Propagate extrafields from supplier order to reception --- htdocs/reception/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 3ee755bef37..3c2c0ba53ba 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -871,7 +871,7 @@ if ($action == 'create') { if ($objectsrc->fetch_optionals() > 0) { $recept->array_options = array_merge($recept->array_options, $objectsrc->array_options); } - print $object->showOptionals($extrafields, 'create', $parameters); + print $recept->showOptionals($extrafields, 'create', $parameters); } // Incoterms From 144d061db3612c04a7b66299ad22bfdd1462f09a Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Tue, 4 Apr 2023 11:01:03 +0200 Subject: [PATCH 4/7] FIX supplier link on bank transfer line --- htdocs/compta/prelevement/line.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/line.php b/htdocs/compta/prelevement/line.php index 6eb10ce6a1a..a7690ca51a2 100644 --- a/htdocs/compta/prelevement/line.php +++ b/htdocs/compta/prelevement/line.php @@ -315,7 +315,11 @@ if ($id) { print ''.$obj->ref."\n"; } - print ''; + if ($type == 'bank-transfer') { + print ''; + } else { + print ''; + } print img_object($langs->trans("ShowCompany"), "company").' '.$obj->name."\n"; print ''.price($obj->total_ttc)."\n"; From 66f1696a9b16725765a7b401a907c16aae8377b6 Mon Sep 17 00:00:00 2001 From: Quentin VIAL-GOUTEYRON Date: Tue, 4 Apr 2023 11:05:50 +0200 Subject: [PATCH 5/7] FIX filter missing id --- htdocs/contact/consumption.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php index da00374cc2a..017cd2d64d1 100644 --- a/htdocs/contact/consumption.php +++ b/htdocs/contact/consumption.php @@ -339,7 +339,7 @@ if ($sql_select) $num = $db->num_rows($resql); - $param = "&socid=".urlencode($socid)."&type_element=".urlencode($type_element); + $param = "&socid=".urlencode($socid)."&type_element=".urlencode($type_element)."&id=".urlencode($id); if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); if ($sprod_fulldescr) $param .= "&sprod_fulldescr=".urlencode($sprod_fulldescr); From 9f8b67a6ec5ba35d642a1a02de920c68f40b8f46 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Tue, 4 Apr 2023 11:33:23 +0200 Subject: [PATCH 6/7] FIX supplier invoice status on bank transfer line --- htdocs/compta/prelevement/line.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/line.php b/htdocs/compta/prelevement/line.php index 6eb10ce6a1a..d094a61e0b8 100644 --- a/htdocs/compta/prelevement/line.php +++ b/htdocs/compta/prelevement/line.php @@ -116,7 +116,13 @@ if ($action == 'confirm_rejet') { * View */ -$invoicestatic = new Facture($db); +if ($type == 'bank-transfer') { + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; + $invoicestatic = new FactureFournisseur($db); +} else { + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; + $invoicestatic = new Facture($db); +} $title = $langs->trans("WithdrawalsLine"); if ($type == 'bank-transfer') { From 36ffcbc5da75d3451c78f4682bda4e767337294e Mon Sep 17 00:00:00 2001 From: atm-lena Date: Tue, 4 Apr 2023 12:26:59 +0200 Subject: [PATCH 7/7] FIX Search List Select Extrafields with condition --- htdocs/core/class/extrafields.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 6644548d87c..6f346179aa8 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1084,6 +1084,9 @@ class ExtraFields continue; } + $valarray = explode('|', $val); + $val = $valarray[0]; + if ($langfile && $val) { $options[$okey] = $langs->trans($val); } else {