Use isModEnabled
This commit is contained in:
parent
07e91a061a
commit
cb7728936a
@ -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 '<td>'.img_picto('', 'user', 'class="pictofixedwidth"').$form->select_dolusers($fk_user, 'userid', 1).'</td></tr>';
|
||||
|
||||
// Project
|
||||
if (!empty($conf->project->enabled)) {
|
||||
if (isModEnabled('project')) {
|
||||
$formproject = new FormProjets($db);
|
||||
|
||||
// Associated project
|
||||
@ -426,7 +426,7 @@ if ($action == 'create') {
|
||||
print '</td></tr>';
|
||||
|
||||
// Bank Account
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
if (isModEnabled('banque')) {
|
||||
print '<tr><td>'.$langs->trans('DefaultBankAccount').'</td><td colspan="2">';
|
||||
print img_picto('', 'bank_account', 'class="pictofixedwidth"').$form->select_comptes(GETPOST('fk_account', 'int'), 'fk_account', 0, '', 2, '', 0, '', 1);
|
||||
print '</td></tr>';
|
||||
@ -540,7 +540,7 @@ if ($id > 0) {
|
||||
}
|
||||
|
||||
// Project
|
||||
if (!empty($conf->project->enabled)) {
|
||||
if (isModEnabled('project')) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($user->rights->tax->charges->creer) {
|
||||
@ -638,7 +638,7 @@ if ($id > 0) {
|
||||
print '</td></tr>';
|
||||
|
||||
// Bank account
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
if (isModEnabled('banque')) {
|
||||
print '<tr><td class="nowrap">';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans('DefaultBankAccount');
|
||||
@ -668,7 +668,7 @@ if ($id > 0) {
|
||||
print '<div class="fichehalfright">';
|
||||
|
||||
$nbcols = 3;
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
if (isModEnabled('banque')) {
|
||||
$nbcols++;
|
||||
}
|
||||
|
||||
@ -703,7 +703,7 @@ if ($id > 0) {
|
||||
print '<td>'.$langs->trans("RefPayment").'</td>';
|
||||
print '<td>'.$langs->trans("Date").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
if (isModEnabled('banque')) {
|
||||
print '<td class="liste_titre right">'.$langs->trans('BankAccount').'</td>';
|
||||
}
|
||||
print '<td class="right">'.$langs->trans("Amount").'</td>';
|
||||
@ -726,14 +726,14 @@ if ($id > 0) {
|
||||
print '<td>'.dol_print_date($db->jdate($objp->dp), 'day')."</td>\n";
|
||||
$labeltype = $langs->trans("PaymentType".$objp->type_code) != ("PaymentType".$objp->type_code) ? $langs->trans("PaymentType".$objp->type_code) : $objp->paiement_type;
|
||||
print "<td>".$labeltype.' '.$objp->num_payment."</td>\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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user