From d9074e70e1fa6387f23b6f619b90931cbefd7b71 Mon Sep 17 00:00:00 2001 From: John Botella Date: Wed, 21 Oct 2020 13:27:37 +0200 Subject: [PATCH 1/3] FIX admin conf selected --- htdocs/admin/facture_situation.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/htdocs/admin/facture_situation.php b/htdocs/admin/facture_situation.php index 223045db2e9..5aeb09bb789 100644 --- a/htdocs/admin/facture_situation.php +++ b/htdocs/admin/facture_situation.php @@ -104,12 +104,7 @@ $arrayAvailableType = array( Facture::TYPE_SITUATION => $langs->trans("InvoiceSituation"), Facture::TYPE_STANDARD.'+'.Facture::TYPE_SITUATION => $langs->trans("InvoiceSituation").' + '.$langs->trans("InvoiceStandard"), ); -$selected = array(); -$implodeglue = '+'; -if (!empty($conf->global->{$confkey}) && !is_array($conf->global->{$confkey})) { - $selected = explode('+', $conf->global->{$confkey}); -} - +$selected = $conf->global->{$confkey}; $curentInput = (empty($inputCount) ? 1 : ($inputCount + 1)); $formSelectInvoiceType = $form->selectarray('value'.$curentInput, $arrayAvailableType, $selected, 1); _printInputFormPart($confkey, $langs->trans('AllowedInvoiceForRetainedWarranty'), '', array(), $formSelectInvoiceType); From 70790009a95b91a93bb6a1203de42df9d4151880 Mon Sep 17 00:00:00 2001 From: John Botella Date: Wed, 21 Oct 2020 14:49:51 +0200 Subject: [PATCH 2/3] Fix display warranty fields on page load --- htdocs/compta/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 2038fea438c..59cfb5b601a 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3497,7 +3497,7 @@ if ($action == 'create') } }); - $("[name=\'type\']").trigger("change"); + $("[name=\'type\']:checked").trigger("change"); }); '; } From 7605cb18718086ea270000fa5724692f2e554ff9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 21 Oct 2020 19:54:28 +0200 Subject: [PATCH 3/3] Update facture_situation.php --- htdocs/admin/facture_situation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/facture_situation.php b/htdocs/admin/facture_situation.php index 5aeb09bb789..e3d2bf278a9 100644 --- a/htdocs/admin/facture_situation.php +++ b/htdocs/admin/facture_situation.php @@ -104,7 +104,7 @@ $arrayAvailableType = array( Facture::TYPE_SITUATION => $langs->trans("InvoiceSituation"), Facture::TYPE_STANDARD.'+'.Facture::TYPE_SITUATION => $langs->trans("InvoiceSituation").' + '.$langs->trans("InvoiceStandard"), ); -$selected = $conf->global->{$confkey}; +$selected = $conf->global->$confkey; $curentInput = (empty($inputCount) ? 1 : ($inputCount + 1)); $formSelectInvoiceType = $form->selectarray('value'.$curentInput, $arrayAvailableType, $selected, 1); _printInputFormPart($confkey, $langs->trans('AllowedInvoiceForRetainedWarranty'), '', array(), $formSelectInvoiceType);