update code

This commit is contained in:
Philippe GRAND 2022-09-04 13:33:11 +02:00
parent 94a646103d
commit 36f2c139e5
5 changed files with 14 additions and 14 deletions

View File

@ -713,7 +713,7 @@ foreach ($profid as $key => $val) {
$i++;
}
if (!empty($conf->accounting->enabled)) {
if (isModEnabled('accounting')) {
print '<tr class="oddeven">';
print '<td colspan="2">'.$langs->trans('CustomerAccountancyCodeShort')."</td>\n";
print '<td colspan="2"></td>';

View File

@ -50,13 +50,13 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
if (isModEnabled('adherent')) {
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
}
if (!empty($conf->accounting->enabled)) {
if (isModEnabled('accounting')) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
}
if (!empty($conf->accounting->enabled)) {
if (isModEnabled('accounting')) {
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
}
if (!empty($conf->accounting->enabled)) {
if (isModEnabled('accounting')) {
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
}
if (isModEnabled('eventorganization')) {
@ -80,7 +80,7 @@ if (!empty($conf->incoterm->enabled)) {
if (!empty($conf->notification->enabled)) {
$langs->load("mails");
}
if (!empty($conf->accounting->enabled)) {
if (isModEnabled('accounting')) {
$langs->load("products");
}
@ -961,7 +961,7 @@ $form = new Form($db);
$formfile = new FormFile($db);
$formadmin = new FormAdmin($db);
$formcompany = new FormCompany($db);
if (!empty($conf->accounting->enabled)) {
if (isModEnabled('accounting')) {
$formaccounting = new FormAccounting($db);
}
@ -1834,7 +1834,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
print '<table class="border" width="100%">';
if (!empty($conf->accounting->enabled)) {
if (isModEnabled('accounting')) {
// Accountancy_code_sell
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellCode").'</td>';
print '<td>';
@ -2562,7 +2562,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<br>';
print '<table class="border centpercent">';
if (!empty($conf->accounting->enabled)) {
if (isModEnabled('accounting')) {
// Accountancy_code_sell
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellCode").'</td>';
print '<td>';
@ -2984,7 +2984,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<tr><td class="nowrap">';
print $langs->trans("ProductAccountancySellCode");
print '</td><td colspan="2">';
if (!empty($conf->accounting->enabled)) {
if (isModEnabled('accounting')) {
if (!empty($object->accountancy_code_sell)) {
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch('', $object->accountancy_code_sell, 1);
@ -3000,7 +3000,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<tr><td class="nowrap">';
print $langs->trans("ProductAccountancyBuyCode");
print '</td><td colspan="2">';
if (!empty($conf->accounting->enabled)) {
if (isModEnabled('accounting')) {
if (!empty($object->accountancy_code_buy)) {
$accountingaccount2 = new AccountingAccount($db);
$accountingaccount2->fetch('', $object->accountancy_code_buy, 1);

View File

@ -2711,10 +2711,10 @@ class Societe extends CommonObject
if (!empty($this->code_fournisseur) && $this->fournisseur) {
$label2 .= '<br><b>'.$langs->trans('SupplierCode').':</b> '.$this->code_fournisseur;
}
if (!empty($conf->accounting->enabled) && ($this->client == 1 || $this->client == 3)) {
if (isModEnabled('accounting') && ($this->client == 1 || $this->client == 3)) {
$label2 .= '<br><b>'.$langs->trans('CustomerAccountancyCode').':</b> '.($this->code_compta ? $this->code_compta : $this->code_compta_client);
}
if (!empty($conf->accounting->enabled) && $this->fournisseur) {
if (isModEnabled('accounting') && $this->fournisseur) {
$label2 .= '<br><b>'.$langs->trans('SupplierAccountancyCode').':</b> '.$this->code_compta_fournisseur;
}
$label .= ($label2 ? '<br>'.$label2 : '').'</div>';

View File

@ -26,7 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
if (!empty($conf->accounting->enabled)) {
if (isModEnabled('accounting')) {
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
}

View File

@ -26,7 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
if (!empty($conf->accounting->enabled)) {
if (isModEnabled('accounting')) {
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
}