Work on split module fournisseur

This commit is contained in:
Alexandre SPANGARO 2020-03-22 05:33:30 +01:00
parent e2acb0c65e
commit 6e9a07d119
3 changed files with 8 additions and 8 deletions

View File

@ -169,8 +169,8 @@ class CActionComm
if ($obj->module == 'invoice' && ! $conf->facture->enabled) $qualified=0;
if ($obj->module == 'order' && ! $conf->commande->enabled) $qualified=0;
if ($obj->module == 'propal' && ! $conf->propal->enabled) $qualified=0;
if ($obj->module == 'invoice_supplier' && ! $conf->fournisseur->enabled) $qualified=0;
if ($obj->module == 'order_supplier' && ! $conf->fournisseur->enabled) $qualified=0;
if ($obj->module == 'invoice_supplier' && (! $conf->fournisseur->enabled && $conf->global->MAIN_USE_NEW_SUPPLIERMOD || ! $conf->supplier_invoice->enabled)) $qualified=0;
if ($obj->module == 'order_supplier' && (! $conf->fournisseur->enabled && $conf->global->MAIN_USE_NEW_SUPPLIERMOD || ! $conf->supplier_order->enabled)) $qualified=0;
if ($obj->module == 'shipping' && ! $conf->expedition->enabled) $qualified=0;
}

View File

@ -35,7 +35,7 @@ if (!empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.'/contrat/cl
if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
if (!empty($conf->supplier_proposal->enabled)) require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
if (!empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
if (!empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! empty($conf->supplier_order->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
if (!$user->rights->societe->lire) accessforbidden();
@ -76,7 +76,7 @@ $companystatic = new Societe($db);
if (!empty($conf->propal->enabled)) $propalstatic = new Propal($db);
if (!empty($conf->supplier_proposal->enabled)) $supplierproposalstatic = new SupplierProposal($db);
if (!empty($conf->commande->enabled)) $orderstatic = new Commande($db);
if (!empty($conf->fournisseur->enabled)) $supplierorderstatic = new CommandeFournisseur($db);
if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) $supplierorderstatic = new CommandeFournisseur($db);
llxHeader("", $langs->trans("CommercialArea"));
@ -102,7 +102,7 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useles
$listofsearchfields['search_supplier_proposal'] = array('text'=>'SupplierProposalShort');
}
// Search supplier order
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)
{
$listofsearchfields['search_supplier_order'] = array('text'=>'SupplierOrder');
}
@ -414,7 +414,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
/*
* Draft suppliers 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)
{
$langs->load("orders");

View File

@ -105,11 +105,11 @@ if (! empty($conf->supplier_proposal->enabled) && empty($conf->global->MAIN_SEAR
{
$arrayresult['searchintosupplierpropal']=array('position'=>100, 'img'=>'object_propal', 'label'=>$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text'=>img_picto('', 'object_propal').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/supplier_proposal/list.php'.($search_boxvalue?'?sall='.urlencode($search_boxvalue):''));
}
if (! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED) && $user->rights->fournisseur->commande->lire)
if ((! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED) || ! empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire)
{
$arrayresult['searchintosupplierorder']=array('position'=>110, 'img'=>'object_order', 'label'=>$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text'=>img_picto('', 'object_order').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/commande/list.php'.($search_boxvalue?'?search_all='.urlencode($search_boxvalue):''));
}
if (! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED) && $user->rights->fournisseur->facture->lire)
if ((! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED) || ! empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire)
{
$arrayresult['searchintosupplierinvoice']=array('position'=>120, 'img'=>'object_bill', 'label'=>$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text'=>img_picto('', 'object_bill').' '.$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/facture/list.php'.($search_boxvalue?'?sall='.urlencode($search_boxvalue):''));
}