diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 005c55c260a..f460b60f2d2 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -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;