diff --git a/htdocs/societe/rib.php b/htdocs/societe/rib.php index 8218838ab67..8b8f5c50292 100644 --- a/htdocs/societe/rib.php +++ b/htdocs/societe/rib.php @@ -95,7 +95,8 @@ $head=societe_prepare_head2($soc); dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"),0,'company'); $account = new CompanyBankAccount($db); -$account->socid=$soc->id; +$account->fetch(0,$soc->id); +if (empty($account->socid)) $account->socid=$soc->id;