diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index fe5654a0d06..22b9dc56fae 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -138,6 +138,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'); @@ -151,7 +152,6 @@ if (empty($reshook)) { } } - $companybankaccount->fetch($id); if (!$error) { $companybankaccount->socid = $object->id;