浏览代码

Use isModEnabled

Alexandre SPANGARO 2 年之前
父节点
当前提交
ccea57423a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      htdocs/salaries/class/salary.class.php

+ 2 - 2
htdocs/salaries/class/salary.class.php

@@ -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;