From 9c54f8831fcfbf9696dd8493f3a7dc9e52fc02c0 Mon Sep 17 00:00:00 2001 From: "Sekan, Tobias" Date: Fri, 28 Aug 2020 13:08:04 +0200 Subject: [PATCH] Show bank only when active (on new) --- htdocs/compta/facture/card.php | 15 +++++++++------ htdocs/fourn/facture/card.php | 9 ++++++--- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 17f6898a1db..460e40a1de4 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3397,13 +3397,16 @@ if ($action == 'create') print ''; // Bank Account - if (GETPOSTISSET('fk_account')) { - $fk_account = GETPOST('fk_account'); - } + if (!empty($conf->banque->enabled)) + { + if (GETPOSTISSET('fk_account')) { + $fk_account = GETPOST('fk_account'); + } - print ''.$langs->trans('BankAccount').''; - $form->select_comptes($fk_account, 'fk_account', 0, '', 1); - print ''; + print ''.$langs->trans('BankAccount').''; + $form->select_comptes($fk_account, 'fk_account', 0, '', 1); + print ''; + } // Project if (!empty($conf->projet->enabled)) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index fa0ab11955a..dcf6cc0bd3a 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2013,9 +2013,12 @@ if ($action == 'create') print ''; // Bank Account - print ''.$langs->trans('BankAccount').''; - $form->select_comptes((GETPOSTISSET('fk_account') ?GETPOST('fk_account', 'alpha') : $fk_account), 'fk_account', 0, '', 1); - print ''; + if (!empty($conf->banque->enabled)) + { + print ''.$langs->trans('BankAccount').''; + $form->select_comptes((GETPOSTISSET('fk_account') ?GETPOST('fk_account', 'alpha') : $fk_account), 'fk_account', 0, '', 1); + print ''; + } // Multicurrency if (!empty($conf->multicurrency->enabled))