|
@@ -28,7 +28,7 @@ require '../main.inc.php';
|
|
|
require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php';
|
|
|
require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php';
|
|
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
|
|
-if (!empty($conf->accounting->enabled)) {
|
|
|
+if (isModEnabled('accounting')) {
|
|
|
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
|
|
|
}
|
|
|
|
|
@@ -448,7 +448,7 @@ print '</td>';
|
|
|
// Chq number
|
|
|
print '<td class="liste_titre right"><input name="search_chq_number" class="flat" type="text" size="8" value="'.$db->escape($search_chq_number).'"></td>';
|
|
|
|
|
|
-if (!empty($conf->banque->enabled)) {
|
|
|
+if (isModEnabled('banque')) {
|
|
|
// Bank transaction
|
|
|
print '<td class="liste_titre center">';
|
|
|
print '<input class="flat" type="text" size="3" name="search_fk_bank" value="'.$db->escape($search_fk_bank).'">';
|
|
@@ -489,7 +489,7 @@ print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "s.datep,s.rowid",
|
|
|
print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.rowid", "", $param, "", $sortfield, $sortorder);
|
|
|
print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "pst.code", "", $param, 'class="left"', $sortfield, $sortorder);
|
|
|
print_liste_field_titre("Numero", $_SERVER["PHP_SELF"], "s.num_payment", "", $param, '', $sortfield, $sortorder, '', 'ChequeOrTransferNumber');
|
|
|
-if (!empty($conf->banque->enabled)) {
|
|
|
+if (isModEnabled('banque')) {
|
|
|
print_liste_field_titre("BankTransactionLine", $_SERVER["PHP_SELF"], "s.fk_bank", "", $param, '', $sortfield, $sortorder);
|
|
|
print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
|
|
}
|
|
@@ -604,7 +604,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|
|
}
|
|
|
|
|
|
// Account
|
|
|
- if (!empty($conf->banque->enabled)) {
|
|
|
+ if (isModEnabled('banque')) {
|
|
|
// Bank transaction
|
|
|
print '<td>';
|
|
|
$accountlinestatic->id = $obj->fk_bank;
|
|
@@ -625,7 +625,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|
|
$accountstatic->currency_code = $langs->trans("Currency".$obj->currency_code);
|
|
|
$accountstatic->clos = $obj->clos;
|
|
|
|
|
|
- if (!empty($conf->accounting->enabled)) {
|
|
|
+ if (isModEnabled('accounting')) {
|
|
|
$accountstatic->account_number = $obj->account_number;
|
|
|
|
|
|
$accountingjournal = new AccountingJournal($db);
|