diff --git a/htdocs/admin/facture_situation.php b/htdocs/admin/facture_situation.php index 223045db2e9..e3d2bf278a9 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); 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"); }); '; }