View | Details | Raw Unified | Return to bug 23355
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_24082.perl (+12 lines)
Line 0 Link Here
1
$DBversion = 'XXX';    # will be replaced by the RM
2
if ( CheckVersion($DBversion) ) {
3
4
    $dbh->do(qq{
5
        INSERT IGNORE permissions (module_bit, code, description)
6
        VALUES
7
        (25, 'anonymous_refund', 'Perform refund actions from cash registers')
8
    });
9
10
    SetVersion($DBversion);
11
    print "Upgrade to $DBversion done (Bug 23442 - Add a refund option to the point of sale system)\n";
12
}
(-)a/installer/data/mysql/userpermissions.sql (+1 lines)
Lines 121-126 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
121
   (23, 'self_checkout_module', 'Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID'),
121
   (23, 'self_checkout_module', 'Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID'),
122
   (24, 'manage_rotas', 'Create, edit and delete rotas'),
122
   (24, 'manage_rotas', 'Create, edit and delete rotas'),
123
   (24, 'manage_rota_items', 'Add and remove items from rotas'),
123
   (24, 'manage_rota_items', 'Add and remove items from rotas'),
124
   (25, 'anonymous_refund', 'Perform refund actions from cash registers'),
124
   (25, 'cashup', 'Perform cash register cashup action'),
125
   (25, 'cashup', 'Perform cash register cashup action'),
125
   (25, 'takepayment', 'Access the point of sale page and take payments')
126
   (25, 'takepayment', 'Access the point of sale page and take payments')
126
;
127
;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (+5 lines)
Lines 701-705 Link Here
701
            Perform cash register cashup action
701
            Perform cash register cashup action
702
        </span>
702
        </span>
703
        <span class="permissioncode">([% name | html %])</span>
703
        <span class="permissioncode">([% name | html %])</span>
704
    [%- CASE 'anonymous_refund' -%]
705
        <span class="sub_permission anonymous_refund_subpermission">
706
            Perform anonymous refund actions
707
        </span>
708
        <span class="permissioncode">([% name | html %])</span>
704
  [%- END -%]
709
  [%- END -%]
705
[%- END -%]
710
[%- END -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/pos-menu.inc (-1 / +1 lines)
Lines 1-6 Link Here
1
<div id="navmenu">
1
<div id="navmenu">
2
    <div id="navmenulist">
2
    <div id="navmenulist">
3
        [% IF ( CAN_user_cash_management_cashup ) %]
3
        [% IF ( CAN_user_cash_management_cashup || CAN_user_cash_management_anonymous_refund ) %]
4
        <h5>Point of sale</h5>
4
        <h5>Point of sale</h5>
5
        <ul>
5
        <ul>
6
            <li><a href="/cgi-bin/koha/pos/register.pl">Register details</a></li>
6
            <li><a href="/cgi-bin/koha/pos/register.pl">Register details</a></li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt (+2 lines)
Lines 27-35 Link Here
27
            </div>
27
            </div>
28
            [% ELSE %]
28
            [% ELSE %]
29
29
30
            [% IF ( CAN_user_cash_management_cashup ) %]
30
            <div id="toolbar" class="btn-toolbar">
31
            <div id="toolbar" class="btn-toolbar">
31
                <a id="cashup" href="/cgi-bin/koha/pos/register.pl?op=cashup" class="btn btn-default"><i class="fa fa-money"></i> Record cashup</a>
32
                <a id="cashup" href="/cgi-bin/koha/pos/register.pl?op=cashup" class="btn btn-default"><i class="fa fa-money"></i> Record cashup</a>
32
            </div>
33
            </div>
34
            [% END %]
33
35
34
            <h1>Register transaction details for [% register.name | html %]</h1>
36
            <h1>Register transaction details for [% register.name | html %]</h1>
35
37
(-)a/pos/register.pl (-2 / +1 lines)
Lines 35-41 my ( $template, $loggedinuser, $cookie, $user_flags ) = get_template_and_user( Link Here
35
        query           => $input,
35
        query           => $input,
36
        type            => 'intranet',
36
        type            => 'intranet',
37
        authnotrequired => 0,
37
        authnotrequired => 0,
38
        flagsrequired   => { cash_management => 'cashup' },
38
        flagsrequired   => { cash_management => [ 'cashup', 'anonymous_refund' ] },
39
    }
39
    }
40
);
40
);
41
my $logged_in_user = Koha::Patrons->find($loggedinuser) or die "Not logged in";
41
my $logged_in_user = Koha::Patrons->find($loggedinuser) or die "Not logged in";
42
- 

Return to bug 23355