[Bug 26536] New: "Writeoff selected" seems deduct old unpaid fines first
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Bug ID: 26536 Summary: "Writeoff selected" seems deduct old unpaid fines first Change sponsored?: --- Product: Koha Version: 20.05 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: mishravk79@gmail.com QA Contact: testopia@bugs.koha-community.org Hello In version 20.05.04 Writeoff selected fine tab does not write off only selected instead it applied on oldest unpaid fine first. Test Plan 1. Two returned book/s with unpaid fine 2. Try to write off lasted returned book with "Writeoff selected" 3. You will observe fine deducted from oldest unpaid book. Vinod -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Severity|minor |normal -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 George Williams (NEKLS) <george@nekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |george@nekls.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Hmm.. I'm wondering whether this is a result of bug 26076. Testing. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=26076 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 111209 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111209&action=edit Bug 26536: Fix incorrectly scoped variable During work on bug 26076 a variable scope mistake was made when reverting the logic to use distinct queries for selected accountlines. This patch restores the script scope of the varaible by removing the superflous 'my' declaration. Test plan 1/ Add a set of manual invoices 2/ Select a subset of those manual invoices to 'Writeoff selected' 3/ Confirm that only those selected invoices have been written off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 111210 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111210&action=edit Bug 26536: WRITEOFF not writeoff There is inconsistency in variable case between the controller script and the template. This patch corrects those inconsistencies. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 111211 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111211&action=edit Bug 25636: Assignment fix Whilst working on this bug I found a weird inconsistent variable assignment line -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Only the first patch is actually required, the subsequent two patches are just cleanup I spotted whilst working on the bug -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|"Writeoff selected" seems |"Writeoff/Pay selected" |deduct old unpaid fines |deducts from old unpaid |first |debts first -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |critical -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |26076 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26076 [Bug 26076] Paying selected accountlines in full may result in the error "You must pay a value less than or equal to $x" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111209|0 |1 is obsolete| | --- Comment #6 from PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> --- Created attachment 111268 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111268&action=edit Bug 26536: Fix incorrectly scoped variable During work on bug 26076 a variable scope mistake was made when reverting the logic to use distinct queries for selected accountlines. This patch restores the script scope of the varaible by removing the superflous 'my' declaration. Test plan 1/ Add a set of manual invoices 2/ Select a subset of those manual invoices to 'Writeoff selected' 3/ Confirm that only those selected invoices have been written off. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111210|0 |1 is obsolete| | --- Comment #7 from PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> --- Created attachment 111269 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111269&action=edit Bug 26536: WRITEOFF not writeoff There is inconsistency in variable case between the controller script and the template. This patch corrects those inconsistencies. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111211|0 |1 is obsolete| | --- Comment #8 from PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> --- Created attachment 111270 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111270&action=edit Bug 25636: Assignment fix Whilst working on this bug I found a weird inconsistent variable assignment line https://bugs.koha-community.org/show_bug.cgi?id=26536 Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Sally <sally.healey@cheshiresharedservices.gov.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |sally.healey@cheshireshared | |services.gov.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111268|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 111658 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111658&action=edit Bug 26536: Fix incorrectly scoped variable During work on bug 26076 a variable scope mistake was made when reverting the logic to use distinct queries for selected accountlines. This patch restores the script scope of the varaible by removing the superflous 'my' declaration. Test plan 1/ Add a set of manual invoices 2/ Select a subset of those manual invoices to 'Writeoff selected' 3/ Confirm that only those selected invoices have been written off. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111269|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 111659 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111659&action=edit Bug 26536: WRITEOFF not writeoff There is inconsistency in variable case between the controller script and the template. This patch corrects those inconsistencies. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111270|0 |1 is obsolete| | --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 111660 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111660&action=edit Bug 25636: Assignment fix Whilst working on this bug I found a weird inconsistent variable assignment line https://bugs.koha-community.org/show_bug.cgi?id=26536 Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111660|0 |1 is obsolete| | --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 111701 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111701&action=edit Bug 26536: Assignment fix Whilst working on this bug I found a weird inconsistent variable assignment line Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> JD: Amended commit message: fix bug number Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #14 from Lucas Gass <lucas@bywatersolutions.com> --- does not apply cleanly to 20.05.x, no backport -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- As this was initially reported against 20.05.04, could we have a rebase and backport? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Martha Fuerst <mfuerst@hmcpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mfuerst@hmcpl.org --- Comment #16 from Martha Fuerst <mfuerst@hmcpl.org> --- Not being able to use Write Off Selected to select specific fines to write off defeats the purpose of even having the function to select fines for payment/write off. It is essential to being able to clearly communicate to patrons why/for what materials they owe fines. Losing this functionality has made for a lot of mess on the backend that our admin/business office is having to deal with. Please rebase and backport to 20.05. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 --- Comment #17 from George Williams (NEKLS) <george@nekls.org> --- (In reply to Martha Fuerst from comment #16)
Not being able to use Write Off Selected to select specific fines to write off defeats the purpose of even having the function to select fines for payment/write off.
It is essential to being able to clearly communicate to patrons why/for what materials they owe fines.
Losing this functionality has made for a lot of mess on the backend that our admin/business office is having to deal with. Please rebase and backport to 20.05.
Thanks!
+1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 114508 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114508&action=edit [20.05.x] Bug 26536: Fix incorrectly scoped variable During work on bug 26076 a variable scope mistake was made when reverting the logic to use distinct queries for selected accountlines. This patch restores the script scope of the varaible by removing the superflous 'my' declaration. Test plan 1/ Add a set of manual invoices 2/ Select a subset of those manual invoices to 'Writeoff selected' 3/ Confirm that only those selected invoices have been written off. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 --- Comment #19 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 114509 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114509&action=edit [20.05.x] Bug 26536: WRITEOFF not writeoff There is inconsistency in variable case between the controller script and the template. This patch corrects those inconsistencies. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 --- Comment #20 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 114510 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114510&action=edit [20.05.x] Bug 26536: Assignment fix Whilst working on this bug I found a weird inconsistent variable assignment line Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> JD: Amended commit message: fix bug number Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |andrew@bywatersolutions.com Version(s)|20.11.00 |20.11.00, 20.05.07 released in| | --- Comment #21 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #22 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Got a conflict when backporting from 20.05.x to 19.11.x Tried to fix by selecting the 3rd section (Bug 26536: Assignment fix) <<<<<<< HEAD $payment_id = $account->pay( ||||||| parent of 6d302b741c (Bug 26536: Assignment fix) $pay_result = $payment_id = $account->pay( ======= $pay_result = $account->pay(
> 6d302b741c (Bug 26536: Assignment fix) { amount => $total_paid, library_id => $library_id, note => $note, payment_type => $payment_type, interface => C4::Context->interface, payment_type => $payment_type, cash_register => $registerid } ); $payment_id = $pay_result->{payment_id}; }
print $input->redirect("/cgi-bin/koha/members/boraccount.pl?borrowernumber=$borrowernumber&payment_id=$payment_id&change_given=$change_given"); } } But when writing off, I got this error: Could not compile /kohadevbox/koha/members/paycollect.pl: Global symbol "$pay_result" requires explicit package name It's not clear either if 19.11.x is affected. I'm not sure I did the test plan right to confirm the issue. Does anyone have hints? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 --- Comment #23 from Martha Fuerst <mfuerst@hmcpl.org> --- It was not an issue for us in 19.11 at Huntsville-Madison County Public. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED --- Comment #24 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Thanks for the confirmation :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |28645 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28645 [Bug 28645] write off fine on selected items does not pay against those lines -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Alexander Borkowski <alexander.borkowski@kau.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alexander.borkowski@kau.se --- Comment #25 from Alexander Borkowski <alexander.borkowski@kau.se> --- We do have this exact issue on 19.11 unfortunately. I guess a backport to 19.11 is unlikely at this stage in its lifecycle so I will just patch our local version based on the diffs provided here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 --- Comment #26 from Victor Grousset/tuxayo <victor@tuxayo.net> ---
I guess a backport to 19.11 is unlikely at this stage in its lifecycle
Indeed 19.11.x is still supported but only for security fixes. But the main issues is to be able to make a working backport. See comment 22 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 --- Comment #27 from Alexander Borkowski <alexander.borkowski@kau.se> --- Applying only attachments 114508 and 114509 went without problems and resolved the issue for our 19.11.23 installation. I think attachment 114510 which gave problems in comment 22 is not necessary for 19.11 as the return value of Koha::Account::pay changed only in attachment 100185 to bug 23501 which was not backported to 19.11. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 Alexander Borkowski <alexander.borkowski@kau.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bernard.scaife@ptfs-europe. | |com --- Comment #28 from Alexander Borkowski <alexander.borkowski@kau.se> --- *** Bug 28645 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26536 --- Comment #29 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Thanks a lot :D glad you figured it out. That could help others still using 19.11 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org