FIX: when form not completely filled, doesn't keep the checked state of checkbox

This commit is contained in:
Florian Mortgat 2021-02-16 16:05:19 +01:00
parent 363fe1f52f
commit 97052b035e

View File

@ -43,7 +43,7 @@ $id = GETPOST("id", 'int');
$action = GETPOST("action", "alpha");
$confirm = GETPOST('confirm');
$refund = GETPOST("refund", "int");
if (GETPOSTISSET('auto_create_paiement')) {
if (GETPOSTISSET('auto_create_paiement') || $action === 'add') {
$auto_create_payment = GETPOST("auto_create_paiement", "int");
} else {
$auto_create_payment = empty($conf->global->CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT);