FIX #22386 IBAN not mandatory for International Export Countries

This commit is contained in:
Jean 2022-09-24 12:43:24 +02:00 committed by Laurent Destailleur
parent c52327297a
commit 452d114efb

View File

@ -129,6 +129,7 @@ if (empty($reshook)) {
$action = 'edit';
$error++;
}
$companybankaccount->fetch($id);
if ($companybankaccount->needIBAN() == 1) {
if (!GETPOST('iban')) {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("IBAN")), null, 'errors');
@ -142,7 +143,6 @@ if (empty($reshook)) {
}
}
$companybankaccount->fetch($id);
if (!$error) {
$companybankaccount->socid = $object->id;