Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
2a98ff313e
@ -1441,7 +1441,7 @@ class Setup extends DolibarrApi
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if (empty($conf->socialnetworks->enabled)) {
|
||||
if (!isModEnabled('socialnetworks')) {
|
||||
throw new RestException(400, 'API not available: this dictionary is not enabled by setup');
|
||||
}
|
||||
|
||||
|
||||
@ -237,7 +237,7 @@ if (!empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/swagger.json' || $
|
||||
|
||||
// Defined if module is enabled
|
||||
$enabled = true;
|
||||
if (empty($conf->$modulenameforenabled->enabled)) {
|
||||
if (!isModEnabled($modulenameforenabled)) {
|
||||
$enabled = false;
|
||||
}
|
||||
|
||||
|
||||
@ -1376,7 +1376,7 @@ class BOM extends CommonObject
|
||||
$unit = measuringUnitString($line->fk_unit, '', '', 1);
|
||||
$qty = convertDurationtoHour($line->qty, $unit);
|
||||
|
||||
if ($conf->workstation->enabled && !empty($tmpproduct->fk_default_workstation)) {
|
||||
if (isModEnabled('workstation') && !empty($tmpproduct->fk_default_workstation)) {
|
||||
$workstation = new Workstation($this->db);
|
||||
$res = $workstation->fetch($tmpproduct->fk_default_workstation);
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ if ($nolinesbefore) {
|
||||
print '<td class="linecollost right">' . $form->textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')) . '</td>';
|
||||
} else {
|
||||
print '<td class="linecolunit right">' . $form->textwithpicto($langs->trans('Unit'), '').'</td>';
|
||||
if ($conf->workstation->enabled) print '<td class="linecolworkstation right">' . $form->textwithpicto($langs->trans('Workstation'), '') . '</td>';
|
||||
if (isModEnabled('workstation')) print '<td class="linecolworkstation right">' . $form->textwithpicto($langs->trans('Workstation'), '') . '</td>';
|
||||
print '<td class="linecoltotalcost right">' . $form->textwithpicto($langs->trans('TotalCost'), '') . '</td>';
|
||||
}
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ if ($filtertype != 1) {
|
||||
} else {
|
||||
print '<td class="linecolunit right">' . $form->textwithpicto($langs->trans('Unit'), '').'</td>';
|
||||
|
||||
if ($conf->workstation->enabled) print '<td class="linecolworkstation right">' . $form->textwithpicto($langs->trans('DefaultWorkstation'), '') . '</td>';
|
||||
if (isModEnabled('workstation')) print '<td class="linecolworkstation right">' . $form->textwithpicto($langs->trans('DefaultWorkstation'), '') . '</td>';
|
||||
|
||||
// Cost
|
||||
print '<td class="linecolcost right">'.$form->textwithpicto($langs->trans("TotalCost"), $langs->trans("BOMTotalCostService")).'</td>';
|
||||
|
||||
@ -144,8 +144,8 @@ if ($filtertype != 1) {
|
||||
|
||||
print '</td>';
|
||||
|
||||
//Poste de travail
|
||||
if ($conf->workstation->enabled) {
|
||||
// Work station
|
||||
if (isModEnabled('workstation')) {
|
||||
$workstation = new Workstation($object->db);
|
||||
$res = $workstation->fetch($tmpproduct->fk_default_workstation);
|
||||
|
||||
|
||||
@ -2355,7 +2355,7 @@ class ActionComm extends CommonObject
|
||||
$nbMailSend = 0;
|
||||
$errorsMsg = array();
|
||||
|
||||
if (empty($conf->agenda->enabled)) { // Should not happen. If module disabled, cron job should not be visible.
|
||||
if (!isModEnabled('agenda')) { // Should not happen. If module disabled, cron job should not be visible.
|
||||
$langs->load("agenda");
|
||||
$this->output = $langs->trans('ModuleNotEnabled', $langs->transnoentitiesnoconv("Agenda"));
|
||||
return 0;
|
||||
|
||||
@ -207,10 +207,10 @@ class CActionComm
|
||||
if ($obj->module == 'propal' && isModEnabled("propal") && !empty($user->rights->propale->lire)) {
|
||||
$qualified = 1;
|
||||
}
|
||||
if ($obj->module == 'invoice_supplier' && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && !empty($user->rights->fournisseur->facture->lire)) || (!empty($conf->rights->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire)))) {
|
||||
if ($obj->module == 'invoice_supplier' && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && !empty($user->rights->fournisseur->facture->lire)) || (isModEnabled('supplier_invoice') && !empty($user->rights->supplier_invoice->lire)))) {
|
||||
$qualified = 1;
|
||||
}
|
||||
if ($obj->module == 'order_supplier' && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && !empty($user->rights->fournisseur->commande->lire)) || (empty($conf->rights->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)))) {
|
||||
if ($obj->module == 'order_supplier' && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && !empty($user->rights->fournisseur->commande->lire)) || (!isModEnabled('supplier_order') && !empty($user->rights->supplier_order->lire)))) {
|
||||
$qualified = 1;
|
||||
}
|
||||
if ($obj->module == 'shipping' && isModEnabled("expedition") && !empty($user->rights->expedition->lire)) {
|
||||
@ -228,7 +228,7 @@ class CActionComm
|
||||
$tmpobject = $regs[1];
|
||||
$tmpmodule = $regs[2];
|
||||
//var_dump($user->$tmpmodule);
|
||||
if ($tmpmodule && isset($conf->$tmpmodule) && !empty($conf->$tmpmodule->enabled) && (!empty($user->rights->$tmpmodule->read) || !empty($user->rights->$tmpmodule->lire) || !empty($user->rights->$tmpmodule->$tmpobject->read) || !empty($user->rights->$tmpmodule->$tmpobject->lire))) {
|
||||
if ($tmpmodule && isset($conf->$tmpmodule) && isModEnabled($tmpmodule) && (!empty($user->rights->$tmpmodule->read) || !empty($user->rights->$tmpmodule->lire) || !empty($user->rights->$tmpmodule->$tmpobject->read) || !empty($user->rights->$tmpmodule->$tmpobject->lire))) {
|
||||
$qualified = 1;
|
||||
}
|
||||
}
|
||||
@ -237,7 +237,7 @@ class CActionComm
|
||||
if (! in_array($obj->type, array('system', 'systemauto', 'module', 'moduleauto'))) {
|
||||
$tmpmodule = $obj->module;
|
||||
//var_dump($tmpmodule);
|
||||
if ($tmpmodule && isset($conf->$tmpmodule) && !empty($conf->$tmpmodule->enabled)) {
|
||||
if ($tmpmodule && isset($conf->$tmpmodule) && isModEnabled($tmpmodule)) {
|
||||
$qualified = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formpropal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
if (!empty($conf->margin->enabled)) {
|
||||
if (isModEnabled('margin')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php';
|
||||
}
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
@ -237,10 +237,10 @@ $arrayfields = array(
|
||||
'p.multicurrency_total_invoiced'=>array('label'=>'MulticurrencyAmountInvoicedTTC', 'checked'=>0, 'enabled'=>isModEnabled("multicurrency") && !empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)),
|
||||
'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>10),
|
||||
'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>-1),
|
||||
'total_pa' => array('label' => (getDolGlobalString('MARGIN_TYPE') == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous ? 0 : 1)),
|
||||
'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous ? 0 : 1)),
|
||||
'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous || empty($conf->global->DISPLAY_MARGIN_RATES) ? 0 : 1)),
|
||||
'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous || empty($conf->global->DISPLAY_MARK_RATES) ? 0 : 1)),
|
||||
'total_pa' => array('label' => (getDolGlobalString('MARGIN_TYPE') == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous ? 0 : 1)),
|
||||
'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous ? 0 : 1)),
|
||||
'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous || empty($conf->global->DISPLAY_MARGIN_RATES) ? 0 : 1)),
|
||||
'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous || empty($conf->global->DISPLAY_MARK_RATES) ? 0 : 1)),
|
||||
'p.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
|
||||
'p.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500),
|
||||
'p.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>500),
|
||||
|
||||
@ -1866,7 +1866,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
}
|
||||
|
||||
// Incoterms
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
print '<tr>';
|
||||
print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $objectsrc->label_incoterms, 1).'</label></td>';
|
||||
print '<td class="maxwidthonsmartphone">';
|
||||
@ -2113,7 +2113,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
// It may also break step of creating an order when invoicing must be done from proposals and not from orders
|
||||
$deposit_percent_from_payment_terms = getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id);
|
||||
|
||||
if (!empty($deposit_percent_from_payment_terms) && !empty($conf->facture->enabled) && !empty($user->rights->facture->creer)) {
|
||||
if (!empty($deposit_percent_from_payment_terms) && isModEnabled('facture') && !empty($user->rights->facture->creer)) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||
|
||||
$object->fetchObjectLinked();
|
||||
@ -2610,7 +2610,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
// TODO How record was recorded OrderMode (llx_c_input_method)
|
||||
|
||||
// Incoterms
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
print '<tr><td>';
|
||||
$editenable = $usercancreate;
|
||||
print $form->editfieldkey("IncotermLabel", 'incoterm', '', $object, $editenable);
|
||||
@ -2697,7 +2697,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
print '</table>';
|
||||
|
||||
// Margin Infos
|
||||
if (!empty($conf->margin->enabled)) {
|
||||
if (isModEnabled('margin')) {
|
||||
$formmargin->displayMarginInfos($object);
|
||||
}
|
||||
|
||||
@ -2809,7 +2809,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?action=modif&token='.newToken().'&id='.$object->id, '');
|
||||
}
|
||||
// Create event
|
||||
/*if ($conf->agenda->enabled && !empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD))
|
||||
/*if (isModEnabled('agenda') && !empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD))
|
||||
{
|
||||
// Add hidden condition because this is not a
|
||||
// "workflow" action so should appears somewhere else on
|
||||
@ -2937,7 +2937,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem, $compatibleImportElementsList);
|
||||
|
||||
// Show online payment link
|
||||
$useonlinepayment = (!empty($conf->paypal->enabled) || !empty($conf->stripe->enabled) || !empty($conf->paybox->enabled));
|
||||
$useonlinepayment = (isModEnabled('paypal') || isModEnabled('stripe') || isModEnabled('paybox'));
|
||||
if (!empty($conf->global->ORDER_HIDE_ONLINE_PAYMENT_ON_ORDER)) {
|
||||
$useonlinepayment = 0;
|
||||
}
|
||||
|
||||
@ -1105,7 +1105,7 @@ class Form
|
||||
|
||||
// If product & services are enabled or both disabled.
|
||||
if ($forceall == 1 || (empty($forceall) && isModEnabled("product") && isModEnabled("service"))
|
||||
|| (empty($forceall) && empty($conf->product->enabled) && empty($conf->service->enabled))) {
|
||||
|| (empty($forceall) && !isModEnabled('product') && !isModEnabled('service'))) {
|
||||
if (empty($hidetext)) {
|
||||
print $langs->trans("Type").': ';
|
||||
}
|
||||
@ -1134,11 +1134,11 @@ class Form
|
||||
print ajax_combobox('select_'.$htmlname);
|
||||
//if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
}
|
||||
if ((empty($forceall) && empty($conf->product->enabled) && isModEnabled("service")) || $forceall == 3) {
|
||||
if ((empty($forceall) && !isModEnabled('product') && isModEnabled("service")) || $forceall == 3) {
|
||||
print $langs->trans("Service");
|
||||
print '<input type="hidden" name="'.$htmlname.'" value="1">';
|
||||
}
|
||||
if ((empty($forceall) && isModEnabled("product") && empty($conf->service->enabled)) || $forceall == 2) {
|
||||
if ((empty($forceall) && isModEnabled("product") && !isModEnabled('service')) || $forceall == 2) {
|
||||
print $langs->trans("Product");
|
||||
print '<input type="hidden" name="'.$htmlname.'" value="0">';
|
||||
}
|
||||
@ -2280,9 +2280,9 @@ class Form
|
||||
}
|
||||
|
||||
if (strval($filtertype) === '' && (isModEnabled("product") || isModEnabled("service"))) {
|
||||
if (isModEnabled("product") && empty($conf->service->enabled)) {
|
||||
if (isModEnabled("product") && !isModEnabled('service')) {
|
||||
$filtertype = '0';
|
||||
} elseif (empty($conf->product->enabled) && isModEnabled("service")) {
|
||||
} elseif (!isModEnabled('product') && isModEnabled("service")) {
|
||||
$filtertype = '1';
|
||||
}
|
||||
}
|
||||
@ -2299,9 +2299,9 @@ class Form
|
||||
}
|
||||
// handle case where product or service module is disabled + no filter specified
|
||||
if ($filtertype == '') {
|
||||
if (empty($conf->product->enabled)) { // when product module is disabled, show services only
|
||||
if (!isModEnabled('product')) { // when product module is disabled, show services only
|
||||
$filtertype = 1;
|
||||
} elseif (empty($conf->service->enabled)) { // when service module is disabled, show products only
|
||||
} elseif (!isModEnabled('service')) { // when service module is disabled, show products only
|
||||
$filtertype = 0;
|
||||
}
|
||||
}
|
||||
@ -2647,9 +2647,9 @@ class Form
|
||||
// Filter by product type
|
||||
if (strval($filtertype) != '') {
|
||||
$sql .= " AND p.fk_product_type = ".((int) $filtertype);
|
||||
} elseif (empty($conf->product->enabled)) { // when product module is disabled, show services only
|
||||
} elseif (!isModEnabled('product')) { // when product module is disabled, show services only
|
||||
$sql .= " AND p.fk_product_type = 1";
|
||||
} elseif (empty($conf->service->enabled)) { // when service module is disabled, show products only
|
||||
} elseif (!isModEnabled('service')) { // when service module is disabled, show products only
|
||||
$sql .= " AND p.fk_product_type = 0";
|
||||
}
|
||||
// Add where from hooks
|
||||
@ -2795,7 +2795,7 @@ class Form
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!empty($conf->dynamicprices->enabled) && !empty($objp->fk_price_expression)) {
|
||||
if (isModEnabled('dynamicprices') && !empty($objp->fk_price_expression)) {
|
||||
$price_product = new Product($this->db);
|
||||
$price_product->fetch($objp->rowid, '', '', 1);
|
||||
$priceparser = new PriceParser($this->db);
|
||||
@ -3424,7 +3424,7 @@ class Form
|
||||
if (!empty($objp->idprodfournprice)) {
|
||||
$outqty = $objp->quantity;
|
||||
$outdiscount = $objp->remise_percent;
|
||||
if (!empty($conf->dynamicprices->enabled) && !empty($objp->fk_supplier_price_expression)) {
|
||||
if (isModEnabled('dynamicprices') && !empty($objp->fk_supplier_price_expression)) {
|
||||
$prod_supplier = new ProductFournisseur($this->db);
|
||||
$prod_supplier->product_fourn_price_id = $objp->idprodfournprice;
|
||||
$prod_supplier->id = $objp->fk_product;
|
||||
@ -3649,7 +3649,7 @@ class Form
|
||||
}
|
||||
$opt .= '>'.$objp->name.' - '.$objp->ref_fourn.' - ';
|
||||
|
||||
if (!empty($conf->dynamicprices->enabled) && !empty($objp->fk_supplier_price_expression)) {
|
||||
if (isModEnabled('dynamicprices') && !empty($objp->fk_supplier_price_expression)) {
|
||||
$prod_supplier = new ProductFournisseur($this->db);
|
||||
$prod_supplier->product_fourn_price_id = $objp->idprodfournprice;
|
||||
$prod_supplier->id = $productid;
|
||||
@ -8590,26 +8590,26 @@ class Form
|
||||
}
|
||||
} elseif ($objecttype == 'propal') {
|
||||
$tplpath = 'comm/'.$element;
|
||||
if (empty($conf->propal->enabled)) {
|
||||
if (!isModEnabled('propal')) {
|
||||
continue; // Do not show if module disabled
|
||||
}
|
||||
} elseif ($objecttype == 'supplier_proposal') {
|
||||
if (empty($conf->supplier_proposal->enabled)) {
|
||||
if (!isModEnabled('supplier_proposal')) {
|
||||
continue; // Do not show if module disabled
|
||||
}
|
||||
} elseif ($objecttype == 'shipping' || $objecttype == 'shipment' || $objecttype == 'expedition') {
|
||||
$tplpath = 'expedition';
|
||||
if (empty($conf->expedition->enabled)) {
|
||||
if (!isModEnabled('expedition')) {
|
||||
continue; // Do not show if module disabled
|
||||
}
|
||||
} elseif ($objecttype == 'reception') {
|
||||
$tplpath = 'reception';
|
||||
if (empty($conf->reception->enabled)) {
|
||||
if (!isModEnabled('reception')) {
|
||||
continue; // Do not show if module disabled
|
||||
}
|
||||
} elseif ($objecttype == 'delivery') {
|
||||
$tplpath = 'delivery';
|
||||
if (empty($conf->expedition->enabled)) {
|
||||
if (!isModEnabled('expedition')) {
|
||||
continue; // Do not show if module disabled
|
||||
}
|
||||
} elseif ($objecttype == 'ficheinter') {
|
||||
@ -8631,7 +8631,7 @@ class Form
|
||||
$tplpath = 'eventorganization';
|
||||
} elseif ($objecttype == 'mo') {
|
||||
$tplpath = 'mrp';
|
||||
if (empty($conf->mrp->enabled)) {
|
||||
if (!isModEnabled('mrp')) {
|
||||
continue; // Do not show if module disabled
|
||||
}
|
||||
}
|
||||
|
||||
@ -318,20 +318,20 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
|
||||
$rowspan++; $sectionauto[] = array('position'=>20, 'level'=>1, 'module'=>'company', 'test'=>isModEnabled('societe'), 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ThirdParties")));
|
||||
}
|
||||
if (isModEnabled("propal")) {
|
||||
$rowspan++; $sectionauto[] = array('position'=>30, 'level'=>1, 'module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Proposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Proposals")));
|
||||
$rowspan++; $sectionauto[] = array('position'=>30, 'level'=>1, 'module'=>'propal', 'test'=>isModEnabled('propal'), 'label'=>$langs->trans("Proposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Proposals")));
|
||||
}
|
||||
if (isModEnabled('contrat')) {
|
||||
$rowspan++; $sectionauto[] = array('position'=>40, 'level'=>1, 'module'=>'contract', 'test'=>$conf->contrat->enabled, 'label'=>$langs->trans("Contracts"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Contracts")));
|
||||
$rowspan++; $sectionauto[] = array('position'=>40, 'level'=>1, 'module'=>'contract', 'test'=>isModEnabled('contrat'), 'label'=>$langs->trans("Contracts"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Contracts")));
|
||||
}
|
||||
if (isModEnabled('commande')) {
|
||||
$rowspan++; $sectionauto[] = array('position'=>50, 'level'=>1, 'module'=>'order', 'test'=>$conf->commande->enabled, 'label'=>$langs->trans("CustomersOrders"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Orders")));
|
||||
$rowspan++; $sectionauto[] = array('position'=>50, 'level'=>1, 'module'=>'order', 'test'=>isModEnabled('commande'), 'label'=>$langs->trans("CustomersOrders"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Orders")));
|
||||
}
|
||||
if (isModEnabled('facture')) {
|
||||
$rowspan++; $sectionauto[] = array('position'=>60, 'level'=>1, 'module'=>'invoice', 'test'=>$conf->facture->enabled, 'label'=>$langs->trans("CustomersInvoices"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Invoices")));
|
||||
$rowspan++; $sectionauto[] = array('position'=>60, 'level'=>1, 'module'=>'invoice', 'test'=>isModEnabled('facture'), 'label'=>$langs->trans("CustomersInvoices"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Invoices")));
|
||||
}
|
||||
if (isModEnabled('supplier_proposal')) {
|
||||
$langs->load("supplier_proposal");
|
||||
$rowspan++; $sectionauto[] = array('position'=>70, 'level'=>1, 'module'=>'supplier_proposal', 'test'=>$conf->supplier_proposal->enabled, 'label'=>$langs->trans("SupplierProposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SupplierProposals")));
|
||||
$rowspan++; $sectionauto[] = array('position'=>70, 'level'=>1, 'module'=>'supplier_proposal', 'test'=>isModEnabled('supplier_proposal'), 'label'=>$langs->trans("SupplierProposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SupplierProposals")));
|
||||
}
|
||||
if (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_order")) {
|
||||
$rowspan++; $sectionauto[] = array('position'=>80, 'level'=>1, 'module'=>'order_supplier', 'test'=>(isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_order")), 'label'=>$langs->trans("SuppliersOrders"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("PurchaseOrders")));
|
||||
@ -341,12 +341,12 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
|
||||
}
|
||||
if (isModEnabled('tax')) {
|
||||
$langs->load("compta");
|
||||
$rowspan++; $sectionauto[] = array('position'=>100, 'level'=>1, 'module'=>'tax', 'test'=>$conf->tax->enabled, 'label'=>$langs->trans("SocialContributions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SocialContributions")));
|
||||
$rowspan++; $sectionauto[] = array('position'=>110, 'level'=>1, 'module'=>'tax-vat', 'test'=>$conf->tax->enabled, 'label'=>$langs->trans("VAT"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("VAT")));
|
||||
$rowspan++; $sectionauto[] = array('position'=>100, 'level'=>1, 'module'=>'tax', 'test'=>isModEnabled('tax'), 'label'=>$langs->trans("SocialContributions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SocialContributions")));
|
||||
$rowspan++; $sectionauto[] = array('position'=>110, 'level'=>1, 'module'=>'tax-vat', 'test'=>isModEnabled('tax'), 'label'=>$langs->trans("VAT"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("VAT")));
|
||||
}
|
||||
if (!empty($conf->salaries->enabled)) {
|
||||
$langs->load("compta");
|
||||
$rowspan++; $sectionauto[] = array('position'=>120, 'level'=>1, 'module'=>'salaries', 'test'=>$conf->salaries->enabled, 'label'=>$langs->trans("Salaries"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Salaries")));
|
||||
$rowspan++; $sectionauto[] = array('position'=>120, 'level'=>1, 'module'=>'salaries', 'test'=>isModEnabled('salaries'), 'label'=>$langs->trans("Salaries"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Salaries")));
|
||||
}
|
||||
if (isModEnabled('project')) {
|
||||
$rowspan++; $sectionauto[] = array('position'=>130, 'level'=>1, 'module'=>'project', 'test'=>isModEnabled('project'), 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Projects")));
|
||||
@ -354,28 +354,28 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
|
||||
}
|
||||
if (isModEnabled('ficheinter')) {
|
||||
$langs->load("interventions");
|
||||
$rowspan++; $sectionauto[] = array('position'=>150, 'level'=>1, 'module'=>'fichinter', 'test'=>$conf->ficheinter->enabled, 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Interventions")));
|
||||
$rowspan++; $sectionauto[] = array('position'=>150, 'level'=>1, 'module'=>'fichinter', 'test'=>isModEnabled('ficheinter'), 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Interventions")));
|
||||
}
|
||||
if (isModEnabled('expensereport')) {
|
||||
$langs->load("trips");
|
||||
$rowspan++; $sectionauto[] = array('position'=>160, 'level'=>1, 'module'=>'expensereport', 'test'=>$conf->expensereport->enabled, 'label'=>$langs->trans("ExpenseReports"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ExpenseReports")));
|
||||
$rowspan++; $sectionauto[] = array('position'=>160, 'level'=>1, 'module'=>'expensereport', 'test'=>isModEnabled('expensereport'), 'label'=>$langs->trans("ExpenseReports"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ExpenseReports")));
|
||||
}
|
||||
if (isModEnabled('holiday')) {
|
||||
$langs->load("holiday");
|
||||
$rowspan++; $sectionauto[] = array('position'=>170, 'level'=>1, 'module'=>'holiday', 'test'=>$conf->holiday->enabled, 'label'=>$langs->trans("Holidays"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Holidays")));
|
||||
$rowspan++; $sectionauto[] = array('position'=>170, 'level'=>1, 'module'=>'holiday', 'test'=>isModEnabled('holiday'), 'label'=>$langs->trans("Holidays"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Holidays")));
|
||||
}
|
||||
if (isModEnabled("banque")) {
|
||||
$langs->load("banks");
|
||||
$rowspan++; $sectionauto[] = array('position'=>180, 'level'=>1, 'module'=>'banque', 'test'=>$conf->banque->enabled, 'label'=>$langs->trans("BankAccount"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("BankAccount")));
|
||||
$rowspan++; $sectionauto[] = array('position'=>190, 'level'=>1, 'module'=>'chequereceipt', 'test'=>$conf->banque->enabled, 'label'=>$langs->trans("CheckReceipt"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("CheckReceipt")));
|
||||
$rowspan++; $sectionauto[] = array('position'=>180, 'level'=>1, 'module'=>'banque', 'test'=>isModEnabled('banque'), 'label'=>$langs->trans("BankAccount"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("BankAccount")));
|
||||
$rowspan++; $sectionauto[] = array('position'=>190, 'level'=>1, 'module'=>'chequereceipt', 'test'=>isModEnabled('banque'), 'label'=>$langs->trans("CheckReceipt"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("CheckReceipt")));
|
||||
}
|
||||
if (!empty($conf->mrp->enabled)) {
|
||||
if (isModEnabled('mrp')) {
|
||||
$langs->load("mrp");
|
||||
$rowspan++; $sectionauto[] = array('position'=>200, 'level'=>1, 'module'=>'mrp-mo', 'test'=>$conf->mrp->enabled, 'label'=>$langs->trans("MOs"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ManufacturingOrders")));
|
||||
$rowspan++; $sectionauto[] = array('position'=>200, 'level'=>1, 'module'=>'mrp-mo', 'test'=>isModEnabled('mrp'), 'label'=>$langs->trans("MOs"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ManufacturingOrders")));
|
||||
}
|
||||
if (isModEnabled('recruitment')) {
|
||||
$langs->load("recruitment");
|
||||
$rowspan++; $sectionauto[] = array('position'=>210, 'level'=>1, 'module'=>'recruitment-recruitmentcandidature', 'test'=>$conf->recruitment->enabled, 'label'=>$langs->trans("Candidatures"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("JobApplications")));
|
||||
$rowspan++; $sectionauto[] = array('position'=>210, 'level'=>1, 'module'=>'recruitment-recruitmentcandidature', 'test'=>isModEnabled('recruitment'), 'label'=>$langs->trans("Candidatures"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("JobApplications")));
|
||||
}
|
||||
$rowspan++; $sectionauto[] = array('position'=>220, 'level'=>1, 'module'=>'user', 'test'=>1, 'label'=>$langs->trans("Users"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Users")));
|
||||
|
||||
|
||||
@ -121,19 +121,19 @@ if (isModEnabled("societe")) {
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'company', 'test'=>isModEnabled('societe'), 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ThirdParties")));
|
||||
}
|
||||
if (isModEnabled("propal")) {
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Proposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Proposals")));
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'propal', 'test'=>isModEnabled('propal'), 'label'=>$langs->trans("Proposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Proposals")));
|
||||
}
|
||||
if (isModEnabled('contrat')) {
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'contract', 'test'=>$conf->contrat->enabled, 'label'=>$langs->trans("Contracts"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Contracts")));
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'contract', 'test'=>isModEnabled('contrat'), 'label'=>$langs->trans("Contracts"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Contracts")));
|
||||
}
|
||||
if (isModEnabled('commande')) {
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'order', 'test'=>$conf->commande->enabled, 'label'=>$langs->trans("CustomersOrders"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Orders")));
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'order', 'test'=>isModEnabled('commande'), 'label'=>$langs->trans("CustomersOrders"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Orders")));
|
||||
}
|
||||
if (isModEnabled('facture')) {
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'invoice', 'test'=>$conf->facture->enabled, 'label'=>$langs->trans("CustomersInvoices"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Invoices")));
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'invoice', 'test'=>isModEnabled('facture'), 'label'=>$langs->trans("CustomersInvoices"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Invoices")));
|
||||
}
|
||||
if (isModEnabled('supplier_proposal')) {
|
||||
$langs->load("supplier_proposal"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'supplier_proposal', 'test'=>$conf->supplier_proposal->enabled, 'label'=>$langs->trans("SupplierProposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SupplierProposals")));
|
||||
$langs->load("supplier_proposal"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'supplier_proposal', 'test'=>isModEnabled('supplier_proposal'), 'label'=>$langs->trans("SupplierProposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SupplierProposals")));
|
||||
}
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) {
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'order_supplier', 'test'=>((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")), 'label'=>$langs->trans("SuppliersOrders"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("PurchaseOrders")));
|
||||
@ -142,28 +142,28 @@ if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMO
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'invoice_supplier', 'test'=>((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_invoice")), 'label'=>$langs->trans("SuppliersInvoices"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SupplierInvoices")));
|
||||
}
|
||||
if (isModEnabled('tax')) {
|
||||
$langs->load("compta"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'tax', 'test'=>$conf->tax->enabled, 'label'=>$langs->trans("SocialContributions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SocialContributions")));
|
||||
$langs->load("compta"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'tax', 'test'=>isModEnabled('tax'), 'label'=>$langs->trans("SocialContributions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SocialContributions")));
|
||||
}
|
||||
if (isModEnabled('project')) {
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'project', 'test'=>isModEnabled('project'), 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Projects")));
|
||||
}
|
||||
if (isModEnabled('ficheinter')) {
|
||||
$langs->load("interventions"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'fichinter', 'test'=>$conf->ficheinter->enabled, 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Interventions")));
|
||||
$langs->load("interventions"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'fichinter', 'test'=>isModEnabled('ficheinter'), 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Interventions")));
|
||||
}
|
||||
if (isModEnabled('expensereport')) {
|
||||
$langs->load("trips"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'expensereport', 'test'=>$conf->expensereport->enabled, 'label'=>$langs->trans("ExpenseReports"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ExpenseReports")));
|
||||
$langs->load("trips"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'expensereport', 'test'=>isModEnabled('expensereport'), 'label'=>$langs->trans("ExpenseReports"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ExpenseReports")));
|
||||
}
|
||||
if (isModEnabled('holiday')) {
|
||||
$langs->load("holiday"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'holiday', 'test'=>$conf->holiday->enabled, 'label'=>$langs->trans("Holidays"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Holidays")));
|
||||
$langs->load("holiday"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'holiday', 'test'=>isModEnabled('holiday'), 'label'=>$langs->trans("Holidays"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Holidays")));
|
||||
}
|
||||
if (isModEnabled("banque")) {
|
||||
$langs->load("banks"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'banque', 'test'=>$conf->banque->enabled, 'label'=>$langs->trans("BankAccount"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("BankAccount")));
|
||||
$langs->load("banks"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'banque', 'test'=>isModEnabled('banque'), 'label'=>$langs->trans("BankAccount"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("BankAccount")));
|
||||
}
|
||||
if (!empty($conf->mrp->enabled)) {
|
||||
$langs->load("mrp"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'mrp-mo', 'test'=>$conf->mrp->enabled, 'label'=>$langs->trans("MOs"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ManufacturingOrders")));
|
||||
$langs->load("mrp"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'mrp-mo', 'test'=>isModEnabled('mrp'), 'label'=>$langs->trans("MOs"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ManufacturingOrders")));
|
||||
}
|
||||
if (isModEnabled('recruitment')) {
|
||||
$langs->load("recruitment"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'recruitment-recruitmentcandidature', 'test'=>$conf->recruitment->enabled, 'label'=>$langs->trans("Candidatures"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("JobApplications")));
|
||||
$langs->load("recruitment"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'recruitment-recruitmentcandidature', 'test'=>isModEnabled('recruitment'), 'label'=>$langs->trans("Candidatures"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("JobApplications")));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1210,7 +1210,7 @@ class Expedition extends CommonObject
|
||||
}
|
||||
|
||||
// Stock control
|
||||
if (!$error && $conf->stock->enabled &&
|
||||
if (!$error && isModEnabled('stock') &&
|
||||
(($conf->global->STOCK_CALCULATE_ON_SHIPMENT && $this->statut > self::STATUS_DRAFT) ||
|
||||
($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE && $this->statut == self::STATUS_CLOSED && $also_update_stock))) {
|
||||
require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php";
|
||||
@ -1401,7 +1401,7 @@ class Expedition extends CommonObject
|
||||
}
|
||||
|
||||
// Stock control
|
||||
if (!$error && $conf->stock->enabled &&
|
||||
if (!$error && isModEnabled('stock') &&
|
||||
(($conf->global->STOCK_CALCULATE_ON_SHIPMENT && $this->statut > self::STATUS_DRAFT) ||
|
||||
($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE && $this->statut == self::STATUS_CLOSED && $also_update_stock))) {
|
||||
require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php";
|
||||
|
||||
@ -2382,7 +2382,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
dol_syslog(get_class($this)."::Livraison");
|
||||
|
||||
$usercanreceive = 0;
|
||||
if (empty($conf->reception->enabled)) {
|
||||
if (!isModEnabled('reception')) {
|
||||
$usercanreceive = $user->rights->fournisseur->commande->receptionner;
|
||||
} else {
|
||||
$usercanreceive = $user->rights->reception->creer;
|
||||
|
||||
@ -738,7 +738,7 @@ class ProductFournisseur extends Product
|
||||
$prodfourn->supplier_fk_barcode_type = $record["fk_barcode_type"];
|
||||
}
|
||||
|
||||
if (!empty($conf->dynamicprices->enabled) && !empty($prodfourn->fk_supplier_price_expression)) {
|
||||
if (isModEnabled('dynamicprices') && !empty($prodfourn->fk_supplier_price_expression)) {
|
||||
$priceparser = new PriceParser($this->db);
|
||||
$price_result = $priceparser->parseProductSupplier($prodfourn);
|
||||
if ($price_result >= 0) {
|
||||
@ -844,7 +844,7 @@ class ProductFournisseur extends Product
|
||||
$fourn_unitprice = $record["unitprice"];
|
||||
$fourn_unitprice_with_discount = $record["unitprice"] * (1 - $record["remise_percent"] / 100);
|
||||
|
||||
if (!empty($conf->dynamicprices->enabled) && !empty($record["fk_supplier_price_expression"])) {
|
||||
if (isModEnabled('dynamicprices') && !empty($record["fk_supplier_price_expression"])) {
|
||||
$prod_supplier = new ProductFournisseur($this->db);
|
||||
$prod_supplier->product_fourn_price_id = $record["product_fourn_price_id"];
|
||||
$prod_supplier->id = $prodid;
|
||||
|
||||
@ -839,7 +839,7 @@ if ($resql) {
|
||||
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
|
||||
);
|
||||
|
||||
if (!empty($conf->paymentbybanktransfer->enabled) && !empty($user->rights->paymentbybanktransfer->create)) {
|
||||
if (isModEnabled('paymentbybanktransfer') && !empty($user->rights->paymentbybanktransfer->create)) {
|
||||
$langs->load('withdrawals');
|
||||
$arrayofmassactions['banktransfertrequest'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("MakeBankTransferOrder");
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ $permissiontoadd = $user->admin;
|
||||
//if ($user->socid > 0) $socid = $user->socid;
|
||||
//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||
//restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', 0);
|
||||
if (empty($conf->hrm->enabled)) accessforbidden();
|
||||
if (!isModEnabled('hrm')) accessforbidden();
|
||||
if (empty($permissiontoread)) accessforbidden();
|
||||
|
||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||
|
||||
@ -46,7 +46,7 @@ $permissiontoadd = $user->admin;
|
||||
//if ($user->socid > 0) $socid = $user->socid;
|
||||
//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||
//restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', 0);
|
||||
if (empty($conf->hrm->enabled)) accessforbidden();
|
||||
if (!isModEnabled('hrm')) accessforbidden();
|
||||
if (empty($permissiontoread)) accessforbidden();
|
||||
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ $upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->enti
|
||||
//if ($user->socid > 0) $socid = $user->socid;
|
||||
//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||
//restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', 0);
|
||||
if (empty($conf->hrm->enabled)) accessforbidden();
|
||||
if (!isModEnabled('hrm')) accessforbidden();
|
||||
if (empty($permissiontoread)) accessforbidden();
|
||||
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ $upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->enti
|
||||
//if ($user->socid > 0) $socid = $user->socid;
|
||||
//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||
//restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
||||
if (empty($conf->hrm->enabled)) accessforbidden();
|
||||
if (!isModEnabled('hrm')) accessforbidden();
|
||||
if (empty($permissiontoread)) accessforbidden();
|
||||
|
||||
|
||||
|
||||
@ -107,6 +107,6 @@ create table llx_product
|
||||
fk_project integer DEFAULT NULL, -- Used when product was generated by a project or is specifif to a project
|
||||
mandatory_period tinyint DEFAULT 0, -- is used to signal to the user that the start and end dates are mandatory for this type of product the fk_product_type == 1 (service) (non-blocking action)
|
||||
|
||||
fk_default_bom integer DEFAULT NULL
|
||||
fk_default_bom integer DEFAULT NULL,
|
||||
fk_default_workstation integer DEFAULT NULL
|
||||
)ENGINE=innodb;
|
||||
|
||||
@ -2603,7 +2603,7 @@ function top_menu_bookmark()
|
||||
$html = '';
|
||||
|
||||
// Define $bookmarks
|
||||
if (empty($conf->bookmark->enabled) || empty($user->rights->bookmark->lire)) {
|
||||
if (!isModEnabled('bookmark') || empty($user->rights->bookmark->lire)) {
|
||||
return $html;
|
||||
}
|
||||
|
||||
@ -3304,7 +3304,7 @@ if (!function_exists("llxFooter")) {
|
||||
}
|
||||
|
||||
// Wrapper to add log when clicking on download or preview
|
||||
if (!empty($conf->blockedlog->enabled) && is_object($object) && !empty($object->id) && $object->id > 0 && $object->statut > 0) {
|
||||
if (isModEnabled('blockedlog') && is_object($object) && !empty($object->id) && $object->id > 0 && $object->statut > 0) {
|
||||
if (in_array($object->element, array('facture'))) { // Restrict for the moment to element 'facture'
|
||||
print "\n<!-- JS CODE TO ENABLE log when making a download or a preview of a document -->\n";
|
||||
?>
|
||||
|
||||
@ -153,7 +153,7 @@ if ($object->id > 0) {
|
||||
// Thirdparty
|
||||
$morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
|
||||
// Project
|
||||
if (!empty($conf->project->enabled)) {
|
||||
if (isModEnabled('project')) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($permissiontoadd) {
|
||||
|
||||
@ -436,7 +436,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
}*/
|
||||
|
||||
$formquestion = array();
|
||||
if (!empty($conf->mrp->enabled)) {
|
||||
if (isModEnabled('mrp')) {
|
||||
$langs->load("mrp");
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||
$formproduct = new FormProduct($db);
|
||||
@ -487,7 +487,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$morehtmlref .= $langs->trans('ThirdParty').' ';
|
||||
$morehtmlref .= ': '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
|
||||
// Project
|
||||
if (!empty($conf->project->enabled)) {
|
||||
if (isModEnabled('project')) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($permissiontoadd) {
|
||||
|
||||
@ -131,7 +131,7 @@ if ($object->id) {
|
||||
// Thirdparty
|
||||
$morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
|
||||
// Project
|
||||
if (!empty($conf->project->enabled)) {
|
||||
if (isModEnabled('project')) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($permissiontoadd) {
|
||||
|
||||
@ -327,7 +327,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
// Thirdparty
|
||||
$morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
|
||||
// Project
|
||||
if (!empty($conf->project->enabled)) {
|
||||
if (isModEnabled('project')) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($permissiontoadd) {
|
||||
@ -605,7 +605,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
if (!empty($arrayfields['m.datem']['checked'])) {
|
||||
print '<td class="liste_titre nowraponall">';
|
||||
print '<input class="flat" type="text" size="2" maxlength="2" placeholder="'.dol_escape_htmltag($langs->trans("Month")).'" name="month" value="'.$month.'">';
|
||||
if (empty($conf->productbatch->enabled)) {
|
||||
if (!isModEnabled('productbatch')) {
|
||||
print ' ';
|
||||
}
|
||||
//else print '<br>';
|
||||
|
||||
@ -107,7 +107,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
// Thirdparty
|
||||
$morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
|
||||
// Project
|
||||
if (!empty($conf->project->enabled)) {
|
||||
if (isModEnabled('project')) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($permissiontoadd) {
|
||||
|
||||
@ -482,7 +482,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
}*/
|
||||
|
||||
$formquestion = array();
|
||||
if (!empty($conf->mrp->enabled)) {
|
||||
if (isModEnabled('mrp')) {
|
||||
$langs->load("mrp");
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||
$formproduct = new FormProduct($db);
|
||||
@ -525,7 +525,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
// Thirdparty
|
||||
$morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
|
||||
// Project
|
||||
if (!empty($conf->project->enabled)) {
|
||||
if (isModEnabled('project')) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($permissiontoadd) {
|
||||
|
||||
@ -313,7 +313,7 @@ if (empty($reshook)) {
|
||||
$error++;
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
if (!empty($conf->dynamicprices->enabled) && $price_expression !== '') {
|
||||
if (isModEnabled('dynamicprices') && $price_expression !== '') {
|
||||
//Check the expression validity by parsing it
|
||||
$priceparser = new PriceParser($db);
|
||||
$object->fk_supplier_price_expression = $price_expression;
|
||||
@ -323,7 +323,7 @@ if (empty($reshook)) {
|
||||
setEventMessages($priceparser->translatedError(), null, 'errors');
|
||||
}
|
||||
}
|
||||
if (!$error && !empty($conf->dynamicprices->enabled)) {
|
||||
if (!$error && isModEnabled('dynamicprices')) {
|
||||
//Set the price expression for this supplier price
|
||||
$ret = $object->setSupplierPriceExpression($price_expression);
|
||||
if ($ret < 0) {
|
||||
@ -635,7 +635,7 @@ if ($id > 0 || $ref) {
|
||||
print '<input type="text" class="flat" size="5" name="tva_tx" value="'.$vattosuggest.'">';
|
||||
print '</td></tr>';
|
||||
|
||||
if (!empty($conf->dynamicprices->enabled)) { //Only show price mode and expression selector if module is enabled
|
||||
if (isModEnabled('dynamicprices')) { //Only show price mode and expression selector if module is enabled
|
||||
// Price mode selector
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("PriceMode").'</td><td>';
|
||||
$price_expression = new PriceExpression($db);
|
||||
@ -803,7 +803,7 @@ END;
|
||||
|
||||
// Option to define a transport cost on supplier price
|
||||
if (!empty($conf->global->PRODUCT_CHARGES)) {
|
||||
if (!empty($conf->margin->enabled)) {
|
||||
if (isModEnabled('margin')) {
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("Charges").'</td>';
|
||||
print '<td><input class="flat width75" name="charges" value="'.(GETPOST('charges') ? price(GETPOST('charges')) : (isset($object->fourn_charges) ? price($object->fourn_charges) : '')).'">';
|
||||
|
||||
@ -165,7 +165,7 @@ if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)
|
||||
|| !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)
|
||||
|| !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION)
|
||||
|| !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)
|
||||
|| !empty($conf->mrp->enabled)) {
|
||||
|| isModEnabled('mrp')) {
|
||||
$virtualdiffersfromphysical = 1; // According to increase/decrease stock options, virtual and physical stock may differs.
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user