From 1d875ef0251a96c78b1be81bf984c21a7f5a9f2e Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 29 Aug 2022 11:21:34 +0200 Subject: [PATCH] Use isModEnabled --- htdocs/compta/bank/class/paymentvarious.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 48ea553abf0..53505a888eb 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -423,11 +423,11 @@ class PaymentVarious extends CommonObject $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount")); return -5; } - if (!empty($conf->banque->enabled) && (empty($this->fk_account) || $this->fk_account <= 0)) { + if (isModEnabled('banque') && (empty($this->fk_account) || $this->fk_account <= 0)) { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("BankAccount")); return -6; } - if (!empty($conf->banque->enabled) && (empty($this->type_payment) || $this->type_payment <= 0)) { + if (isModEnabled('banque') && (empty($this->type_payment) || $this->type_payment <= 0)) { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")); return -7; } @@ -481,7 +481,7 @@ class PaymentVarious extends CommonObject $this->ref = $this->id; if ($this->id > 0) { - if (!empty($conf->banque->enabled) && !empty($this->amount)) { + if (isModEnabled('banque') && !empty($this->amount)) { // Insert into llx_bank require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';