diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index fd9111a6a6f..1eebb5300d2 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -54,7 +54,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!empty($conf->commande->enabled)) { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; } -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } @@ -63,7 +63,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; if (!empty($conf->variants->enabled)) { require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php'; } -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; } @@ -2874,7 +2874,7 @@ $formmargin = new FormMargin($db); $soc = new Societe($db); $paymentstatic = new Paiement($db); $bankaccountstatic = new Account($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } @@ -3650,7 +3650,7 @@ if ($action == 'create') { print ''; // Bank Account - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { print '
| '; print $langs->trans('BankAccount'); @@ -4803,10 +4803,10 @@ if ($action == 'create') { $nbrows = 8; $nbcols = 3; - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $nbrows++; } - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { $nbrows++; $nbcols++; } @@ -4835,7 +4835,7 @@ if ($action == 'create') { print ' | '.$langs->trans('ListOfSituationInvoices').' | '; print ''; print ' | '.$langs->trans('Situation').' | '; - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { print ''; } print ' | '.$langs->trans('AmountHT').' | '; @@ -4859,7 +4859,7 @@ if ($action == 'create') { print ''.$prev_invoice->getNomUrl(1).' | '; print ''; print ' | '.(($prev_invoice->type == Facture::TYPE_CREDIT_NOTE) ? $langs->trans('situationInvoiceShortcode_AS') : $langs->trans('situationInvoiceShortcode_S')).$prev_invoice->situation_counter.' | '; - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { print ''; } print ' | '.price($prev_invoice->total_ht).' | '; @@ -4879,7 +4879,7 @@ if ($action == 'create') { print ''.$object->getNomUrl(1).' | '; print ''; print ' | '.(($object->type == Facture::TYPE_CREDIT_NOTE) ? $langs->trans('situationInvoiceShortcode_AS') : $langs->trans('situationInvoiceShortcode_S')).$object->situation_counter.' | '; - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { print ''; } print ' | '.price($object->total_ht).' | '; @@ -4902,7 +4902,7 @@ if ($action == 'create') { $i++; } print ''; - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { print ''; } print ' | '.price($total_global_ht).' | '; @@ -4934,7 +4934,7 @@ if ($action == 'create') { print ''.$next_invoice->getNomUrl(1).' | '; print ''; print ' | '.(($next_invoice->type == Facture::TYPE_CREDIT_NOTE) ? $langs->trans('situationInvoiceShortcode_AS') : $langs->trans('situationInvoiceShortcode_S')).$next_invoice->situation_counter.' | '; - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { print ''; } print ' | '.price($next_invoice->total_ht).' | '; @@ -4948,7 +4948,7 @@ if ($action == 'create') { print '
| '; - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { print ' | '; } print ' | '.price($total_global_ht).' | '; @@ -4975,7 +4975,7 @@ if ($action == 'create') { print ''.($object->type == Facture::TYPE_CREDIT_NOTE ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).' | '; print ''.$langs->trans('Date').' | '; print ''.$langs->trans('Type').' | '; - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { print ''.$langs->trans('BankAccount').' | '; } print ''.$langs->trans('Amount').' | '; @@ -5024,14 +5024,14 @@ if ($action == 'create') { print ''; $label = ($langs->trans("PaymentType".$objp->payment_code) != ("PaymentType".$objp->payment_code)) ? $langs->trans("PaymentType".$objp->payment_code) : $objp->payment_label; print ''.$label.' '.$objp->num_payment.' | '; - 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);||||||||||||||