[Bug 9943] New: Pay fines page "Pay selected" button give invalid amount when nothing is selected
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9943 Bug ID: 9943 Summary: Pay fines page "Pay selected" button give invalid amount when nothing is selected Classification: Unclassified Change sponsored?: --- Product: Koha Version: 3.10 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: pongtawat.c@gmail.com CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com In Patrons > Pay Fines page, if there is a payable fine but all of them are not selected and "Pay selected" button is pressed. The next page shown is "Pay an amount toward all fines" with the "Total amount outstanding" being the total fines. The page shown should be "Pay an amount toward selected fines" like when some item is selected, with "Total amount outstanding" = 0. Step to reproduce: 1. Select a patron with some outstanding fines item. 2. Go to Pay fines page at /cgi-bin/koha/members/pay.pl?borrowernumber=xxx 3. Deselect every item. 4. Press "Pay selected" Current Result: - Next page shown is "Pay an amount toward all fines" Expected Result: - Next page shown is "Pay an amount toward selected fines" -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9943 --- Comment #1 from Pongtawat <pongtawat.c@gmail.com> --- The problem is that when nothing is selected, &selected= parameter is passed with empty string. The condition in paycollect.pl will miss it. It might be simply fixed by update that condition to use "defined" function. --- paycollect.pl 2013-03-28 14:10:16.518906138 +0700 +++ new/paycollect.pl 2013-03-28 14:11:12.994905576 +0700 @@ -86,7 +86,7 @@ notify_id => $notify_id, notify_level => $notify_level, ); -} elsif ($select_lines) { +} elsif (defined $select_lines) { $total_due = $input->param('amt'); $template->param( selected_accts => $select_lines -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9943 --- Comment #2 from Pongtawat <pongtawat.c@gmail.com> --- Maybe it's better if "Pay selected" is not clickable if nothing is selected. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9943 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Version|3.10 |master Assignee|koha-bugs@lists.koha-commun |oleonard@myacpl.org |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9943 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9943 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 20246 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20246&action=edit Bug 9943 - Pay fines page "Pay selected" button give invalid amount when nothing is selected If you select no fines but click the "pay selected" button the resulting screen offers to let you pay against all fines, which is confusing. To simplify things this patch disables the "pay selected" button if no lines are selected. To test, apply the patch and find a patron with outstanding fines. From the "pay fines" page (members/pay.pl) try selecting and deselecting checkboxes and using the "select all" and "clear all" links. When no item is selected the "Pay selected" button should become disabled. Confirm that the form submits correctly when one or more fines is selected. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9943 Melia Meggs <melia@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20246|0 |1 is obsolete| | CC| |melia@bywatersolutions.com --- Comment #4 from Melia Meggs <melia@bywatersolutions.com> --- Created attachment 20259 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20259&action=edit [Signed off] Bug 9943 - Pay fines page "Pay selected" button give invalid amount when nothing is selected I confirmed the behavior that Pongtawat described on master. After applying this patch, I went to the pay fines page for a patron with fines. I selected and deselected each checkbox one by one, and I used the Select All and Clear All links successfully. I confirmed that the "Pay Selected" button is disabled when nothing is selected. I paid off one selected fine, and also paid off multiple fines with the pay selected button. All behaves as expected, so I am signing off! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9943 Melia Meggs <melia@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9943 --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 20429 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20429&action=edit Bug 9943 - Pay fines page "Pay selected" button give invalid amount when nothing is selected If you select no fines but click the "pay selected" button the resulting screen offers to let you pay against all fines, which is confusing. To simplify things this patch disables the "pay selected" button if no lines are selected. To test, apply the patch and find a patron with outstanding fines. From the "pay fines" page (members/pay.pl) try selecting and deselecting checkboxes and using the "select all" and "clear all" links. When no item is selected the "Pay selected" button should become disabled. Confirm that the form submits correctly when one or more fines is selected. Signed-off-by: Melia Meggs <melia@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9943 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20259|0 |1 is obsolete| | CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9943 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9943 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20429|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 20603 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20603&action=edit [PASSED QA] Bug 9943 - Pay fines page "Pay selected" button give invalid amount when nothing is selected If you select no fines but click the "pay selected" button the resulting screen offers to let you pay against all fines, which is confusing. To simplify things this patch disables the "pay selected" button if no lines are selected. To test, apply the patch and find a patron with outstanding fines. From the "pay fines" page (members/pay.pl) try selecting and deselecting checkboxes and using the "select all" and "clear all" links. When no item is selected the "Pay selected" button should become disabled. Confirm that the form submits correctly when one or more fines is selected. Signed-off-by: Melia Meggs <melia@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA script. Works nicely in my tests. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9943 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #7 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Owen! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9943 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |tomascohen@gmail.com --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch has been pushed to 3.12.x, will be in 3.12.7. Thanks Owen! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org