Work on split module fournisseur
This commit is contained in:
parent
6e9a07d119
commit
c05ef16e0b
@ -173,7 +173,7 @@ function societe_prepare_head(Societe $object)
|
||||
}
|
||||
|
||||
// Related items
|
||||
if ((!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || !empty($conf->facture->enabled) || !empty($conf->ficheinter->enabled) || !empty($conf->fournisseur->enabled))
|
||||
if ((!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || !empty($conf->facture->enabled) || !empty($conf->ficheinter->enabled) || !empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))
|
||||
&& empty($conf->global->THIRPARTIES_DISABLE_RELATED_OBJECT_TAB))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/societe/consumption.php?socid='.$object->id;
|
||||
|
||||
@ -59,7 +59,7 @@ function contact_prepare_head(Contact $object)
|
||||
$tab++;
|
||||
|
||||
// Related items
|
||||
if (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->ficheinter->enabled) || ! empty($conf->fournisseur->enabled))
|
||||
if (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->ficheinter->enabled) || !empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))
|
||||
{
|
||||
$head[$tab][0] = DOL_URL_ROOT.'/contact/consumption.php?id='.$object->id;
|
||||
$head[$tab][1] = $langs->trans("Referers");
|
||||
|
||||
@ -55,7 +55,7 @@ function product_prepare_head($object)
|
||||
|
||||
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) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->lire)
|
||||
|| (!empty($conf->margin->enabled) && $user->rights->margin->liretous)
|
||||
)
|
||||
{
|
||||
@ -408,7 +408,7 @@ function show_stats_for_company($product, $socid)
|
||||
print '</tr>';
|
||||
}
|
||||
// Supplier orders
|
||||
if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->lire)
|
||||
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire)
|
||||
{
|
||||
$nblines++;
|
||||
$ret = $product->load_stats_commande_fournisseur($socid);
|
||||
@ -462,7 +462,7 @@ function show_stats_for_company($product, $socid)
|
||||
print '</tr>';
|
||||
}
|
||||
// Supplier invoices
|
||||
if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire)
|
||||
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$nblines++;
|
||||
$ret = $product->load_stats_facture_fournisseur($socid);
|
||||
|
||||
@ -87,7 +87,8 @@ function project_prepare_head($object)
|
||||
$h++;
|
||||
}
|
||||
|
||||
if (!empty($conf->fournisseur->enabled) || !empty($conf->propal->enabled) || !empty($conf->commande->enabled)
|
||||
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))
|
||||
|| !empty($conf->propal->enabled) || !empty($conf->commande->enabled)
|
||||
|| !empty($conf->facture->enabled) || !empty($conf->contrat->enabled)
|
||||
|| !empty($conf->ficheinter->enabled) || !empty($conf->agenda->enabled) || !empty($conf->deplacement->enabled))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user