Merge pull request #24545 from frederic34/use_ismodenabled
use isModEnabled
This commit is contained in:
commit
246750a89e
@ -3061,7 +3061,7 @@ class Adherent extends CommonObject
|
||||
|
||||
$blockingerrormsg = '';
|
||||
|
||||
if (empty($conf->adherent->enabled)) { // Should not happen. If module disabled, cron job should not be visible.
|
||||
if (!isModEnabled('adherent')) { // Should not happen. If module disabled, cron job should not be visible.
|
||||
$langs->load("agenda");
|
||||
$this->output = $langs->trans('ModuleNotEnabled', $langs->transnoentitiesnoconv("Adherent"));
|
||||
return 0;
|
||||
|
||||
@ -456,12 +456,12 @@ if ($action == 'create') {
|
||||
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('comment', (GETPOSTISSET('comment') ? GETPOST('comment', 'restricthtml') : $object->note_public), '', 200, 'dolibarr_notes', '', false, true, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, 15, '90%');
|
||||
$doleditor = new DolEditor('comment', (GETPOSTISSET('comment') ? GETPOST('comment', 'restricthtml') : $object->note_public), '', 200, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor'), 15, '90%');
|
||||
$doleditor->Create();
|
||||
|
||||
print '<tr><td class="tdtop">'.$langs->trans("WelcomeEMail").'</td><td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('mail_valid', GETPOSTISSET('mail_valid') ? GETPOST('mail_valid') : $object->mail_valid, '', 250, 'dolibarr_notes', '', false, true, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, 15, '90%');
|
||||
$doleditor = new DolEditor('mail_valid', GETPOSTISSET('mail_valid') ? GETPOST('mail_valid') : $object->mail_valid, '', 250, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor'), 15, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
@ -943,12 +943,12 @@ if ($rowid > 0) {
|
||||
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('comment', $object->note_public, '', 220, 'dolibarr_notes', '', false, true, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, 15, '90%');
|
||||
$doleditor = new DolEditor('comment', $object->note_public, '', 220, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor'), 15, '90%');
|
||||
$doleditor->Create();
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td class="tdtop">'.$langs->trans("WelcomeEMail").'</td><td>';
|
||||
$doleditor = new DolEditor('mail_valid', $object->mail_valid, '', 280, 'dolibarr_notes', '', false, true, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, 15, '90%');
|
||||
$doleditor = new DolEditor('mail_valid', $object->mail_valid, '', 280, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor'), 15, '90%');
|
||||
$doleditor->Create();
|
||||
print "</td></tr>";
|
||||
|
||||
|
||||
@ -289,7 +289,7 @@ if ($action == 'create' && $user->hasRight('adherent', 'configurer')) {
|
||||
print '</td></tr>';
|
||||
print '<tr><td class="tdtop fieldrequired">'.$langs->trans('Label').'</td><td><input name="libelle" class="minwidth300" value="'.dol_escape_htmltag(GETPOST("libelle", 'alphanohtml')).'"></td></tr>';
|
||||
print '<tr><td class="tdtop">'.$langs->trans('Description').'</td><td>';
|
||||
$doleditor = new DolEditor('desc', '', '', 160, 'dolibarr_notes', '', false, true, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, ROWS_3, '90%');
|
||||
$doleditor = new DolEditor('desc', '', '', 160, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor'), ROWS_3, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -531,7 +531,7 @@ print '<td>';
|
||||
print '<input type="hidden" name="action" value="setribchq">';
|
||||
print $langs->trans("PaymentMode").'</td>';
|
||||
print '<td align="right">';
|
||||
if (empty($conf->facture->enabled)) {
|
||||
if (!isModEnabled('facture')) {
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
}
|
||||
print '</td>';
|
||||
@ -540,7 +540,7 @@ print "</tr>\n";
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("SuggestPaymentByRIBOnAccount")."</td>";
|
||||
print "<td>";
|
||||
if (empty($conf->facture->enabled)) {
|
||||
if (!isModEnabled('facture')) {
|
||||
if (isModEnabled("banque")) {
|
||||
$sql = "SELECT rowid, label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."bank_account";
|
||||
@ -579,7 +579,7 @@ print "</td></tr>";
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("SuggestPaymentByChequeToAddress")."</td>";
|
||||
print "<td>";
|
||||
if (empty($conf->facture->enabled)) {
|
||||
if (!isModEnabled('facture')) {
|
||||
print '<select class="flat" name="chq" id="chq">';
|
||||
print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
|
||||
print '<option value="-1"'.($conf->global->FACTURE_CHQ_NUMBER ? ' selected' : '').'>'.$langs->trans("MenuCompanySetup").' ('.($mysoc->name ? $mysoc->name : $langs->trans("NotDefined")).')</option>';
|
||||
@ -682,7 +682,7 @@ print '</form>';
|
||||
// Seems to be not so used. So kept hidden for the moment to avoid dangerous options inflation.
|
||||
// TODO Must be implemented by PDF templates
|
||||
// Ask for payment bank during order
|
||||
if ($conf->banque->enabled) {
|
||||
if (isModEnabled("banque")) {
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").'</td><td> </td><td class="center">';
|
||||
|
||||
@ -424,7 +424,7 @@ print '<br>';
|
||||
print '<strong>'.$langs->trans("HTTPCacheStaticResources").' - ';
|
||||
print $form->textwithpicto($langs->trans("CacheByServer"), $langs->trans("CacheByServerDesc"));
|
||||
print ':</strong><br>';
|
||||
// No cahce on PHP
|
||||
// No cache on PHP
|
||||
//print '<div id="httpcachephpok">'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'php (.php)').'</div>';
|
||||
//print '<div id="httpcachephpko">'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeNotCached",'php (.php)').'</div>';
|
||||
// Cache on rest
|
||||
|
||||
@ -1732,8 +1732,8 @@ class BOMLine extends CommonObjectLine
|
||||
*/
|
||||
public $childBom = array();
|
||||
|
||||
/*
|
||||
* Service Workstation
|
||||
/**
|
||||
* @var int Service Workstation
|
||||
*/
|
||||
public $fk_default_workstation;
|
||||
|
||||
|
||||
@ -2904,7 +2904,7 @@ if ($action == 'create') {
|
||||
}
|
||||
}
|
||||
// Create event
|
||||
/*if ($conf->agenda->enabled && !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 page.
|
||||
/*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 page.
|
||||
{
|
||||
print '<a class="butAction" href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans("AddAction") . '</a></div>';
|
||||
}*/
|
||||
|
||||
@ -326,7 +326,7 @@ class Propal extends CommonObject
|
||||
'localtax1' =>array('type'=>'double(24,8)', 'label'=>'LocalTax1', 'enabled'=>1, 'visible'=>-1, 'position'=>135, 'isameasure'=>1),
|
||||
'localtax2' =>array('type'=>'double(24,8)', 'label'=>'LocalTax2', 'enabled'=>1, 'visible'=>-1, 'position'=>140, 'isameasure'=>1),
|
||||
'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'TotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>145, 'isameasure'=>1),
|
||||
'fk_account' =>array('type'=>'integer', 'label'=>'BankAccount', 'enabled'=>'$conf->banque->enabled', 'visible'=>-1, 'position'=>150),
|
||||
'fk_account' =>array('type'=>'integer', 'label'=>'BankAccount', 'enabled'=>'isModEnabled("banque")', 'visible'=>-1, 'position'=>150),
|
||||
'fk_currency' =>array('type'=>'varchar(3)', 'label'=>'Currency', 'enabled'=>1, 'visible'=>-1, 'position'=>155),
|
||||
'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'PaymentTerm', 'enabled'=>1, 'visible'=>-1, 'position'=>160),
|
||||
'deposit_percent' =>array('type'=>'varchar(63)', 'label'=>'DepositPercent', 'enabled'=>1, 'visible'=>-1, 'position'=>161),
|
||||
|
||||
@ -890,7 +890,7 @@ if ($search_billed != '' && $search_billed >= 0) {
|
||||
}
|
||||
if ($search_status <> '') {
|
||||
if ($search_status <= 3 && $search_status >= -1) { // status from -1 to 3 are real status (other are virtual combination)
|
||||
if ($search_status == 1 && empty($conf->expedition->enabled)) {
|
||||
if ($search_status == 1 && !isModEnabled('expedition')) {
|
||||
$sql .= ' AND c.fk_statut IN (1,2)'; // If module expedition disabled, we include order with status 'sending in process' into 'validated'
|
||||
} else {
|
||||
$sql .= ' AND c.fk_statut = '.((int) $search_status); // draft, validated, in process or canceled
|
||||
@ -1116,7 +1116,7 @@ if ($resql) {
|
||||
$title .= ' - '.$langs->trans('StatusOrderToProcessShort');
|
||||
}
|
||||
if ($search_status == -3) {
|
||||
$title .= ' - '.$langs->trans('StatusOrderValidated').', '.(empty($conf->expedition->enabled) ? '' : $langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill');
|
||||
$title .= ' - '.$langs->trans('StatusOrderValidated').', '.(!isModEnabled('expedition') ? '' : $langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill');
|
||||
}
|
||||
if ($search_status == -4) {
|
||||
$title .= ' - '.$langs->trans("StatusOrderValidatedShort").'+'.$langs->trans("StatusOrderSentShort");
|
||||
|
||||
@ -40,7 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.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.'/commande/class/commande.class.php';
|
||||
@ -188,7 +188,7 @@ $arrayfields = array(
|
||||
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers, 'position'=>55),
|
||||
'c.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1, 'position'=>60),
|
||||
'c.date_delivery'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE), 'position'=>65),
|
||||
'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66 , 'enabled'=>!empty($conf->expedition->enabled)),
|
||||
'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66 , 'enabled'=>isModEnabled('expedition')),
|
||||
'c.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>-1, 'position'=>67),
|
||||
'c.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>-1, 'position'=>68),
|
||||
'c.fk_input_reason'=>array('label'=>"Channel", 'checked'=>-1, 'position'=>69),
|
||||
@ -203,16 +203,16 @@ $arrayfields = array(
|
||||
'c.fk_warehouse'=>array('label'=>'Warehouse', 'checked'=>0, 'enabled'=>(empty($conf->stock->enabled) && empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER) ? 0 : 1), 'position'=>110),
|
||||
'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>115),
|
||||
'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>0, 'position'=>116),
|
||||
'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)),
|
||||
'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>120),
|
||||
'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>125),
|
||||
'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>130),
|
||||
'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES)), 'position'=>135),
|
||||
'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES)), 'position'=>140),
|
||||
'shippable'=>array('label'=>"Shippable", 'checked'=>1,'enabled'=>(!empty($conf->expedition->enabled)), 'position'=>990),
|
||||
'shippable'=>array('label'=>"Shippable", 'checked'=>1,'enabled'=>(isModEnabled('expedition')), 'position'=>990),
|
||||
'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'enabled'=>(empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)), 'position'=>995),
|
||||
'c.import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>999),
|
||||
'c.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000)
|
||||
@ -338,7 +338,7 @@ $form = new Form($db);
|
||||
$formother = new FormOther($db);
|
||||
$formfile = new FormFile($db);
|
||||
$formmargin = null;
|
||||
if (!empty($conf->margin->enabled)) {
|
||||
if (isModEnabled('margin')) {
|
||||
$formmargin = new FormMargin($db);
|
||||
}
|
||||
$companystatic = new Societe($db);
|
||||
@ -466,7 +466,7 @@ if ($search_billed != '' && $search_billed >= 0) {
|
||||
}
|
||||
if ($search_status <> '') {
|
||||
if ($search_status <= 3 && $search_status >= -1) { // status from -1 to 3 are real status (other are virtual combination)
|
||||
if ($search_status == 1 && empty($conf->expedition->enabled)) {
|
||||
if ($search_status == 1 && !isModEnabled('expedition')) {
|
||||
$sql .= ' AND c.fk_statut IN (1,2)'; // If module expedition disabled, we include order with status 'sending in process' into 'validated'
|
||||
} else {
|
||||
$sql .= ' AND c.fk_statut = '.((int) $search_status); // brouillon, validee, en cours, annulee
|
||||
@ -646,7 +646,7 @@ if ($resql) {
|
||||
$title .= ' - '.$langs->trans('StatusOrderToProcessShort');
|
||||
}
|
||||
if ($search_status == -3) {
|
||||
$title .= ' - '.$langs->trans('StatusOrderValidated').', '.(empty($conf->expedition->enabled) ? '' : $langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill');
|
||||
$title .= ' - '.$langs->trans('StatusOrderValidated').', '.(!isModEnabled('expedition') ? '' : $langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill');
|
||||
}
|
||||
if ($search_status == -4) {
|
||||
$title .= ' - '.$langs->trans("StatusOrderValidatedShort").'+'.$langs->trans("StatusOrderSentShort");
|
||||
@ -875,7 +875,7 @@ if ($resql) {
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
// If the user can view prospects other than his'
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
if (isModEnabled("categorie") && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('IncludingProductWithTag');
|
||||
@ -883,7 +883,7 @@ if ($resql) {
|
||||
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300 widthcentpercentminusx', 1);
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
if (isModEnabled("categorie") && $user->rights->categorie->lire) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('CustomersProspectsCategoriesShort');
|
||||
@ -1402,7 +1402,7 @@ if ($resql) {
|
||||
$i = 0;
|
||||
|
||||
$with_margin_info = false;
|
||||
if (!empty($conf->margin->enabled) && (
|
||||
if (isModEnabled('margin') && (
|
||||
!empty($arrayfields['total_pa']['checked'])
|
||||
|| !empty($arrayfields['total_margin']['checked'])
|
||||
|| !empty($arrayfields['total_margin_rate']['checked'])
|
||||
|
||||
@ -198,7 +198,7 @@ class FactureRec extends CommonInvoice
|
||||
'revenuestamp' =>array('type'=>'double(24,8)', 'label'=>'RevenueStamp', 'enabled'=>1, 'visible'=>-1, 'position'=>160, 'isameasure'=>1),
|
||||
'auto_validate' =>array('type'=>'integer', 'label'=>'Auto validate', 'enabled'=>1, 'visible'=>-1, 'position'=>165),
|
||||
'generate_pdf' =>array('type'=>'integer', 'label'=>'Generate pdf', 'enabled'=>1, 'visible'=>-1, 'position'=>170),
|
||||
'fk_account' =>array('type'=>'integer', 'label'=>'Fk account', 'enabled'=>'$conf->banque->enabled', 'visible'=>-1, 'position'=>175),
|
||||
'fk_account' =>array('type'=>'integer', 'label'=>'Fk account', 'enabled'=>'isModEnabled("banque")', 'visible'=>-1, 'position'=>175),
|
||||
'fk_multicurrency' =>array('type'=>'integer', 'label'=>'Fk multicurrency', 'enabled'=>1, 'visible'=>-1, 'position'=>180),
|
||||
'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'Multicurrency code', 'enabled'=>1, 'visible'=>-1, 'position'=>185),
|
||||
'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency tx', 'enabled'=>1, 'visible'=>-1, 'position'=>190, 'isameasure'=>1),
|
||||
|
||||
@ -1178,7 +1178,7 @@ if ($resql) {
|
||||
if (!empty($user->rights->facture->paiement)) {
|
||||
$arrayofmassactions['makepayment'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("MakePaymentAndClassifyPayed");
|
||||
}
|
||||
if (!empty($conf->prelevement->enabled) && !empty($user->rights->prelevement->bons->creer)) {
|
||||
if (isModEnabled('prelevement') && !empty($user->rights->prelevement->bons->creer)) {
|
||||
$langs->load("withdrawals");
|
||||
$arrayofmassactions['withdrawrequest'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("MakeWithdrawRequest");
|
||||
}
|
||||
|
||||
@ -746,7 +746,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
// Remain to take or to pay back
|
||||
print '<td class="right">';
|
||||
print price($sign * $remaintopay);
|
||||
if (!empty($conf->prelevement->enabled)) {
|
||||
if (isModEnabled('prelevement')) {
|
||||
$numdirectdebitopen = 0;
|
||||
$totaldirectdebit = 0;
|
||||
$sql = "SELECT COUNT(pfd.rowid) as nb, SUM(pfd.amount) as amount";
|
||||
@ -859,8 +859,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
|
||||
print '<br><div class="center">';
|
||||
print '<input type="checkbox" checked name="closepaidinvoices"> '.$checkboxlabel;
|
||||
/*if (!empty($conf->prelevement->enabled))
|
||||
{
|
||||
/*if (isModEnabled('prelevement')) {
|
||||
$langs->load("withdrawals");
|
||||
if (!empty($conf->global->WITHDRAW_DISABLE_AUTOCREATE_ONPAYMENTS)) print '<br>'.$langs->trans("IfInvoiceNeedOnWithdrawPaymentWontBeClosed");
|
||||
}*/
|
||||
|
||||
@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
||||
if (isModEnabled("banque")) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
}
|
||||
if (!empty($conf->margin->enabled)) {
|
||||
if (isModEnabled('margin')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php';
|
||||
}
|
||||
|
||||
@ -436,7 +436,7 @@ if ($resql) {
|
||||
print '<td>'.$langs->trans('Entity').'</td>';
|
||||
}
|
||||
//Add Margin
|
||||
if (!empty($conf->margin->enabled) && getDolGlobalInt('MARGIN_SHOW_MARGIN_ON_PAYMENT')) {
|
||||
if (isModEnabled('margin') && getDolGlobalInt('MARGIN_SHOW_MARGIN_ON_PAYMENT')) {
|
||||
print '<td class="right">'.$langs->trans('Margin').'</td>';
|
||||
}
|
||||
print '<td class="right">'.$langs->trans('ExpectedToPay').'</td>';
|
||||
@ -455,7 +455,7 @@ if ($resql) {
|
||||
$invoice->fetch($objp->facid);
|
||||
|
||||
// Add Margin
|
||||
if (!empty($conf->margin->enabled) && getDolGlobalInt('MARGIN_SHOW_MARGIN_ON_PAYMENT')) {
|
||||
if (isModEnabled('margin') && getDolGlobalInt('MARGIN_SHOW_MARGIN_ON_PAYMENT')) {
|
||||
$formmargin = new FormMargin($db);
|
||||
$marginInfo = array();
|
||||
$invoice->fetch_lines();
|
||||
@ -489,7 +489,7 @@ if ($resql) {
|
||||
}
|
||||
|
||||
// Add margin
|
||||
if (!empty($conf->margin->enabled) && getDolGlobalInt('MARGIN_SHOW_MARGIN_ON_PAYMENT')) {
|
||||
if (isModEnabled('margin') && getDolGlobalInt('MARGIN_SHOW_MARGIN_ON_PAYMENT')) {
|
||||
print '<td class="right">'.price($marginInfo['total_margin']).'</td>';
|
||||
}
|
||||
|
||||
|
||||
@ -1966,7 +1966,7 @@ if ($action == 'create') {
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nohover">'.$langs->trans("Comment").'</td><td colspan="3" class="nohover" colspan="'.($conf->margin->enabled ? 4 : 3).'"><input type="text" class="minwidth300" name="comment" value="'.dol_escape_htmltag(GETPOST("comment", 'alphanohtml')).'"></td>';
|
||||
print '<td class="nohover">'.$langs->trans("Comment").'</td><td colspan="3" class="nohover" colspan="'.(isModEnabled('margin') ? 4 : 3).'"><input type="text" class="minwidth300" name="comment" value="'.dol_escape_htmltag(GETPOST("comment", 'alphanohtml')).'"></td>';
|
||||
print '<td class="nohover right">';
|
||||
print '<input type="submit" class="button" name="activate" value="'.$langs->trans("Activate").'"> ';
|
||||
print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
|
||||
@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled("categorie")) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
}
|
||||
|
||||
@ -701,7 +701,7 @@ if (isModEnabled('categorie') && $user->rights->categorie->lire && ($user->right
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
// Filter on customer categories
|
||||
if (!empty($conf->global->MAIN_SEARCH_CATEGORY_CUSTOMER_ON_CONTRACT_LIST) && !empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
if (!empty($conf->global->MAIN_SEARCH_CATEGORY_CUSTOMER_ON_CONTRACT_LIST) && isModEnabled("categorie") && $user->rights->categorie->lire) {
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->transnoentities('CustomersProspectsCategoriesShort');
|
||||
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"');
|
||||
|
||||
@ -60,7 +60,7 @@ class box_actions extends ModeleBoxes
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
$this->enabled = $conf->agenda->enabled;
|
||||
$this->enabled = isModEnabled('agenda');
|
||||
|
||||
$this->hidden = !($user->hasRight('agenda', 'myactions', 'read'));
|
||||
}
|
||||
|
||||
@ -137,7 +137,7 @@ if (!isset($form) || !is_object($form)) {
|
||||
}
|
||||
|
||||
// Link to module builder
|
||||
if (!empty($conf->modulebuilder->enabled)) {
|
||||
if (isModEnabled('modulebuilder')) {
|
||||
$text = '<a href="'.DOL_URL_ROOT.'/modulebuilder/index.php?mainmenu=home&leftmenu=admintools" target="modulebuilder">';
|
||||
//$text.= img_picto(":".$langs->trans("ModuleBuilder"), 'printer_top.png', 'class="printer"');
|
||||
$text .= '<span class="fa fa-bug atoplogin"></span>';
|
||||
|
||||
@ -3584,7 +3584,7 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli
|
||||
}
|
||||
}
|
||||
|
||||
//if (($cid || $socid) && !empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
|
||||
//if (($cid || $socid) && isModEnabled('agenda') && $user->rights->agenda->myactions->create)
|
||||
if (isModEnabled('agenda') && $user->hasRight("agenda", "myactions", "create")) {
|
||||
$type = 'AC_TEL';
|
||||
$link = '';
|
||||
@ -3801,22 +3801,22 @@ function dol_print_address($address, $htmlid, $element, $id, $noprint = 0, $char
|
||||
|
||||
// TODO Remove this block, we can add this using the hook now
|
||||
$showgmap = $showomap = 0;
|
||||
if (($element == 'thirdparty' || $element == 'societe') && !empty($conf->google->enabled) && !empty($conf->global->GOOGLE_ENABLE_GMAPS)) {
|
||||
if (($element == 'thirdparty' || $element == 'societe') && isModEnabled('google') && !empty($conf->global->GOOGLE_ENABLE_GMAPS)) {
|
||||
$showgmap = 1;
|
||||
}
|
||||
if ($element == 'contact' && !empty($conf->google->enabled) && !empty($conf->global->GOOGLE_ENABLE_GMAPS_CONTACTS)) {
|
||||
if ($element == 'contact' && isModEnabled('google') && !empty($conf->global->GOOGLE_ENABLE_GMAPS_CONTACTS)) {
|
||||
$showgmap = 1;
|
||||
}
|
||||
if ($element == 'member' && !empty($conf->google->enabled) && !empty($conf->global->GOOGLE_ENABLE_GMAPS_MEMBERS)) {
|
||||
if ($element == 'member' && isModEnabled('google') && !empty($conf->global->GOOGLE_ENABLE_GMAPS_MEMBERS)) {
|
||||
$showgmap = 1;
|
||||
}
|
||||
if (($element == 'thirdparty' || $element == 'societe') && !empty($conf->openstreetmap->enabled) && !empty($conf->global->OPENSTREETMAP_ENABLE_MAPS)) {
|
||||
if (($element == 'thirdparty' || $element == 'societe') && isModEnabled('openstreetmap') && !empty($conf->global->OPENSTREETMAP_ENABLE_MAPS)) {
|
||||
$showomap = 1;
|
||||
}
|
||||
if ($element == 'contact' && !empty($conf->openstreetmap->enabled) && !empty($conf->global->OPENSTREETMAP_ENABLE_MAPS_CONTACTS)) {
|
||||
if ($element == 'contact' && isModEnabled('openstreetmap') && !empty($conf->global->OPENSTREETMAP_ENABLE_MAPS_CONTACTS)) {
|
||||
$showomap = 1;
|
||||
}
|
||||
if ($element == 'member' && !empty($conf->openstreetmap->enabled) && !empty($conf->global->OPENSTREETMAP_ENABLE_MAPS_MEMBERS)) {
|
||||
if ($element == 'member' && isModEnabled('openstreetmap') && !empty($conf->global->OPENSTREETMAP_ENABLE_MAPS_MEMBERS)) {
|
||||
$showomap = 1;
|
||||
}
|
||||
if ($showgmap) {
|
||||
@ -9779,7 +9779,7 @@ function printCommonFooter($zone = 'private')
|
||||
|
||||
// Google Analytics
|
||||
// TODO Add a hook here
|
||||
if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID)) {
|
||||
if (isModEnabled('google') && !empty($conf->global->MAIN_GOOGLE_AN_ID)) {
|
||||
$tmptagarray = explode(',', $conf->global->MAIN_GOOGLE_AN_ID);
|
||||
foreach ($tmptagarray as $tmptag) {
|
||||
print "\n";
|
||||
|
||||
@ -56,7 +56,7 @@ function facture_prepare_head($object)
|
||||
$h++;
|
||||
}
|
||||
|
||||
if (!empty($conf->prelevement->enabled)) {
|
||||
if (isModEnabled('prelevement')) {
|
||||
$nbStandingOrders = 0;
|
||||
$sql = "SELECT COUNT(pfd.rowid) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_demande as pfd";
|
||||
|
||||
@ -13,12 +13,12 @@ delete from llx_menu where menu_handler=__HANDLER__ and entity=__ENTITY__;
|
||||
-- old: (module, enabled, rowid, ...)
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 1__+MAX_llx_menu__, '', '1', __HANDLER__, 'top', 'home', '', 0, '/index.php?mainmenu=home&leftmenu=', 'Home', -1, '', '', '', 2, 10, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 2__+MAX_llx_menu__, 'societe|fournisseur|supplier_order|supplier_invoice', '(isModEnabled("societe") && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) || isModeEnabled('supplier_order') || isModEnabled('supplier_invoice')))', __HANDLER__, 'top', 'companies', '', 0, '/societe/index.php?mainmenu=companies&leftmenu=', 'ThirdParties', -1, 'companies', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 20, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 3__+MAX_llx_menu__, 'product|service', '$conf->product->enabled || $conf->service->enabled', __HANDLER__, 'top', 'products', '', 0, '/product/index.php?mainmenu=products&leftmenu=', 'ProductsPipeServices', -1, 'products', '$user->rights->produit->lire||$user->rights->service->lire', '', 0, 30, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 3__+MAX_llx_menu__, 'product|service', 'isModEnabled("product") || isModEnabled("service")', __HANDLER__, 'top', 'products', '', 0, '/product/index.php?mainmenu=products&leftmenu=', 'ProductsPipeServices', -1, 'products', '$user->rights->produit->lire||$user->rights->service->lire', '', 0, 30, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 16__+MAX_llx_menu__, 'bom|mrp', '$conf->bom->enabled || $conf->mrp->enabled', __HANDLER__, 'top', 'mrp', '', 0, '/mrp/index.php?mainmenu=mrp&leftmenu=', 'MRP', -1, 'mrp', '$user->rights->bom->read||$user->rights->mrp->read', '', 0, 31, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 7__+MAX_llx_menu__, 'projet', '$conf->project->enabled', __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 2, 32, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 5__+MAX_llx_menu__, 'propal|commande|fournisseur|supplier_order|supplier_invoice|contrat|ficheinter', '$conf->propal->enabled || $conf->commande->enabled || $conf->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled', __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 40, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 6__+MAX_llx_menu__, 'facture|don|tax|salaries|loan|banque', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled || $conf->banque->enabled', __HANDLER__, 'top', 'billing', '', 0, '/compta/index.php?mainmenu=billing&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read || $user->rights->banque->lire', '', 2, 50, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 14__+MAX_llx_menu__, 'banque|prelevement', '$conf->banque->enabled || $conf->prelevement->enabled', __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/list.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->rights->banque->lire || $user->rights->prelevement->bons->lire', '', 0, 52, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 6__+MAX_llx_menu__, 'facture|don|tax|salaries|loan|banque', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled || isModEnabled("banque")', __HANDLER__, 'top', 'billing', '', 0, '/compta/index.php?mainmenu=billing&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read || $user->rights->banque->lire', '', 2, 50, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 14__+MAX_llx_menu__, 'banque|prelevement', 'isModEnabled("banque") || isModEnabled("prelevement")', __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/list.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->rights->banque->lire || $user->rights->prelevement->bons->lire', '', 0, 52, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 9__+MAX_llx_menu__, 'comptabilite|accounting|asset', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->asset->enabled', __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&leftmenu=accountancy', 'MenuAccountancy', -1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->mouvements->lire || $user->rights->asset->read', '', 2, 54, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 8__+MAX_llx_menu__, '', '', __HANDLER__, 'top', 'tools', '', 0, '/core/tools.php?mainmenu=tools&leftmenu=', 'Tools', -1, 'other', '', '', 2, 90, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 13__+MAX_llx_menu__, 'adherent', '$conf->adherent->enabled', __HANDLER__, 'top', 'members', '', 0, '/adherents/index.php?mainmenu=members&leftmenu=', 'Members', -1, 'members', '$user->rights->adherent->lire', '', 2, 19, __ENTITY__);
|
||||
@ -115,10 +115,10 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("societe") && $conf->categorie->enabled', __HANDLER__, 'left', 671__+MAX_llx_menu__, 'companies', '', 670__+MAX_llx_menu__, '/categories/card.php?mainmenu=companies&action=create&type=4', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__);
|
||||
|
||||
-- Product - Product
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2800__+MAX_llx_menu__, 'products', 'product', 3__+MAX_llx_menu__, '/product/index.php?mainmenu=products&leftmenu=product&type=0', 'Products', 0, 'products', '$user->rights->produit->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2801__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/card.php?mainmenu=products&leftmenu=product&action=create&type=0', 'NewProduct', 1, 'products', '$user->rights->produit->creer', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2802__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/list.php?mainmenu=products&leftmenu=product&type=0', 'List', 1, 'products', '$user->rights->produit->lire', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2803__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/reassort.php?mainmenu=products&type=0', 'MenuStocks', 1, 'products', '$user->rights->produit->lire && $user->rights->stock->lire', '', 2, 4, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("product")', __HANDLER__, 'left', 2800__+MAX_llx_menu__, 'products', 'product', 3__+MAX_llx_menu__, '/product/index.php?mainmenu=products&leftmenu=product&type=0', 'Products', 0, 'products', '$user->rights->produit->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("product")', __HANDLER__, 'left', 2801__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/card.php?mainmenu=products&leftmenu=product&action=create&type=0', 'NewProduct', 1, 'products', '$user->rights->produit->creer', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("product")', __HANDLER__, 'left', 2802__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/list.php?mainmenu=products&leftmenu=product&type=0', 'List', 1, 'products', '$user->rights->produit->lire', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("product")', __HANDLER__, 'left', 2803__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/reassort.php?mainmenu=products&type=0', 'MenuStocks', 1, 'products', '$user->rights->produit->lire && $user->rights->stock->lire', '', 2, 4, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->productbatch->enabled', __HANDLER__, 'left', 2805__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/reassortlot.php?mainmenu=products&type=0&search_subjecttolotserial=1', 'StocksByLotSerial', 1, 'products', '$user->rights->produit->lire && $user->rights->stock->lire', '', 2, 5, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->productbatch->enabled', __HANDLER__, 'left', 2806__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/stock/productlot_list.php?mainmenu=products', 'LotSerial', 1, 'products', '$user->rights->produit->lire && $user->rights->stock->lire', '', 2, 6, __ENTITY__);
|
||||
|
||||
@ -127,9 +127,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 2804__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/stats/card.php?mainmenu=products&id=all&leftmenu=stats&type=0', 'Statistics', 1, 'main', '$user->rights->produit->lire', '', 2, 8, __ENTITY__);
|
||||
|
||||
-- Product - Services
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->service->enabled', __HANDLER__, 'left', 2900__+MAX_llx_menu__, 'products', 'service', 3__+MAX_llx_menu__, '/product/index.php?mainmenu=products&leftmenu=service&type=1', 'Services', 0, 'products', '$user->rights->service->lire', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->service->enabled', __HANDLER__, 'left', 2901__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/card.php?mainmenu=products&leftmenu=service&action=create&type=1', 'NewService', 1, 'products', '$user->rights->service->creer', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->service->enabled', __HANDLER__, 'left', 2902__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/list.php?mainmenu=products&leftmenu=service&type=1', 'List', 1, 'products', '$user->rights->service->lire', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("service")', __HANDLER__, 'left', 2900__+MAX_llx_menu__, 'products', 'service', 3__+MAX_llx_menu__, '/product/index.php?mainmenu=products&leftmenu=service&type=1', 'Services', 0, 'products', '$user->rights->service->lire', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("service")', __HANDLER__, 'left', 2901__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/card.php?mainmenu=products&leftmenu=service&action=create&type=1', 'NewService', 1, 'products', '$user->rights->service->creer', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("service")', __HANDLER__, 'left', 2902__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/list.php?mainmenu=products&leftmenu=service&type=1', 'List', 1, 'products', '$user->rights->service->lire', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 2903__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/stats/card.php?mainmenu=products&id=all&leftmenu=stats&type=1', 'Statistics', 1, 'main', '$user->rights->service->lire', '', 2, 5, __ENTITY__);
|
||||
|
||||
-- Product - Stocks
|
||||
@ -251,7 +251,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
-- insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->don->enabled && $leftmenu=="donations"', __HANDLER__, 'left', 2003__+MAX_llx_menu__, 'billing', '', 2000__+MAX_llx_menu__, '/don/stats/index.php?mainmenu=billing&leftmenu=donations', 'Statistics', 1, 'donations', '$user->rights->don->lire', '', 2, 2, __ENTITY__);
|
||||
|
||||
-- Special expenses
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled || $conf->salaries->enabled || $conf->loan->enabled || $conf->banque->enabled', __HANDLER__, 'left', 2200__+MAX_llx_menu__, 'billing', 'tax', 6__+MAX_llx_menu__, '/compta/charges/index.php?mainmenu=billing&leftmenu=tax', 'MenuTaxesAndSpecialExpenses', 0, 'compta', '(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) || (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read)) || (! empty($conf->loan->enabled) && $user->rights->loan->read) || (! empty($conf->banque->enabled) && $user->rights->banque->lire)', '', 0, 6, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled || $conf->salaries->enabled || $conf->loan->enabled || isModEnabled("banque")', __HANDLER__, 'left', 2200__+MAX_llx_menu__, 'billing', 'tax', 6__+MAX_llx_menu__, '/compta/charges/index.php?mainmenu=billing&leftmenu=tax', 'MenuTaxesAndSpecialExpenses', 0, 'compta', '(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) || (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read)) || (! empty($conf->loan->enabled) && $user->rights->loan->read) || (isModEnabled("banque") && $user->rights->banque->lire)', '', 0, 6, __ENTITY__);
|
||||
|
||||
-- Social contributions
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled', __HANDLER__, 'left', 2250__+MAX_llx_menu__, 'billing', 'tax_social', 2200__+MAX_llx_menu__, '/compta/sociales/list.php?mainmenu=billing&leftmenu=tax_social', 'SocialContributions', 1, '', '$user->rights->tax->charges->lire', '', 0, 1, __ENTITY__);
|
||||
@ -279,9 +279,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->loan->enabled && $leftmenu=="tax_loan" && ! empty($conf->global->LOAN_SHOW_CALCULATOR)', __HANDLER__, 'left', 2223__+MAX_llx_menu__, 'billing', '', 2220__+MAX_llx_menu__, '/loan/calc.php?mainmenu=billing&leftmenu=tax_loan', 'Calculator', 1, 'companies', '$user->rights->loan->calc', '', 0, 4, __ENTITY__);
|
||||
|
||||
-- Various payments
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)', __HANDLER__, 'left', 2350__+MAX_llx_menu__, 'billing', 'tax_various', 6__+MAX_llx_menu__, '/compta/bank/various_payment/list.php?mainmenu=billing&leftmenu=tax_various', 'MenuVariousPayment', 0, 'banks', '$user->rights->banque->lire', '', 0, 30, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && $leftmenu=="tax_various"', __HANDLER__, 'left', 2351__+MAX_llx_menu__, 'billing', '', 2350__+MAX_llx_menu__, '/compta/bank/various_payment/card.php?mainmenu=billing&leftmenu=tax_various&action=create', 'New', 1, 'various_payment', '$user->rights->banque->modifier', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && $leftmenu=="tax_various"', __HANDLER__, 'left', 2352__+MAX_llx_menu__, 'billing', '', 2350__+MAX_llx_menu__, '/compta/bank/various_payment/list.php?mainmenu=billing&leftmenu=tax_various', 'List', 1, 'various_payment', '$user->rights->banque->lire', '', 0, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("banque") && empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)', __HANDLER__, 'left', 2350__+MAX_llx_menu__, 'billing', 'tax_various', 6__+MAX_llx_menu__, '/compta/bank/various_payment/list.php?mainmenu=billing&leftmenu=tax_various', 'MenuVariousPayment', 0, 'banks', '$user->rights->banque->lire', '', 0, 30, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("banque") && $leftmenu=="tax_various"', __HANDLER__, 'left', 2351__+MAX_llx_menu__, 'billing', '', 2350__+MAX_llx_menu__, '/compta/bank/various_payment/card.php?mainmenu=billing&leftmenu=tax_various&action=create', 'New', 1, 'various_payment', '$user->rights->banque->modifier', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("banque") && $leftmenu=="tax_various"', __HANDLER__, 'left', 2352__+MAX_llx_menu__, 'billing', '', 2350__+MAX_llx_menu__, '/compta/bank/various_payment/list.php?mainmenu=billing&leftmenu=tax_various', 'List', 1, 'various_payment', '$user->rights->banque->lire', '', 0, 3, __ENTITY__);
|
||||
|
||||
-- Accounting (Double entries)
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2400__+MAX_llx_menu__, 'accountancy', 'accountancy', 9__+MAX_llx_menu__, '/accountancy/index.php?mainmenu=accountancy&leftmenu=accountancy', 'MenuAccountancy', 0, 'main', '! empty($conf->accounting->enabled) || $user->rights->accounting->bind->write || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire', '', 0, 7, __ENTITY__);
|
||||
@ -371,33 +371,33 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->asset->enabled && $leftmenu=="asset"', __HANDLER__, 'left', 3006__+MAX_llx_menu__, 'asset', '', 3004__+MAX_llx_menu__, '/asset/type.php?mainmenu=accountancy', 'MenuListTypeAssets', 3, 'assets', '($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->asset->model_advance->read:$user->rights->asset->read)', '', 0, 25, __ENTITY__);
|
||||
|
||||
-- Check deposit
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))', __HANDLER__, 'left', 1711__+MAX_llx_menu__, 'accountancy', 'checks', 14__+MAX_llx_menu__, '/compta/paiement/cheque/index.php?mainmenu=bank&leftmenu=checks', 'MenuChequeDeposits', 0, 'bills', '$user->rights->banque->lire', '', 2, 9, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))', __HANDLER__, 'left', 1712__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/card.php?mainmenu=bank&leftmenu=checks&action=new', 'NewCheckDeposit', 1, 'compta', '$user->rights->banque->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))', __HANDLER__, 'left', 1713__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/list.php?mainmenu=bank&leftmenu=checks', 'List', 1, 'bills', '$user->rights->banque->lire', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && isModEnabled("banque") && (isModEnabled("facture") || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))', __HANDLER__, 'left', 1711__+MAX_llx_menu__, 'accountancy', 'checks', 14__+MAX_llx_menu__, '/compta/paiement/cheque/index.php?mainmenu=bank&leftmenu=checks', 'MenuChequeDeposits', 0, 'bills', '$user->rights->banque->lire', '', 2, 9, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && isModEnabled("banque")pty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))', __HANDLER__, 'left', 1712__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/card.php?mainmenu=bank&leftmenu=checks&action=new', 'NewCheckDeposit', 1, 'compta', '$user->rights->banque->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && isModEnabled("banque") && (isModEnabled("facture") || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))', __HANDLER__, 'left', 1713__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/list.php?mainmenu=bank&leftmenu=checks', 'List', 1, 'bills', '$user->rights->banque->lire', '', 2, 1, __ENTITY__);
|
||||
|
||||
-- PaymentByDirectDebit
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled', __HANDLER__, 'left', 2500__+MAX_llx_menu__, 'accountancy', 'withdraw', 14__+MAX_llx_menu__, '/compta/prelevement/index.php?mainmenu=bank&leftmenu=withdraw', 'PaymentByDirectDebit', 0, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 9, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2502__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/create.php?mainmenu=bank&leftmenu=withdraw', 'NewStandingOrder', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2503__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/orders_list.php?mainmenu=bank&leftmenu=withdraw', 'WithdrawalsReceipts', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2504__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/list.php?mainmenu=bank&leftmenu=withdraw', 'WithdrawalsLines', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2506__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/rejets.php?mainmenu=bank&leftmenu=withdraw', 'Rejects', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 5, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2507__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/stats.php?mainmenu=bank&leftmenu=withdraw', 'Statistics', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 6, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("prelevement")', __HANDLER__, 'left', 2500__+MAX_llx_menu__, 'accountancy', 'withdraw', 14__+MAX_llx_menu__, '/compta/prelevement/index.php?mainmenu=bank&leftmenu=withdraw', 'PaymentByDirectDebit', 0, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 9, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("prelevement") && $leftmenu=="withdraw"', __HANDLER__, 'left', 2502__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/create.php?mainmenu=bank&leftmenu=withdraw', 'NewStandingOrder', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("prelevement") && $leftmenu=="withdraw"', __HANDLER__, 'left', 2503__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/orders_list.php?mainmenu=bank&leftmenu=withdraw', 'WithdrawalsReceipts', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("prelevement") && $leftmenu=="withdraw"', __HANDLER__, 'left', 2504__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/list.php?mainmenu=bank&leftmenu=withdraw', 'WithdrawalsLines', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("prelevement") && $leftmenu=="withdraw"', __HANDLER__, 'left', 2506__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/rejets.php?mainmenu=bank&leftmenu=withdraw', 'Rejects', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 5, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("prelevement") && $leftmenu=="withdraw"', __HANDLER__, 'left', 2507__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/stats.php?mainmenu=bank&leftmenu=withdraw', 'Statistics', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 6, __ENTITY__);
|
||||
|
||||
-- PaymentByCreditTransfer
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled', __HANDLER__, 'left', 2510__+MAX_llx_menu__, 'accountancy', 'banktransfer', 14__+MAX_llx_menu__, '/compta/prelevement/index.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'PaymentByBankTransfer', 0, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 9, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2512__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/create.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'NewStandingOrder', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2513__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/orders_list.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'WithdrawalsReceipts', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2514__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/list.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'WithdrawalsLines', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2516__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/rejets.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'Rejects', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 5, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2517__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/stats.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'Statistics', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 6, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("prelevement")', __HANDLER__, 'left', 2510__+MAX_llx_menu__, 'accountancy', 'banktransfer', 14__+MAX_llx_menu__, '/compta/prelevement/index.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'PaymentByBankTransfer', 0, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 9, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("prelevement") && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2512__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/create.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'NewStandingOrder', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("prelevement") && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2513__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/orders_list.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'WithdrawalsReceipts', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("prelevement") && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2514__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/list.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'WithdrawalsLines', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("prelevement") && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2516__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/rejets.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'Rejects', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 5, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("prelevement") && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2517__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/stats.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'Statistics', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 6, __ENTITY__);
|
||||
|
||||
-- Bank
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled', __HANDLER__, 'left', 2600__+MAX_llx_menu__, 'accountancy', 'bank', 14__+MAX_llx_menu__, '/compta/bank/list.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', 0, 'banks', '$user->rights->banque->lire', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2601__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/card.php?mainmenu=bank&action=create&leftmenu=bank', 'MenuNewFinancialAccount', 1, 'banks', '$user->rights->banque->configurer', '', 0, 0, __ENTITY__);
|
||||
-- insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2602__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/categ.php?mainmenu=bank&leftmenu=bank', 'Rubriques', 1, 'categories', '$user->rights->banque->configurer', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2603__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/bankentries_list.php?mainmenu=bank&leftmenu=bank', 'ListTransactions', 1, 'banks', '$user->rights->banque->lire', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2604__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/budget.php?mainmenu=bank&leftmenu=bank', 'ListTransactionsByCategory', 1, 'banks', '$user->rights->banque->lire', '', 0, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2606__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/transfer.php?mainmenu=bank&leftmenu=bank', 'BankTransfers', 1, 'banks', '$user->rights->banque->transfer', '', 0, 5, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("banque")', __HANDLER__, 'left', 2600__+MAX_llx_menu__, 'accountancy', 'bank', 14__+MAX_llx_menu__, '/compta/bank/list.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', 0, 'banks', '$user->rights->banque->lire', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("banque") && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2601__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/card.php?mainmenu=bank&action=create&leftmenu=bank', 'MenuNewFinancialAccount', 1, 'banks', '$user->rights->banque->configurer', '', 0, 0, __ENTITY__);
|
||||
-- insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("banque") && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2602__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/categ.php?mainmenu=bank&leftmenu=bank', 'Rubriques', 1, 'categories', '$user->rights->banque->configurer', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("banque") && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2603__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/bankentries_list.php?mainmenu=bank&leftmenu=bank', 'ListTransactions', 1, 'banks', '$user->rights->banque->lire', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("banque") && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2604__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/budget.php?mainmenu=bank&leftmenu=bank', 'ListTransactionsByCategory', 1, 'banks', '$user->rights->banque->lire', '', 0, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("banque") && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2606__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/transfer.php?mainmenu=bank&leftmenu=bank', 'BankTransfers', 1, 'banks', '$user->rights->banque->transfer', '', 0, 5, __ENTITY__);
|
||||
|
||||
-- Bank - Categories
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->categorie->enabled', __HANDLER__, 'left', 2650__+MAX_llx_menu__, 'accountancy', 'cat', 14__+MAX_llx_menu__, '/categories/index.php?mainmenu=bank&leftmenu=bank&type=5', 'Categories', 0, 'categories', '$user->rights->categorie->lire', '', 2, 4, __ENTITY__);
|
||||
|
||||
@ -253,7 +253,7 @@ class mailing_advthirdparties extends MailingTargets
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows($resql);
|
||||
|
||||
if (empty($conf->categorie->enabled)) {
|
||||
if (!isModEnabled("categorie")) {
|
||||
$num = 0; // Force empty list if category module is not enabled
|
||||
}
|
||||
|
||||
|
||||
@ -295,7 +295,7 @@ class mailing_thirdparties extends MailingTargets
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows($resql);
|
||||
|
||||
if (empty($conf->categorie->enabled)) {
|
||||
if (!isModEnabled("categorie")) {
|
||||
$num = 0; // Force empty list if category module is not enabled
|
||||
}
|
||||
|
||||
|
||||
@ -113,7 +113,7 @@ class modAgenda extends DolibarrModules
|
||||
//------------
|
||||
$datestart = dol_now();
|
||||
$this->cronjobs = array(
|
||||
0=>array('label'=>'SendEmailsReminders', 'jobtype'=>'method', 'class'=>'comm/action/class/actioncomm.class.php', 'objectname'=>'ActionComm', 'method'=>'sendEmailsReminder', 'parameters'=>'', 'comment'=>'SendEMailsReminder', 'frequency'=>5, 'unitfrequency'=>60, 'priority'=>10, 'status'=>1, 'test'=>'$conf->agenda->enabled', 'datestart'=>$datestart),
|
||||
0=>array('label'=>'SendEmailsReminders', 'jobtype'=>'method', 'class'=>'comm/action/class/actioncomm.class.php', 'objectname'=>'ActionComm', 'method'=>'sendEmailsReminder', 'parameters'=>'', 'comment'=>'SendEMailsReminder', 'frequency'=>5, 'unitfrequency'=>60, 'priority'=>10, 'status'=>1, 'test'=>'isModEnabled("agenda")', 'datestart'=>$datestart),
|
||||
);
|
||||
|
||||
// Permissions
|
||||
@ -212,7 +212,7 @@ class modAgenda extends DolibarrModules
|
||||
'langs'=>'agenda',
|
||||
'position'=>86,
|
||||
'perms'=>'$user->rights->agenda->myactions->read || $user->rights->resource->read',
|
||||
'enabled'=>'$conf->agenda->enabled || $conf->resource->enabled',
|
||||
'enabled'=>'isModEnabled("agenda") || isModEnabled("resource")',
|
||||
'target'=>'',
|
||||
'user'=>2,
|
||||
);
|
||||
@ -228,7 +228,7 @@ class modAgenda extends DolibarrModules
|
||||
'langs'=>'agenda',
|
||||
'position'=>100,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'enabled'=>'isModEnabled("agenda")',
|
||||
'target'=>'',
|
||||
'user'=>2,
|
||||
);
|
||||
@ -242,7 +242,7 @@ class modAgenda extends DolibarrModules
|
||||
'langs'=>'commercial',
|
||||
'position'=>101,
|
||||
'perms'=>'($user->hasRight("agenda", "myactions", "create")||$user->hasRight("agenda", "allactions", "create"))',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'enabled'=>'isModEnabled("agenda")',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
@ -257,7 +257,7 @@ class modAgenda extends DolibarrModules
|
||||
'langs'=>'agenda',
|
||||
'position'=>140,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'enabled'=>'isModEnabled("agenda")',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
@ -271,7 +271,7 @@ class modAgenda extends DolibarrModules
|
||||
'langs'=>'agenda',
|
||||
'position'=>141,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'enabled'=>'isModEnabled("agenda")',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
@ -285,7 +285,7 @@ class modAgenda extends DolibarrModules
|
||||
'langs'=>'agenda',
|
||||
'position'=>142,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'enabled'=>'isModEnabled("agenda")',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
@ -329,7 +329,7 @@ class modAgenda extends DolibarrModules
|
||||
'langs'=>'agenda',
|
||||
'position'=>110,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'enabled'=>'isModEnabled("agenda")',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
@ -343,7 +343,7 @@ class modAgenda extends DolibarrModules
|
||||
'langs'=>'agenda',
|
||||
'position'=>111,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'enabled'=>'isModEnabled("agenda")',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
@ -357,7 +357,7 @@ class modAgenda extends DolibarrModules
|
||||
'langs'=>'agenda',
|
||||
'position'=>112,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'enabled'=>'isModEnabled("agenda")',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
@ -400,7 +400,7 @@ class modAgenda extends DolibarrModules
|
||||
'langs'=>'agenda',
|
||||
'position'=>160,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'enabled'=>'isModEnabled("agenda")',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
|
||||
@ -127,7 +127,7 @@ class modECM extends DolibarrModules
|
||||
'langs'=>'ecm',
|
||||
'position'=>82,
|
||||
'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup',
|
||||
'enabled'=>'$conf->ecm->enabled',
|
||||
'enabled'=>'isModEnabled("ecm")',
|
||||
'target'=>'',
|
||||
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
|
||||
);
|
||||
|
||||
@ -113,7 +113,7 @@ class modMargin extends DolibarrModules
|
||||
'url'=>'/margin/index.php',
|
||||
'langs'=>'margins', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>100,
|
||||
'enabled'=>'$conf->margin->enabled', // Define condition to show or hide menu entry. Use '$conf->monmodule->enabled' if entry must be visible if module is enabled.
|
||||
'enabled'=>'isModEnabled("margin")', // Define condition to show or hide menu entry. Use '$conf->monmodule->enabled' if entry must be visible if module is enabled.
|
||||
'perms'=>'$user->rights->margins->liretous', // Use 'perms'=>'$user->rights->monmodule->level1->level2' if you want your menu with a permission rules
|
||||
'target'=>'',
|
||||
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
|
||||
|
||||
@ -116,7 +116,7 @@ class modPaypal extends DolibarrModules
|
||||
'url'=>'/paypal/importpayments.php',
|
||||
'langs'=>'paypal', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>501,
|
||||
'enabled'=>'$conf->paypal->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 2', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'enabled'=>'$conf->paypal->enabled && isModEnabled("banque") && $conf->global->MAIN_FEATURES_LEVEL >= 2', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'perms'=>'$user->rights->banque->consolidate', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
|
||||
@ -168,7 +168,7 @@ class modProduct extends DolibarrModules
|
||||
'url'=>'/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools',
|
||||
'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>300,
|
||||
'enabled'=>'$conf->product->enabled && preg_match(\'/^(admintools|all)/\',$leftmenu)', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'enabled'=>'isModEnabled("product") && preg_match(\'/^(admintools|all)/\',$leftmenu)', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
'target'=>'',
|
||||
'user'=>0); // 0=Menu for internal users, 1=external users, 2=both
|
||||
|
||||
@ -135,7 +135,7 @@ class modService extends DolibarrModules
|
||||
'url'=>'/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools',
|
||||
'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>300,
|
||||
'enabled'=>'$conf->product->enabled && preg_match(\'/^(admintools|all)/\',$leftmenu)', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'enabled'=>'isModEnabled("product") && preg_match(\'/^(admintools|all)/\',$leftmenu)', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
'target'=>'',
|
||||
'user'=>0); // 0=Menu for internal users, 1=external users, 2=both
|
||||
@ -284,7 +284,7 @@ class modService extends DolibarrModules
|
||||
$this->export_sql_order[$r] = ' GROUP BY p.rowid'; // FIXME The group by used a generic value to say "all fields in select except function fields"
|
||||
}
|
||||
|
||||
if (empty($conf->product->enabled)) { // We enable next import templates only if module product not already enabled (to avoid duplicate entries)
|
||||
if (!isModEnabled("product")) { // We enable next import templates only if module product not already enabled (to avoid duplicate entries)
|
||||
if (!empty($conf->global->PRODUIT_MULTIPRICES)) {
|
||||
// Exports product multiprice
|
||||
$r++;
|
||||
@ -705,7 +705,7 @@ class modService extends DolibarrModules
|
||||
$this->import_updatekeys_array[$r] = array_merge($this->import_updatekeys_array[$r], array('p.barcode'=>'BarCode')); //only show/allow barcode as update key if Barcode module enabled
|
||||
}
|
||||
|
||||
if (empty($conf->product->enabled)) { // We enable next import templates only if module product not already enabled (to avoid duplicate entries)
|
||||
if (!isModEnabled("product")) { // We enable next import templates only if module product not already enabled (to avoid duplicate entries)
|
||||
if (isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) {
|
||||
// Import suppliers prices (note: this code is duplicated in module Service)
|
||||
$r++;
|
||||
|
||||
@ -101,7 +101,7 @@ class modStripe extends DolibarrModules
|
||||
'url'=>'/stripe/importpayments.php',
|
||||
'langs'=>'stripe', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>500,
|
||||
'enabled'=>'$conf->stripe->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 2', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'enabled'=>'$conf->stripe->enabled && isModEnabled("banque") && $conf->global->MAIN_FEATURES_LEVEL >= 2', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'perms'=>'$user->rights->banque->modifier', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
|
||||
@ -157,7 +157,7 @@ class modTicket extends DolibarrModules
|
||||
'tabfieldvalue' => array("code,label,pos,use_default", "code,label,pos,use_default", "code,label,pos,use_default,public,fk_parent", "code,label,pos,use_default"),
|
||||
'tabfieldinsert' => array("code,label,pos,use_default", "code,label,pos,use_default", "code,label,pos,use_default,public,fk_parent", "code,label,pos,use_default"),
|
||||
'tabrowid' => array("rowid", "rowid", "rowid", "rowid"),
|
||||
'tabcond' => array($conf->ticket->enabled, $conf->ticket->enabled, $conf->ticket->enabled, $conf->ticket->enabled && getDolGlobalString('TICKET_ENABLE_RESOLUTION')),
|
||||
'tabcond' => array(isModEnabled("ticket"), isModEnabled("ticket"), isModEnabled("ticket"), isModEnabled("ticket") && getDolGlobalString('TICKET_ENABLE_RESOLUTION')),
|
||||
'tabhelp' => array(
|
||||
array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")),
|
||||
array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")),
|
||||
@ -238,7 +238,7 @@ class modTicket extends DolibarrModules
|
||||
'url' => '/ticket/index.php',
|
||||
'langs' => 'ticket', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position' => 88,
|
||||
'enabled' => '$conf->ticket->enabled',
|
||||
'enabled' => 'isModEnabled("ticket")',
|
||||
'perms' => '$user->rights->ticket->read', // Use 'perms'=>'$user->rights->ticket->level1->level2' if you want your menu with a permission rules
|
||||
'target' => '',
|
||||
'user' => 2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
@ -253,7 +253,7 @@ class modTicket extends DolibarrModules
|
||||
'url' => '/ticket/index.php',
|
||||
'langs' => 'ticket',
|
||||
'position' => 101,
|
||||
'enabled' => '$conf->ticket->enabled',
|
||||
'enabled' => 'isModEnabled("ticket")',
|
||||
'perms' => '$user->rights->ticket->read',
|
||||
'target' => '',
|
||||
'user' => 2);
|
||||
@ -266,7 +266,7 @@ class modTicket extends DolibarrModules
|
||||
'url' => '/ticket/card.php?action=create',
|
||||
'langs' => 'ticket',
|
||||
'position' => 102,
|
||||
'enabled' => '$conf->ticket->enabled',
|
||||
'enabled' => 'isModEnabled("ticket")',
|
||||
'perms' => '$user->rights->ticket->write',
|
||||
'target' => '',
|
||||
'user' => 2);
|
||||
@ -280,7 +280,7 @@ class modTicket extends DolibarrModules
|
||||
'url' => '/ticket/list.php?search_fk_status=non_closed',
|
||||
'langs' => 'ticket',
|
||||
'position' => 103,
|
||||
'enabled' => '$conf->ticket->enabled',
|
||||
'enabled' => 'isModEnabled("ticket")',
|
||||
'perms' => '$user->rights->ticket->read',
|
||||
'target' => '',
|
||||
'user' => 2);
|
||||
@ -294,7 +294,7 @@ class modTicket extends DolibarrModules
|
||||
'url' => '/ticket/list.php?mode=mine&search_fk_status=non_closed',
|
||||
'langs' => 'ticket',
|
||||
'position' => 105,
|
||||
'enabled' => '$conf->ticket->enabled',
|
||||
'enabled' => 'isModEnabled("ticket")',
|
||||
'perms' => '$user->rights->ticket->read',
|
||||
'target' => '',
|
||||
'user' => 0);
|
||||
@ -307,7 +307,7 @@ class modTicket extends DolibarrModules
|
||||
'url' => '/ticket/stats/index.php',
|
||||
'langs' => 'ticket',
|
||||
'position' => 107,
|
||||
'enabled' => '$conf->ticket->enabled',
|
||||
'enabled' => 'isModEnabled("ticket")',
|
||||
'perms' => '$user->rights->ticket->read',
|
||||
'target' => '',
|
||||
'user' => 0);
|
||||
|
||||
@ -274,7 +274,7 @@ class modUser extends DolibarrModules
|
||||
$keyforelement = 'user';
|
||||
$keyforaliasextra = 'extra';
|
||||
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
|
||||
if (empty($conf->adherent->enabled)) {
|
||||
if (!isModEnabled('adherent')) {
|
||||
unset($this->export_fields_array[$r]['u.fk_member']);
|
||||
unset($this->export_entities_array[$r]['u.fk_member']);
|
||||
}
|
||||
|
||||
@ -1048,7 +1048,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
'class' => 'ActionComm',
|
||||
'table' => 'actioncomm',
|
||||
'disableamount' => 1,
|
||||
'test' => $conf->agenda->enabled && $user->rights->agenda->allactions->lire
|
||||
'test' => isModEnabled('agenda') && $user->rights->agenda->allactions->lire
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
@ -462,7 +462,7 @@ class pdf_beluga extends ModelePDFProjects
|
||||
'table'=>'actioncomm',
|
||||
'datefieldname'=>'datep',
|
||||
'disableamount'=>1,
|
||||
'test'=>$conf->agenda->enabled && $user->rights->agenda->allactions->read,
|
||||
'test'=> isModEnabled('agenda') && $user->rights->agenda->allactions->read,
|
||||
'lang'=>'agenda')
|
||||
);
|
||||
|
||||
|
||||
@ -447,7 +447,7 @@ if (!empty($morelogincontent) && is_array($morelogincontent)) {
|
||||
|
||||
// Google Analytics
|
||||
// TODO Remove this, and add content into hook getLoginPageExtraOptions() instead
|
||||
if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID)) {
|
||||
if (isModEnabled('google') && !empty($conf->global->MAIN_GOOGLE_AN_ID)) {
|
||||
$tmptagarray = explode(',', $conf->global->MAIN_GOOGLE_AN_ID);
|
||||
foreach ($tmptagarray as $tmptag) {
|
||||
print "\n";
|
||||
@ -468,7 +468,7 @@ if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID))
|
||||
|
||||
// TODO Replace this with a hook
|
||||
// Google Adsense (need Google module)
|
||||
if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT)) {
|
||||
if (isModEnabled('google') && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT)) {
|
||||
if (empty($conf->dol_use_jmobile)) {
|
||||
?>
|
||||
<div class="center"><br>
|
||||
|
||||
@ -287,7 +287,7 @@ if (!empty($morelogincontent) && is_array($morelogincontent)) {
|
||||
|
||||
// Google Analytics
|
||||
// TODO Remove this, and add content into hook getPasswordForgottenPageExtraOptions() instead
|
||||
if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID)) {
|
||||
if (isModEnabled('google') && !empty($conf->global->MAIN_GOOGLE_AN_ID)) {
|
||||
$tmptagarray = explode(',', $conf->global->MAIN_GOOGLE_AN_ID);
|
||||
foreach ($tmptagarray as $tmptag) {
|
||||
print "\n";
|
||||
@ -308,7 +308,7 @@ if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID))
|
||||
|
||||
// TODO Replace this with a hook
|
||||
// Google Adsense (need Google module)
|
||||
if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT)) {
|
||||
if (isModEnabled('google') && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT)) {
|
||||
if (empty($conf->dol_use_jmobile)) {
|
||||
?>
|
||||
<div class="center"><br>
|
||||
|
||||
@ -328,7 +328,7 @@ if (!empty($morelogincontent) && is_array($morelogincontent)) {
|
||||
|
||||
// Google Analytics
|
||||
// TODO Remove this, and add content into hook getPasswordForgottenPageExtraOptions() instead
|
||||
if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID)) {
|
||||
if (isModEnabled('google') && !empty($conf->global->MAIN_GOOGLE_AN_ID)) {
|
||||
$tmptagarray = explode(',', $conf->global->MAIN_GOOGLE_AN_ID);
|
||||
foreach ($tmptagarray as $tmptag) {
|
||||
print "\n";
|
||||
@ -349,7 +349,7 @@ if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID))
|
||||
|
||||
// TODO Replace this with a hook
|
||||
// Google Adsense (need Google module)
|
||||
if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT)) {
|
||||
if (isModEnabled('google') && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT)) {
|
||||
if (empty($conf->dol_use_jmobile)) {
|
||||
?>
|
||||
<div class="center"><br>
|
||||
|
||||
@ -76,7 +76,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
||||
*/
|
||||
public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
|
||||
{
|
||||
if (empty($conf->agenda) || empty($conf->agenda->enabled)) {
|
||||
if (!isModEnabled('agenda')) {
|
||||
return 0; // Module not active, we do nothing
|
||||
}
|
||||
|
||||
|
||||
@ -139,11 +139,11 @@ class InterfaceNotification extends DolibarrTriggers
|
||||
$qualified = 0;
|
||||
} elseif ($element == 'invoice_supplier' && !isModEnabled('supplier_invoice')) {
|
||||
$qualified = 0;
|
||||
} elseif ($element == 'withdraw' && empty($conf->prelevement->enabled)) {
|
||||
} elseif ($element == 'withdraw' && !isModEnabled('prelevement')) {
|
||||
$qualified = 0;
|
||||
} elseif ($element == 'shipping' && empty($conf->expedition->enabled)) {
|
||||
} elseif ($element == 'shipping' && !isModEnabled('expedition')) {
|
||||
$qualified = 0;
|
||||
} elseif ($element == 'member' && empty($conf->adherent->enabled)) {
|
||||
} elseif ($element == 'member' && !isModEnabled('adherent')) {
|
||||
$qualified = 0;
|
||||
} elseif (($element == 'expense_report' || $element == 'expensereport') && empty($conf->expensereport->enabled)) {
|
||||
$qualified = 0;
|
||||
|
||||
@ -294,7 +294,7 @@ if ($action == 'refreshmanual' && $permissiontoread) {
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."ecm_directories set cachenbofdoc = -1 WHERE cachenbofdoc < 0"; // If pb into cahce counting, we set to value -1 = "unknown"
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."ecm_directories set cachenbofdoc = -1 WHERE cachenbofdoc < 0"; // If pb into cache counting, we set to value -1 = "unknown"
|
||||
dol_syslog("sql = ".$sql);
|
||||
$db->query($sql);
|
||||
|
||||
|
||||
@ -269,7 +269,7 @@ if ($action == 'refreshmanual') {
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."ecm_directories set cachenbofdoc = -1 WHERE cachenbofdoc < 0"; // If pb into cahce counting, we set to value -1 = "unknown"
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."ecm_directories set cachenbofdoc = -1 WHERE cachenbofdoc < 0"; // If pb into cache counting, we set to value -1 = "unknown"
|
||||
dol_syslog("sql = ".$sql);
|
||||
$db->query($sql);
|
||||
|
||||
|
||||
@ -261,7 +261,7 @@ if ($action == 'refreshmanual') {
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."ecm_directories set cachenbofdoc = -1 WHERE cachenbofdoc < 0"; // If pb into cahce counting, we set to value -1 = "unknown"
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."ecm_directories set cachenbofdoc = -1 WHERE cachenbofdoc < 0"; // If pb into cache counting, we set to value -1 = "unknown"
|
||||
dol_syslog("sql = ".$sql);
|
||||
$db->query($sql);
|
||||
|
||||
|
||||
@ -2768,8 +2768,8 @@ if ($action != 'create' && $action != 'edit' && $action != 'editline') {
|
||||
}
|
||||
|
||||
// If bank module is not used
|
||||
if (($user->rights->expensereport->to_paid || empty($conf->banque->enabled)) && $object->status == ExpenseReport::STATUS_APPROVED) {
|
||||
//if ((round($remaintopay) == 0 || empty($conf->banque->enabled)) && $object->paid == 0)
|
||||
if (($user->rights->expensereport->to_paid || empty(isModEnabled("banque"))) && $object->status == ExpenseReport::STATUS_APPROVED) {
|
||||
//if ((round($remaintopay) == 0 || !isModEnabled("banque")) && $object->paid == 0)
|
||||
if ($object->paid == 0) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=set_paid&token='.newToken().'">'.$langs->trans("ClassifyPaid")."</a></div>";
|
||||
}
|
||||
|
||||
@ -398,9 +398,9 @@ if ($action == 'create') {
|
||||
print '<br>';
|
||||
|
||||
$title = $langs->trans("ProductsAndServices");
|
||||
if (empty($conf->service->enabled)) {
|
||||
if (!isModEnabled("service")) {
|
||||
$title = $langs->trans("Products");
|
||||
} elseif (empty($conf->product->enabled)) {
|
||||
} elseif (!isModEnabled("product")) {
|
||||
$title = $langs->trans("Services");
|
||||
}
|
||||
|
||||
@ -709,9 +709,9 @@ if ($action == 'create') {
|
||||
*/
|
||||
|
||||
$title = $langs->trans("ProductsAndServices");
|
||||
if (empty($conf->service->enabled)) {
|
||||
if (!isModEnabled("service")) {
|
||||
$title = $langs->trans("Products");
|
||||
} elseif (empty($conf->product->enabled)) {
|
||||
} elseif (!isModEnabled("product")) {
|
||||
$title = $langs->trans("Services");
|
||||
}
|
||||
|
||||
|
||||
@ -1643,7 +1643,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Proposal
|
||||
if ($conf->service->enabled && isModEnabled("propal") && $object->statut > Fichinter::STATUS_DRAFT) {
|
||||
if (isModEnabled("service") && isModEnabled("propal") && $object->statut > Fichinter::STATUS_DRAFT) {
|
||||
$langs->load("propal");
|
||||
if ($object->statut < Fichinter::STATUS_BILLED) {
|
||||
if ($user->rights->propal->creer) {
|
||||
|
||||
@ -196,7 +196,7 @@ class FactureFournisseurRec extends CommonInvoice
|
||||
'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'position'=>80),
|
||||
'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>210),
|
||||
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>"isModEnabled('project')", 'visible'=>-1, 'position'=>85),
|
||||
'fk_account' =>array('type'=>'integer', 'label'=>'Fk account', 'enabled'=>'$conf->banque->enabled', 'visible'=>-1, 'position'=>175),
|
||||
'fk_account' =>array('type'=>'integer', 'label'=>'Fk account', 'enabled'=>'isModEnabled("banque")', 'visible'=>-1, 'position'=>175),
|
||||
'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'Fk cond reglement', 'enabled'=>1, 'visible'=>-1, 'position'=>90),
|
||||
'fk_mode_reglement' =>array('type'=>'integer', 'label'=>'Fk mode reglement', 'enabled'=>1, 'visible'=>-1, 'position'=>95),
|
||||
'date_lim_reglement' =>array('type'=>'date', 'label'=>'Date lim reglement', 'enabled'=>1, 'visible'=>-1, 'position'=>100),
|
||||
|
||||
@ -301,7 +301,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>135),
|
||||
'fk_facture_source' =>array('type'=>'integer', 'label'=>'Fk facture source', 'enabled'=>1, 'visible'=>-1, 'position'=>140),
|
||||
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Project', 'enabled'=>"isModEnabled('project')", 'visible'=>-1, 'position'=>145),
|
||||
'fk_account' =>array('type'=>'integer', 'label'=>'Account', 'enabled'=>'$conf->banque->enabled', 'visible'=>-1, 'position'=>150),
|
||||
'fk_account' =>array('type'=>'integer', 'label'=>'Account', 'enabled'=>'isModEnabled("banque")', 'visible'=>-1, 'position'=>150),
|
||||
'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'PaymentTerm', 'enabled'=>1, 'visible'=>-1, 'position'=>155),
|
||||
'fk_mode_reglement' =>array('type'=>'integer', 'label'=>'PaymentMode', 'enabled'=>1, 'visible'=>-1, 'position'=>160),
|
||||
'date_lim_reglement' =>array('type'=>'date', 'label'=>'DateLimReglement', 'enabled'=>1, 'visible'=>-1, 'position'=>165),
|
||||
|
||||
@ -2462,7 +2462,7 @@ if ($action == 'create') {
|
||||
}
|
||||
}
|
||||
// Create event
|
||||
/*if ($conf->agenda->enabled && !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 page.
|
||||
/*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 page.
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans("AddAction") . '</a></div>';
|
||||
}*/
|
||||
|
||||
@ -1059,9 +1059,9 @@ if ($action == 'create') {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$title = $langs->trans("ProductsAndServices");
|
||||
if (empty($conf->service->enabled)) {
|
||||
if (!isModEnabled("service")) {
|
||||
$title = $langs->trans("Products");
|
||||
} elseif (empty($conf->product->enabled)) {
|
||||
} elseif (!isModEnabled("product")) {
|
||||
$title = $langs->trans("Services");
|
||||
}
|
||||
|
||||
|
||||
@ -3946,7 +3946,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Create event
|
||||
/*if ($conf->agenda->enabled && !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 page.
|
||||
/*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 page.
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans("AddAction") . '</a></div>';
|
||||
}*/
|
||||
|
||||
@ -1150,7 +1150,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("DescCP").'</td>';
|
||||
print '<td class="tdtop">';
|
||||
$doleditor = new DolEditor('description', GETPOST('description', 'restricthtml'), '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, ROWS_3, '90%');
|
||||
$doleditor = new DolEditor('description', GETPOST('description', 'restricthtml'), '', 80, 'dolibarr_notes', 'In', 0, false, isModEnabled('fckeditor'), ROWS_3, '90%');
|
||||
print $doleditor->Create(1);
|
||||
print '</td></tr>';
|
||||
|
||||
@ -1351,7 +1351,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans('DescCP').'</td>';
|
||||
print '<td class="tdtop">';
|
||||
$doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, ROWS_3, '90%');
|
||||
$doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_notes', 'In', 0, false, isModEnabled('fckeditor'), ROWS_3, '90%');
|
||||
print $doleditor->Create(1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -624,7 +624,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("DescCP").'</td>';
|
||||
print '<td class="tdtop">';
|
||||
$doleditor = new DolEditor('description', GETPOST('description', 'restricthtml'), '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, ROWS_3, '90%');
|
||||
$doleditor = new DolEditor('description', GETPOST('description', 'restricthtml'), '', 80, 'dolibarr_notes', 'In', 0, false, isModEnabled('fckeditor'), ROWS_3, '90%');
|
||||
print $doleditor->Create(1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -121,7 +121,7 @@ class MyObject extends CommonObject
|
||||
'amount' => array('type'=>'price', 'label'=>'Amount', 'enabled'=>1, 'visible'=>1, 'default'=>'null', 'position'=>40, 'searchall'=>0, 'isameasure'=>1, 'help'=>'Help text for amount', 'validate'=>1),
|
||||
'qty' => array('type'=>'real', 'label'=>'Qty', 'enabled'=>1, 'visible'=>1, 'default'=>'0', 'position'=>45, 'searchall'=>0, 'isameasure'=>1, 'help'=>'Help text for quantity', 'css'=>'maxwidth75imp', 'validate'=>1),
|
||||
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:((status:=:1) AND (entity:IN:__SHARED_ENTITIES__))', 'picto'=>'company', 'label'=>'ThirdParty', 'visible'=> 1, 'enabled'=>'isModEnabled("societe")', 'position'=>50, 'notnull'=>-1, 'index'=>1, 'help'=>'OrganizationEventLinkToThirdParty', 'validate'=>1, 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150'),
|
||||
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'picto'=>'project', 'enabled'=>'$conf->project->enabled', 'visible'=>-1, 'position'=>52, 'notnull'=>-1, 'index'=>1, 'validate'=>1, 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150'),
|
||||
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'picto'=>'project', 'enabled'=>'isModEnabled("project")', 'visible'=>-1, 'position'=>52, 'notnull'=>-1, 'index'=>1, 'validate'=>1, 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150'),
|
||||
'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>3, 'position'=>60, 'validate'=>1),
|
||||
'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>61, 'validate'=>1, 'cssview'=>'wordbreak'),
|
||||
'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>62, 'validate'=>1, 'cssview'=>'wordbreak'),
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2023 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) ---Put here your own copyright and developer email---
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@ -101,8 +101,10 @@ class mymodulewidget1 extends ModeleBoxes
|
||||
|
||||
$this->param = $param;
|
||||
|
||||
//$this->enabled = $conf->global->FEATURES_LEVEL > 0; // Condition when module is enabled or not
|
||||
//$this->hidden = ! ($user->rights->mymodule->myobject->read); // Condition when module is visible by user (test on permission)
|
||||
// Condition when module is enabled or not
|
||||
// $this->enabled = getDolGlobalInt('MAIN_FEATURES_LEVEL') > 0;
|
||||
// Condition when module is visible by user (test on permission)
|
||||
// $this->hidden = !$user->hasRight('mymodule', 'myobject', 'read');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -223,7 +223,7 @@ class modMyModule extends DolibarrModules
|
||||
// Name of columns with primary key (try to always name it 'rowid')
|
||||
'tabrowid'=>array("rowid", "rowid", "rowid"),
|
||||
// Condition to show each dictionary
|
||||
'tabcond'=>array($conf->mymodule->enabled, $conf->mymodule->enabled, $conf->mymodule->enabled),
|
||||
'tabcond'=>array(isModEnabled('mymodule'), isModEnabled('mymodule'), isModEnabled('mymodule')),
|
||||
// Tooltip for every fields of dictionaries: DO NOT PUT AN EMPTY ARRAY
|
||||
'tabhelp'=>array(array('code'=>$langs->trans('CodeTooltipHelp'), 'field2' => 'field2tooltip'), array('code'=>$langs->trans('CodeTooltipHelp'), 'field2' => 'field2tooltip'), ...),
|
||||
);
|
||||
@ -254,13 +254,13 @@ class modMyModule extends DolibarrModules
|
||||
// 'frequency' => 2,
|
||||
// 'unitfrequency' => 3600,
|
||||
// 'status' => 0,
|
||||
// 'test' => '$conf->mymodule->enabled',
|
||||
// 'test' => 'isModEnabled("mymodule")',
|
||||
// 'priority' => 50,
|
||||
// ),
|
||||
);
|
||||
// Example: $this->cronjobs=array(
|
||||
// 0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'/dir/class/file.class.php', 'objectname'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'param1, param2', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600, 'status'=>0, 'test'=>'$conf->mymodule->enabled', 'priority'=>50),
|
||||
// 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'param1, param2', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24, 'status'=>0, 'test'=>'$conf->mymodule->enabled', 'priority'=>50)
|
||||
// 0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'/dir/class/file.class.php', 'objectname'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'param1, param2', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600, 'status'=>0, 'test'=>'isModEnabled("mymodule")', 'priority'=>50),
|
||||
// 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'param1, param2', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24, 'status'=>0, 'test'=>'isModEnabled("mymodule")', 'priority'=>50)
|
||||
// );
|
||||
|
||||
// Permissions provided by this module
|
||||
@ -439,11 +439,11 @@ class modMyModule extends DolibarrModules
|
||||
// Create extrafields during init
|
||||
//include_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
//$extrafields = new ExtraFields($this->db);
|
||||
//$result1=$extrafields->addExtraField('mymodule_myattr1', "New Attr 1 label", 'boolean', 1, 3, 'thirdparty', 0, 0, '', '', 1, '', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled');
|
||||
//$result2=$extrafields->addExtraField('mymodule_myattr2', "New Attr 2 label", 'varchar', 1, 10, 'project', 0, 0, '', '', 1, '', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled');
|
||||
//$result3=$extrafields->addExtraField('mymodule_myattr3', "New Attr 3 label", 'varchar', 1, 10, 'bank_account', 0, 0, '', '', 1, '', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled');
|
||||
//$result4=$extrafields->addExtraField('mymodule_myattr4', "New Attr 4 label", 'select', 1, 3, 'thirdparty', 0, 1, '', array('options'=>array('code1'=>'Val1','code2'=>'Val2','code3'=>'Val3')), 1,'', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled');
|
||||
//$result5=$extrafields->addExtraField('mymodule_myattr5', "New Attr 5 label", 'text', 1, 10, 'user', 0, 0, '', '', 1, '', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled');
|
||||
//$result1=$extrafields->addExtraField('mymodule_myattr1', "New Attr 1 label", 'boolean', 1, 3, 'thirdparty', 0, 0, '', '', 1, '', 0, 0, '', '', 'mymodule@mymodule', 'isModEnabled("mymodule")');
|
||||
//$result2=$extrafields->addExtraField('mymodule_myattr2', "New Attr 2 label", 'varchar', 1, 10, 'project', 0, 0, '', '', 1, '', 0, 0, '', '', 'mymodule@mymodule', 'isModEnabled("mymodule")');
|
||||
//$result3=$extrafields->addExtraField('mymodule_myattr3', "New Attr 3 label", 'varchar', 1, 10, 'bank_account', 0, 0, '', '', 1, '', 0, 0, '', '', 'mymodule@mymodule', 'isModEnabled("mymodule")');
|
||||
//$result4=$extrafields->addExtraField('mymodule_myattr4', "New Attr 4 label", 'select', 1, 3, 'thirdparty', 0, 1, '', array('options'=>array('code1'=>'Val1','code2'=>'Val2','code3'=>'Val3')), 1,'', 0, 0, '', '', 'mymodule@mymodule', 'isModEnabled("mymodule")');
|
||||
//$result5=$extrafields->addExtraField('mymodule_myattr5', "New Attr 5 label", 'text', 1, 10, 'user', 0, 0, '', '', 1, '', 0, 0, '', '', 'mymodule@mymodule', 'isModEnabled("mymodule")');
|
||||
|
||||
// Permissions
|
||||
$this->remove($options);
|
||||
|
||||
@ -90,7 +90,7 @@ class InterfaceMyModuleTriggers extends DolibarrTriggers
|
||||
*/
|
||||
public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
|
||||
{
|
||||
if (empty($conf->mymodule) || empty($conf->mymodule->enabled)) {
|
||||
if (!isModEnabled('mymodule')) {
|
||||
return 0; // If module is not enabled, we do nothing
|
||||
}
|
||||
|
||||
|
||||
@ -186,8 +186,8 @@ END MODULEBUILDER DRAFT MYOBJECT */
|
||||
print '</div><div class="fichetwothirdright">';
|
||||
|
||||
|
||||
$NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
|
||||
$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
|
||||
$NBMAX = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT');
|
||||
$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT');
|
||||
|
||||
/* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT
|
||||
// Last modified myobject
|
||||
|
||||
@ -211,7 +211,7 @@ if ($object->id > 0) {
|
||||
// Thirdparty
|
||||
$morehtmlref.='<br>'.$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) {
|
||||
|
||||
@ -175,8 +175,7 @@ if ($object->id) {
|
||||
// Thirdparty
|
||||
$morehtmlref.='<br>'.$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)
|
||||
|
||||
@ -193,8 +193,7 @@ $morehtmlref = '<div class="refidno">';
|
||||
// Thirdparty
|
||||
$morehtmlref.='<br>'.$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)
|
||||
|
||||
@ -168,8 +168,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
// Thirdparty
|
||||
$morehtmlref.='<br>'.$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)
|
||||
|
||||
@ -100,7 +100,7 @@ class Mo extends CommonObject
|
||||
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>4, 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'showoncombobox'=>'1', 'noteditable'=>1),
|
||||
'fk_bom' => array('type'=>'integer:Bom:bom/class/bom.class.php:0:(t.status:=:1)', 'filter'=>'active=1', 'label'=>'BOM', 'enabled'=>'$conf->bom->enabled', 'visible'=>1, 'position'=>33, 'notnull'=>-1, 'index'=>1, 'comment'=>"Original BOM", 'css'=>'minwidth100 maxwidth300', 'csslist'=>'nowraponall', 'picto'=>'bom'),
|
||||
'mrptype' => array('type'=>'integer', 'label'=>'Type', 'enabled'=>1, 'visible'=>1, 'position'=>34, 'notnull'=>1, 'default'=>'0', 'arrayofkeyval'=>array(0=>'Manufacturing', 1=>'Disassemble'), 'css'=>'minwidth150', 'csslist'=>'minwidth150 center'),
|
||||
'fk_product' => array('type'=>'integer:Product:product/class/product.class.php:0', 'label'=>'Product', 'enabled'=>'$conf->product->enabled', 'visible'=>1, 'position'=>35, 'notnull'=>1, 'index'=>1, 'comment'=>"Product to produce", 'css'=>'maxwidth300', 'csslist'=>'tdoverflowmax100', 'picto'=>'product'),
|
||||
'fk_product' => array('type'=>'integer:Product:product/class/product.class.php:0', 'label'=>'Product', 'enabled'=>'isModEnabled("product")', 'visible'=>1, 'position'=>35, 'notnull'=>1, 'index'=>1, 'comment'=>"Product to produce", 'css'=>'maxwidth300', 'csslist'=>'tdoverflowmax100', 'picto'=>'product'),
|
||||
'qty' => array('type'=>'real', 'label'=>'QtyToProduce', 'enabled'=>1, 'visible'=>1, 'position'=>40, 'notnull'=>1, 'comment'=>"Qty to produce", 'css'=>'width75', 'default'=>1, 'isameasure'=>1),
|
||||
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>42, 'notnull'=>-1, 'searchall'=>1, 'showoncombobox'=>'2', 'css'=>'maxwidth300', 'csslist'=>'tdoverflowmax200', 'alwayseditable'=>1),
|
||||
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1', 'label'=>'ThirdParty', 'picto'=>'company', 'enabled'=>'isModEnabled("societe")', 'visible'=>-1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'css'=>'maxwidth400', 'csslist'=>'tdoverflowmax150'),
|
||||
@ -1744,8 +1744,8 @@ class MoLine extends CommonObjectLine
|
||||
public $import_key;
|
||||
public $fk_parent_line;
|
||||
|
||||
/*
|
||||
* Service Workstation
|
||||
/**
|
||||
* @var int Service Workstation
|
||||
*/
|
||||
public $fk_default_workstation;
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ $langs->loadLangs(array('admin', 'products'));
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
// Security check
|
||||
if (!$user->admin || (empty($conf->product->enabled) && empty($conf->service->enabled))) {
|
||||
if (!$user->admin || (!isModEnabled("product") && !isModEnabled("service"))) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
@ -119,10 +119,10 @@ while ($result = $db->fetch_object($query)) {
|
||||
$title = $langs->trans('ProductServiceSetup');
|
||||
$tab = $langs->trans("ProductsAndServices");
|
||||
|
||||
if (empty($conf->product->enabled)) {
|
||||
if (!isModEnabled("product")) {
|
||||
$title = $langs->trans('ServiceSetup');
|
||||
$tab = $langs->trans('Services');
|
||||
} elseif (empty($conf->service->enabled)) {
|
||||
} elseif (!isModEnabled("service")) {
|
||||
$title = $langs->trans('ProductSetup');
|
||||
$tab = $langs->trans('Products');
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php';
|
||||
$langs->loadLangs(array("admin", "products"));
|
||||
|
||||
// Security check
|
||||
if (!$user->admin || (empty($conf->product->enabled) && empty($conf->service->enabled))) {
|
||||
if (!$user->admin || (!isModEnabled("product") && !isModEnabled("service"))) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
@ -271,10 +271,10 @@ $formbarcode = new FormBarCode($db);
|
||||
|
||||
$title = $langs->trans('ProductServiceSetup');
|
||||
$tab = $langs->trans("ProductsAndServices");
|
||||
if (empty($conf->product->enabled)) {
|
||||
if (!isModEnabled("product")) {
|
||||
$title = $langs->trans('ServiceSetup');
|
||||
$tab = $langs->trans('Services');
|
||||
} elseif (empty($conf->service->enabled)) {
|
||||
} elseif (!isModEnabled("service")) {
|
||||
$title = $langs->trans('ProductSetup');
|
||||
$tab = $langs->trans('Products');
|
||||
}
|
||||
|
||||
@ -66,10 +66,10 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||
|
||||
$title = $langs->trans('ProductServiceSetup');
|
||||
$textobject = $langs->trans("ProductsAndServices");
|
||||
if (empty($conf->product->enabled)) {
|
||||
if (!isModEnabled("product")) {
|
||||
$title = $langs->trans('ServiceSetup');
|
||||
$textobject = $langs->trans('Services');
|
||||
} elseif (empty($conf->service->enabled)) {
|
||||
} elseif (!isModEnabled("service")) {
|
||||
$title = $langs->trans('ProductSetup');
|
||||
$textobject = $langs->trans('Products');
|
||||
}
|
||||
|
||||
@ -67,10 +67,10 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||
|
||||
$title = $langs->trans('ProductServiceSetup');
|
||||
$textobject = $langs->trans("ProductsAndServices");
|
||||
if (empty($conf->product->enabled)) {
|
||||
if (!isModEnabled("product")) {
|
||||
$title = $langs->trans('ServiceSetup');
|
||||
$textobject = $langs->trans('Services');
|
||||
} elseif (empty($conf->service->enabled)) {
|
||||
} elseif (!isModEnabled("service")) {
|
||||
$title = $langs->trans('ProductSetup');
|
||||
$textobject = $langs->trans('Products');
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
|
||||
if (empty($user->rights->fournisseur->lire) && (empty($conf->margin->enabled) && !$user->hasRight("margin", "liretous"))) {
|
||||
if (empty($user->rights->fournisseur->lire) && (!isModEnabled('margin') && !$user->hasRight("margin", "liretous"))) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
@ -73,11 +73,11 @@ if (!isset($_GET["type"])) {
|
||||
$transAreaType = $langs->trans("ProductsAndServicesArea");
|
||||
$helpurl = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
|
||||
}
|
||||
if ((isset($_GET["type"]) && $_GET["type"] == 0) || empty($conf->service->enabled)) {
|
||||
if ((isset($_GET["type"]) && $_GET["type"] == 0) || !isModEnabled("service")) {
|
||||
$transAreaType = $langs->trans("ProductsArea");
|
||||
$helpurl = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
|
||||
}
|
||||
if ((isset($_GET["type"]) && $_GET["type"] == 1) || empty($conf->product->enabled)) {
|
||||
if ((isset($_GET["type"]) && $_GET["type"] == 1) || !isModEnabled("product")) {
|
||||
$transAreaType = $langs->trans("ServicesArea");
|
||||
$helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
|
||||
}
|
||||
|
||||
@ -495,8 +495,7 @@ print '<div class="clearboth" style="padding-bottom: 20px;"></div>';
|
||||
$moreforfilter = '';
|
||||
|
||||
// Filter on categories
|
||||
/*if (!empty($conf->categorie->enabled))
|
||||
{
|
||||
/*if (isModEnabled("categorie")) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('ProjectCategories'). ': ';
|
||||
|
||||
@ -410,8 +410,7 @@ $moreforfilter = '';
|
||||
|
||||
// Filter on categories
|
||||
/*
|
||||
if (!empty($conf->categorie->enabled))
|
||||
{
|
||||
if (isModEnabled("categorie")) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('ProjectCategories'). ': ';
|
||||
|
||||
@ -546,8 +546,7 @@ $moreforfilter = '';
|
||||
|
||||
// Filter on categories
|
||||
/*
|
||||
if (!empty($conf->categorie->enabled))
|
||||
{
|
||||
if (isModEnabled("categorie")) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('ProjectCategories'). ': ';
|
||||
|
||||
@ -412,7 +412,7 @@ $listofreferent = array(
|
||||
'lang'=>'bills',
|
||||
'buttonnew'=>'CreateBill',
|
||||
'testnew'=>$user->hasRight('facture', 'creer'),
|
||||
'test'=>!empty($conf->facture->enabled) && $user->hasRight('facture', 'lire')),
|
||||
'test'=>isModEnabled('facture') && $user->hasRight('facture', 'lire')),
|
||||
'invoice_predefined'=>array(
|
||||
'name'=>"PredefinedInvoices",
|
||||
'title'=>"ListPredefinedInvoicesAssociatedProject",
|
||||
@ -423,7 +423,7 @@ $listofreferent = array(
|
||||
'lang'=>'bills',
|
||||
'buttonnew'=>'CreateBill',
|
||||
'testnew'=>$user->hasRight('facture', 'creer'),
|
||||
'test'=>!empty($conf->facture->enabled) && $user->hasRight('facture', 'lire')),
|
||||
'test'=>isModEnabled('facture') && $user->hasRight('facture', 'lire')),
|
||||
'proposal_supplier'=>array(
|
||||
'name'=>"SuppliersProposals",
|
||||
'title'=>"ListSupplierProposalsAssociatedProject",
|
||||
@ -616,7 +616,7 @@ $listofreferent = array(
|
||||
'lang'=>'banks',
|
||||
'buttonnew'=>'AddVariousPayment',
|
||||
'testnew'=>$user->hasRight('banque', 'modifier'),
|
||||
'test'=>!empty($conf->banque->enabled) && $user->hasRight('banque', 'lire') && !empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)),
|
||||
'test'=>isModEnabled("banque") && $user->hasRight('banque', 'lire') && !empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)),
|
||||
/* No need for this, available on dedicated tab "Agenda/Events"
|
||||
'agenda'=>array(
|
||||
'name'=>"Agenda",
|
||||
@ -629,7 +629,7 @@ $listofreferent = array(
|
||||
'lang'=>'agenda',
|
||||
'buttonnew'=>'AddEvent',
|
||||
'testnew'=>$user->rights->agenda->myactions->create,
|
||||
'test'=>$conf->agenda->enabled && $user->rights->agenda->myactions->read),
|
||||
'test'=> isModEnabled('agenda') && $user->rights->agenda->myactions->read),
|
||||
*/
|
||||
);
|
||||
|
||||
|
||||
@ -1006,7 +1006,7 @@ if (isModEnabled('categorie') && $user->rights->categorie->lire) {
|
||||
$moreforfilter .= $formcategory->getFilterBox(Categorie::TYPE_PROJECT, $search_category_array, 'minwidth300imp widthcentpercentminusx');
|
||||
}
|
||||
// Filter on customer categories
|
||||
if (!empty($conf->global->MAIN_SEARCH_CATEGORY_CUSTOMER_ON_PROJECT_LIST) && !empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
if (!empty($conf->global->MAIN_SEARCH_CATEGORY_CUSTOMER_ON_PROJECT_LIST) && isModEnabled("categorie") && $user->rights->categorie->lire) {
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->transnoentities('CustomersProspectsCategoriesShort');
|
||||
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"');
|
||||
|
||||
@ -806,7 +806,7 @@ $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form-
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
// Filter on customer categories
|
||||
if (!empty($conf->global->MAIN_SEARCH_CATEGORY_CUSTOMER_ON_TASK_LIST) && !empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
if (!empty($conf->global->MAIN_SEARCH_CATEGORY_CUSTOMER_ON_TASK_LIST) && isModEnabled("categorie") && $user->rights->categorie->lire) {
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->transnoentities('CustomersProspectsCategoriesShort');
|
||||
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"');
|
||||
|
||||
@ -1458,7 +1458,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
if ($conf->service->enabled) {
|
||||
if (isModEnabled("service")) {
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print $langs->trans('ServiceToUseOnLines');
|
||||
@ -1750,7 +1750,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
|
||||
print '<td></td>';
|
||||
|
||||
if ($conf->service->enabled && $projectstatic->thirdparty->id > 0 && $projectstatic->usage_bill_time) {
|
||||
if (isModEnabled("service") && $projectstatic->thirdparty->id > 0 && $projectstatic->usage_bill_time) {
|
||||
print '<td>'.$langs->trans("Product").'</td>';
|
||||
}
|
||||
}
|
||||
@ -1829,7 +1829,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
print '<td>';
|
||||
print '</td>';
|
||||
|
||||
if ($conf->service->enabled && $projectstatic->thirdparty->id > 0 && $projectstatic->usage_bill_time) {
|
||||
if (isModEnabled("service") && $projectstatic->thirdparty->id > 0 && $projectstatic->usage_bill_time) {
|
||||
print '<td class="nowraponall">';
|
||||
print img_picto('', 'product');
|
||||
print $form->select_produits('', 'fk_product', '1', 0, $projectstatic->thirdparty->price_level, 1, 2, '', 1, array(), $projectstatic->thirdparty->id, 'None', 0, 'maxwidth150', 0, '', null, 1);
|
||||
|
||||
@ -84,7 +84,7 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
|
||||
// Security check
|
||||
if (empty($conf->agenda->enabled)) {
|
||||
if (!isModEnabled('agenda')) {
|
||||
httponly_accessforbidden('Module Agenda not enabled');
|
||||
}
|
||||
|
||||
|
||||
@ -434,7 +434,7 @@ print '<br>';
|
||||
|
||||
// TODO Replace this with a hook
|
||||
// Google Adsense (need Google module)
|
||||
if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT)) {
|
||||
if (isModEnabled('google') && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT)) {
|
||||
if (empty($conf->dol_use_jmobile)) {
|
||||
print '<div align="center">'."\n";
|
||||
print '<script><!--'."\n";
|
||||
|
||||
@ -81,7 +81,7 @@ $error = 0;
|
||||
$langs->loadLangs(array("main", "members", "companies", "install", "other", "errors"));
|
||||
|
||||
// Security check
|
||||
if (empty($conf->adherent->enabled)) {
|
||||
if (!isModEnabled('adherent')) {
|
||||
httponly_accessforbidden('Module Membership not enabled');
|
||||
}
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
|
||||
// Security check
|
||||
if (empty($conf->adherent->enabled)) {
|
||||
if (!isModEnabled('adherent')) {
|
||||
httponly_accessforbidden('Module Memebership no enabled');
|
||||
}
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ if (is_numeric($entity)) {
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Security check
|
||||
if (empty($conf->adherent->enabled)) {
|
||||
if (!isModEnabled('adherent')) {
|
||||
httponly_accessforbidden('Module Membership not enabled');
|
||||
}
|
||||
|
||||
|
||||
@ -577,7 +577,7 @@ class Thirdparties extends DolibarrApi
|
||||
throw new RestException(501, 'Module "Thirdparties" needed for this request');
|
||||
}
|
||||
|
||||
if (empty($conf->product->enabled)) {
|
||||
if (!isModEnabled("product")) {
|
||||
throw new RestException(501, 'Module "Products" needed for this request');
|
||||
}
|
||||
|
||||
|
||||
@ -205,7 +205,7 @@ class CompanyBankAccount extends Account
|
||||
$sql .= ",proprio = '".$this->db->escape($this->proprio)."'";
|
||||
$sql .= ",owner_address = '".$this->db->escape($this->owner_address)."'";
|
||||
$sql .= ",default_rib = ".((int) $this->default_rib);
|
||||
if (!empty($conf->prelevement->enabled)) {
|
||||
if (isModEnabled('prelevement')) {
|
||||
$sql .= ",frstrecur = '".$this->db->escape($this->frstrecur)."'";
|
||||
$sql .= ",rum = '".$this->db->escape($this->rum)."'";
|
||||
$sql .= ",date_rum = ".($this->date_rum ? "'".$this->db->idate($this->date_rum)."'" : "null");
|
||||
|
||||
@ -147,7 +147,7 @@ if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field
|
||||
print '<tr><td class="titlefield">'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>';
|
||||
}
|
||||
|
||||
//if ($conf->agenda->enabled && $user->rights->agenda->myactions->read) $elementTypeArray['action']=$langs->transnoentitiesnoconv('Events');
|
||||
//if (isModEnabled('agenda') && $user->rights->agenda->myactions->read) $elementTypeArray['action']=$langs->transnoentitiesnoconv('Events');
|
||||
|
||||
if ($object->client) {
|
||||
print '<tr><td class="titlefield">';
|
||||
|
||||
@ -1440,7 +1440,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
||||
print_liste_field_titre("RIB");
|
||||
print_liste_field_titre("IBAN");
|
||||
print_liste_field_titre("BIC");
|
||||
if (!empty($conf->prelevement->enabled)) {
|
||||
if (isModEnabled('prelevement')) {
|
||||
print_liste_field_titre("RUM");
|
||||
print_liste_field_titre("DateRUM");
|
||||
print_liste_field_titre("WithdrawMode");
|
||||
@ -1530,7 +1530,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
||||
print dol_escape_htmltag($rib->bic);
|
||||
print '</td>';
|
||||
|
||||
if (!empty($conf->prelevement->enabled)) {
|
||||
if (isModEnabled('prelevement')) {
|
||||
// RUM
|
||||
//print '<td>'.$prelevement->buildRumNumber($object->code_client, $rib->datec, $rib->id).'</td>';
|
||||
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($rib->rum).'">'.dol_escape_htmltag($rib->rum).'</td>';
|
||||
@ -1695,7 +1695,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
||||
//var_dump($src);
|
||||
print '</td>';
|
||||
|
||||
if (!empty($conf->prelevement->enabled)) {
|
||||
if (isModEnabled('prelevement')) {
|
||||
// RUM
|
||||
print '<td valign="middle">';
|
||||
//var_dump($src);
|
||||
|
||||
@ -1770,8 +1770,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
/* Not for supplier proposals
|
||||
if ($soc->outstanding_limit)
|
||||
{
|
||||
if ($soc->outstanding_limit) {
|
||||
// Outstanding Bill
|
||||
print '<tr><td>';
|
||||
print $langs->trans('OutstandingBill');
|
||||
@ -1861,8 +1860,8 @@ if ($action == 'create') {
|
||||
print '</table>';
|
||||
|
||||
// Margin Infos
|
||||
/*if (!empty($conf->margin->enabled)) {
|
||||
$formmargin->displayMarginInfos($object);
|
||||
/*if (isModEnabled('margin')) {
|
||||
$formmargin->displayMarginInfos($object);
|
||||
}*/
|
||||
|
||||
print '</div>';
|
||||
|
||||
@ -353,7 +353,7 @@ if (empty($reshook)) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action = "create"; // Go back to create page
|
||||
} else {
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled("categorie")) {
|
||||
// Categories association
|
||||
$usercats = GETPOST('usercats', 'array');
|
||||
$object->setCategories($usercats);
|
||||
|
||||
@ -222,7 +222,7 @@ if ($object->id > 0) {
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if (!empty($conf->agenda->enabled)) {
|
||||
if (isModEnabled('agenda')) {
|
||||
if (!empty($user->rights->agenda->myactions->create) || $user->hasRight('agenda', 'allactions', 'create')) {
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'">'.$langs->trans("AddAction").'</a>';
|
||||
} else {
|
||||
@ -232,7 +232,7 @@ if ($object->id > 0) {
|
||||
|
||||
print '</div>';
|
||||
|
||||
if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
|
||||
if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
|
||||
$param = '&id='.$object->id.'&socid='.$socid;
|
||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
||||
$param .= '&contextpage='.urlencode($contextpage);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user