Fix bad condition to show tabs

This commit is contained in:
Laurent Destailleur 2016-01-07 00:05:28 +01:00
parent d6c5a73264
commit 2945d2d171

View File

@ -45,11 +45,16 @@ function product_prepare_head($object)
$head[$h][2] = 'card'; $head[$h][2] = 'card';
$h++; $h++;
if (! empty($object->status))
{
$head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$object->id; $head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$object->id;
$head[$h][1] = $langs->trans("SellingPrices"); $head[$h][1] = $langs->trans("SellingPrices");
$head[$h][2] = 'price'; $head[$h][2] = 'price';
$h++; $h++;
}
if (! empty($object->status_buy) || (! empty($conf->margin->enabled) && ! empty($object->status))) // If margin is on and product on sell, we may need the cost price even if product os not on purchase
{
if ((! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire) if ((! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire)
|| (! empty($conf->margin->enabled) && $user->rights->margin->liretous) || (! empty($conf->margin->enabled) && $user->rights->margin->liretous)
) )
@ -59,6 +64,7 @@ function product_prepare_head($object)
$head[$h][2] = 'suppliers'; $head[$h][2] = 'suppliers';
$h++; $h++;
} }
}
// Show category tab // Show category tab
/* No more required. Replaced with new multiselect component /* No more required. Replaced with new multiselect component