diff --git a/htdocs/adherents/fiche_subscription.php b/htdocs/adherents/fiche_subscription.php
index 9cef42a005e..8bb13a5f4f7 100644
--- a/htdocs/adherents/fiche_subscription.php
+++ b/htdocs/adherents/fiche_subscription.php
@@ -225,20 +225,24 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
print '
| '.$langs->trans("Label").' | ';
print ' |
';
- if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE)
+ // Bank line
+ if ($conf->banque->enabled)
{
- print '| '.$langs->trans("BankTransactionLine").' | ';
- if ($subscription->fk_bank)
- {
- $bankline=new AccountLine($db);
- $result=$bankline->fetch($subscription->fk_bank);
- print $bankline->getNomUrl(1,0,'showall');
- }
- else
- {
- print $langs->trans("NoneF");
- }
- print ' |
';
+ if ($conf->global->ADHERENT_BANK_USE || $subscription->fk_bank)
+ {
+ print '| '.$langs->trans("BankTransactionLine").' | ';
+ if ($subscription->fk_bank)
+ {
+ $bankline=new AccountLine($db);
+ $result=$bankline->fetch($subscription->fk_bank);
+ print $bankline->getNomUrl(1,0,'showall');
+ }
+ else
+ {
+ print $langs->trans("NoneF");
+ }
+ print ' |
';
+ }
}
print '| ';
@@ -328,25 +332,23 @@ if ($rowid && $action != 'edit')
// Amount
print ' |
| '.$langs->trans("Label").' | '.$subscription->note.' |
';
- // Bank account
+ // Bank line
if ($conf->banque->enabled)
{
- if ($subscription->fk_bank)
+ if ($conf->global->ADHERENT_BANK_USE || $subscription->fk_bank)
{
- $bankline=new AccountLine($db);
- $result=$bankline->fetch($subscription->fk_bank);
-
- $bank=new Account($db);
- $result=$bank->fetch($bankline->fk_account);
-
- print '';
- print '| '.$langs->trans('BankTransactionLine').' | ';
- print '';
- $bankline=new AccountLine($db);
- $result=$bankline->fetch($subscription->fk_bank);
- print $bankline->getNomUrl(1,0,'showall');
- print ' | ';
- print '
';
+ print '| '.$langs->trans("BankTransactionLine").' | ';
+ if ($subscription->fk_bank)
+ {
+ $bankline=new AccountLine($db);
+ $result=$bankline->fetch($subscription->fk_bank);
+ print $bankline->getNomUrl(1,0,'showall');
+ }
+ else
+ {
+ print $langs->trans("NoneF");
+ }
+ print ' |
';
}
}