Bugzilla – Attachment 155635 Details for
Bug 34768
Can't pay fines on OPAC if patron has a guarantee and they can see their fines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34768: Remove checkbox column from relatives fines on OPAC
Bug-34768-Remove-checkbox-column-from-relatives-fi.patch (text/plain), 4.21 KB, created by
Marcel de Rooy
on 2023-09-15 06:23:10 UTC
(
hide
)
Description:
Bug 34768: Remove checkbox column from relatives fines on OPAC
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-09-15 06:23:10 UTC
Size:
4.21 KB
patch
obsolete
>From 11303e0a4330fb048ebf1a0ac7ee752b696d9c3b Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 12 Sep 2023 15:28:34 +0000 >Subject: [PATCH] Bug 34768: Remove checkbox column from relatives fines on > OPAC >Content-Type: text/plain; charset=utf-8 > >When a patron has a guarantee and can see their fines on the opac and >an opac payment plugin is enabled there is an error on the 'Charges' >tab. > >The table uses a 'COLSPAN' variable which is set to 5 or 6 depending on >if OPAC payments are enabled. The guarantees table has one less column >than the patron's however, so it is going out of range and causing a JS >error. Additionally, we are adding a column to the child's table which >is not used as their fines cannot be selected for payment at this time. > >This patch removes the checkbox column and sets the colspan directly to >4 > >I also fix an issue where the table is not being set as we need to >reference the patron object in the guarantor info to obtain the id. > >To test: >1 - Set system preference: AllowStaffToSetFinesVisibilityForGuarantor to > allow >2 - Find a patron >3 - Add some fines to their account >4 - Install and enable an opac payment plugin > (https://github.com/bywatersolutions/koha-plugin-pay-via-govolution > for example) >5 - Sign in to OPAC as borrower >6 - Go to 'Charges' tab >7 - Select a fee >8 - Confirm 'Make payment' button enabled and 'amount to pay' is > updated >9 - Add a guarantee to patron in staff interface >10 - Set 'Show charges to guarantors' to 'Yes' >11 - Add and pay a fine for the child >12 - View guarantor account on the OPAC >13 - Confirm you now see child's charges >14 - Confirm selecting your own fees does not enable the button or > update amount to pay >15 - Note JS error in console >16 - Apply patch >17 - Reload patrons page >18 - Confirm the table loads correctly (no JS error) >19 - Confirm selecting a fine updates the total and enables button >20 - Disable the payment plugin >21 - Confirm the display is still correct, no errors > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../bootstrap/en/includes/account-table.inc | 12 +----------- > 1 file changed, 1 insertion(+), 11 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc >index dcd0b0f1bb..3605fcab1d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc >@@ -91,10 +91,9 @@ > [% FOREACH r IN relatives %] > <h3 id="g[% r.patron.id | html %]">[% r.patron.firstname | html %] [% r.patron.surname | html %]'s fines and charges</h3> > >- <table class="table table-bordered table-striped finestable" id="finestable-[% r.id | html %]"> >+ <table class="table table-bordered table-striped finestable" id="finestable-[% r.patron.id | html %]"> > <thead> > <tr> >- [% IF ENABLE_OPAC_PAYMENTS %]<th> </th>[% END %] > <th>Created</th> > <th>Updated</th> > <th>Description</th> >@@ -109,15 +108,6 @@ > [% FOREACH a IN r.accountlines %] > [% SET account_sum = account_sum + a.amountoutstanding %] > <tr> >- [% IF ENABLE_OPAC_PAYMENTS %] >- <td> >- [% IF a.amountoutstanding > 0 %] >- [% SET DISPLAY_PAYMENT_BLOCK = 1 %] >- <input class="checkbox-pay pay-online hidden" name="accountline" type="checkbox" id="checkbox-pay-[% a.accountlines_id | html %]" value="[% a.accountlines_id | html %]"> >- <input type="hidden" id="amount-[% a.accountlines_id | html %]" value="[% a.amountoutstanding | html %]" /> >- [% END %] >- </td> >- [% END %] > <td data-order="[% a.date | html %]">[% a.date | $KohaDates %]</td> > <td data-order="[% a.timestamp | html %]">[% a.timestamp | $KohaDates with_hours = 1 %]</td> > <td> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34768
:
155558
|
155562
| 155635