[Bug 15746] New: A random library is used to record an individual payment
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15746 Bug ID: 15746 Summary: A random library is used to record an individual payment Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Patrons Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15746 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15746 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 47684 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47684&action=edit Bug 15746: Do not record individual payments with randomly picked libraries When a payment is made individualy, the library used to record this payment is randomly picked from the library list. This is because C4::Branch::GetBranch looks at 1. the $branch variable sent by the template, wich does not exist, then 2. the branchname cookie, which does not exist neither, then 3. get the first branchcode from a list of keys (non ordered). To reproduce: - Create a manual invoice for a patron (members/maninvoice.pl?borrowernumber=XXXX) - Pay this fine using the "Pay" button of the corresponding line from the members/pay.pl?borrowernumber=XXXX page Look at the statistics table: select * from statistics order by datetime desc limit 10; The branch value of the first line might not correspond to the library you were using to pay the payment. Test plan: Apply this patch, repeat the steps above and confirm that the library picked is now the one used to pay. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15746 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 47685 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47685&action=edit Bug 15746: Same fix for "write off" Same fix as before for the "Write off" button next to the "Pay" button. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15746 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15746 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #47684|0 |1 is obsolete| | --- Comment #3 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 47702 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47702&action=edit [SIGNED-OFF]Bug 15746: Do not record individual payments with randomly picked libraries When a payment is made individualy, the library used to record this payment is randomly picked from the library list. This is because C4::Branch::GetBranch looks at 1. the $branch variable sent by the template, wich does not exist, then 2. the branchname cookie, which does not exist neither, then 3. get the first branchcode from a list of keys (non ordered). To reproduce: - Create a manual invoice for a patron (members/maninvoice.pl?borrowernumber=XXXX) - Pay this fine using the "Pay" button of the corresponding line from the members/pay.pl?borrowernumber=XXXX page Look at the statistics table: select * from statistics order by datetime desc limit 10; The branch value of the first line might not correspond to the library you were using to pay the payment. Test plan: Apply this patch, repeat the steps above and confirm that the library picked is now the one used to pay. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15746 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #47685|0 |1 is obsolete| | --- Comment #4 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 47703 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47703&action=edit [SIGNED-OFF]Bug 15746: Same fix for "write off" Same fix as before for the "Write off" button next to the "Pay" button. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15746 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |15758 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15758 [Bug 15758] Move the C4::Branch related code to Koha::Libraries - part 4 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15746 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=15746 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #47702|0 |1 is obsolete| | Attachment #47703|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 47974 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47974&action=edit Bug 15746: Do not record individual payments with randomly picked libraries When a payment is made individualy, the library used to record this payment is randomly picked from the library list. This is because C4::Branch::GetBranch looks at 1. the $branch variable sent by the template, wich does not exist, then 2. the branchname cookie, which does not exist neither, then 3. get the first branchcode from a list of keys (non ordered). To reproduce: - Create a manual invoice for a patron (members/maninvoice.pl?borrowernumber=XXXX) - Pay this fine using the "Pay" button of the corresponding line from the members/pay.pl?borrowernumber=XXXX page Look at the statistics table: select * from statistics order by datetime desc limit 10; The branch value of the first line might not correspond to the library you were using to pay the payment. Test plan: Apply this patch, repeat the steps above and confirm that the library picked is now the one used to pay. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Signed-off-by: Kyle M Hall <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=15746 --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 47975 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47975&action=edit Bug 15746: Same fix for "write off" Same fix as before for the "Write off" button next to the "Pay" button. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Signed-off-by: Kyle M Hall <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=15746 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |brendan@bywatersolutions.co | |m Status|Passed QA |Pushed to Master --- Comment #7 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - Should be in the May 2016 Release. Thanks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15746 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |julian.maurice@biblibre.com --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> --- Patches pushed to 3.22.x, will be in 3.22.4 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15746 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #9 from Frédéric Demians <frederic@tamil.fr> --- This patch has been pushed to 3.20.x, will be in 3.20.9. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org