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 ''.$langs->trans('BankAccount').''; print img_picto('', 'bank_account', 'class="pictofixedwidth"'); print $form->select_comptes(($fk_account < 0 ? '' : $fk_account), 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1); @@ -3658,7 +3658,7 @@ if ($action == 'create') { } // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load('projects'); print ''.$langs->trans('Project').''; print img_picto('', 'project').$formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx'); @@ -4284,7 +4284,7 @@ if ($action == 'create') { $morehtmlref .= ' ('.$langs->trans("OtherBills").')'; } // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'.$langs->trans('Project').' '; if ($usercancreate) { @@ -4550,7 +4550,7 @@ if ($action == 'create') { } // Bank Account - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { print ''; print ''; print ''; print ''; - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { print ''; } print ''; @@ -4859,7 +4859,7 @@ if ($action == 'create') { print ''; print ''; print ''; - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { print ''; } print ''; @@ -4879,7 +4879,7 @@ if ($action == 'create') { print ''; print ''; print ''; - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { print ''; } print ''; @@ -4902,7 +4902,7 @@ if ($action == 'create') { $i++; } print ''; - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { print ''; } print ''; @@ -4934,7 +4934,7 @@ if ($action == 'create') { print ''; print ''; print ''; - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { print ''; } print ''; @@ -4948,7 +4948,7 @@ if ($action == 'create') { print ''; print ''; - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { print ''; } print ''; @@ -4975,7 +4975,7 @@ if ($action == 'create') { print ''; print ''; print ''; - if (!empty($conf->banque->enabled)) { + if (isModEnabled('banque')) { print ''; } print ''; @@ -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 ''; - 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);
'; 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').''.$langs->trans('Situation').''.$langs->trans('AmountHT').''.$prev_invoice->getNomUrl(1).''.(($prev_invoice->type == Facture::TYPE_CREDIT_NOTE) ? $langs->trans('situationInvoiceShortcode_AS') : $langs->trans('situationInvoiceShortcode_S')).$prev_invoice->situation_counter.''.price($prev_invoice->total_ht).''.$object->getNomUrl(1).''.(($object->type == Facture::TYPE_CREDIT_NOTE) ? $langs->trans('situationInvoiceShortcode_AS') : $langs->trans('situationInvoiceShortcode_S')).$object->situation_counter.''.price($object->total_ht).''.price($total_global_ht).''.$next_invoice->getNomUrl(1).''.(($next_invoice->type == Facture::TYPE_CREDIT_NOTE) ? $langs->trans('situationInvoiceShortcode_AS') : $langs->trans('situationInvoiceShortcode_S')).$next_invoice->situation_counter.''.price($next_invoice->total_ht).'
'.price($total_global_ht).''.($object->type == Facture::TYPE_CREDIT_NOTE ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).''.$langs->trans('Date').''.$langs->trans('Type').''.$langs->trans('BankAccount').''.$langs->trans('Amount').''.$label.' '.$objp->num_payment.'