WIP
This commit is contained in:
parent
be1eb7829e
commit
4e16992796
@ -36,7 +36,7 @@ if (empty($conf->accounting->enabled)) {
|
||||
}
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
if (! $user->rights->accounting->closure->read)
|
||||
if (! $user->rights->accounting->fiscalyear->closure)
|
||||
accessforbidden();
|
||||
|
||||
|
||||
|
||||
@ -1304,10 +1304,10 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
|
||||
// Closure
|
||||
if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
||||
$newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure", $langs->trans("Closure"), 1, $user->rights->accounting->closure->read, '', $mainmenu, 'closure');
|
||||
$newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure", $langs->trans("MenuAccountancyClosure"), 1, $user->rights->accounting->fiscalyear->closure, '', $mainmenu, 'closure');
|
||||
|
||||
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_closure/', $leftmenu)) {
|
||||
$newmenu->add("/accountancy/closure/validation.php?leftmenu=accountancy_closure", $langs->trans("MenuAccountancyValidationMovements"), 2, $user->rights->accounting->closure->read);
|
||||
$newmenu->add("/accountancy/closure/validation.php?leftmenu=accountancy_closure", $langs->trans("MenuAccountancyValidationMovements"), 2, $user->rights->accounting->fiscalyear->closure);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -228,6 +228,14 @@ class modAccounting extends DolibarrModules
|
||||
$this->rights[$r][5] = '';
|
||||
$r++;
|
||||
|
||||
$this->rights[$r][0] = 50431;
|
||||
$this->rights[$r][1] = 'Validate movements of a fiscal year';
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'fiscalyear';
|
||||
$this->rights[$r][5] = 'closure';
|
||||
$r++;
|
||||
|
||||
|
||||
// Menus
|
||||
//-------
|
||||
|
||||
@ -97,6 +97,8 @@ MenuExpenseReportAccounts=Expense report accounts
|
||||
MenuLoanAccounts=Loan accounts
|
||||
MenuProductsAccounts=Product accounts
|
||||
MenuClosureAccounts=Closure accounts
|
||||
MenuAccountancyClosure=Closure
|
||||
MenuAccountancyValidationMovements=Validate movements
|
||||
ProductsBinding=Products accounts
|
||||
TransferInAccounting=Transfer in accounting
|
||||
RegistrationInAccounting=Registration in accounting
|
||||
|
||||
Loading…
Reference in New Issue
Block a user