From 7aa371815ad42203f1a22cfdf2e88e15e095dcdc Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 29 Aug 2022 11:25:07 +0200 Subject: [PATCH] Use isModEnabled --- htdocs/compta/paiement.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index aea9f917dab..e6a9fe713cf 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -170,7 +170,7 @@ if (empty($reshook)) { $error++; } - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { // If bank module is on, account is required to enter a payment if (GETPOST('accountid') <= 0) { setEventMessages($langs->transnoentities('ErrorFieldRequired', $langs->transnoentities('AccountToCredit')), null, 'errors'); @@ -244,7 +244,7 @@ if (empty($reshook)) { $multicurrency_code[$key] = $tmpinvoice->multicurrency_code; } - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { // If the bank module is active, an account is required to input a payment if (GETPOST('accountid', 'int') <= 0) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('AccountToCredit')), null, 'errors'); @@ -492,7 +492,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie // Bank account print ''; - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { if ($facture->type != 2) { print ''.$langs->trans('AccountToCredit').''; }