Description
Vinod
2020-09-25 11:33:15 UTC
Hmm.. I'm wondering whether this is a result of bug 26076. Testing. Created attachment 111209 [details] [review] 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. Created attachment 111210 [details] [review] Bug 26536: WRITEOFF not writeoff There is inconsistency in variable case between the controller script and the template. This patch corrects those inconsistencies. Created attachment 111211 [details] [review] Bug 25636: Assignment fix Whilst working on this bug I found a weird inconsistent variable assignment line Only the first patch is actually required, the subsequent two patches are just cleanup I spotted whilst working on the bug Created attachment 111268 [details] [review] 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> Created attachment 111269 [details] [review] 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> Created attachment 111270 [details] [review] 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> Created attachment 111658 [details] [review] 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> Created attachment 111659 [details] [review] 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> Created attachment 111660 [details] [review] 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> Pushed to master for 20.11, thanks to everybody involved! Created attachment 111701 [details] [review] 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> does not apply cleanly to 20.05.x, no backport As this was initially reported against 20.05.04, could we have a rebase and backport? 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! (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 Created attachment 114508 [details] [review] [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> Created attachment 114509 [details] [review] [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> Created attachment 114510 [details] [review] [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> Pushed to 20.05.x for 20.05.07 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? It was not an issue for us in 19.11 at Huntsville-Madison County Public. Thanks for the confirmation :) 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. > 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 Applying only attachments 114508 and 114509 went without problems and resolved the issue for our 19.11.23 installation. I think attachment 114510 [details] [review] 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 [details] [review] to bug 23501 which was not backported to 19.11. *** Bug 28645 has been marked as a duplicate of this bug. *** Thanks a lot :D glad you figured it out. That could help others still using 19.11 |