Debug v16

This commit is contained in:
Laurent Destailleur
2022-07-29 14:50:21 +02:00
parent e25b599ee3
commit f0c8523713
3 changed files with 19 additions and 12 deletions

View File

@@ -254,7 +254,9 @@ function supplier_invoice_rec_prepare_head($object)
function getNumberInvoicesPieChart($mode)
{
global $conf, $db, $langs, $user;
if (isModEnabled('facture') && !empty($user->rights->facture->lire)) {
if (($mode == 'customers' && isModEnabled('facture') && !empty($user->rights->facture->lire))
|| ($mode = 'suppliers') && (isModEnabled('fournisseur') || isModEnabled('supplier_invoice')) && !empty($user->rights->facture->lire)
) {
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
$now = date_create(date('Y-m-d', dol_now()));