--- /dev/null
+$DBversion = 'XXX'; # will be replaced by the RM
+if ( CheckVersion($DBversion) ) {
+
+ $dbh->do(qq{
+ INSERT IGNORE INTO `userflags` (`bit`, `flag`, `flagdesc`, `defaulton`)
+ VALUES (25, 'cash_management', 'Cash management', 0)
+ });
+
+ $dbh->do(qq{
+ INSERT IGNORE permissions (module_bit, code, description)
+ VALUES
+ (25, 'manage_cash_registers', 'Add and remove cash registers')
+ });
+
+
+ SetVersion($DBversion);
+ print "Upgrade to $DBversion done (Bug 23321 - Add cash register permissions)\n";
+}
(21, 'clubs', 'Patron clubs', '0'),
(22,'ill','The Interlibrary Loans Module',0),
(23,'self_check','Self check modules',0),
-(24, 'stockrotation', 'Manage stockrotation operations', 0)
+(24, 'stockrotation', 'Manage stockrotation operations', 0),
+(25, 'cash_management', 'Cash management', 0)
;
(23, 'self_checkin_module', 'Log into the self check-in module'),
(23, 'self_checkout_module', 'Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID'),
(24, 'manage_rotas', 'Create, edit and delete rotas'),
- (24, 'manage_rota_items', 'Add and remove items from rotas')
+ (24, 'manage_rota_items', 'Add and remove items from rotas'),
+ (25, 'manage_cash_registers', 'Add and remove cash registers')
;
[%- CASE 'stockrotation' -%]
<span class="main_permission self_check_permission">Manage stockrotation operations</span>
<span class="permissioncode">([% name | html %])</span>
+ [%- CASE 'cash_management' -%]
+ <span class="main_permission cash_management_permission">Cash management</span>
+ <span class="permissioncode">([% name | html %])</span>
[%- END -%]
[%- END -%]
Create, edit and delete rotas
</span>
<span class="permissioncode">([% name | html %])</span>
+ [%# cash_management %]
+ [%- CASE 'manage_cash_registers' -%]
+ <span class="sub_permission manage_cash_registers_subpermission">
+ Add, edit and archive cash registers
+ </span>
+ <span class="permissioncode">([% name | html %])</span>
[%- END -%]
[%- END -%]
if ($#sub_perm_loop > -1) {
$row{sub_perm_loop} = \@sub_perm_loop;
}
+ next if ( ( $row{flag} eq 'cash_management' ) && !C4::Context->preference('UseCashRegisters') );
push @loop, \%row;
}