From 20f11378bfb4535be53d964887c07efd0dfe5e08 Mon Sep 17 00:00:00 2001 From: Eric Garcia Date: Wed, 17 Jul 2024 20:33:43 +0000 Subject: [PATCH] Bug 17473: Add void payment permission To test: 1. Apply patch, updatedatabase, restart_all 2. Search for staff patron 3. More -> Set permissions 4. Check - Staff access, allows viewing of catalogue in staff interface - Add, modify and view patron information - Manage patrons fines and fee 5. Notice under Manage patrons fines and fee there is a new permission "Voiding Payments" 6. Sign into staff interface as your selected staff patron 7. Search for a non-staff patron -> Accounting 8. Click 'Create manual invoice', add an amount and click 'Save and pay' -> 'Confirm' 9. Go to transactions and notice the option to Void payment appears 10. Go back to your staff patron's permission and unselect 'Voiding Payments' 11. Go to your non-staff patron and notice the option to void payments is gone --- .../intranet-tmpl/prog/en/includes/permissions.inc | 5 +++++ .../prog/en/modules/members/boraccount.tt | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc index b8f2c2b040..c16609d925 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -427,6 +427,11 @@ Write off fines and fees ([% name | html %]) + [%- CASE 'void_payment' -%] + + Voiding Payments + + ([% name | html %]) [%- CASE 'manual_invoice' -%] Add manual invoices to a patron account diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt index a051fc2732..4d4527c9b5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -181,10 +181,12 @@ - + [% IF CAN_user_updatecharges_void_payment %] + + [% END %] [% END %] [% IF account.is_debit && account.amount == account.amountoutstanding && account.status != 'CANCELLED' && !(account.debit_type_code == 'PAYOUT') %] -- 2.30.2