Merge pull request #20962 from Hystepik/develop#7

Fix : facture fourn type not init in radio
This commit is contained in:
Laurent Destailleur 2022-05-21 20:07:42 +02:00 committed by GitHub
commit 3205d88cad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -720,6 +720,11 @@ if (empty($reshook)) {
//exit;
// Replacement invoice
if (GETPOST('type', 'int') === '') {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors');
$error++;
}
if (GETPOST('type') == FactureFournisseur::TYPE_REPLACEMENT) {
if (empty($dateinvoice)) {
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('DateInvoice')), null, 'errors');
@ -2136,7 +2141,7 @@ if ($action == 'create') {
// Standard invoice
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp = '<input type="radio" id="radio_standard" name="type" value="0"'.(GETPOST('type') == 0 ? ' checked' : '').'> ';
$tmp = '<input type="radio" id="radio_standard" name="type" value="0"'.(GETPOST('type', 'int')? '' : 'checked').'> ';
$desc = $form->textwithpicto($tmp.$langs->trans("InvoiceStandardAsk"), $langs->transnoentities("InvoiceStandardDesc"), 1, 'help', '', 0, 3);
print $desc;
print '</div></div>';