From b9bbba813a131cf9c0941c6f168b64770a876024 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 22 Oct 2017 15:28:03 +0200 Subject: [PATCH] Update company.lib.php --- htdocs/core/lib/company.lib.php | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 2e24fd3fee8..5c10c433326 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -145,22 +145,25 @@ function societe_prepare_head(Societe $object) $h++; } - // Tab to accountancy - if (! empty($conf->accounting->enabled) && $object->client>0) + if (! empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) { - $head[$h][0] = DOL_URL_ROOT.'/accountancy/bookkeeping/thirdparty_lettrage.php?socid='.$object->id; - $head[$h][1] = $langs->trans("TabAccountingCustomer"); - $head[$h][2] = 'accounting'; - $h++; - } + // Tab to accountancy + if (! empty($conf->accounting->enabled) && $object->client>0) + { + $head[$h][0] = DOL_URL_ROOT.'/accountancy/bookkeeping/thirdparty_lettrage.php?socid='.$object->id; + $head[$h][1] = $langs->trans("TabAccountingCustomer"); + $head[$h][2] = 'accounting'; + $h++; + } - // Tab to accountancy - if (! empty($conf->accounting->enabled) && $object->fournisseur>0) - { - $head[$h][0] = DOL_URL_ROOT.'/accountancy/bookkeeping/thirdparty_lettrage_supplier.php?socid='.$object->id; - $head[$h][1] = $langs->trans("TabAccountingSupplier"); - $head[$h][2] = 'accounting_supplier'; - $h++; + // Tab to accountancy + if (! empty($conf->accounting->enabled) && $object->fournisseur>0) + { + $head[$h][0] = DOL_URL_ROOT.'/accountancy/bookkeeping/thirdparty_lettrage_supplier.php?socid='.$object->id; + $head[$h][1] = $langs->trans("TabAccountingSupplier"); + $head[$h][2] = 'accounting_supplier'; + $h++; + } } // Related items