|
@@ -96,7 +96,7 @@ discard block |
|
|
block discarded – undo |
96
|
96
|
// Members |
97
|
97
|
$tmpentry = array( |
98
|
98
|
'enabled' => isModEnabled('adherent'), |
99
|
|
- 'perms' => $user->hasRight('adherent', 'lire'), |
|
99
|
+ 'perms' => $user->hasRight('adherent', 'lire'), |
100
|
100
|
'module' => 'adherent' |
101
|
101
|
); |
102
|
102
|
$menu_arr[] = array( |
|
@@ -125,7 +125,7 @@ discard block |
|
|
block discarded – undo |
125
|
125
|
) |
126
|
126
|
|| (isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) |
127
|
127
|
), |
128
|
|
- 'perms'=> ($user->hasRight('societe', 'lire') || $user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire')), |
|
128
|
+ 'perms'=> ($user->hasRight('societe', 'lire') || $user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire')), |
129
|
129
|
'module'=>'societe|fournisseur' |
130
|
130
|
); |
131
|
131
|
$menu_arr[] = array( |
|
@@ -150,7 +150,7 @@ discard block |
|
|
block discarded – undo |
150
|
150
|
// Products-Services |
151
|
151
|
$tmpentry = array( |
152
|
152
|
'enabled'=> (isModEnabled('product') || isModEnabled('service') || isModEnabled('expedition')), |
153
|
|
- 'perms'=> ($user->hasRight('product', 'read') || $user->hasRight('service', 'read') || $user->hasRight('expedition', 'lire')), |
|
153
|
+ 'perms'=> ($user->hasRight('product', 'read') || $user->hasRight('service', 'read') || $user->hasRight('expedition', 'lire')), |
154
|
154
|
'module'=>'product|service' |
155
|
155
|
); |
156
|
156
|
$menu_arr[] = array( |
|
@@ -177,7 +177,7 @@ discard block |
|
|
block discarded – undo |
177
|
177
|
// MRP - GPAO |
178
|
178
|
$tmpentry = array( |
179
|
179
|
'enabled'=>(isModEnabled('bom') || isModEnabled('mrp')), |
180
|
|
- 'perms'=>($user->hasRight('bom', 'read') || $user->hasRight('mrp', 'read')), |
|
180
|
+ 'perms'=>($user->hasRight('bom', 'read') || $user->hasRight('mrp', 'read')), |
181
|
181
|
'module'=>'bom|mrp' |
182
|
182
|
); |
183
|
183
|
$menu_arr[] = array( |
|
@@ -202,7 +202,7 @@ discard block |
|
|
block discarded – undo |
202
|
202
|
// Projects |
203
|
203
|
$tmpentry = array( |
204
|
204
|
'enabled'=> (isModEnabled('projet') ? 1 : 0), |
205
|
|
- 'perms'=> ($user->hasRight('projet', 'lire') ? 1 : 0), |
|
205
|
+ 'perms'=> ($user->hasRight('projet', 'lire') ? 1 : 0), |
206
|
206
|
'module'=>'projet' |
207
|
207
|
); |
208
|
208
|
|
|
@@ -247,25 +247,25 @@ discard block |
|
|
block discarded – undo |
247
|
247
|
|| isModEnabled('contrat') |
248
|
248
|
|| isModEnabled('ficheinter') |
249
|
249
|
) ? 1 : 0, |
250
|
|
- 'perms'=>($user->hasRight('propal', 'read') |
251
|
|
- || $user->hasRight('commande', 'lire') |
252
|
|
- || $user->hasRight('supplier_proposal', 'lire') |
253
|
|
- || $user->hasRight('fournisseur', 'lire') |
254
|
|
- || $user->hasRight('fournisseur', 'commande', 'lire') |
255
|
|
- || $user->hasRight('supplier_order', 'lire') |
256
|
|
- || $user->hasRight('contrat', 'lire') |
257
|
|
- || $user->hasRight('ficheinter', 'lire') |
|
250
|
+ 'perms'=>($user->hasRight('propal', 'read') |
|
251
|
+ || $user->hasRight('commande', 'lire') |
|
252
|
+ || $user->hasRight('supplier_proposal', 'lire') |
|
253
|
+ || $user->hasRight('fournisseur', 'lire') |
|
254
|
+ || $user->hasRight('fournisseur', 'commande', 'lire') |
|
255
|
+ || $user->hasRight('supplier_order', 'lire') |
|
256
|
+ || $user->hasRight('contrat', 'lire') |
|
257
|
+ || $user->hasRight('ficheinter', 'lire') |
258
|
258
|
), |
259
|
259
|
'module'=>'propal|commande|supplier_proposal|supplier_order|contrat|ficheinter' |
260
|
260
|
); |
261
|
261
|
|
262
|
|
- $onlysupplierorder = $user->hasRight('fournisseur', 'commande', 'lire') && |
263
|
|
- !$user->hasRight('propal', 'lire') && |
264
|
|
- !$user->hasRight('commande', 'lire') && |
265
|
|
- !$user->hasRight('supplier_order', 'lire') && |
266
|
|
- !$user->hasRight('supplier_proposal', 'lire') && |
267
|
|
- !$user->hasRight('contrat', 'lire') && |
268
|
|
- !$user->hasRight('ficheinter', 'lire'); |
|
262
|
+ $onlysupplierorder = $user->hasRight('fournisseur', 'commande', 'lire') && |
|
263
|
+ !$user->hasRight('propal', 'lire') && |
|
264
|
+ !$user->hasRight('commande', 'lire') && |
|
265
|
+ !$user->hasRight('supplier_order', 'lire') && |
|
266
|
+ !$user->hasRight('supplier_proposal', 'lire') && |
|
267
|
+ !$user->hasRight('contrat', 'lire') && |
|
268
|
+ !$user->hasRight('ficheinter', 'lire'); |
269
|
269
|
|
270
|
270
|
$menu_arr[] = array( |
271
|
271
|
'name' => 'Commercial', |
|
@@ -296,9 +296,9 @@ discard block |
|
|
block discarded – undo |
296
|
296
|
isModEnabled('loan') || |
297
|
297
|
isModEnabled('margins') |
298
|
298
|
) ? 1 : 0, |
299
|
|
- 'perms'=>($user->hasRight('facture', 'lire') || $user->hasRight('don', 'contact', 'lire') |
300
|
|
- || $user->hasRight('tax', 'charges', 'lire') || $user->hasRight('salaries', 'read') |
301
|
|
- || $user->hasRight('fournisseur', 'facture', 'lire') || $user->hasRight('loan', 'read') || $user->hasRight('margins', 'liretous')), |
|
299
|
+ 'perms'=>($user->hasRight('facture', 'lire') || $user->hasRight('don', 'contact', 'lire') |
|
300
|
+ || $user->hasRight('tax', 'charges', 'lire') || $user->hasRight('salaries', 'read') |
|
301
|
+ || $user->hasRight('fournisseur', 'facture', 'lire') || $user->hasRight('loan', 'read') || $user->hasRight('margins', 'liretous')), |
302
|
302
|
'module'=>'facture|supplier_invoice|don|tax|salaries|loan' |
303
|
303
|
); |
304
|
304
|
$menu_arr[] = array( |
|
@@ -323,7 +323,7 @@ discard block |
|
|
block discarded – undo |
323
|
323
|
// Bank |
324
|
324
|
$tmpentry = array( |
325
|
325
|
'enabled'=>(isModEnabled('banque') || isModEnabled('prelevement')), |
326
|
|
- 'perms'=>($user->hasRight('banque', 'lire') || $user->hasRight('prelevement', 'lire') || $user->hasRight('paymentbybanktransfer', 'read')), |
|
326
|
+ 'perms'=>($user->hasRight('banque', 'lire') || $user->hasRight('prelevement', 'lire') || $user->hasRight('paymentbybanktransfer', 'read')), |
327
|
327
|
'module'=>'banque|prelevement|paymentbybanktransfer' |
328
|
328
|
); |
329
|
329
|
$menu_arr[] = array( |
|
@@ -348,7 +348,7 @@ discard block |
|
|
block discarded – undo |
348
|
348
|
// Accounting |
349
|
349
|
$tmpentry = array( |
350
|
350
|
'enabled'=>(isModEnabled('comptabilite') || isModEnabled('accounting') || isModEnabled('asset') || isModEnabled('intracommreport')), |
351
|
|
- 'perms'=>($user->hasRight('compta', 'resultat', 'lire') || $user->hasRight('accounting', 'comptarapport', 'lire') || $user->hasRight('accounting', 'mouvements', 'lire') || $user->hasRight('asset', 'read') || $user->hasRight('intracommreport', 'read')), |
|
351
|
+ 'perms'=>($user->hasRight('compta', 'resultat', 'lire') || $user->hasRight('accounting', 'comptarapport', 'lire') || $user->hasRight('accounting', 'mouvements', 'lire') || $user->hasRight('asset', 'read') || $user->hasRight('intracommreport', 'read')), |
352
|
352
|
'module'=>'comptabilite|accounting|asset|intracommreport' |
353
|
353
|
); |
354
|
354
|
$menu_arr[] = array( |
|
@@ -373,7 +373,7 @@ discard block |
|
|
block discarded – undo |
373
|
373
|
// HRM |
374
|
374
|
$tmpentry = array( |
375
|
375
|
'enabled'=>(isModEnabled('hrm') || (isModEnabled('holiday')) || isModEnabled('deplacement') || isModEnabled('expensereport') || isModEnabled('recruitment')), |
376
|
|
- 'perms'=>($user->hasRight('user', 'user', 'lire') || $user->hasRight('holiday', 'read') || $user->hasRight('deplacement', 'lire') || $user->hasRight('expensereport', 'lire') || $user->hasRight('recruitment', 'recruitmentjobposition', 'read')), |
|
376
|
+ 'perms'=>($user->hasRight('user', 'user', 'lire') || $user->hasRight('holiday', 'read') || $user->hasRight('deplacement', 'lire') || $user->hasRight('expensereport', 'lire') || $user->hasRight('recruitment', 'recruitmentjobposition', 'read')), |
377
|
377
|
'module'=>'hrm|holiday|deplacement|expensereport|recruitment' |
378
|
378
|
); |
379
|
379
|
|
|
@@ -399,7 +399,7 @@ discard block |
|
|
block discarded – undo |
399
|
399
|
// Tickets and Knowledge base |
400
|
400
|
$tmpentry = array( |
401
|
401
|
'enabled'=>(isModEnabled('ticket') || isModEnabled('knowledgemanagement')), |
402
|
|
- 'perms'=>($user->hasRight('ticket', 'read') || $user->hasRight('knowledgemanagement', 'knowledgerecord', 'read')), |
|
402
|
+ 'perms'=>($user->hasRight('ticket', 'read') || $user->hasRight('knowledgemanagement', 'knowledgerecord', 'read')), |
403
|
403
|
'module'=>'ticket|knowledgemanagement' |
404
|
404
|
); |
405
|
405
|
$link = ''; |
|
@@ -1196,17 +1196,17 @@ discard block |
|
|
block discarded – undo |
1196
|
1196
|
$newmenu->add("/user/home.php?leftmenu=users", $langs->trans("MenuUsersAndGroups"), 0, $user->hasRight('user', 'user', 'read'), '', $mainmenu, 'users', 0, '', '', '', img_picto('', 'user', 'class="paddingright pictofixedwidth"')); |
1197
|
1197
|
if ($user->hasRight('user', 'user', 'read')) { |
1198
|
1198
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "users") { |
1199
|
|
- $newmenu->add("", $langs->trans("Users"), 1, $user->hasRight('user', 'user', 'lire') || $user->admin); |
|
1199
|
+ $newmenu->add("", $langs->trans("Users"), 1, $user->hasRight('user', 'user', 'lire') || $user->admin); |
1200
|
1200
|
$newmenu->add("/user/card.php?leftmenu=users&action=create", $langs->trans("NewUser"), 2, ($user->hasRight("user", "user", "write") || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)), '', 'home'); |
1201
|
|
- $newmenu->add("/user/list.php?leftmenu=users", $langs->trans("ListOfUsers"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin); |
1202
|
|
- $newmenu->add("/user/hierarchy.php?leftmenu=users", $langs->trans("HierarchicView"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin); |
|
1201
|
+ $newmenu->add("/user/list.php?leftmenu=users", $langs->trans("ListOfUsers"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin); |
|
1202
|
+ $newmenu->add("/user/hierarchy.php?leftmenu=users", $langs->trans("HierarchicView"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin); |
1203
|
1203
|
if (isModEnabled('categorie')) { |
1204
|
1204
|
$langs->load("categories"); |
1205
|
|
- $newmenu->add("/categories/index.php?leftmenu=users&type=7", $langs->trans("UsersCategoriesShort"), 2, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
1205
|
+ $newmenu->add("/categories/index.php?leftmenu=users&type=7", $langs->trans("UsersCategoriesShort"), 2, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
1206
|
1206
|
} |
1207
|
|
- $newmenu->add("", $langs->trans("Groups"), 1, ($user->hasRight('user', 'user', 'lire') || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))); |
|
1207
|
+ $newmenu->add("", $langs->trans("Groups"), 1, ($user->hasRight('user', 'user', 'lire') || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))); |
1208
|
1208
|
$newmenu->add("/user/group/card.php?leftmenu=users&action=create", $langs->trans("NewGroup"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->hasRight("user", "group_advance", "create") : $user->hasRight("user", "user", "create")) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))); |
1209
|
|
- $newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->hasRight('user', 'group_advance', 'read') : $user->hasRight('user', 'user', 'lire')) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))); |
|
1209
|
+ $newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->hasRight('user', 'group_advance', 'read') : $user->hasRight('user', 'user', 'lire')) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))); |
1210
|
1210
|
} |
1211
|
1211
|
} |
1212
|
1212
|
} |
|
@@ -1230,9 +1230,9 @@ discard block |
|
|
block discarded – undo |
1230
|
1230
|
// Societes |
1231
|
1231
|
if (isModEnabled('societe')) { |
1232
|
1232
|
$langs->load("companies"); |
1233
|
|
- $newmenu->add("/societe/index.php?leftmenu=thirdparties", $langs->trans("ThirdParty"), 0, $user->hasRight('societe', 'lire'), '', $mainmenu, 'thirdparties', 0, '', '', '', img_picto('', 'company', 'class="paddingright pictofixedwidth"')); |
|
1233
|
+ $newmenu->add("/societe/index.php?leftmenu=thirdparties", $langs->trans("ThirdParty"), 0, $user->hasRight('societe', 'lire'), '', $mainmenu, 'thirdparties', 0, '', '', '', img_picto('', 'company', 'class="paddingright pictofixedwidth"')); |
1234
|
1234
|
|
1235
|
|
- if ($user->hasRight('societe', 'creer')) { |
|
1235
|
+ if ($user->hasRight('societe', 'creer')) { |
1236
|
1236
|
$newmenu->add("/societe/card.php?action=create", $langs->trans("MenuNewThirdParty"), 1); |
1237
|
1237
|
if (!$conf->use_javascript_ajax) { |
1238
|
1238
|
$newmenu->add("/societe/card.php?action=create&private=1", $langs->trans("MenuNewPrivateIndividual"), 1); |
|
@@ -1245,7 +1245,7 @@ discard block |
|
|
block discarded – undo |
1245
|
1245
|
// Prospects |
1246
|
1246
|
if (isModEnabled('societe') && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { |
1247
|
1247
|
$langs->load("commercial"); |
1248
|
|
- $newmenu->add("/societe/list.php?type=p&leftmenu=prospects", $langs->trans("ListProspectsShort"), 2, $user->hasRight('societe', 'lire'), '', $mainmenu, 'prospects'); |
|
1248
|
+ $newmenu->add("/societe/list.php?type=p&leftmenu=prospects", $langs->trans("ListProspectsShort"), 2, $user->hasRight('societe', 'lire'), '', $mainmenu, 'prospects'); |
1249
|
1249
|
/* no more required, there is a filter that can do more |
1250
|
1250
|
if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=-1", $langs->trans("LastProspectDoNotContact"), 2, $user->hasRight('societe', 'lire')); |
1251
|
1251
|
if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=0", $langs->trans("LastProspectNeverContacted"), 2, $user->hasRight('societe', 'lire')); |
|
@@ -1253,22 +1253,22 @@ discard block |
|
|
block discarded – undo |
1253
|
1253
|
if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=2", $langs->trans("LastProspectContactInProcess"), 2, $user->hasRight('societe', 'lire')); |
1254
|
1254
|
if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=3", $langs->trans("LastProspectContactDone"), 2, $user->hasRight('societe', 'lire')); |
1255
|
1255
|
*/ |
1256
|
|
- $newmenu->add("/societe/card.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 3, $user->hasRight('societe', 'creer')); |
|
1256
|
+ $newmenu->add("/societe/card.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 3, $user->hasRight('societe', 'creer')); |
1257
|
1257
|
} |
1258
|
1258
|
|
1259
|
1259
|
// Customers/Prospects |
1260
|
1260
|
if (isModEnabled('societe') && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { |
1261
|
1261
|
$langs->load("commercial"); |
1262
|
|
- $newmenu->add("/societe/list.php?type=c&leftmenu=customers", $langs->trans("ListCustomersShort"), 2, $user->hasRight('societe', 'lire'), '', $mainmenu, 'customers'); |
|
1262
|
+ $newmenu->add("/societe/list.php?type=c&leftmenu=customers", $langs->trans("ListCustomersShort"), 2, $user->hasRight('societe', 'lire'), '', $mainmenu, 'customers'); |
1263
|
1263
|
|
1264
|
|
- $newmenu->add("/societe/card.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 3, $user->hasRight('societe', 'creer')); |
|
1264
|
+ $newmenu->add("/societe/card.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 3, $user->hasRight('societe', 'creer')); |
1265
|
1265
|
} |
1266
|
1266
|
|
1267
|
1267
|
// Suppliers |
1268
|
1268
|
if (isModEnabled('societe') && (isModEnabled('supplier_order') || isModEnabled('supplier_invoice') || isModEnabled('supplier_proposal'))) { |
1269
|
1269
|
$langs->load("suppliers"); |
1270
|
|
- $newmenu->add("/societe/list.php?type=f&leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 2, ($user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire')), '', $mainmenu, 'suppliers'); |
1271
|
|
- $newmenu->add("/societe/card.php?leftmenu=suppliers&action=create&type=f", $langs->trans("MenuNewSupplier"), 3, $user->hasRight('societe', 'creer') && ($user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire'))); |
|
1270
|
+ $newmenu->add("/societe/list.php?type=f&leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 2, ($user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire')), '', $mainmenu, 'suppliers'); |
|
1271
|
+ $newmenu->add("/societe/card.php?leftmenu=suppliers&action=create&type=f", $langs->trans("MenuNewSupplier"), 3, $user->hasRight('societe', 'creer') && ($user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire'))); |
1272
|
1272
|
} |
1273
|
1273
|
|
1274
|
1274
|
// Categories |
|
@@ -1283,36 +1283,36 @@ discard block |
|
|
block discarded – undo |
1283
|
1283
|
if (!empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { |
1284
|
1284
|
$menutoshow = $langs->trans("ProspectsCategoriesShort"); |
1285
|
1285
|
} |
1286
|
|
- $newmenu->add("/categories/index.php?leftmenu=cat&type=2", $menutoshow, 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
1286
|
+ $newmenu->add("/categories/index.php?leftmenu=cat&type=2", $menutoshow, 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
1287
|
1287
|
} |
1288
|
1288
|
// Categories suppliers |
1289
|
1289
|
if (isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) { |
1290
|
|
- $newmenu->add("/categories/index.php?leftmenu=catfournish&type=1", $langs->trans("SuppliersCategoriesShort"), 1, $user->hasRight('categorie', 'lire')); |
|
1290
|
+ $newmenu->add("/categories/index.php?leftmenu=catfournish&type=1", $langs->trans("SuppliersCategoriesShort"), 1, $user->hasRight('categorie', 'lire')); |
1291
|
1291
|
} |
1292
|
1292
|
} |
1293
|
1293
|
|
1294
|
1294
|
// Contacts |
1295
|
|
- $newmenu->add("/societe/index.php?leftmenu=thirdparties", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")), 0, $user->hasRight('societe', 'contact', 'lire'), '', $mainmenu, 'contacts', 0, '', '', '', img_picto('', 'contact', 'class="paddingright pictofixedwidth"')); |
|
1295
|
+ $newmenu->add("/societe/index.php?leftmenu=thirdparties", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")), 0, $user->hasRight('societe', 'contact', 'lire'), '', $mainmenu, 'contacts', 0, '', '', '', img_picto('', 'contact', 'class="paddingright pictofixedwidth"')); |
1296
|
1296
|
|
1297
|
|
- $newmenu->add("/contact/card.php?leftmenu=contacts&action=create", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress")), 1, $user->hasRight('societe', 'contact', 'creer')); |
1298
|
|
- $newmenu->add("/contact/list.php?leftmenu=contacts", $langs->trans("List"), 1, $user->hasRight('societe', 'contact', 'lire')); |
|
1297
|
+ $newmenu->add("/contact/card.php?leftmenu=contacts&action=create", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress")), 1, $user->hasRight('societe', 'contact', 'creer')); |
|
1298
|
+ $newmenu->add("/contact/list.php?leftmenu=contacts", $langs->trans("List"), 1, $user->hasRight('societe', 'contact', 'lire')); |
1299
|
1299
|
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { |
1300
|
|
- $newmenu->add("/contact/list.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->hasRight('societe', 'contact', 'lire')); |
|
1300
|
+ $newmenu->add("/contact/list.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->hasRight('societe', 'contact', 'lire')); |
1301
|
1301
|
} |
1302
|
1302
|
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { |
1303
|
|
- $newmenu->add("/contact/list.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->hasRight('societe', 'contact', 'lire')); |
|
1303
|
+ $newmenu->add("/contact/list.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->hasRight('societe', 'contact', 'lire')); |
1304
|
1304
|
} |
1305
|
1305
|
if (isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) { |
1306
|
|
- $newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->hasRight('fournisseur', 'lire')); |
|
1306
|
+ $newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->hasRight('fournisseur', 'lire')); |
1307
|
1307
|
} |
1308
|
|
- $newmenu->add("/contact/list.php?leftmenu=contacts&type=o", $langs->trans("ContactOthers"), 2, $user->hasRight('societe', 'contact', 'lire')); |
|
1308
|
+ $newmenu->add("/contact/list.php?leftmenu=contacts&type=o", $langs->trans("ContactOthers"), 2, $user->hasRight('societe', 'contact', 'lire')); |
1309
|
1309
|
//$newmenu->add("/contact/list.php?userid=$user->id", $langs->trans("MyContacts"), 1, $user->hasRight('societe', 'contact', 'lire')); |
1310
|
1310
|
|
1311
|
1311
|
// Categories |
1312
|
1312
|
if (isModEnabled('categorie')) { |
1313
|
1313
|
$langs->load("categories"); |
1314
|
1314
|
// Categories Contact |
1315
|
|
- $newmenu->add("/categories/index.php?leftmenu=catcontact&type=4", $langs->trans("ContactCategoriesShort"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
1315
|
+ $newmenu->add("/categories/index.php?leftmenu=catcontact&type=4", $langs->trans("ContactCategoriesShort"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
1316
|
1316
|
} |
1317
|
1317
|
} |
1318
|
1318
|
} |
|
@@ -1337,108 +1337,108 @@ discard block |
|
|
block discarded – undo |
1337
|
1337
|
// Customer proposal |
1338
|
1338
|
if (isModEnabled('propal')) { |
1339
|
1339
|
$langs->load("propal"); |
1340
|
|
- $newmenu->add("/comm/propal/index.php?leftmenu=propals", $langs->trans("Proposals"), 0, $user->hasRight('propal', 'read'), '', $mainmenu, 'propals', 100, '', '', '', img_picto('', 'propal', 'class="paddingright pictofixedwidth"')); |
1341
|
|
- $newmenu->add("/comm/propal/card.php?action=create&leftmenu=propals", $langs->trans("NewPropal"), 1, $user->hasRight('propal', 'write')); |
1342
|
|
- $newmenu->add("/comm/propal/list.php?leftmenu=propals", $langs->trans("List"), 1, $user->hasRight('propal', 'read')); |
|
1340
|
+ $newmenu->add("/comm/propal/index.php?leftmenu=propals", $langs->trans("Proposals"), 0, $user->hasRight('propal', 'read'), '', $mainmenu, 'propals', 100, '', '', '', img_picto('', 'propal', 'class="paddingright pictofixedwidth"')); |
|
1341
|
+ $newmenu->add("/comm/propal/card.php?action=create&leftmenu=propals", $langs->trans("NewPropal"), 1, $user->hasRight('propal', 'write')); |
|
1342
|
+ $newmenu->add("/comm/propal/list.php?leftmenu=propals", $langs->trans("List"), 1, $user->hasRight('propal', 'read')); |
1343
|
1343
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "propals") { |
1344
|
|
- $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=0", $langs->trans("PropalsDraft"), 2, $user->hasRight('propal', 'read')); |
1345
|
|
- $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=1", $langs->trans("PropalsOpened"), 2, $user->hasRight('propal', 'read')); |
1346
|
|
- $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2", $langs->trans("PropalStatusSigned"), 2, $user->hasRight('propal', 'read')); |
1347
|
|
- $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=3", $langs->trans("PropalStatusNotSigned"), 2, $user->hasRight('propal', 'read')); |
1348
|
|
- $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=4", $langs->trans("PropalStatusBilled"), 2, $user->hasRight('propal', 'read')); |
|
1344
|
+ $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=0", $langs->trans("PropalsDraft"), 2, $user->hasRight('propal', 'read')); |
|
1345
|
+ $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=1", $langs->trans("PropalsOpened"), 2, $user->hasRight('propal', 'read')); |
|
1346
|
+ $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2", $langs->trans("PropalStatusSigned"), 2, $user->hasRight('propal', 'read')); |
|
1347
|
+ $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=3", $langs->trans("PropalStatusNotSigned"), 2, $user->hasRight('propal', 'read')); |
|
1348
|
+ $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=4", $langs->trans("PropalStatusBilled"), 2, $user->hasRight('propal', 'read')); |
1349
|
1349
|
//$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2,3,4", $langs->trans("PropalStatusClosedShort"), 2, $user->hasRight('propal', 'read')); |
1350
|
1350
|
} |
1351
|
|
- $newmenu->add("/comm/propal/stats/index.php?leftmenu=propals", $langs->trans("Statistics"), 1, $user->hasRight('propal', 'read')); |
|
1351
|
+ $newmenu->add("/comm/propal/stats/index.php?leftmenu=propals", $langs->trans("Statistics"), 1, $user->hasRight('propal', 'read')); |
1352
|
1352
|
} |
1353
|
1353
|
|
1354
|
1354
|
// Customers orders |
1355
|
1355
|
if (isModEnabled('commande')) { |
1356
|
1356
|
$langs->load("orders"); |
1357
|
|
- $newmenu->add("/commande/index.php?leftmenu=orders", $langs->trans("CustomersOrders"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 200, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"')); |
1358
|
|
- $newmenu->add("/commande/card.php?action=create&leftmenu=orders", $langs->trans("NewOrder"), 1, $user->hasRight('commande', 'creer')); |
1359
|
|
- $newmenu->add("/commande/list.php?leftmenu=orders", $langs->trans("List"), 1, $user->hasRight('commande', 'lire')); |
|
1357
|
+ $newmenu->add("/commande/index.php?leftmenu=orders", $langs->trans("CustomersOrders"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 200, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"')); |
|
1358
|
+ $newmenu->add("/commande/card.php?action=create&leftmenu=orders", $langs->trans("NewOrder"), 1, $user->hasRight('commande', 'creer')); |
|
1359
|
+ $newmenu->add("/commande/list.php?leftmenu=orders", $langs->trans("List"), 1, $user->hasRight('commande', 'lire')); |
1360
|
1360
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "orders") { |
1361
|
|
- $newmenu->add("/commande/list.php?leftmenu=orders&search_status=0", $langs->trans("StatusOrderDraftShort"), 2, $user->hasRight('commande', 'lire')); |
1362
|
|
- $newmenu->add("/commande/list.php?leftmenu=orders&search_status=1", $langs->trans("StatusOrderValidated"), 2, $user->hasRight('commande', 'lire')); |
|
1361
|
+ $newmenu->add("/commande/list.php?leftmenu=orders&search_status=0", $langs->trans("StatusOrderDraftShort"), 2, $user->hasRight('commande', 'lire')); |
|
1362
|
+ $newmenu->add("/commande/list.php?leftmenu=orders&search_status=1", $langs->trans("StatusOrderValidated"), 2, $user->hasRight('commande', 'lire')); |
1363
|
1363
|
if (isModEnabled('expedition')) { |
1364
|
|
- $newmenu->add("/commande/list.php?leftmenu=orders&search_status=2", $langs->trans("StatusOrderSentShort"), 2, $user->hasRight('commande', 'lire')); |
|
1364
|
+ $newmenu->add("/commande/list.php?leftmenu=orders&search_status=2", $langs->trans("StatusOrderSentShort"), 2, $user->hasRight('commande', 'lire')); |
1365
|
1365
|
} |
1366
|
|
- $newmenu->add("/commande/list.php?leftmenu=orders&search_status=3", $langs->trans("StatusOrderDelivered"), 2, $user->hasRight('commande', 'lire')); |
|
1366
|
+ $newmenu->add("/commande/list.php?leftmenu=orders&search_status=3", $langs->trans("StatusOrderDelivered"), 2, $user->hasRight('commande', 'lire')); |
1367
|
1367
|
//$newmenu->add("/commande/list.php?leftmenu=orders&search_status=4", $langs->trans("StatusOrderProcessed"), 2, $user->hasRight('commande', 'lire')); |
1368
|
|
- $newmenu->add("/commande/list.php?leftmenu=orders&search_status=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->hasRight('commande', 'lire')); |
|
1368
|
+ $newmenu->add("/commande/list.php?leftmenu=orders&search_status=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->hasRight('commande', 'lire')); |
1369
|
1369
|
} |
1370
|
1370
|
if ($conf->global->MAIN_FEATURES_LEVEL >= 2 && empty($user->socid)) { |
1371
|
|
- $newmenu->add("/commande/list_det.php?leftmenu=orders", $langs->trans("ListOrderLigne"), 1, $user->hasRight('commande', 'lire')); |
|
1371
|
+ $newmenu->add("/commande/list_det.php?leftmenu=orders", $langs->trans("ListOrderLigne"), 1, $user->hasRight('commande', 'lire')); |
1372
|
1372
|
} |
1373
|
1373
|
if (getDolGlobalInt('MAIN_NEED_EXPORT_PERMISSION_TO_READ_STATISTICS')) { |
1374
|
1374
|
$newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->hasRight('commande', 'commande', 'export')); |
1375
|
1375
|
} else { |
1376
|
|
- $newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->hasRight('commande', 'lire')); |
|
1376
|
+ $newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->hasRight('commande', 'lire')); |
1377
|
1377
|
} |
1378
|
1378
|
} |
1379
|
1379
|
|
1380
|
1380
|
// Supplier proposal |
1381
|
1381
|
if (isModEnabled('supplier_proposal')) { |
1382
|
1382
|
$langs->load("supplier_proposal"); |
1383
|
|
- $newmenu->add("/supplier_proposal/index.php?leftmenu=propals_supplier", $langs->trans("SupplierProposalsShort"), 0, $user->hasRight('supplier_proposal', 'lire'), '', $mainmenu, 'propals_supplier', 300, '', '', '', img_picto('', 'supplier_proposal', 'class="paddingright pictofixedwidth"')); |
1384
|
|
- $newmenu->add("/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals", $langs->trans("SupplierProposalNew"), 1, $user->hasRight('supplier_proposal', 'creer')); |
1385
|
|
- $newmenu->add("/supplier_proposal/list.php?leftmenu=supplier_proposals", $langs->trans("List"), 1, $user->hasRight('supplier_proposal', 'lire')); |
1386
|
|
- $newmenu->add("/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('supplier_proposal', 'lire')); |
|
1383
|
+ $newmenu->add("/supplier_proposal/index.php?leftmenu=propals_supplier", $langs->trans("SupplierProposalsShort"), 0, $user->hasRight('supplier_proposal', 'lire'), '', $mainmenu, 'propals_supplier', 300, '', '', '', img_picto('', 'supplier_proposal', 'class="paddingright pictofixedwidth"')); |
|
1384
|
+ $newmenu->add("/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals", $langs->trans("SupplierProposalNew"), 1, $user->hasRight('supplier_proposal', 'creer')); |
|
1385
|
+ $newmenu->add("/supplier_proposal/list.php?leftmenu=supplier_proposals", $langs->trans("List"), 1, $user->hasRight('supplier_proposal', 'lire')); |
|
1386
|
+ $newmenu->add("/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('supplier_proposal', 'lire')); |
1387
|
1387
|
} |
1388
|
1388
|
|
1389
|
1389
|
// Suppliers orders |
1390
|
1390
|
if (isModEnabled('supplier_order')) { |
1391
|
1391
|
$langs->load("orders"); |
1392
|
|
- $newmenu->add("/fourn/commande/index.php?leftmenu=orders_suppliers", $langs->trans("SuppliersOrders"), 0, $user->hasRight('fournisseur', 'commande', 'lire'), '', $mainmenu, 'orders_suppliers', 400, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"')); |
1393
|
|
- $newmenu->add("/fourn/commande/card.php?action=create&leftmenu=orders_suppliers", $langs->trans("NewSupplierOrderShort"), 1, $user->hasRight('fournisseur', 'commande', 'creer')); |
1394
|
|
- $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers", $langs->trans("List"), 1, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1392
|
+ $newmenu->add("/fourn/commande/index.php?leftmenu=orders_suppliers", $langs->trans("SuppliersOrders"), 0, $user->hasRight('fournisseur', 'commande', 'lire'), '', $mainmenu, 'orders_suppliers', 400, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"')); |
|
1393
|
+ $newmenu->add("/fourn/commande/card.php?action=create&leftmenu=orders_suppliers", $langs->trans("NewSupplierOrderShort"), 1, $user->hasRight('fournisseur', 'commande', 'creer')); |
|
1394
|
+ $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers", $langs->trans("List"), 1, $user->hasRight('fournisseur', 'commande', 'lire')); |
1395
|
1395
|
|
1396
|
1396
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "orders_suppliers") { |
1397
|
|
- $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=0", $langs->trans("StatusSupplierOrderDraftShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1397
|
+ $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=0", $langs->trans("StatusSupplierOrderDraftShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
1398
|
1398
|
if (empty($conf->global->SUPPLIER_ORDER_HIDE_VALIDATED)) { |
1399
|
|
- $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=1", $langs->trans("StatusSupplierOrderValidated"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1399
|
+ $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=1", $langs->trans("StatusSupplierOrderValidated"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
1400
|
1400
|
} |
1401
|
|
- $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=2", $langs->trans("StatusSupplierOrderApprovedShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
1402
|
|
- $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=3", $langs->trans("StatusSupplierOrderOnProcessShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
1403
|
|
- $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=4", $langs->trans("StatusSupplierOrderReceivedPartiallyShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
1404
|
|
- $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=5", $langs->trans("StatusSupplierOrderReceivedAll"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
1405
|
|
- $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=6,7", $langs->trans("StatusSupplierOrderCanceled"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
1406
|
|
- $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=9", $langs->trans("StatusSupplierOrderRefused"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1401
|
+ $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=2", $langs->trans("StatusSupplierOrderApprovedShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1402
|
+ $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=3", $langs->trans("StatusSupplierOrderOnProcessShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1403
|
+ $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=4", $langs->trans("StatusSupplierOrderReceivedPartiallyShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1404
|
+ $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=5", $langs->trans("StatusSupplierOrderReceivedAll"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1405
|
+ $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=6,7", $langs->trans("StatusSupplierOrderCanceled"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1406
|
+ $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=9", $langs->trans("StatusSupplierOrderRefused"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
1407
|
1407
|
} |
1408
|
1408
|
// Billed is another field. We should add instead a dedicated filter on list. if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&billed=1", $langs->trans("Billed"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
1409
|
1409
|
|
1410
|
1410
|
if (getDolGlobalInt('MAIN_NEED_EXPORT_PERMISSION_TO_READ_STATISTICS')) { |
1411
|
1411
|
$newmenu->add("/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur', 'commande', 'export')); |
1412
|
1412
|
} else { |
1413
|
|
- $newmenu->add("/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1413
|
+ $newmenu->add("/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur', 'commande', 'lire')); |
1414
|
1414
|
} |
1415
|
1415
|
} |
1416
|
1416
|
|
1417
|
1417
|
// Contrat |
1418
|
1418
|
if (isModEnabled('contrat')) { |
1419
|
1419
|
$langs->load("contracts"); |
1420
|
|
- $newmenu->add("/contrat/index.php?leftmenu=contracts", $langs->trans("ContractsSubscriptions"), 0, $user->hasRight('contrat', 'lire'), '', $mainmenu, 'contracts', 2000, '', '', '', img_picto('', 'contract', 'class="paddingright pictofixedwidth"')); |
1421
|
|
- $newmenu->add("/contrat/card.php?action=create&leftmenu=contracts", $langs->trans("NewContractSubscription"), 1, $user->hasRight('contrat', 'creer')); |
1422
|
|
- $newmenu->add("/contrat/list.php?leftmenu=contracts", $langs->trans("List"), 1, $user->hasRight('contrat', 'lire')); |
1423
|
|
- $newmenu->add("/contrat/services_list.php?leftmenu=contracts", $langs->trans("MenuServices"), 1, $user->hasRight('contrat', 'lire')); |
|
1420
|
+ $newmenu->add("/contrat/index.php?leftmenu=contracts", $langs->trans("ContractsSubscriptions"), 0, $user->hasRight('contrat', 'lire'), '', $mainmenu, 'contracts', 2000, '', '', '', img_picto('', 'contract', 'class="paddingright pictofixedwidth"')); |
|
1421
|
+ $newmenu->add("/contrat/card.php?action=create&leftmenu=contracts", $langs->trans("NewContractSubscription"), 1, $user->hasRight('contrat', 'creer')); |
|
1422
|
+ $newmenu->add("/contrat/list.php?leftmenu=contracts", $langs->trans("List"), 1, $user->hasRight('contrat', 'lire')); |
|
1423
|
+ $newmenu->add("/contrat/services_list.php?leftmenu=contracts", $langs->trans("MenuServices"), 1, $user->hasRight('contrat', 'lire')); |
1424
|
1424
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "contracts") { |
1425
|
|
- $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=0", $langs->trans("MenuInactiveServices"), 2, $user->hasRight('contrat', 'lire')); |
1426
|
|
- $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=4", $langs->trans("MenuRunningServices"), 2, $user->hasRight('contrat', 'lire')); |
1427
|
|
- $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=4&filter=expired", $langs->trans("MenuExpiredServices"), 2, $user->hasRight('contrat', 'lire')); |
1428
|
|
- $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=5", $langs->trans("MenuClosedServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1425
|
+ $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=0", $langs->trans("MenuInactiveServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1426
|
+ $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=4", $langs->trans("MenuRunningServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1427
|
+ $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=4&filter=expired", $langs->trans("MenuExpiredServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1428
|
+ $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=5", $langs->trans("MenuClosedServices"), 2, $user->hasRight('contrat', 'lire')); |
1429
|
1429
|
} |
1430
|
1430
|
} |
1431
|
1431
|
|
1432
|
1432
|
// Interventions |
1433
|
1433
|
if (isModEnabled('ficheinter')) { |
1434
|
1434
|
$langs->load("interventions"); |
1435
|
|
- $newmenu->add("/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->hasRight('ficheinter', 'lire'), '', $mainmenu, 'ficheinter', 2200, '', '', '', img_picto('', 'intervention', 'class="paddingright pictofixedwidth"')); |
1436
|
|
- $newmenu->add("/fichinter/card.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->hasRight('ficheinter', 'creer'), '', '', '', 201); |
1437
|
|
- $newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->hasRight('ficheinter', 'lire'), '', '', '', 202); |
|
1435
|
+ $newmenu->add("/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->hasRight('ficheinter', 'lire'), '', $mainmenu, 'ficheinter', 2200, '', '', '', img_picto('', 'intervention', 'class="paddingright pictofixedwidth"')); |
|
1436
|
+ $newmenu->add("/fichinter/card.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->hasRight('ficheinter', 'creer'), '', '', '', 201); |
|
1437
|
+ $newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->hasRight('ficheinter', 'lire'), '', '', '', 202); |
1438
|
1438
|
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { |
1439
|
|
- $newmenu->add("/fichinter/card-rec.php?leftmenu=ficheinter", $langs->trans("ListOfTemplates"), 1, $user->hasRight('ficheinter', 'lire'), '', '', '', 203); |
|
1439
|
+ $newmenu->add("/fichinter/card-rec.php?leftmenu=ficheinter", $langs->trans("ListOfTemplates"), 1, $user->hasRight('ficheinter', 'lire'), '', '', '', 203); |
1440
|
1440
|
} |
1441
|
|
- $newmenu->add("/fichinter/stats/index.php?leftmenu=ficheinter", $langs->trans("Statistics"), 1, $user->hasRight('ficheinter', 'lire')); |
|
1441
|
+ $newmenu->add("/fichinter/stats/index.php?leftmenu=ficheinter", $langs->trans("Statistics"), 1, $user->hasRight('ficheinter', 'lire')); |
1442
|
1442
|
} |
1443
|
1443
|
} |
1444
|
1444
|
} |
|
@@ -1463,59 +1463,59 @@ discard block |
|
|
block discarded – undo |
1463
|
1463
|
// Customers invoices |
1464
|
1464
|
if (isModEnabled('facture')) { |
1465
|
1465
|
$langs->load("bills"); |
1466
|
|
- $newmenu->add("/compta/facture/index.php?leftmenu=customers_bills", $langs->trans("BillsCustomers"), 0, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills', 0, '', '', '', img_picto('', 'bill', 'class="paddingright pictofixedwidth"')); |
1467
|
|
- $newmenu->add("/compta/facture/card.php?action=create", $langs->trans("NewBill"), 1, $user->hasRight('facture', 'creer')); |
1468
|
|
- $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills", $langs->trans("List"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_list'); |
|
1466
|
+ $newmenu->add("/compta/facture/index.php?leftmenu=customers_bills", $langs->trans("BillsCustomers"), 0, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills', 0, '', '', '', img_picto('', 'bill', 'class="paddingright pictofixedwidth"')); |
|
1467
|
+ $newmenu->add("/compta/facture/card.php?action=create", $langs->trans("NewBill"), 1, $user->hasRight('facture', 'creer')); |
|
1468
|
+ $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills", $langs->trans("List"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_list'); |
1469
|
1469
|
|
1470
|
1470
|
if ($usemenuhider || empty($leftmenu) || preg_match('/customers_bills(|_draft|_notpaid|_paid|_canceled)$/', $leftmenu)) { |
1471
|
|
- $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_draft&search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->hasRight('facture', 'lire')); |
1472
|
|
- $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_notpaid&search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->hasRight('facture', 'lire')); |
1473
|
|
- $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_paid&search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->hasRight('facture', 'lire')); |
1474
|
|
- $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_canceled&search_status=3", $langs->trans("BillShortStatusCanceled"), 2, $user->hasRight('facture', 'lire')); |
|
1471
|
+ $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_draft&search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->hasRight('facture', 'lire')); |
|
1472
|
+ $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_notpaid&search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->hasRight('facture', 'lire')); |
|
1473
|
+ $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_paid&search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->hasRight('facture', 'lire')); |
|
1474
|
+ $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_canceled&search_status=3", $langs->trans("BillShortStatusCanceled"), 2, $user->hasRight('facture', 'lire')); |
1475
|
1475
|
} |
1476
|
|
- $newmenu->add("/compta/facture/invoicetemplate_list.php?leftmenu=customers_bills_templates", $langs->trans("ListOfTemplates"), 1, $user->hasRight('facture', 'creer'), '', $mainmenu, 'customers_bills_templates'); // No need to see recurring invoices, if user has no permission to create invoice. |
|
1476
|
+ $newmenu->add("/compta/facture/invoicetemplate_list.php?leftmenu=customers_bills_templates", $langs->trans("ListOfTemplates"), 1, $user->hasRight('facture', 'creer'), '', $mainmenu, 'customers_bills_templates'); // No need to see recurring invoices, if user has no permission to create invoice. |
1477
|
1477
|
|
1478
|
|
- $newmenu->add("/compta/paiement/list.php?leftmenu=customers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment'); |
|
1478
|
+ $newmenu->add("/compta/paiement/list.php?leftmenu=customers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment'); |
1479
|
1479
|
|
1480
|
1480
|
if (!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { |
1481
|
|
- $newmenu->add("/compta/paiement/tovalidate.php?leftmenu=customers_bills_tovalid", $langs->trans("MenuToValid"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customer_bills_tovalid'); |
|
1481
|
+ $newmenu->add("/compta/paiement/tovalidate.php?leftmenu=customers_bills_tovalid", $langs->trans("MenuToValid"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customer_bills_tovalid'); |
1482
|
1482
|
} |
1483
|
1483
|
if ($usemenuhider || empty($leftmenu) || preg_match('/customers_bills/', $leftmenu)) { |
1484
|
|
- $newmenu->add("/compta/paiement/rapport.php?leftmenu=customers_bills_payment_report", $langs->trans("Reportings"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment_report'); |
|
1484
|
+ $newmenu->add("/compta/paiement/rapport.php?leftmenu=customers_bills_payment_report", $langs->trans("Reportings"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment_report'); |
1485
|
1485
|
} |
1486
|
1486
|
|
1487
|
|
- $newmenu->add("/compta/facture/stats/index.php?leftmenu=customers_bills_stats", $langs->trans("Statistics"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_stats'); |
|
1487
|
+ $newmenu->add("/compta/facture/stats/index.php?leftmenu=customers_bills_stats", $langs->trans("Statistics"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_stats'); |
1488
|
1488
|
} |
1489
|
1489
|
|
1490
|
1490
|
// Suppliers invoices |
1491
|
1491
|
if (isModEnabled('societe') && isModEnabled('supplier_invoice')) { |
1492
|
1492
|
$langs->load("bills"); |
1493
|
|
- $newmenu->add("/fourn/facture/index.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"), 0, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills', 0, '', '', '', img_picto('', 'supplier_invoice', 'class="paddingright pictofixedwidth"')); |
1494
|
|
- $newmenu->add("/fourn/facture/card.php?leftmenu=suppliers_bills&action=create", $langs->trans("NewBill"), 1, ($user->hasRight('fournisseur', 'facture', 'creer') || $user->hasRight('supplier_invoice', 'creer')), '', $mainmenu, 'suppliers_bills_create'); |
1495
|
|
- $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("List"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_list'); |
|
1493
|
+ $newmenu->add("/fourn/facture/index.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"), 0, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills', 0, '', '', '', img_picto('', 'supplier_invoice', 'class="paddingright pictofixedwidth"')); |
|
1494
|
+ $newmenu->add("/fourn/facture/card.php?leftmenu=suppliers_bills&action=create", $langs->trans("NewBill"), 1, ($user->hasRight('fournisseur', 'facture', 'creer') || $user->hasRight('supplier_invoice', 'creer')), '', $mainmenu, 'suppliers_bills_create'); |
|
1495
|
+ $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("List"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_list'); |
1496
|
1496
|
|
1497
|
1497
|
if ($usemenuhider || empty($leftmenu) || preg_match('/suppliers_bills/', $leftmenu)) { |
1498
|
|
- $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_draft&search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_draft'); |
1499
|
|
- $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_notpaid&search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_notpaid'); |
1500
|
|
- $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_paid&search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_paid'); |
|
1498
|
+ $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_draft&search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_draft'); |
|
1499
|
+ $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_notpaid&search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_notpaid'); |
|
1500
|
+ $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_paid&search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_paid'); |
1501
|
1501
|
} |
1502
|
1502
|
|
1503
|
|
- $newmenu->add("/fourn/facture/list-rec.php?leftmenu=supplierinvoicestemplate_list", $langs->trans("ListOfTemplates"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'supplierinvoicestemplate_list'); |
|
1503
|
+ $newmenu->add("/fourn/facture/list-rec.php?leftmenu=supplierinvoicestemplate_list", $langs->trans("ListOfTemplates"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'supplierinvoicestemplate_list'); |
1504
|
1504
|
|
1505
|
|
- $newmenu->add("/fourn/paiement/list.php?leftmenu=suppliers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_payment'); |
|
1505
|
+ $newmenu->add("/fourn/paiement/list.php?leftmenu=suppliers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_payment'); |
1506
|
1506
|
|
1507
|
1507
|
if ($usemenuhider || empty($leftmenu) || preg_match('/suppliers_bills/', $leftmenu)) { |
1508
|
|
- $newmenu->add("/fourn/facture/rapport.php?leftmenu=suppliers_bills_payment_report", $langs->trans("Reportings"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_payment_report'); |
|
1508
|
+ $newmenu->add("/fourn/facture/rapport.php?leftmenu=suppliers_bills_payment_report", $langs->trans("Reportings"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_payment_report'); |
1509
|
1509
|
} |
1510
|
1510
|
|
1511
|
|
- $newmenu->add("/compta/facture/stats/index.php?mode=supplier&leftmenu=suppliers_bills_stats", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_stats'); |
|
1511
|
+ $newmenu->add("/compta/facture/stats/index.php?mode=supplier&leftmenu=suppliers_bills_stats", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_stats'); |
1512
|
1512
|
} |
1513
|
1513
|
|
1514
|
1514
|
// Orders |
1515
|
1515
|
if (isModEnabled('commande')) { |
1516
|
1516
|
$langs->load("orders"); |
1517
|
1517
|
if (isModEnabled('facture')) { |
1518
|
|
- $newmenu->add("/commande/list.php?leftmenu=orders&search_status=-3&billed=0&contextpage=billableorders", $langs->trans("MenuOrdersToBill2"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"')); |
|
1518
|
+ $newmenu->add("/commande/list.php?leftmenu=orders&search_status=-3&billed=0&contextpage=billableorders", $langs->trans("MenuOrdersToBill2"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"')); |
1519
|
1519
|
} |
1520
|
1520
|
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->hasRight('commande', 'lire')); |
1521
|
1521
|
} |
|
@@ -1524,7 +1524,7 @@ discard block |
|
|
block discarded – undo |
1524
|
1524
|
if (isModEnabled('supplier_invoice')) { |
1525
|
1525
|
if (!empty($conf->global->SUPPLIER_MENU_ORDER_RECEIVED_INTO_INVOICE)) { |
1526
|
1526
|
$langs->load("supplier"); |
1527
|
|
- $newmenu->add("/fourn/commande/list.php?leftmenu=orders&search_status=5&billed=0", $langs->trans("MenuOrdersSupplierToBill"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"')); |
|
1527
|
+ $newmenu->add("/fourn/commande/list.php?leftmenu=orders&search_status=5&billed=0", $langs->trans("MenuOrdersSupplierToBill"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"')); |
1528
|
1528
|
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->hasRight('commande', 'lire')); |
1529
|
1529
|
} |
1530
|
1530
|
} |
|
@@ -1533,58 +1533,58 @@ discard block |
|
|
block discarded – undo |
1533
|
1533
|
// Donations |
1534
|
1534
|
if (isModEnabled('don')) { |
1535
|
1535
|
$langs->load("donations"); |
1536
|
|
- $newmenu->add("/don/index.php?leftmenu=donations&mainmenu=billing", $langs->trans("Donations"), 0, $user->hasRight('don', 'lire'), '', $mainmenu, 'donations', 0, '', '', '', img_picto('', 'donation', 'class="paddingright pictofixedwidth"')); |
|
1536
|
+ $newmenu->add("/don/index.php?leftmenu=donations&mainmenu=billing", $langs->trans("Donations"), 0, $user->hasRight('don', 'lire'), '', $mainmenu, 'donations', 0, '', '', '', img_picto('', 'donation', 'class="paddingright pictofixedwidth"')); |
1537
|
1537
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "donations") { |
1538
|
|
- $newmenu->add("/don/card.php?leftmenu=donations&action=create", $langs->trans("NewDonation"), 1, $user->hasRight('don', 'creer')); |
1539
|
|
- $newmenu->add("/don/list.php?leftmenu=donations", $langs->trans("List"), 1, $user->hasRight('don', 'lire')); |
|
1538
|
+ $newmenu->add("/don/card.php?leftmenu=donations&action=create", $langs->trans("NewDonation"), 1, $user->hasRight('don', 'creer')); |
|
1539
|
+ $newmenu->add("/don/list.php?leftmenu=donations", $langs->trans("List"), 1, $user->hasRight('don', 'lire')); |
1540
|
1540
|
} |
1541
|
1541
|
// if ($leftmenu=="donations") $newmenu->add("/don/stats/index.php",$langs->trans("Statistics"), 1, $user->hasRight('don', 'lire')); |
1542
|
1542
|
} |
1543
|
1543
|
|
1544
|
1544
|
// Taxes and social contributions |
1545
|
1545
|
if (isModEnabled('tax')) { |
1546
|
|
- $newmenu->add("/compta/charges/index.php?leftmenu=tax&mainmenu=billing", $langs->trans("MenuTaxesAndSpecialExpenses"), 0, $user->hasRight('tax', 'charges', 'lire'), '', $mainmenu, 'tax', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
1546
|
+ $newmenu->add("/compta/charges/index.php?leftmenu=tax&mainmenu=billing", $langs->trans("MenuTaxesAndSpecialExpenses"), 0, $user->hasRight('tax', 'charges', 'lire'), '', $mainmenu, 'tax', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
1547
|
1547
|
|
1548
|
|
- $newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("MenuSocialContributions"), 1, $user->hasRight('tax', 'charges', 'lire')); |
|
1548
|
+ $newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("MenuSocialContributions"), 1, $user->hasRight('tax', 'charges', 'lire')); |
1549
|
1549
|
if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_social/i', $leftmenu)) { |
1550
|
|
- $newmenu->add("/compta/sociales/card.php?leftmenu=tax_social&action=create", $langs->trans("MenuNewSocialContribution"), 2, $user->hasRight('tax', 'charges', 'creer')); |
1551
|
|
- $newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
1552
|
|
- $newmenu->add("/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=billing", $langs->trans("Payments"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1550
|
+ $newmenu->add("/compta/sociales/card.php?leftmenu=tax_social&action=create", $langs->trans("MenuNewSocialContribution"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1551
|
+ $newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1552
|
+ $newmenu->add("/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=billing", $langs->trans("Payments"), 2, $user->hasRight('tax', 'charges', 'lire')); |
1553
|
1553
|
} |
1554
|
1554
|
// VAT |
1555
|
1555
|
if (empty($conf->global->TAX_DISABLE_VAT_MENUS)) { |
1556
|
1556
|
global $mysoc; |
1557
|
1557
|
|
1558
|
|
- $newmenu->add("/compta/tva/list.php?leftmenu=tax_vat&mainmenu=billing", $langs->transcountry("VAT", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire'), '', $mainmenu, 'tax_vat'); |
|
1558
|
+ $newmenu->add("/compta/tva/list.php?leftmenu=tax_vat&mainmenu=billing", $langs->transcountry("VAT", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire'), '', $mainmenu, 'tax_vat'); |
1559
|
1559
|
if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_vat/i', $leftmenu)) { |
1560
|
|
- $newmenu->add("/compta/tva/card.php?leftmenu=tax_vat&action=create", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
1561
|
|
- $newmenu->add("/compta/tva/list.php?leftmenu=tax_vat", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
1562
|
|
- $newmenu->add("/compta/tva/payments.php?mode=tvaonly&leftmenu=tax_vat", $langs->trans("Payments"), 2, $user->hasRight('tax', 'charges', 'lire')); |
1563
|
|
- $newmenu->add("/compta/tva/index.php?leftmenu=tax_vat", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
1564
|
|
- $newmenu->add("/compta/tva/clients.php?leftmenu=tax_vat", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
1565
|
|
- $newmenu->add("/compta/tva/quadri_detail.php?leftmenu=tax_vat", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1560
|
+ $newmenu->add("/compta/tva/card.php?leftmenu=tax_vat&action=create", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1561
|
+ $newmenu->add("/compta/tva/list.php?leftmenu=tax_vat", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1562
|
+ $newmenu->add("/compta/tva/payments.php?mode=tvaonly&leftmenu=tax_vat", $langs->trans("Payments"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1563
|
+ $newmenu->add("/compta/tva/index.php?leftmenu=tax_vat", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1564
|
+ $newmenu->add("/compta/tva/clients.php?leftmenu=tax_vat", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1565
|
+ $newmenu->add("/compta/tva/quadri_detail.php?leftmenu=tax_vat", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
1566
|
1566
|
} |
1567
|
1567
|
|
1568
|
1568
|
//Local Taxes 1 |
1569
|
1569
|
if ($mysoc->useLocalTax(1) && (isset($mysoc->localtax1_assuj) && $mysoc->localtax1_assuj == "1")) { |
1570
|
|
- $newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&mainmenu=billing&localTaxType=1", $langs->transcountry("LT1", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire')); |
|
1570
|
+ $newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&mainmenu=billing&localTaxType=1", $langs->transcountry("LT1", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire')); |
1571
|
1571
|
if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_1_vat/i', $leftmenu)) { |
1572
|
|
- $newmenu->add("/compta/localtax/card.php?leftmenu=tax_1_vat&action=create&localTaxType=1", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
1573
|
|
- $newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
1574
|
|
- $newmenu->add("/compta/localtax/index.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
1575
|
|
- $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
1576
|
|
- $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1572
|
+ $newmenu->add("/compta/localtax/card.php?leftmenu=tax_1_vat&action=create&localTaxType=1", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1573
|
+ $newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1574
|
+ $newmenu->add("/compta/localtax/index.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1575
|
+ $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1576
|
+ $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
1577
|
1577
|
} |
1578
|
1578
|
} |
1579
|
1579
|
//Local Taxes 2 |
1580
|
1580
|
if ($mysoc->useLocalTax(2) && (isset($mysoc->localtax2_assuj) && $mysoc->localtax2_assuj == "1")) { |
1581
|
|
- $newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&mainmenu=billing&localTaxType=2", $langs->transcountry("LT2", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire')); |
|
1581
|
+ $newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&mainmenu=billing&localTaxType=2", $langs->transcountry("LT2", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire')); |
1582
|
1582
|
if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_2_vat/i', $leftmenu)) { |
1583
|
|
- $newmenu->add("/compta/localtax/card.php?leftmenu=tax_2_vat&action=create&localTaxType=2", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
1584
|
|
- $newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
1585
|
|
- $newmenu->add("/compta/localtax/index.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
1586
|
|
- $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
1587
|
|
- $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1583
|
+ $newmenu->add("/compta/localtax/card.php?leftmenu=tax_2_vat&action=create&localTaxType=2", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1584
|
+ $newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1585
|
+ $newmenu->add("/compta/localtax/index.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1586
|
+ $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1587
|
+ $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
1588
|
1588
|
} |
1589
|
1589
|
} |
1590
|
1590
|
} |
|
@@ -1593,21 +1593,21 @@ discard block |
|
|
block discarded – undo |
1593
|
1593
|
// Salaries |
1594
|
1594
|
if (isModEnabled('salaries')) { |
1595
|
1595
|
$langs->load("salaries"); |
1596
|
|
- $newmenu->add("/salaries/list.php?leftmenu=tax_salary&mainmenu=billing", $langs->trans("Salaries"), 0, $user->hasRight('salaries', 'read'), '', $mainmenu, 'tax_salary', 0, '', '', '', img_picto('', 'salary', 'class="paddingright pictofixedwidth"')); |
|
1596
|
+ $newmenu->add("/salaries/list.php?leftmenu=tax_salary&mainmenu=billing", $langs->trans("Salaries"), 0, $user->hasRight('salaries', 'read'), '', $mainmenu, 'tax_salary', 0, '', '', '', img_picto('', 'salary', 'class="paddingright pictofixedwidth"')); |
1597
|
1597
|
if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_salary/i', $leftmenu)) { |
1598
|
|
- $newmenu->add("/salaries/card.php?leftmenu=tax_salary&action=create", $langs->trans("New"), 1, $user->hasRight('salaries', 'write')); |
1599
|
|
- $newmenu->add("/salaries/list.php?leftmenu=tax_salary", $langs->trans("List"), 1, $user->hasRight('salaries', 'read')); |
1600
|
|
- $newmenu->add("/salaries/payments.php?leftmenu=tax_salary", $langs->trans("Payments"), 1, $user->hasRight('salaries', 'read')); |
1601
|
|
- $newmenu->add("/salaries/stats/index.php?leftmenu=tax_salary", $langs->trans("Statistics"), 1, $user->hasRight('salaries', 'read')); |
|
1598
|
+ $newmenu->add("/salaries/card.php?leftmenu=tax_salary&action=create", $langs->trans("New"), 1, $user->hasRight('salaries', 'write')); |
|
1599
|
+ $newmenu->add("/salaries/list.php?leftmenu=tax_salary", $langs->trans("List"), 1, $user->hasRight('salaries', 'read')); |
|
1600
|
+ $newmenu->add("/salaries/payments.php?leftmenu=tax_salary", $langs->trans("Payments"), 1, $user->hasRight('salaries', 'read')); |
|
1601
|
+ $newmenu->add("/salaries/stats/index.php?leftmenu=tax_salary", $langs->trans("Statistics"), 1, $user->hasRight('salaries', 'read')); |
1602
|
1602
|
} |
1603
|
1603
|
} |
1604
|
1604
|
|
1605
|
1605
|
// Loan |
1606
|
1606
|
if (isModEnabled('loan')) { |
1607
|
1607
|
$langs->load("loan"); |
1608
|
|
- $newmenu->add("/loan/list.php?leftmenu=tax_loan&mainmenu=billing", $langs->trans("Loans"), 0, $user->hasRight('loan', 'read'), '', $mainmenu, 'tax_loan', 0, '', '', '', img_picto('', 'loan', 'class="paddingright pictofixedwidth"')); |
|
1608
|
+ $newmenu->add("/loan/list.php?leftmenu=tax_loan&mainmenu=billing", $langs->trans("Loans"), 0, $user->hasRight('loan', 'read'), '', $mainmenu, 'tax_loan', 0, '', '', '', img_picto('', 'loan', 'class="paddingright pictofixedwidth"')); |
1609
|
1609
|
if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_loan/i', $leftmenu)) { |
1610
|
|
- $newmenu->add("/loan/card.php?leftmenu=tax_loan&action=create", $langs->trans("NewLoan"), 1, $user->hasRight('loan', 'write')); |
|
1610
|
+ $newmenu->add("/loan/card.php?leftmenu=tax_loan&action=create", $langs->trans("NewLoan"), 1, $user->hasRight('loan', 'write')); |
1611
|
1611
|
//$newmenu->add("/loan/payment/list.php?leftmenu=tax_loan",$langs->trans("Payments"),2,$user->hasRight('loan', 'read')); |
1612
|
1612
|
} |
1613
|
1613
|
} |
|
@@ -1615,10 +1615,10 @@ discard block |
|
|
block discarded – undo |
1615
|
1615
|
// Various payment |
1616
|
1616
|
if (isModEnabled('banque') && empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) { |
1617
|
1617
|
$langs->load("banks"); |
1618
|
|
- $newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various&mainmenu=billing", $langs->trans("MenuVariousPayment"), 0, $user->hasRight('banque', 'lire'), '', $mainmenu, 'tax_various', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
1618
|
+ $newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various&mainmenu=billing", $langs->trans("MenuVariousPayment"), 0, $user->hasRight('banque', 'lire'), '', $mainmenu, 'tax_various', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
1619
|
1619
|
if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_various/i', $leftmenu)) { |
1620
|
|
- $newmenu->add("/compta/bank/various_payment/card.php?leftmenu=tax_various&action=create", $langs->trans("New"), 1, $user->hasRight('banque', 'modifier')); |
1621
|
|
- $newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various", $langs->trans("List"), 1, $user->hasRight('banque', 'lire')); |
|
1620
|
+ $newmenu->add("/compta/bank/various_payment/card.php?leftmenu=tax_various&action=create", $langs->trans("New"), 1, $user->hasRight('banque', 'modifier')); |
|
1621
|
+ $newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various", $langs->trans("List"), 1, $user->hasRight('banque', 'lire')); |
1622
|
1622
|
} |
1623
|
1623
|
} |
1624
|
1624
|
} |
|
@@ -1648,67 +1648,67 @@ discard block |
|
|
block discarded – undo |
1648
|
1648
|
//$newmenu->add("/accountancy/index.php?leftmenu=accountancy", $langs->trans("MenuAccountancy"), 0, $permtoshowmenu, '', $mainmenu, 'accountancy'); |
1649
|
1649
|
|
1650
|
1650
|
// Configuration |
1651
|
|
- $newmenu->add("/accountancy/index.php?leftmenu=accountancy_admin", $langs->trans("Setup"), 0, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin', 1, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); |
|
1651
|
+ $newmenu->add("/accountancy/index.php?leftmenu=accountancy_admin", $langs->trans("Setup"), 0, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin', 1, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); |
1652
|
1652
|
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_admin/', $leftmenu)) { |
1653
|
1653
|
global $mysoc; |
1654
|
|
- $newmenu->add("/accountancy/admin/index.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("General"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_general', 10); |
|
1654
|
+ $newmenu->add("/accountancy/admin/index.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("General"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_general', 10); |
1655
|
1655
|
|
1656
|
1656
|
// Fiscal year |
1657
|
|
- $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("FiscalPeriod"), 1, $user->hasRight('accounting', 'fiscalyear', 'write'), '', $mainmenu, 'fiscalyear', 20); |
|
1657
|
+ $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("FiscalPeriod"), 1, $user->hasRight('accounting', 'fiscalyear', 'write'), '', $mainmenu, 'fiscalyear', 20); |
1658
|
1658
|
|
1659
|
|
- $newmenu->add("/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingJournals"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_journal', 30); |
1660
|
|
- $newmenu->add("/accountancy/admin/accountmodel.php?id=31&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Pcg_version"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chartmodel', 40); |
1661
|
|
- $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41); |
1662
|
|
- $newmenu->add("/accountancy/admin/subaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ChartOfSubaccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41); |
1663
|
|
- $newmenu->add("/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuDefaultAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 60); |
|
1659
|
+ $newmenu->add("/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingJournals"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_journal', 30); |
|
1660
|
+ $newmenu->add("/accountancy/admin/accountmodel.php?id=31&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Pcg_version"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chartmodel', 40); |
|
1661
|
+ $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41); |
|
1662
|
+ $newmenu->add("/accountancy/admin/subaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ChartOfSubaccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41); |
|
1663
|
+ $newmenu->add("/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuDefaultAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 60); |
1664
|
1664
|
if (isModEnabled('banque')) { |
1665
|
|
- $newmenu->add("/compta/bank/list.php?mainmenu=accountancy&leftmenu=accountancy_admin&search_status=-1", $langs->trans("MenuBankAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_bank', 70); |
|
1665
|
+ $newmenu->add("/compta/bank/list.php?mainmenu=accountancy&leftmenu=accountancy_admin&search_status=-1", $langs->trans("MenuBankAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_bank', 70); |
1666
|
1666
|
} |
1667
|
1667
|
if (isModEnabled('facture') || isModEnabled('supplier_invoice')) { |
1668
|
|
- $newmenu->add("/admin/dict.php?id=10&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuVatAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 80); |
|
1668
|
+ $newmenu->add("/admin/dict.php?id=10&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuVatAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 80); |
1669
|
1669
|
} |
1670
|
1670
|
if (isModEnabled('tax')) { |
1671
|
|
- $newmenu->add("/admin/dict.php?id=7&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuTaxAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 90); |
|
1671
|
+ $newmenu->add("/admin/dict.php?id=7&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuTaxAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 90); |
1672
|
1672
|
} |
1673
|
1673
|
if (isModEnabled('expensereport')) { |
1674
|
|
- $newmenu->add("/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuExpenseReportAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 100); |
|
1674
|
+ $newmenu->add("/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuExpenseReportAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 100); |
1675
|
1675
|
} |
1676
|
|
- $newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuProductsAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_product', 110); |
1677
|
|
- $newmenu->add("/accountancy/admin/closure.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuClosureAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_closure', 120); |
1678
|
|
- $newmenu->add("/accountancy/admin/categories_list.php?id=32&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingCategory"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 125); |
1679
|
|
- $newmenu->add("/accountancy/admin/export.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ExportOptions"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_export', 130); |
|
1676
|
+ $newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuProductsAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_product', 110); |
|
1677
|
+ $newmenu->add("/accountancy/admin/closure.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuClosureAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_closure', 120); |
|
1678
|
+ $newmenu->add("/accountancy/admin/categories_list.php?id=32&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingCategory"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 125); |
|
1679
|
+ $newmenu->add("/accountancy/admin/export.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ExportOptions"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_export', 130); |
1680
|
1680
|
} |
1681
|
1681
|
|
1682
|
1682
|
// Transfer in accounting |
1683
|
|
- $newmenu->add("/accountancy/index.php?leftmenu=accountancy_transfer", $langs->trans("TransferInAccounting"), 0, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'transfer', 1, '', '', '', img_picto('', 'long-arrow-alt-right', 'class="paddingright pictofixedwidth"')); |
|
1683
|
+ $newmenu->add("/accountancy/index.php?leftmenu=accountancy_transfer", $langs->trans("TransferInAccounting"), 0, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'transfer', 1, '', '', '', img_picto('', 'long-arrow-alt-right', 'class="paddingright pictofixedwidth"')); |
1684
|
1684
|
|
1685
|
1685
|
// Binding |
1686
|
1686
|
// $newmenu->add("", $langs->trans("Binding"), 0, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch'); |
1687
|
1687
|
if (isModEnabled('facture') && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES)) { |
1688
|
|
- $newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&mainmenu=accountancy", $langs->trans("CustomersVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_customer'); |
|
1688
|
+ $newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&mainmenu=accountancy", $langs->trans("CustomersVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_customer'); |
1689
|
1689
|
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_customer/', $leftmenu)) { |
1690
|
|
- $newmenu->add("/accountancy/customer/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
1691
|
|
- $newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1690
|
+ $newmenu->add("/accountancy/customer/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1691
|
+ $newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
1692
|
1692
|
} |
1693
|
1693
|
} |
1694
|
1694
|
if (isModEnabled('supplier_invoice') && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES)) { |
1695
|
|
- $newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy", $langs->trans("SuppliersVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_supplier'); |
|
1695
|
+ $newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy", $langs->trans("SuppliersVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_supplier'); |
1696
|
1696
|
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_supplier/', $leftmenu)) { |
1697
|
|
- $newmenu->add("/accountancy/supplier/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
1698
|
|
- $newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1697
|
+ $newmenu->add("/accountancy/supplier/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1698
|
+ $newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
1699
|
1699
|
} |
1700
|
1700
|
} |
1701
|
1701
|
if (isModEnabled('expensereport') && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)) { |
1702
|
|
- $newmenu->add("/accountancy/expensereport/index.php?leftmenu=accountancy_dispatch_expensereport&mainmenu=accountancy", $langs->trans("ExpenseReportsVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_expensereport'); |
|
1702
|
+ $newmenu->add("/accountancy/expensereport/index.php?leftmenu=accountancy_dispatch_expensereport&mainmenu=accountancy", $langs->trans("ExpenseReportsVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_expensereport'); |
1703
|
1703
|
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_expensereport/', $leftmenu)) { |
1704
|
|
- $newmenu->add("/accountancy/expensereport/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
1705
|
|
- $newmenu->add("/accountancy/expensereport/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1704
|
+ $newmenu->add("/accountancy/expensereport/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1705
|
+ $newmenu->add("/accountancy/expensereport/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
1706
|
1706
|
} |
1707
|
1707
|
} |
1708
|
1708
|
|
1709
|
1709
|
// Journals |
1710
|
|
- if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
1711
|
|
- $newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'accountancy_journal'); |
|
1710
|
+ if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1711
|
+ $newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'accountancy_journal'); |
1712
|
1712
|
|
1713
|
1713
|
// Multi journal |
1714
|
1714
|
$sql = "SELECT rowid, code, label, nature"; |
|
@@ -1744,7 +1744,7 @@ discard block |
|
|
block discarded – undo |
1744
|
1744
|
$nature = "expensereports"; |
1745
|
1745
|
} |
1746
|
1746
|
if ($objp->nature == 1 && isModEnabled('asset')) { |
1747
|
|
- $nature = "various"; // Warning: The page /accountancy/journal/variousjournal.php is bugged. It read tables that does not exists. |
|
1747
|
+ $nature = "various"; // Warning: The page /accountancy/journal/variousjournal.php is bugged. It read tables that does not exists. |
1748
|
1748
|
} |
1749
|
1749
|
if ($objp->nature == 8) { |
1750
|
1750
|
$nature = "inventory"; |
|
@@ -1768,16 +1768,16 @@ discard block |
|
|
block discarded – undo |
1768
|
1768
|
$journallabel = '<span class="opacitymedium">('.$langs->trans($objp->label).')</span>'; // Label of bank account in llx_accounting_journal |
1769
|
1769
|
} |
1770
|
1770
|
|
1771
|
|
- $key = $langs->trans("AccountingJournalType".$objp->nature); // $objp->nature is 1, 2, 3 ... |
1772
|
|
- $transferlabel = (($objp->nature && $key != "AccountingJournalType".$objp->nature) ? $key.($journallabelwithoutspan != $key ? ' '.$journallabel : ''): $journallabel); |
|
1771
|
+ $key = $langs->trans("AccountingJournalType".$objp->nature); // $objp->nature is 1, 2, 3 ... |
|
1772
|
+ $transferlabel = (($objp->nature && $key != "AccountingJournalType".$objp->nature) ? $key.($journallabelwithoutspan != $key ? ' '.$journallabel : '') : $journallabel); |
1773
|
1773
|
|
1774
|
|
- $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $transferlabel, 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1774
|
+ $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $transferlabel, 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1775
|
1775
|
} |
1776
|
1776
|
$i++; |
1777
|
1777
|
} |
1778
|
1778
|
} else { |
1779
|
1779
|
// Should not happend. Entries are added |
1780
|
|
- $newmenu->add('', $langs->trans("NoJournalDefined"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1780
|
+ $newmenu->add('', $langs->trans("NoJournalDefined"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1781
|
1781
|
} |
1782
|
1782
|
} else { |
1783
|
1783
|
dol_print_error($db); |
|
@@ -1787,48 +1787,48 @@ discard block |
|
|
block discarded – undo |
1787
|
1787
|
|
1788
|
1788
|
// Files |
1789
|
1789
|
if (empty($conf->global->ACCOUNTANCY_HIDE_EXPORT_FILES_MENU)) { |
1790
|
|
- $newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1790
|
+ $newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
1791
|
1791
|
} |
1792
|
1792
|
|
1793
|
1793
|
|
1794
|
1794
|
// Accounting |
1795
|
|
- $newmenu->add("/accountancy/index.php?leftmenu=accountancy_accountancy", $langs->trans("MenuAccountancy"), 0, $user->hasRight('accounting', 'mouvements', 'lire') || $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'accountancy', 1, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); |
|
1795
|
+ $newmenu->add("/accountancy/index.php?leftmenu=accountancy_accountancy", $langs->trans("MenuAccountancy"), 0, $user->hasRight('accounting', 'mouvements', 'lire') || $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'accountancy', 1, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); |
1796
|
1796
|
|
1797
|
1797
|
// General Ledger |
1798
|
|
- $newmenu->add("/accountancy/bookkeeping/listbyaccount.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Bookkeeping"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1798
|
+ $newmenu->add("/accountancy/bookkeeping/listbyaccount.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Bookkeeping"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
1799
|
1799
|
|
1800
|
1800
|
// Journals |
1801
|
|
- $newmenu->add("/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Journals"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1801
|
+ $newmenu->add("/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Journals"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
1802
|
1802
|
|
1803
|
1803
|
// Account Balance |
1804
|
|
- $newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1804
|
+ $newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
1805
|
1805
|
|
1806
|
1806
|
// Export accountancy |
1807
|
|
- $newmenu->add("/accountancy/bookkeeping/export.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("MenuExportAccountancy"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1807
|
+ $newmenu->add("/accountancy/bookkeeping/export.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("MenuExportAccountancy"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
1808
|
1808
|
|
1809
|
1809
|
// Closure |
1810
|
|
- $newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure", $langs->trans("MenuAccountancyClosure"), 1, $user->hasRight('accounting', 'fiscalyear', 'write'), '', $mainmenu, 'closure'); |
|
1810
|
+ $newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure", $langs->trans("MenuAccountancyClosure"), 1, $user->hasRight('accounting', 'fiscalyear', 'write'), '', $mainmenu, 'closure'); |
1811
|
1811
|
|
1812
|
1812
|
// Reports |
1813
|
|
- $newmenu->add("/accountancy/index.php?leftmenu=accountancy_report", $langs->trans("Reportings"), 1, $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'ca'); |
|
1813
|
+ $newmenu->add("/accountancy/index.php?leftmenu=accountancy_report", $langs->trans("Reportings"), 1, $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'ca'); |
1814
|
1814
|
|
1815
|
1815
|
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { |
1816
|
|
- $newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report", $langs->trans("MenuReportInOut"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1817
|
|
- $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=accountancy_report", $langs->trans("ByPredefinedAccountGroups"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1818
|
|
- $newmenu->add("/compta/resultat/result.php?leftmenu=accountancy_report", $langs->trans("ByPersonalizedAccountGroups"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1816
|
+ $newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report", $langs->trans("MenuReportInOut"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1817
|
+ $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=accountancy_report", $langs->trans("ByPredefinedAccountGroups"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1818
|
+ $newmenu->add("/compta/resultat/result.php?leftmenu=accountancy_report", $langs->trans("ByPersonalizedAccountGroups"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1819
|
1819
|
} |
1820
|
1820
|
|
1821
|
1821
|
$modecompta = 'CREANCES-DETTES'; |
1822
|
|
- if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1822
|
+ if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
1823
|
1823
|
$modecompta = 'BOOKKEEPING'; // Not yet implemented. Should be BOOKKEEPINGCOLLECTED |
1824
|
1824
|
} |
1825
|
1825
|
if ($modecompta) { |
1826
|
1826
|
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { |
1827
|
|
- $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1828
|
|
- $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1829
|
|
- $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1830
|
|
- $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1831
|
|
- $newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1827
|
+ $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1828
|
+ $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1829
|
+ $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1830
|
+ $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1831
|
+ $newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1832
|
1832
|
} |
1833
|
1833
|
} |
1834
|
1834
|
|
|
@@ -1836,34 +1836,34 @@ discard block |
|
|
block discarded – undo |
1836
|
1836
|
//if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') $modecompta=''; // Not yet implemented. Should be BOOKKEEPINGCOLLECTED |
1837
|
1837
|
if ($modecompta) { |
1838
|
1838
|
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { |
1839
|
|
- $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1840
|
|
- $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1841
|
|
- $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1839
|
+ $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1840
|
+ $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1841
|
+ $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1842
|
1842
|
//$newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"),3,$user->hasRight('accounting', 'comptarapport', 'lire')); |
1843
|
1843
|
//$newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByVatRate"),3,$user->hasRight('accounting', 'comptarapport', 'lire')); |
1844
|
1844
|
} |
1845
|
1845
|
} |
1846
|
1846
|
|
1847
|
1847
|
$modecompta = 'CREANCES-DETTES'; |
1848
|
|
- if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1848
|
+ if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
1849
|
1849
|
$modecompta = 'BOOKKEEPING'; // Not yet implemented. |
1850
|
1850
|
} |
1851
|
1851
|
if ($modecompta && isModEnabled('supplier_invoice')) { |
1852
|
1852
|
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { |
1853
|
|
- $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1854
|
|
- $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1855
|
|
- $newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1853
|
+ $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1854
|
+ $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1855
|
+ $newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1856
|
1856
|
} |
1857
|
1857
|
} |
1858
|
1858
|
|
1859
|
1859
|
$modecompta = 'RECETTES-DEPENSES'; |
1860
|
|
- if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1860
|
+ if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
1861
|
1861
|
$modecompta = 'BOOKKEEPINGCOLLECTED'; // Not yet implemented. |
1862
|
1862
|
} |
1863
|
1863
|
if ($modecompta && ((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled('supplier_invoice'))) { |
1864
|
1864
|
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { |
1865
|
|
- $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnoverCollected"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1866
|
|
- $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1865
|
+ $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnoverCollected"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1866
|
+ $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
1867
|
1867
|
} |
1868
|
1868
|
} |
1869
|
1869
|
} |
|
@@ -1872,15 +1872,15 @@ discard block |
|
|
block discarded – undo |
1872
|
1872
|
if (isModEnabled('comptabilite')) { |
1873
|
1873
|
// Files |
1874
|
1874
|
if (empty($conf->global->ACCOUNTANCY_HIDE_EXPORT_FILES_MENU)) { |
1875
|
|
- $newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 0, $user->hasRight('compta', 'resultat', 'lire'), '', $mainmenu, 'files', 0, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); |
|
1875
|
+ $newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 0, $user->hasRight('compta', 'resultat', 'lire'), '', $mainmenu, 'files', 0, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); |
1876
|
1876
|
} |
1877
|
1877
|
|
1878
|
1878
|
// Bilan, resultats |
1879
|
|
- $newmenu->add("/compta/resultat/index.php?leftmenu=report&mainmenu=accountancy", $langs->trans("Reportings"), 0, $user->hasRight('compta', 'resultat', 'lire'), '', $mainmenu, 'ca', 0, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); |
|
1879
|
+ $newmenu->add("/compta/resultat/index.php?leftmenu=report&mainmenu=accountancy", $langs->trans("Reportings"), 0, $user->hasRight('compta', 'resultat', 'lire'), '', $mainmenu, 'ca', 0, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); |
1880
|
1880
|
|
1881
|
1881
|
if ($usemenuhider || empty($leftmenu) || preg_match('/report/', $leftmenu)) { |
1882
|
|
- $newmenu->add("/compta/resultat/index.php?leftmenu=report", $langs->trans("MenuReportInOut"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
1883
|
|
- $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=report", $langs->trans("ByPredefinedAccountGroups"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1882
|
+ $newmenu->add("/compta/resultat/index.php?leftmenu=report", $langs->trans("MenuReportInOut"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1883
|
+ $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=report", $langs->trans("ByPredefinedAccountGroups"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
1884
|
1884
|
/* On verra ca avec module compabilite expert |
1885
|
1885
|
$newmenu->add("/compta/resultat/compteres.php?leftmenu=report","Compte de resultat",2,$user->hasRight('compta', 'resultat', 'lire')); |
1886
|
1886
|
$newmenu->add("/compta/resultat/bilan.php?leftmenu=report","Bilan",2,$user->hasRight('compta', 'resultat', 'lire')); |
|
@@ -1895,22 +1895,22 @@ discard block |
|
|
block discarded – undo |
1895
|
1895
|
*/ |
1896
|
1896
|
|
1897
|
1897
|
$modecompta = 'CREANCES-DETTES'; |
1898
|
|
- $newmenu->add("/compta/stats/index.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
1899
|
|
- $newmenu->add("/compta/stats/casoc.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
1900
|
|
- $newmenu->add("/compta/stats/cabyuser.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
1901
|
|
- $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
1902
|
|
- $newmenu->add("/compta/stats/byratecountry.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1898
|
+ $newmenu->add("/compta/stats/index.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1899
|
+ $newmenu->add("/compta/stats/casoc.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1900
|
+ $newmenu->add("/compta/stats/cabyuser.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1901
|
+ $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1902
|
+ $newmenu->add("/compta/stats/byratecountry.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
1903
|
1903
|
|
1904
|
1904
|
$modecompta = 'RECETTES-DEPENSES'; |
1905
|
|
- $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
1906
|
|
- $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
1907
|
|
- $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1905
|
+ $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1906
|
+ $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1907
|
+ $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
1908
|
1908
|
|
1909
|
1909
|
//Achats |
1910
|
1910
|
$modecompta = 'CREANCES-DETTES'; |
1911
|
|
- $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
1912
|
|
- $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
1913
|
|
- $newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1911
|
+ $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1912
|
+ $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1913
|
+ $newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
1914
|
1914
|
|
1915
|
1915
|
/* |
1916
|
1916
|
$modecompta = 'RECETTES-DEPENSES'; |
|
@@ -1920,31 +1920,31 @@ discard block |
|
|
block discarded – undo |
1920
|
1920
|
*/ |
1921
|
1921
|
|
1922
|
1922
|
// Journals |
1923
|
|
- $newmenu->add("/compta/journal/sellsjournal.php?leftmenu=report", $langs->trans("SellsJournal"), 1, $user->hasRight('compta', 'resultat', 'lire'), '', '', '', 50); |
1924
|
|
- $newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=report", $langs->trans("PurchasesJournal"), 1, $user->hasRight('compta', 'resultat', 'lire'), '', '', '', 51); |
|
1923
|
+ $newmenu->add("/compta/journal/sellsjournal.php?leftmenu=report", $langs->trans("SellsJournal"), 1, $user->hasRight('compta', 'resultat', 'lire'), '', '', '', 50); |
|
1924
|
+ $newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=report", $langs->trans("PurchasesJournal"), 1, $user->hasRight('compta', 'resultat', 'lire'), '', '', '', 51); |
1925
|
1925
|
} |
1926
|
1926
|
//if ($leftmenu=="ca") $newmenu->add("/compta/journaux/index.php?leftmenu=ca",$langs->trans("Journals"),1,$user->hasRight('compta', 'resultat', 'lire')||$user->hasRight('accounting', 'comptarapport', 'lire')); |
1927
|
1927
|
} |
1928
|
1928
|
|
1929
|
1929
|
// Intracomm report |
1930
|
1930
|
if (isModEnabled('intracommreport')) { |
1931
|
|
- $newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReport"), 0, $user->hasRight('intracommreport', 'read'), '', $mainmenu, 'intracommreport', 60, '', '', '', img_picto('', 'intracommreport', 'class="paddingright pictofixedwidth"')); |
|
1931
|
+ $newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReport"), 0, $user->hasRight('intracommreport', 'read'), '', $mainmenu, 'intracommreport', 60, '', '', '', img_picto('', 'intracommreport', 'class="paddingright pictofixedwidth"')); |
1932
|
1932
|
if ($usemenuhider || empty($leftmenu) || preg_match('/intracommreport/', $leftmenu)) { |
1933
|
1933
|
// DEB / DES |
1934
|
|
- $newmenu->add("/intracommreport/card.php?action=create&leftmenu=intracommreport", $langs->trans("MenuIntracommReportNew"), 1, $user->hasRight('intracommreport', 'write'), '', $mainmenu, 'intracommreport', 1); |
1935
|
|
- $newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReportList"), 1, $user->hasRight('intracommreport', 'read'), '', $mainmenu, 'intracommreport', 1); |
|
1934
|
+ $newmenu->add("/intracommreport/card.php?action=create&leftmenu=intracommreport", $langs->trans("MenuIntracommReportNew"), 1, $user->hasRight('intracommreport', 'write'), '', $mainmenu, 'intracommreport', 1); |
|
1935
|
+ $newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReportList"), 1, $user->hasRight('intracommreport', 'read'), '', $mainmenu, 'intracommreport', 1); |
1936
|
1936
|
} |
1937
|
1937
|
} |
1938
|
1938
|
|
1939
|
1939
|
// Assets |
1940
|
1940
|
if (isModEnabled('asset')) { |
1941
|
|
- $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuAssets"), 0, $user->hasRight('asset', 'read'), '', $mainmenu, 'asset', 100, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
1942
|
|
- $newmenu->add("/asset/card.php?leftmenu=asset&action=create", $langs->trans("MenuNewAsset"), 1, $user->hasRight('asset', 'write')); |
1943
|
|
- $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuListAssets"), 1, $user->hasRight('asset', 'read')); |
1944
|
|
- $newmenu->add("/asset/model/list.php?leftmenu=asset_model", $langs->trans("MenuAssetModels"), 1, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'read')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'read')), '', $mainmenu, 'asset_model'); |
|
1941
|
+ $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuAssets"), 0, $user->hasRight('asset', 'read'), '', $mainmenu, 'asset', 100, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
1942
|
+ $newmenu->add("/asset/card.php?leftmenu=asset&action=create", $langs->trans("MenuNewAsset"), 1, $user->hasRight('asset', 'write')); |
|
1943
|
+ $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuListAssets"), 1, $user->hasRight('asset', 'read')); |
|
1944
|
+ $newmenu->add("/asset/model/list.php?leftmenu=asset_model", $langs->trans("MenuAssetModels"), 1, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'read')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'read')), '', $mainmenu, 'asset_model'); |
1945
|
1945
|
if ($usemenuhider || empty($leftmenu) || preg_match('/asset_model/', $leftmenu)) { |
1946
|
|
- $newmenu->add("/asset/model/card.php?leftmenu=asset_model&action=create", $langs->trans("MenuNewAssetModel"), 2, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'write')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'write'))); |
1947
|
|
- $newmenu->add("/asset/model/list.php?leftmenu=asset_model", $langs->trans("MenuListAssetModels"), 2, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'read')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'read'))); |
|
1946
|
+ $newmenu->add("/asset/model/card.php?leftmenu=asset_model&action=create", $langs->trans("MenuNewAssetModel"), 2, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'write')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'write'))); |
|
1947
|
+ $newmenu->add("/asset/model/list.php?leftmenu=asset_model", $langs->trans("MenuListAssetModels"), 2, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'read')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'read'))); |
1948
|
1948
|
} |
1949
|
1949
|
} |
1950
|
1950
|
} |
|
@@ -1970,62 +1970,62 @@ discard block |
|
|
block discarded – undo |
1970
|
1970
|
|
1971
|
1971
|
// Bank-Cash account |
1972
|
1972
|
if (isModEnabled('banque')) { |
1973
|
|
- $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("MenuBankCash"), 0, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank', 0, '', '', '', img_picto('', 'bank_account', 'class="paddingright pictofixedwidth"')); |
|
1973
|
+ $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("MenuBankCash"), 0, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank', 0, '', '', '', img_picto('', 'bank_account', 'class="paddingright pictofixedwidth"')); |
1974
|
1974
|
|
1975
|
|
- $newmenu->add("/compta/bank/card.php?action=create", $langs->trans("MenuNewFinancialAccount"), 1, $user->hasRight('banque', 'configurer')); |
1976
|
|
- $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank'); |
1977
|
|
- $newmenu->add("/compta/bank/bankentries_list.php", $langs->trans("ListTransactions"), 1, $user->hasRight('banque', 'lire')); |
1978
|
|
- $newmenu->add("/compta/bank/budget.php", $langs->trans("ListTransactionsByCategory"), 1, $user->hasRight('banque', 'lire')); |
|
1975
|
+ $newmenu->add("/compta/bank/card.php?action=create", $langs->trans("MenuNewFinancialAccount"), 1, $user->hasRight('banque', 'configurer')); |
|
1976
|
+ $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank'); |
|
1977
|
+ $newmenu->add("/compta/bank/bankentries_list.php", $langs->trans("ListTransactions"), 1, $user->hasRight('banque', 'lire')); |
|
1978
|
+ $newmenu->add("/compta/bank/budget.php", $langs->trans("ListTransactionsByCategory"), 1, $user->hasRight('banque', 'lire')); |
1979
|
1979
|
|
1980
|
|
- $newmenu->add("/compta/bank/transfer.php", $langs->trans("MenuBankInternalTransfer"), 1, $user->hasRight('banque', 'transfer')); |
|
1980
|
+ $newmenu->add("/compta/bank/transfer.php", $langs->trans("MenuBankInternalTransfer"), 1, $user->hasRight('banque', 'transfer')); |
1981
|
1981
|
} |
1982
|
1982
|
|
1983
|
1983
|
if (isModEnabled('categorie')) { |
1984
|
1984
|
$langs->load("categories"); |
1985
|
|
- $newmenu->add("/categories/index.php?type=5", $langs->trans("Rubriques"), 1, $user->hasRight('categorie', 'creer'), '', $mainmenu, 'tags'); |
1986
|
|
- $newmenu->add("/compta/bank/categ.php", $langs->trans("RubriquesTransactions"), 1, $user->hasRight('banque', 'configurer'), '', $mainmenu, 'tags'); |
|
1985
|
+ $newmenu->add("/categories/index.php?type=5", $langs->trans("Rubriques"), 1, $user->hasRight('categorie', 'creer'), '', $mainmenu, 'tags'); |
|
1986
|
+ $newmenu->add("/compta/bank/categ.php", $langs->trans("RubriquesTransactions"), 1, $user->hasRight('banque', 'configurer'), '', $mainmenu, 'tags'); |
1987
|
1987
|
} |
1988
|
1988
|
|
1989
|
1989
|
// Direct debit order |
1990
|
1990
|
if (isModEnabled('prelevement')) { |
1991
|
|
- $newmenu->add("/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank", $langs->trans("PaymentByDirectDebit"), 0, $user->hasRight('prelevement', 'bons', 'lire'), '', $mainmenu, 'withdraw', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
1991
|
+ $newmenu->add("/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank", $langs->trans("PaymentByDirectDebit"), 0, $user->hasRight('prelevement', 'bons', 'lire'), '', $mainmenu, 'withdraw', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
1992
|
1992
|
|
1993
|
1993
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "withdraw") { |
1994
|
|
- $newmenu->add("/compta/prelevement/create.php?mainmenu=bank", $langs->trans("NewStandingOrder"), 1, $user->hasRight('prelevement', 'bons', 'creer')); |
|
1994
|
+ $newmenu->add("/compta/prelevement/create.php?mainmenu=bank", $langs->trans("NewStandingOrder"), 1, $user->hasRight('prelevement', 'bons', 'creer')); |
1995
|
1995
|
|
1996
|
|
- $newmenu->add("/compta/prelevement/orders_list.php?mainmenu=bank", $langs->trans("WithdrawalsReceipts"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
1997
|
|
- $newmenu->add("/compta/prelevement/list.php?mainmenu=bank", $langs->trans("WithdrawalsLines"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
1998
|
|
- $newmenu->add("/compta/prelevement/rejets.php?mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
1999
|
|
- $newmenu->add("/compta/prelevement/stats.php?mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
1996
|
+ $newmenu->add("/compta/prelevement/orders_list.php?mainmenu=bank", $langs->trans("WithdrawalsReceipts"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
1997
|
+ $newmenu->add("/compta/prelevement/list.php?mainmenu=bank", $langs->trans("WithdrawalsLines"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
1998
|
+ $newmenu->add("/compta/prelevement/rejets.php?mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
1999
|
+ $newmenu->add("/compta/prelevement/stats.php?mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
2000
|
2000
|
} |
2001
|
2001
|
} |
2002
|
2002
|
|
2003
|
2003
|
// Bank transfer order |
2004
|
2004
|
if (isModEnabled('paymentbybanktransfer')) { |
2005
|
|
- $newmenu->add("/compta/paymentbybanktransfer/index.php?leftmenu=banktransfer&mainmenu=bank", $langs->trans("PaymentByBankTransfer"), 0, $user->hasRight('paymentbybanktransfer', 'read'), '', $mainmenu, 'banktransfer', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
2005
|
+ $newmenu->add("/compta/paymentbybanktransfer/index.php?leftmenu=banktransfer&mainmenu=bank", $langs->trans("PaymentByBankTransfer"), 0, $user->hasRight('paymentbybanktransfer', 'read'), '', $mainmenu, 'banktransfer', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
2006
|
2006
|
|
2007
|
2007
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "banktransfer") { |
2008
|
|
- $newmenu->add("/compta/prelevement/create.php?type=bank-transfer&mainmenu=bank", $langs->trans("NewPaymentByBankTransfer"), 1, $user->hasRight('paymentbybanktransfer', 'create')); |
|
2008
|
+ $newmenu->add("/compta/prelevement/create.php?type=bank-transfer&mainmenu=bank", $langs->trans("NewPaymentByBankTransfer"), 1, $user->hasRight('paymentbybanktransfer', 'create')); |
2009
|
2009
|
|
2010
|
|
- $newmenu->add("/compta/prelevement/orders_list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferReceipts"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
2011
|
|
- $newmenu->add("/compta/prelevement/list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferLines"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
2012
|
|
- $newmenu->add("/compta/prelevement/rejets.php?type=bank-transfer&mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
2013
|
|
- $newmenu->add("/compta/prelevement/stats.php?type=bank-transfer&mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
2010
|
+ $newmenu->add("/compta/prelevement/orders_list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferReceipts"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
2011
|
+ $newmenu->add("/compta/prelevement/list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferLines"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
2012
|
+ $newmenu->add("/compta/prelevement/rejets.php?type=bank-transfer&mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
2013
|
+ $newmenu->add("/compta/prelevement/stats.php?type=bank-transfer&mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
2014
|
2014
|
} |
2015
|
2015
|
} |
2016
|
2016
|
|
2017
|
2017
|
// Management of checks |
2018
|
2018
|
if (empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && isModEnabled('banque') && (isModEnabled('facture') || !empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))) { |
2019
|
|
- $newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank", $langs->trans("MenuChequeDeposits"), 0, $user->hasRight('banque', 'cheque'), '', $mainmenu, 'checks', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
2019
|
+ $newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank", $langs->trans("MenuChequeDeposits"), 0, $user->hasRight('banque', 'cheque'), '', $mainmenu, 'checks', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
2020
|
2020
|
if (preg_match('/checks/', $leftmenu)) { |
2021
|
|
- $newmenu->add("/compta/paiement/cheque/card.php?leftmenu=checks_bis&action=new&mainmenu=bank", $langs->trans("NewChequeDeposit"), 1, $user->hasRight('banque', 'cheque')); |
2022
|
|
- $newmenu->add("/compta/paiement/cheque/list.php?leftmenu=checks_bis&mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque', 'cheque')); |
|
2021
|
+ $newmenu->add("/compta/paiement/cheque/card.php?leftmenu=checks_bis&action=new&mainmenu=bank", $langs->trans("NewChequeDeposit"), 1, $user->hasRight('banque', 'cheque')); |
|
2022
|
+ $newmenu->add("/compta/paiement/cheque/list.php?leftmenu=checks_bis&mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque', 'cheque')); |
2023
|
2023
|
} |
2024
|
2024
|
} |
2025
|
2025
|
|
2026
|
2026
|
// Cash Control |
2027
|
2027
|
if (isModEnabled('takepos') || isModEnabled('cashdesk')) { |
2028
|
|
- $permtomakecashfence = ($user->hasRight('cashdesk', 'run')|| $user->hasRight('takepos', 'run')); |
|
2028
|
+ $permtomakecashfence = ($user->hasRight('cashdesk', 'run') || $user->hasRight('takepos', 'run')); |
2029
|
2029
|
$newmenu->add("/compta/cashcontrol/cashcontrol_list.php?action=list", $langs->trans("CashControl"), 0, $permtomakecashfence, '', $mainmenu, 'cashcontrol', 0, '', '', '', img_picto('', 'pos', 'class="paddingright pictofixedwidth"')); |
2030
|
2030
|
$newmenu->add("/compta/cashcontrol/cashcontrol_card.php?action=create", $langs->trans("NewCashFence"), 1, $permtomakecashfence); |
2031
|
2031
|
$newmenu->add("/compta/cashcontrol/cashcontrol_list.php?action=list", $langs->trans("List"), 1, $permtomakecashfence); |
|
@@ -2050,51 +2050,51 @@ discard block |
|
|
block discarded – undo |
2050
|
2050
|
if ($mainmenu == 'products') { |
2051
|
2051
|
// Products |
2052
|
2052
|
if (isModEnabled('product')) { |
2053
|
|
- $newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->hasRight('product', 'read'), '', $mainmenu, 'product', 0, '', '', '', img_picto('', 'product', 'class="paddingright pictofixedwidth"')); |
2054
|
|
- $newmenu->add("/product/card.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->hasRight('product', 'creer')); |
2055
|
|
- $newmenu->add("/product/list.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->hasRight('product', 'read')); |
|
2053
|
+ $newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->hasRight('product', 'read'), '', $mainmenu, 'product', 0, '', '', '', img_picto('', 'product', 'class="paddingright pictofixedwidth"')); |
|
2054
|
+ $newmenu->add("/product/card.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->hasRight('product', 'creer')); |
|
2055
|
+ $newmenu->add("/product/list.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->hasRight('product', 'read')); |
2056
|
2056
|
if (isModEnabled('stock')) { |
2057
|
|
- $newmenu->add("/product/reassort.php?type=0", $langs->trans("MenuStocks"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
|
2057
|
+ $newmenu->add("/product/reassort.php?type=0", $langs->trans("MenuStocks"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
2058
|
2058
|
} |
2059
|
2059
|
if (isModEnabled('productbatch')) { |
2060
|
2060
|
$langs->load("stocks"); |
2061
|
|
- $newmenu->add("/product/reassortlot.php?type=0&search_subjecttolotserial=1", $langs->trans("StocksByLotSerial"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
2062
|
|
- $newmenu->add("/product/stock/productlot_list.php", $langs->trans("LotSerial"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
|
2061
|
+ $newmenu->add("/product/reassortlot.php?type=0&search_subjecttolotserial=1", $langs->trans("StocksByLotSerial"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
|
2062
|
+ $newmenu->add("/product/stock/productlot_list.php", $langs->trans("LotSerial"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
2063
|
2063
|
} |
2064
|
2064
|
if (isModEnabled('variants')) { |
2065
|
|
- $newmenu->add("/variants/list.php", $langs->trans("VariantAttributes"), 1, $user->hasRight('product', 'read')); |
|
2065
|
+ $newmenu->add("/variants/list.php", $langs->trans("VariantAttributes"), 1, $user->hasRight('product', 'read')); |
2066
|
2066
|
} |
2067
|
2067
|
if (isModEnabled('propal') || isModEnabled('commande') || isModEnabled('facture') || isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) { |
2068
|
|
- $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->hasRight('product', 'read')); |
|
2068
|
+ $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->hasRight('product', 'read')); |
2069
|
2069
|
} |
2070
|
2070
|
|
2071
|
2071
|
// Categories |
2072
|
2072
|
if (isModEnabled('categorie')) { |
2073
|
2073
|
$langs->load("categories"); |
2074
|
|
- $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2074
|
+ $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
2075
|
2075
|
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->hasRight('categorie', 'lire')); |
2076
|
2076
|
} |
2077
|
2077
|
} |
2078
|
2078
|
|
2079
|
2079
|
// Services |
2080
|
2080
|
if (isModEnabled('service')) { |
2081
|
|
- $newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->hasRight('service', 'read'), '', $mainmenu, 'service', 0, '', '', '', img_picto('', 'service', 'class="paddingright pictofixedwidth"')); |
2082
|
|
- $newmenu->add("/product/card.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->hasRight('service', 'creer')); |
2083
|
|
- $newmenu->add("/product/list.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->hasRight('service', 'read')); |
|
2081
|
+ $newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->hasRight('service', 'read'), '', $mainmenu, 'service', 0, '', '', '', img_picto('', 'service', 'class="paddingright pictofixedwidth"')); |
|
2082
|
+ $newmenu->add("/product/card.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->hasRight('service', 'creer')); |
|
2083
|
+ $newmenu->add("/product/list.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->hasRight('service', 'read')); |
2084
|
2084
|
|
2085
|
2085
|
if (isModEnabled('Stock') && getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { |
2086
|
|
- $newmenu->add("/product/reassort.php?type=1", $langs->trans("MenuStocks"), 1, $user->hasRight('service', 'read') && $user->hasRight('stock', 'lire')); |
|
2086
|
+ $newmenu->add("/product/reassort.php?type=1", $langs->trans("MenuStocks"), 1, $user->hasRight('service', 'read') && $user->hasRight('stock', 'lire')); |
2087
|
2087
|
} |
2088
|
2088
|
if (isModEnabled('variants')) { |
2089
|
|
- $newmenu->add("/variants/list.php", $langs->trans("VariantAttributes"), 1, $user->hasRight('service', 'read')); |
|
2089
|
+ $newmenu->add("/variants/list.php", $langs->trans("VariantAttributes"), 1, $user->hasRight('service', 'read')); |
2090
|
2090
|
} |
2091
|
2091
|
if (isModEnabled('propal') || isModEnabled('commande') || isModEnabled('facture') || isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) { |
2092
|
|
- $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=1", $langs->trans("Statistics"), 1, $user->hasRight('service', 'read')); |
|
2092
|
+ $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=1", $langs->trans("Statistics"), 1, $user->hasRight('service', 'read')); |
2093
|
2093
|
} |
2094
|
2094
|
// Categories |
2095
|
2095
|
if (isModEnabled('categorie')) { |
2096
|
2096
|
$langs->load("categories"); |
2097
|
|
- $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2097
|
+ $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
2098
|
2098
|
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->hasRight('categorie', 'lire')); |
2099
|
2099
|
} |
2100
|
2100
|
} |
|
@@ -2104,41 +2104,41 @@ discard block |
|
|
block discarded – undo |
2104
|
2104
|
$langs->load("stocks"); |
2105
|
2105
|
$newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Warehouses"), 0, $user->hasRight('stock', 'lire'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'stock', 'class="paddingright pictofixedwidth"')); |
2106
|
2106
|
$newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->hasRight('stock', 'creer')); |
2107
|
|
- $newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->hasRight('stock', 'lire')); |
|
2107
|
+ $newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->hasRight('stock', 'lire')); |
2108
|
2108
|
$newmenu->add("/product/stock/movement_list.php", $langs->trans("Movements"), 1, $user->hasRight('stock', 'mouvement', 'lire')); |
2109
|
2109
|
|
2110
|
2110
|
$newmenu->add("/product/stock/massstockmove.php?init=1", $langs->trans("MassStockTransferShort"), 1, $user->hasRight('stock', 'mouvement', 'creer')); |
2111
|
2111
|
if (isModEnabled('supplier_order')) { |
2112
|
|
- $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->hasRight('stock', 'mouvement', 'creer') && $user->hasRight('fournisseur', 'lire')); |
|
2112
|
+ $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->hasRight('stock', 'mouvement', 'creer') && $user->hasRight('fournisseur', 'lire')); |
2113
|
2113
|
} |
2114
|
2114
|
$newmenu->add("/product/stock/stockatdate.php", $langs->trans("StockAtDate"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
2115
|
2115
|
|
2116
|
2116
|
// Categories for warehouses |
2117
|
2117
|
if (isModEnabled('categorie')) { |
2118
|
|
- $newmenu->add("/categories/index.php?leftmenu=stock&type=9", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2118
|
+ $newmenu->add("/categories/index.php?leftmenu=stock&type=9", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
2119
|
2119
|
} |
2120
|
2120
|
} |
2121
|
2121
|
|
2122
|
2122
|
if (isModEnabled('stocktransfer')) { |
2123
|
|
- $newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans("ModuleStockTransferName"), 0, $user->hasRight('stocktransfer', 'stocktransfer', 'read'), '', $mainmenu, 'stocktransfer', 0, '', '', '', img_picto('', 'stock', 'class="paddingright pictofixedwidth"')); |
2124
|
|
- $newmenu->add('/product/stock/stocktransfer/stocktransfer_card.php?action=create', $langs->trans('StockTransferNew'), 1, $user->hasRight('stocktransfer', 'stocktransfer', 'write')); |
2125
|
|
- $newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans('List'), 1, $user->hasRight('stocktransfer', 'stocktransfer', 'read')); |
|
2123
|
+ $newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans("ModuleStockTransferName"), 0, $user->hasRight('stocktransfer', 'stocktransfer', 'read'), '', $mainmenu, 'stocktransfer', 0, '', '', '', img_picto('', 'stock', 'class="paddingright pictofixedwidth"')); |
|
2124
|
+ $newmenu->add('/product/stock/stocktransfer/stocktransfer_card.php?action=create', $langs->trans('StockTransferNew'), 1, $user->hasRight('stocktransfer', 'stocktransfer', 'write')); |
|
2125
|
+ $newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans('List'), 1, $user->hasRight('stocktransfer', 'stocktransfer', 'read')); |
2126
|
2126
|
} |
2127
|
2127
|
|
2128
|
2128
|
// Inventory |
2129
|
2129
|
if (isModEnabled('stock')) { |
2130
|
2130
|
$langs->load("stocks"); |
2131
|
2131
|
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { |
2132
|
|
- $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->hasRight('stock', 'lire'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="paddingright pictofixedwidth"')); |
|
2132
|
+ $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->hasRight('stock', 'lire'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="paddingright pictofixedwidth"')); |
2133
|
2133
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") { |
2134
|
|
- $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock', 'creer')); |
2135
|
|
- $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock', 'lire')); |
|
2134
|
+ $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock', 'creer')); |
|
2135
|
+ $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock', 'lire')); |
2136
|
2136
|
} |
2137
|
2137
|
} else { |
2138
|
|
- $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->hasRight('stock', 'inventory_advance', 'read'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="paddingright pictofixedwidth"')); |
|
2138
|
+ $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->hasRight('stock', 'inventory_advance', 'read'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="paddingright pictofixedwidth"')); |
2139
|
2139
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") { |
2140
|
|
- $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock', 'inventory_advance', 'write')); |
2141
|
|
- $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock', 'inventory_advance', 'read')); |
|
2140
|
+ $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock', 'inventory_advance', 'write')); |
|
2141
|
+ $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock', 'inventory_advance', 'read')); |
2142
|
2142
|
} |
2143
|
2143
|
} |
2144
|
2144
|
} |
|
@@ -2146,33 +2146,33 @@ discard block |
|
|
block discarded – undo |
2146
|
2146
|
// Shipments |
2147
|
2147
|
if (isModEnabled('expedition')) { |
2148
|
2148
|
$langs->load("sendings"); |
2149
|
|
- $newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->hasRight('expedition', 'lire'), '', $mainmenu, 'sendings', 0, '', '', '', img_picto('', 'shipment', 'class="paddingright pictofixedwidth"')); |
2150
|
|
- $newmenu->add("/expedition/card.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->hasRight('expedition', 'creer')); |
2151
|
|
- $newmenu->add("/expedition/list.php?leftmenu=sendings", $langs->trans("List"), 1, $user->hasRight('expedition', 'lire')); |
|
2149
|
+ $newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->hasRight('expedition', 'lire'), '', $mainmenu, 'sendings', 0, '', '', '', img_picto('', 'shipment', 'class="paddingright pictofixedwidth"')); |
|
2150
|
+ $newmenu->add("/expedition/card.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->hasRight('expedition', 'creer')); |
|
2151
|
+ $newmenu->add("/expedition/list.php?leftmenu=sendings", $langs->trans("List"), 1, $user->hasRight('expedition', 'lire')); |
2152
|
2152
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "sendings") { |
2153
|
|
- $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=0", $langs->trans("StatusSendingDraftShort"), 2, $user->hasRight('expedition', 'lire')); |
2154
|
|
- $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=1", $langs->trans("StatusSendingValidatedShort"), 2, $user->hasRight('expedition', 'lire')); |
2155
|
|
- $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=2", $langs->trans("StatusSendingProcessedShort"), 2, $user->hasRight('expedition', 'lire')); |
|
2153
|
+ $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=0", $langs->trans("StatusSendingDraftShort"), 2, $user->hasRight('expedition', 'lire')); |
|
2154
|
+ $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=1", $langs->trans("StatusSendingValidatedShort"), 2, $user->hasRight('expedition', 'lire')); |
|
2155
|
+ $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=2", $langs->trans("StatusSendingProcessedShort"), 2, $user->hasRight('expedition', 'lire')); |
2156
|
2156
|
} |
2157
|
|
- $newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->hasRight('expedition', 'lire')); |
|
2157
|
+ $newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->hasRight('expedition', 'lire')); |
2158
|
2158
|
} |
2159
|
2159
|
|
2160
|
2160
|
// Receptions |
2161
|
2161
|
if (isModEnabled('reception')) { |
2162
|
2162
|
$langs->load("receptions"); |
2163
|
|
- $newmenu->add("/reception/index.php?leftmenu=receptions", $langs->trans("Receptions"), 0, $user->hasRight('reception', 'lire'), '', $mainmenu, 'receptions', 0, '', '', '', img_picto('', 'dollyrevert', 'class="paddingright pictofixedwidth"')); |
2164
|
|
- $newmenu->add("/reception/card.php?action=create2&leftmenu=receptions", $langs->trans("NewReception"), 1, $user->hasRight('reception', 'creer')); |
2165
|
|
- $newmenu->add("/reception/list.php?leftmenu=receptions", $langs->trans("List"), 1, $user->hasRight('reception', 'lire')); |
|
2163
|
+ $newmenu->add("/reception/index.php?leftmenu=receptions", $langs->trans("Receptions"), 0, $user->hasRight('reception', 'lire'), '', $mainmenu, 'receptions', 0, '', '', '', img_picto('', 'dollyrevert', 'class="paddingright pictofixedwidth"')); |
|
2164
|
+ $newmenu->add("/reception/card.php?action=create2&leftmenu=receptions", $langs->trans("NewReception"), 1, $user->hasRight('reception', 'creer')); |
|
2165
|
+ $newmenu->add("/reception/list.php?leftmenu=receptions", $langs->trans("List"), 1, $user->hasRight('reception', 'lire')); |
2166
|
2166
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") { |
2167
|
|
- $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=0", $langs->trans("StatusReceptionDraftShort"), 2, $user->hasRight('reception', 'lire')); |
|
2167
|
+ $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=0", $langs->trans("StatusReceptionDraftShort"), 2, $user->hasRight('reception', 'lire')); |
2168
|
2168
|
} |
2169
|
2169
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") { |
2170
|
|
- $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=1", $langs->trans("StatusReceptionValidatedShort"), 2, $user->hasRight('reception', 'lire')); |
|
2170
|
+ $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=1", $langs->trans("StatusReceptionValidatedShort"), 2, $user->hasRight('reception', 'lire')); |
2171
|
2171
|
} |
2172
|
2172
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") { |
2173
|
|
- $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=2", $langs->trans("StatusReceptionProcessedShort"), 2, $user->hasRight('reception', 'lire')); |
|
2173
|
+ $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=2", $langs->trans("StatusReceptionProcessedShort"), 2, $user->hasRight('reception', 'lire')); |
2174
|
2174
|
} |
2175
|
|
- $newmenu->add("/reception/stats/index.php?leftmenu=receptions", $langs->trans("Statistics"), 1, $user->hasRight('reception', 'lire')); |
|
2175
|
+ $newmenu->add("/reception/stats/index.php?leftmenu=receptions", $langs->trans("Statistics"), 1, $user->hasRight('reception', 'lire')); |
2176
|
2176
|
} |
2177
|
2177
|
} |
2178
|
2178
|
} |
|
@@ -2196,17 +2196,17 @@ discard block |
|
|
block discarded – undo |
2196
|
2196
|
if (isModEnabled('bom') || isModEnabled('mrp')) { |
2197
|
2197
|
$langs->load("mrp"); |
2198
|
2198
|
|
2199
|
|
- $newmenu->add("", $langs->trans("MenuBOM"), 0, $user->hasRight('bom', 'read'), '', $mainmenu, 'bom', 0, '', '', '', img_picto('', 'bom', 'class="paddingright pictofixedwidth"')); |
2200
|
|
- $newmenu->add("/bom/bom_card.php?leftmenu=bom&action=create", $langs->trans("NewBOM"), 1, $user->hasRight('bom', 'write'), '', $mainmenu, 'bom'); |
2201
|
|
- $newmenu->add("/bom/bom_list.php?leftmenu=bom", $langs->trans("List"), 1, $user->hasRight('bom', 'read'), '', $mainmenu, 'bom'); |
|
2199
|
+ $newmenu->add("", $langs->trans("MenuBOM"), 0, $user->hasRight('bom', 'read'), '', $mainmenu, 'bom', 0, '', '', '', img_picto('', 'bom', 'class="paddingright pictofixedwidth"')); |
|
2200
|
+ $newmenu->add("/bom/bom_card.php?leftmenu=bom&action=create", $langs->trans("NewBOM"), 1, $user->hasRight('bom', 'write'), '', $mainmenu, 'bom'); |
|
2201
|
+ $newmenu->add("/bom/bom_list.php?leftmenu=bom", $langs->trans("List"), 1, $user->hasRight('bom', 'read'), '', $mainmenu, 'bom'); |
2202
|
2202
|
} |
2203
|
2203
|
|
2204
|
2204
|
if (isModEnabled('mrp')) { |
2205
|
2205
|
$langs->load("mrp"); |
2206
|
2206
|
|
2207
|
|
- $newmenu->add("", $langs->trans("MenuMRP"), 0, $user->hasRight('mrp', 'read'), '', $mainmenu, 'mrp', 0, '', '', '', img_picto('', 'mrp', 'class="paddingright pictofixedwidth"')); |
2208
|
|
- $newmenu->add("/mrp/mo_card.php?leftmenu=mo&action=create", $langs->trans("NewMO"), 1, $user->hasRight('mrp', 'write'), '', $mainmenu, ''); |
2209
|
|
- $newmenu->add("/mrp/mo_list.php?leftmenu=mo", $langs->trans("List"), 1, $user->hasRight('mrp', 'read'), '', $mainmenu, ''); |
|
2207
|
+ $newmenu->add("", $langs->trans("MenuMRP"), 0, $user->hasRight('mrp', 'read'), '', $mainmenu, 'mrp', 0, '', '', '', img_picto('', 'mrp', 'class="paddingright pictofixedwidth"')); |
|
2208
|
+ $newmenu->add("/mrp/mo_card.php?leftmenu=mo&action=create", $langs->trans("NewMO"), 1, $user->hasRight('mrp', 'write'), '', $mainmenu, ''); |
|
2209
|
+ $newmenu->add("/mrp/mo_list.php?leftmenu=mo", $langs->trans("List"), 1, $user->hasRight('mrp', 'read'), '', $mainmenu, ''); |
2210
|
2210
|
} |
2211
|
2211
|
} |
2212
|
2212
|
} |
|
@@ -2233,7 +2233,7 @@ discard block |
|
|
block discarded – undo |
2233
|
2233
|
|
2234
|
2234
|
$tmpentry = array( |
2235
|
2235
|
'enabled'=>isModEnabled('projet'), |
2236
|
|
- 'perms'=>$user->hasRight('projet', 'lire'), |
|
2236
|
+ 'perms'=>$user->hasRight('projet', 'lire'), |
2237
|
2237
|
'module'=>'projet' |
2238
|
2238
|
); |
2239
|
2239
|
$listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); |
|
@@ -2251,8 +2251,8 @@ discard block |
|
|
block discarded – undo |
2251
|
2251
|
} |
2252
|
2252
|
|
2253
|
2253
|
// Project assigned to user |
2254
|
|
- $newmenu->add("/projet/index.php?leftmenu=projects".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titleboth, 0, $user->hasRight('projet', 'lire'), '', $mainmenu, 'projects', 0, '', '', '', img_picto('', 'project', 'class="paddingright pictofixedwidth"')); |
2255
|
|
- $newmenu->add("/projet/card.php?leftmenu=projects&action=create".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titlenew, 1, $user->hasRight('projet', 'creer')); |
|
2254
|
+ $newmenu->add("/projet/index.php?leftmenu=projects".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titleboth, 0, $user->hasRight('projet', 'lire'), '', $mainmenu, 'projects', 0, '', '', '', img_picto('', 'project', 'class="paddingright pictofixedwidth"')); |
|
2255
|
+ $newmenu->add("/projet/card.php?leftmenu=projects&action=create".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titlenew, 1, $user->hasRight('projet', 'creer')); |
2256
|
2256
|
|
2257
|
2257
|
if (empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { |
2258
|
2258
|
$newmenu->add("/projet/list.php?leftmenu=projets".($search_project_user ? '&search_project_user='.$search_project_user : '').'&search_status=99', $langs->trans("List"), 1, $showmode, '', 'project', 'list'); |
|
@@ -2264,23 +2264,23 @@ discard block |
|
|
block discarded – undo |
2264
|
2264
|
$newmenu->add('/projet/list.php?mainmenu=project&leftmenu=list&search_usage_opportunity=1&search_status=99', $langs->trans("List"), 2, $showmode); |
2265
|
2265
|
} |
2266
|
2266
|
|
2267
|
|
- $newmenu->add("/projet/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet', 'lire')); |
|
2267
|
+ $newmenu->add("/projet/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet', 'lire')); |
2268
|
2268
|
|
2269
|
2269
|
// Categories |
2270
|
2270
|
if (isModEnabled('categorie')) { |
2271
|
2271
|
$langs->load("categories"); |
2272
|
|
- $newmenu->add("/categories/index.php?leftmenu=cat&type=6", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2272
|
+ $newmenu->add("/categories/index.php?leftmenu=cat&type=6", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
2273
|
2273
|
} |
2274
|
2274
|
|
2275
|
2275
|
if (empty($conf->global->PROJECT_HIDE_TASKS)) { |
2276
|
2276
|
// Project assigned to user |
2277
|
|
- $newmenu->add("/projet/activity/index.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("Activities"), 0, $user->hasRight('projet', 'lire'), '', 'project', 'tasks', 0, '', '', '', img_picto('', 'projecttask', 'class="paddingright pictofixedwidth"')); |
2278
|
|
- $newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->hasRight('projet', 'creer')); |
2279
|
|
- $newmenu->add("/projet/tasks/list.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->hasRight('projet', 'lire')); |
2280
|
|
- $newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet', 'lire')); |
|
2277
|
+ $newmenu->add("/projet/activity/index.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("Activities"), 0, $user->hasRight('projet', 'lire'), '', 'project', 'tasks', 0, '', '', '', img_picto('', 'projecttask', 'class="paddingright pictofixedwidth"')); |
|
2278
|
+ $newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->hasRight('projet', 'creer')); |
|
2279
|
+ $newmenu->add("/projet/tasks/list.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->hasRight('projet', 'lire')); |
|
2280
|
+ $newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet', 'lire')); |
2281
|
2281
|
|
2282
|
|
- $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("TimeEntry"), 0, $user->hasRight('projet', 'lire'), '', 'project', 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"')); |
2283
|
|
- $newmenu->add("/projet/tasks/time.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->hasRight('projet', 'lire')); |
|
2282
|
+ $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("TimeEntry"), 0, $user->hasRight('projet', 'lire'), '', 'project', 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"')); |
|
2283
|
+ $newmenu->add("/projet/tasks/time.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->hasRight('projet', 'lire')); |
2284
|
2284
|
} |
2285
|
2285
|
} |
2286
|
2286
|
} |
|
@@ -2338,47 +2338,47 @@ discard block |
|
|
block discarded – undo |
2338
|
2338
|
// Load translation files required by the page |
2339
|
2339
|
$langs->loadLangs(array("holiday", "trips")); |
2340
|
2340
|
|
2341
|
|
- $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("CPTitreMenu"), 0, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday', 0, '', '', '', img_picto('', 'holiday', 'class="paddingright pictofixedwidth"')); |
2342
|
|
- $newmenu->add("/holiday/card.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("New"), 1, $user->hasRight('holiday', 'write'), '', $mainmenu); |
2343
|
|
- $newmenu->add("/holiday/card_group.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("NewHolidayForGroup"), 1, ($user->hasRight('holiday', 'writeall') && $user->hasRight('holiday', 'readall')), '', $mainmenu, 'holiday_sm'); |
2344
|
|
- $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("List"), 1, $user->hasRight('holiday', 'read'), '', $mainmenu); |
|
2341
|
+ $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("CPTitreMenu"), 0, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday', 0, '', '', '', img_picto('', 'holiday', 'class="paddingright pictofixedwidth"')); |
|
2342
|
+ $newmenu->add("/holiday/card.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("New"), 1, $user->hasRight('holiday', 'write'), '', $mainmenu); |
|
2343
|
+ $newmenu->add("/holiday/card_group.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("NewHolidayForGroup"), 1, ($user->hasRight('holiday', 'writeall') && $user->hasRight('holiday', 'readall')), '', $mainmenu, 'holiday_sm'); |
|
2344
|
+ $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("List"), 1, $user->hasRight('holiday', 'read'), '', $mainmenu); |
2345
|
2345
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "holiday") { |
2346
|
|
- $newmenu->add("/holiday/list.php?search_status=1&mainmenu=hrm&leftmenu=holiday", $langs->trans("DraftCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
2347
|
|
- $newmenu->add("/holiday/list.php?search_status=2&mainmenu=hrm&leftmenu=holiday", $langs->trans("ToReviewCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
2348
|
|
- $newmenu->add("/holiday/list.php?search_status=3&mainmenu=hrm&leftmenu=holiday", $langs->trans("ApprovedCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
2349
|
|
- $newmenu->add("/holiday/list.php?search_status=4&mainmenu=hrm&leftmenu=holiday", $langs->trans("CancelCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
2350
|
|
- $newmenu->add("/holiday/list.php?search_status=5&mainmenu=hrm&leftmenu=holiday", $langs->trans("RefuseCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2346
|
+ $newmenu->add("/holiday/list.php?search_status=1&mainmenu=hrm&leftmenu=holiday", $langs->trans("DraftCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2347
|
+ $newmenu->add("/holiday/list.php?search_status=2&mainmenu=hrm&leftmenu=holiday", $langs->trans("ToReviewCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2348
|
+ $newmenu->add("/holiday/list.php?search_status=3&mainmenu=hrm&leftmenu=holiday", $langs->trans("ApprovedCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2349
|
+ $newmenu->add("/holiday/list.php?search_status=4&mainmenu=hrm&leftmenu=holiday", $langs->trans("CancelCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2350
|
+ $newmenu->add("/holiday/list.php?search_status=5&mainmenu=hrm&leftmenu=holiday", $langs->trans("RefuseCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
2351
|
2351
|
} |
2352
|
|
- $newmenu->add("/holiday/define_holiday.php?mainmenu=hrm", $langs->trans("MenuConfCP"), 1, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
2353
|
|
- $newmenu->add("/holiday/month_report.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuReportMonth"), 1, $user->hasRight('holiday', 'readall'), '', $mainmenu, 'holiday_sm'); |
2354
|
|
- $newmenu->add("/holiday/view_log.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuLogCP"), 1, $user->hasRight('holiday', 'define_holiday'), '', $mainmenu, 'holiday_sm'); |
|
2352
|
+ $newmenu->add("/holiday/define_holiday.php?mainmenu=hrm", $langs->trans("MenuConfCP"), 1, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2353
|
+ $newmenu->add("/holiday/month_report.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuReportMonth"), 1, $user->hasRight('holiday', 'readall'), '', $mainmenu, 'holiday_sm'); |
|
2354
|
+ $newmenu->add("/holiday/view_log.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuLogCP"), 1, $user->hasRight('holiday', 'define_holiday'), '', $mainmenu, 'holiday_sm'); |
2355
|
2355
|
} |
2356
|
2356
|
|
2357
|
2357
|
// Trips and expenses (old module) |
2358
|
2358
|
if (isModEnabled('deplacement')) { |
2359
|
2359
|
$langs->load("trips"); |
2360
|
|
- $newmenu->add("/compta/deplacement/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->hasRight('deplacement', 'lire'), '', $mainmenu, 'tripsandexpenses', 0, '', '', '', img_picto('', 'trip', 'class="paddingright pictofixedwidth"')); |
2361
|
|
- $newmenu->add("/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('deplacement', 'creer')); |
2362
|
|
- $newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('deplacement', 'lire')); |
2363
|
|
- $newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('deplacement', 'lire')); |
|
2360
|
+ $newmenu->add("/compta/deplacement/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->hasRight('deplacement', 'lire'), '', $mainmenu, 'tripsandexpenses', 0, '', '', '', img_picto('', 'trip', 'class="paddingright pictofixedwidth"')); |
|
2361
|
+ $newmenu->add("/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('deplacement', 'creer')); |
|
2362
|
+ $newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('deplacement', 'lire')); |
|
2363
|
+ $newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('deplacement', 'lire')); |
2364
|
2364
|
} |
2365
|
2365
|
|
2366
|
2366
|
// Expense report |
2367
|
2367
|
if (isModEnabled('expensereport')) { |
2368
|
2368
|
$langs->loadLangs(array("trips", "bills")); |
2369
|
|
- $newmenu->add("/expensereport/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->hasRight('expensereport', 'lire'), '', $mainmenu, 'expensereport', 0, '', '', '', img_picto('', 'trip', 'class="paddingright pictofixedwidth"')); |
2370
|
|
- $newmenu->add("/expensereport/card.php?action=create&leftmenu=expensereport&mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('expensereport', 'creer')); |
2371
|
|
- $newmenu->add("/expensereport/list.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('expensereport', 'lire')); |
|
2369
|
+ $newmenu->add("/expensereport/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->hasRight('expensereport', 'lire'), '', $mainmenu, 'expensereport', 0, '', '', '', img_picto('', 'trip', 'class="paddingright pictofixedwidth"')); |
|
2370
|
+ $newmenu->add("/expensereport/card.php?action=create&leftmenu=expensereport&mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('expensereport', 'creer')); |
|
2371
|
+ $newmenu->add("/expensereport/list.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('expensereport', 'lire')); |
2372
|
2372
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "expensereport") { |
2373
|
|
- $newmenu->add("/expensereport/list.php?search_status=0&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Draft"), 2, $user->hasRight('expensereport', 'lire')); |
2374
|
|
- $newmenu->add("/expensereport/list.php?search_status=2&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Validated"), 2, $user->hasRight('expensereport', 'lire')); |
2375
|
|
- $newmenu->add("/expensereport/list.php?search_status=5&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Approved"), 2, $user->hasRight('expensereport', 'lire')); |
2376
|
|
- $newmenu->add("/expensereport/list.php?search_status=6&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Paid"), 2, $user->hasRight('expensereport', 'lire')); |
2377
|
|
- $newmenu->add("/expensereport/list.php?search_status=4&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Canceled"), 2, $user->hasRight('expensereport', 'lire')); |
2378
|
|
- $newmenu->add("/expensereport/list.php?search_status=99&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Refused"), 2, $user->hasRight('expensereport', 'lire')); |
|
2373
|
+ $newmenu->add("/expensereport/list.php?search_status=0&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Draft"), 2, $user->hasRight('expensereport', 'lire')); |
|
2374
|
+ $newmenu->add("/expensereport/list.php?search_status=2&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Validated"), 2, $user->hasRight('expensereport', 'lire')); |
|
2375
|
+ $newmenu->add("/expensereport/list.php?search_status=5&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Approved"), 2, $user->hasRight('expensereport', 'lire')); |
|
2376
|
+ $newmenu->add("/expensereport/list.php?search_status=6&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Paid"), 2, $user->hasRight('expensereport', 'lire')); |
|
2377
|
+ $newmenu->add("/expensereport/list.php?search_status=4&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Canceled"), 2, $user->hasRight('expensereport', 'lire')); |
|
2378
|
+ $newmenu->add("/expensereport/list.php?search_status=99&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Refused"), 2, $user->hasRight('expensereport', 'lire')); |
2379
|
2379
|
} |
2380
|
|
- $newmenu->add("/expensereport/payment/list.php?leftmenu=expensereport_payments&mainmenu=hrm", $langs->trans("Payments"), 1, ($user->hasRight('expensereport', 'lire')) && isModEnabled('banque')); |
2381
|
|
- $newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('expensereport', 'lire')); |
|
2380
|
+ $newmenu->add("/expensereport/payment/list.php?leftmenu=expensereport_payments&mainmenu=hrm", $langs->trans("Payments"), 1, ($user->hasRight('expensereport', 'lire')) && isModEnabled('banque')); |
|
2381
|
+ $newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('expensereport', 'lire')); |
2382
|
2382
|
} |
2383
|
2383
|
|
2384
|
2384
|
if (isModEnabled('projet')) { |
|
@@ -2387,7 +2387,7 @@ discard block |
|
|
block discarded – undo |
2387
|
2387
|
|
2388
|
2388
|
$search_project_user = GETPOST('search_project_user', 'int'); |
2389
|
2389
|
|
2390
|
|
- $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("TimeEntry"), 0, $user->hasRight('projet', 'lire'), '', $mainmenu, 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"')); |
|
2390
|
+ $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("TimeEntry"), 0, $user->hasRight('projet', 'lire'), '', $mainmenu, 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"')); |
2391
|
2391
|
} |
2392
|
2392
|
} |
2393
|
2393
|
} |
|
@@ -2415,22 +2415,22 @@ discard block |
|
|
block discarded – undo |
2415
|
2415
|
} |
2416
|
2416
|
|
2417
|
2417
|
if (isModEnabled('mailing')) { |
2418
|
|
- $newmenu->add("/comm/mailing/index.php?leftmenu=mailing", $langs->trans("EMailings"), 0, $user->hasRight('mailing', 'lire'), '', $mainmenu, 'mailing', 0, '', '', '', img_picto('', 'email', 'class="paddingright pictofixedwidth"')); |
2419
|
|
- $newmenu->add("/comm/mailing/card.php?leftmenu=mailing&action=create", $langs->trans("NewMailing"), 1, $user->hasRight('mailing', 'creer')); |
2420
|
|
- $newmenu->add("/comm/mailing/list.php?leftmenu=mailing", $langs->trans("List"), 1, $user->hasRight('mailing', 'lire')); |
|
2418
|
+ $newmenu->add("/comm/mailing/index.php?leftmenu=mailing", $langs->trans("EMailings"), 0, $user->hasRight('mailing', 'lire'), '', $mainmenu, 'mailing', 0, '', '', '', img_picto('', 'email', 'class="paddingright pictofixedwidth"')); |
|
2419
|
+ $newmenu->add("/comm/mailing/card.php?leftmenu=mailing&action=create", $langs->trans("NewMailing"), 1, $user->hasRight('mailing', 'creer')); |
|
2420
|
+ $newmenu->add("/comm/mailing/list.php?leftmenu=mailing", $langs->trans("List"), 1, $user->hasRight('mailing', 'lire')); |
2421
|
2421
|
} |
2422
|
2422
|
|
2423
|
2423
|
if (isModEnabled('export')) { |
2424
|
2424
|
$langs->load("exports"); |
2425
|
|
- $newmenu->add("/exports/index.php?leftmenu=export", $langs->trans("FormatedExport"), 0, $user->hasRight('export', 'lire'), '', $mainmenu, 'export', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); |
2426
|
|
- $newmenu->add("/exports/export.php?leftmenu=export", $langs->trans("NewExport"), 1, $user->hasRight('export', 'creer')); |
|
2425
|
+ $newmenu->add("/exports/index.php?leftmenu=export", $langs->trans("FormatedExport"), 0, $user->hasRight('export', 'lire'), '', $mainmenu, 'export', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); |
|
2426
|
+ $newmenu->add("/exports/export.php?leftmenu=export", $langs->trans("NewExport"), 1, $user->hasRight('export', 'creer')); |
2427
|
2427
|
//$newmenu->add("/exports/export.php?leftmenu=export",$langs->trans("List"),1, $user->hasRight('export', 'lire')); |
2428
|
2428
|
} |
2429
|
2429
|
|
2430
|
2430
|
if (isModEnabled('import')) { |
2431
|
2431
|
$langs->load("exports"); |
2432
|
|
- $newmenu->add("/imports/index.php?leftmenu=import", $langs->trans("FormatedImport"), 0, $user->hasRight('import', 'run'), '', $mainmenu, 'import', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); |
2433
|
|
- $newmenu->add("/imports/import.php?leftmenu=import", $langs->trans("NewImport"), 1, $user->hasRight('import', 'run')); |
|
2432
|
+ $newmenu->add("/imports/index.php?leftmenu=import", $langs->trans("FormatedImport"), 0, $user->hasRight('import', 'run'), '', $mainmenu, 'import', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); |
|
2433
|
+ $newmenu->add("/imports/import.php?leftmenu=import", $langs->trans("NewImport"), 1, $user->hasRight('import', 'run')); |
2434
|
2434
|
} |
2435
|
2435
|
} |
2436
|
2436
|
} |
|
@@ -2468,7 +2468,7 @@ discard block |
|
|
block discarded – undo |
2468
|
2468
|
|
2469
|
2469
|
$newmenu->add("/adherents/cartes/carte.php?leftmenu=export", $langs->trans("MembersCards"), 1, $user->hasRight('adherent', 'export')); |
2470
|
2470
|
if (!empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && ($usemenuhider || empty($leftmenu) || $leftmenu == 'none' || $leftmenu == "members" || $leftmenu == "export")) { |
2471
|
|
- $newmenu->add("/adherents/htpasswd.php?leftmenu=export", $langs->trans("Filehtpasswd"), 1, $user->hasRight('adherent', 'export')); |
|
2471
|
+ $newmenu->add("/adherents/htpasswd.php?leftmenu=export", $langs->trans("Filehtpasswd"), 1, $user->hasRight('adherent', 'export')); |
2472
|
2472
|
} |
2473
|
2473
|
|
2474
|
2474
|
if (isModEnabled('categorie')) { |