Bug 24082: Add `anonymous_refund` permission to `cash_management`
This patch adds the new `anonymous_refund` permission to the `cash_management` flag and binds it to the visability of the register details page. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
0359a04bf8
commit
d4d1ffb91c
|
|
@ -0,0 +1,12 @@
|
|||
$DBversion = 'XXX'; # will be replaced by the RM
|
||||
if ( CheckVersion($DBversion) ) {
|
||||
|
||||
$dbh->do(qq{
|
||||
INSERT IGNORE permissions (module_bit, code, description)
|
||||
VALUES
|
||||
(25, 'anonymous_refund', 'Perform refund actions from cash registers')
|
||||
});
|
||||
|
||||
SetVersion($DBversion);
|
||||
print "Upgrade to $DBversion done (Bug 23442 - Add a refund option to the point of sale system)\n";
|
||||
}
|
||||
|
|
@ -122,6 +122,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
|
|||
(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'),
|
||||
(25, 'anonymous_refund', 'Perform refund actions from cash registers'),
|
||||
(25, 'cashup', 'Perform cash register cashup action'),
|
||||
(25, 'takepayment', 'Access the point of sale page and take payments')
|
||||
;
|
||||
|
|
|
|||
|
|
@ -704,5 +704,10 @@
|
|||
Perform cash register cashup action
|
||||
</span>
|
||||
<span class="permissioncode">([% name | html %])</span>
|
||||
[%- CASE 'anonymous_refund' -%]
|
||||
<span class="sub_permission anonymous_refund_subpermission">
|
||||
Perform anonymous refund actions
|
||||
</span>
|
||||
<span class="permissioncode">([% name | html %])</span>
|
||||
[%- END -%]
|
||||
[%- END -%]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div id="navmenu">
|
||||
<div id="navmenulist">
|
||||
[% IF ( CAN_user_cash_management_cashup ) %]
|
||||
[% IF ( CAN_user_cash_management_cashup || CAN_user_cash_management_anonymous_refund ) %]
|
||||
<h5>Point of sale</h5>
|
||||
<ul>
|
||||
<li><a href="/cgi-bin/koha/pos/register.pl">Register details</a></li>
|
||||
|
|
|
|||
|
|
@ -27,9 +27,11 @@
|
|||
</div>
|
||||
[% ELSE %]
|
||||
|
||||
[% IF ( CAN_user_cash_management_cashup ) %]
|
||||
<div id="toolbar" class="btn-toolbar">
|
||||
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#confirmCashupModal" ><i class="fa fa-money"></i> Record cashup</button>
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
<h1>Register transaction details for [% register.name | html %]</h1>
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ my ( $template, $loggedinuser, $cookie, $user_flags ) = get_template_and_user(
|
|||
query => $input,
|
||||
type => 'intranet',
|
||||
authnotrequired => 0,
|
||||
flagsrequired => { cash_management => 'cashup' },
|
||||
flagsrequired => { cash_management => [ 'cashup', 'anonymous_refund' ] },
|
||||
}
|
||||
);
|
||||
my $logged_in_user = Koha::Patrons->find($loggedinuser) or die "Not logged in";
|
||||
|
|
|
|||
Loading…
Reference in New Issue