diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 0bb69c444ba..0aa0f93540c 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -34,11 +34,11 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { include_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; } @@ -333,7 +333,7 @@ $form = new Form($db); $formfile = new FormFile($db); $formsocialcontrib = new FormSocialContrib($db); $bankaccountstatic = new Account($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } @@ -407,7 +407,7 @@ if ($action == 'create') { print '
| ';
print $langs->trans('DefaultBankAccount');
@@ -668,7 +668,7 @@ if ($id > 0) {
print ' ';
$nbcols = 3;
- if (!empty($conf->banque->enabled)) {
+ if (isModEnabled('banque')) {
$nbcols++;
}
@@ -703,7 +703,7 @@ if ($id > 0) {
print ' '.$langs->trans("RefPayment").' | ';
print ''.$langs->trans("Date").' | ';
print ''.$langs->trans("Type").' | ';
- if (!empty($conf->banque->enabled)) {
+ if (isModEnabled('banque')) {
print ''.$langs->trans('BankAccount').' | ';
}
print ''.$langs->trans("Amount").' | ';
@@ -726,14 +726,14 @@ if ($id > 0) {
print ''.dol_print_date($db->jdate($objp->dp), 'day')." | \n";
$labeltype = $langs->trans("PaymentType".$objp->type_code) != ("PaymentType".$objp->type_code) ? $langs->trans("PaymentType".$objp->type_code) : $objp->paiement_type;
print "".$labeltype.' '.$objp->num_payment." | \n";
- if (!empty($conf->banque->enabled)) {
+ if (isModEnabled('banque')) {
$bankaccountstatic->id = $objp->baid;
$bankaccountstatic->ref = $objp->baref;
$bankaccountstatic->label = $objp->baref;
$bankaccountstatic->number = $objp->banumber;
$bankaccountstatic->currency_code = $objp->bacurrency_code;
- if (!empty($conf->accounting->enabled)) {
+ if (isModEnabled('accounting')) {
$bankaccountstatic->account_number = $objp->account_number;
$accountingjournal = new AccountingJournal($db);
|