Use isModEnabled

This commit is contained in:
Alexandre SPANGARO 2022-08-29 10:52:57 +02:00
parent 6fe80c3031
commit ccea57423a

View File

@ -372,12 +372,12 @@ class Salary extends CommonObject
$this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount"));
return -5;
}
/* if (!empty($conf->banque->enabled) && (empty($this->accountid) || $this->accountid <= 0))
/* if (isModEnabled('banque') && (empty($this->accountid) || $this->accountid <= 0))
{
$this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Account"));
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;