This commit is contained in:
Laurent Destailleur 2021-05-11 21:31:43 +02:00
parent 91312f0411
commit b5a43c8d1d
2 changed files with 5 additions and 8 deletions

View File

@ -2955,12 +2955,12 @@ if ($action == 'create') {
// when payment condition is empty (means not override by payment condition form a other object, like third-party), try to use default value
if (empty($cond_reglement_id)) {
$cond_reglement_id = GETPOST("cond_reglement_id");
$cond_reglement_id = GETPOST("cond_reglement_id", 'int');
}
// when payment mode is empty (means not override by payment mode form a other object, like third-party), try to use default value
if (empty($mode_reglement_id)) {
$mode_reglement_id = GETPOST("mode_reglement_id");
$mode_reglement_id = GETPOST("mode_reglement_id", 'int');
}
if (!empty($soc->id)) {
@ -3563,12 +3563,9 @@ if ($action == 'create') {
// Bank Account
if (!empty($conf->banque->enabled)) {
if (GETPOSTISSET('fk_account')) {
$fk_account = GETPOST('fk_account', 'int');
}
print '<tr><td>'.$langs->trans('BankAccount').'</td><td colspan="2">';
print img_picto('', 'bank_account', 'class="paddingrightonly"').$form->select_comptes($fk_account, 'fk_account', 0, '', 1, '', 0, '', 1);
$fk_account = GETPOST('fk_account', 'int');
print img_picto('', 'bank_account', 'class="paddingrightonly"').$form->select_comptes(($fk_account < 0 ? '' : $fk_account), 'fk_account', 0, '', 1, '', 0, '', 1);
print '</td></tr>';
}

View File

@ -294,7 +294,7 @@ function dol_shutdown()
}
/**
* Return true if we are in a context of submitting the parameter $paramname
* Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
*
* @param string $paramname Name or parameter to test
* @return boolean True if we have just submit a POST or GET request with the parameter provided (even if param is empty)