@@ -, +, @@ --- installer/data/mysql/atomicupdate/bug_23442.perl | 7 +++++++ installer/data/mysql/userpermissions.sql | 1 + koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc | 5 +++++ 3 files changed, 13 insertions(+) --- a/installer/data/mysql/atomicupdate/bug_23442.perl +++ a/installer/data/mysql/atomicupdate/bug_23442.perl @@ -14,7 +14,14 @@ if ( CheckVersion($DBversion) ) { INSERT IGNORE INTO account_offset_types ( type ) VALUES ('DISCOUNT'), ('REFUND'); }); + $dbh->do(qq{ + INSERT IGNORE permissions (module_bit, code, description) + VALUES + (10, 'refund', 'Perform account refund action') + }); + SetVersion($DBversion); print "Upgrade to $DBversion done (Bug 23442 - Add REFUND and DISCOUNT account_credit_types)\n"; print "Upgrade to $DBversion done (Bug 23442 - Add REFUNDED and DISCOUNTED account_offset_types)\n"; + print "Upgrade to $DBversion done (Bug 23442 - Add accounts refund permission)\n"; } --- a/installer/data/mysql/userpermissions.sql +++ a/installer/data/mysql/userpermissions.sql @@ -44,6 +44,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEditing preference (please note that edit_item is still required)'), ( 9, 'delete_all_items', 'Delete all items at once'), (10, 'payout', 'Perform account payout action'), + (10, 'refund', 'Perform account refund action'), (10, 'writeoff', 'Write off fines and fees'), (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'), (11, 'currencies_manage', 'Manage currencies and exchange rates'), --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -309,6 +309,11 @@ Payout credits to patrons ([% name | html %]) + [%- CASE 'refund' -%] + + Refund payments to patrons + + ([% name | html %]) [%- CASE 'writeoff' -%] Write off fines and fees --