This commit is contained in:
Laurent Destailleur 2020-01-31 18:16:16 +01:00
parent b83c90e348
commit d530c7f708

View File

@ -40,7 +40,7 @@ if ($type == '' && !$user->rights->service->lire) $type = '0'; // Force global p
// Security check // Security check
if ($type == '0') $result = restrictedArea($user, 'produit'); if ($type == '0') $result = restrictedArea($user, 'produit');
elseif ($type == '1') $result = restrictedArea($user, 'service'); elseif ($type == '1') $result = restrictedArea($user, 'service');
else $result = restrictedArea($user, 'produit|service'); else $result = restrictedArea($user, 'produit|service|expedition');
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array('products', 'stocks')); $langs->loadLangs(array('products', 'stocks'));
@ -117,6 +117,8 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useles
/* /*
* Number of products and/or services * Number of products and/or services
*/ */
if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($user->rights->produit->lire || $user->rights->service->lire))
{
$prodser = array(); $prodser = array();
$prodser[0][0] = $prodser[0][1] = $prodser[0][2] = $prodser[0][3] = 0; $prodser[0][0] = $prodser[0][1] = $prodser[0][2] = $prodser[0][3] = 0;
$prodser[1][0] = $prodser[1][1] = $prodser[1][2] = $prodser[1][3] = 0; $prodser[1][0] = $prodser[1][1] = $prodser[1][2] = $prodser[1][3] = 0;
@ -189,6 +191,7 @@ if ($conf->use_javascript_ajax)
print '</table>'; print '</table>';
print '</div>'; print '</div>';
} }
}
if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTATS_ON_PRODUCTS)) if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTATS_ON_PRODUCTS))
@ -270,6 +273,8 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
/* /*
* Latest modified products * Latest modified products
*/ */
if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($user->rights->produit->lire || $user->rights->service->lire))
{
$max = 15; $max = 15;
$sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type, p.tosell, p.tobuy, p.tobatch, p.fk_price_expression,"; $sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type, p.tosell, p.tobuy, p.tobatch, p.fk_price_expression,";
$sql .= " p.entity,"; $sql .= " p.entity,";
@ -385,6 +390,7 @@ else
{ {
dol_print_error($db); dol_print_error($db);
} }
}
// TODO Move this into a page that should be available into menu "accountancy - report - turnover - per quarter" // TODO Move this into a page that should be available into menu "accountancy - report - turnover - per quarter"