[Bug 21801] New: paycollect.pl should pass library_id when adding accountlines
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21801 Bug ID: 21801 Summary: paycollect.pl should pass library_id when adding accountlines Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org -- 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=21801 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Depends on| |19066 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19066 [Bug 19066] Add branchcode to accountlines -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21801 Tomás Cohen Arazi <tomascohen@gmail.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=21801 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 82172 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82172&action=edit Bug 21801: Make paycollect.pl pass library_id when calling ->pay This patch makes paycollect store the branchcode of the current library when payments are done. - Try all the possible options, specially selecting things to pay for (not using the individual buttons). - Check on the DB, that the accountlines for the patron you're playin with have the branchcode stored correctly in all cases: $ sudo koha-mysql kohadev > SELECT * FROM accountlines WHERE borrowernumber=<the_bn>; => SUCCESS: Things are as expected - SIgn off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21801 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 82173 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82173&action=edit Bug 21801: (follow-up) Use ->account This patch is a minor refactoring, that reuses the $account object we already get from $patron, instead of creating new ones all over the place. Code gets simpler to read too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21801 Bug 21801 depends on bug 19066, which changed state. Bug 19066 Summary: Add branchcode to accountlines https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19066 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21801 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Tomás Cohen Arazi from comment #2)
Created attachment 82173 [details] [review] Bug 21801: (follow-up) Use ->account
This patch is a minor refactoring, that reuses the $account object we already get from $patron, instead of creating new ones all over the place. Code gets simpler to read too.
And given the use of the variable, probably is faster too. Nice. :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21801 --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 82173 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82173 Bug 21801: (follow-up) Use ->account Review of attachment 82173: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=21801&attachment=82173) ----------------------------------------------------------------- ::: members/paycollect.pl @@ +59,4 @@
my $category = $patron->category; my $user = $input->remote_user;
+my $library_id = C4::Context->userenv->{'branch'};
Just had to rename $branch to library_id to fit the _id structure of thinking. :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21801 --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 82172 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82172 Bug 21801: Make paycollect.pl pass library_id when calling ->pay Review of attachment 82172: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=21801&attachment=82172) ----------------------------------------------------------------- ::: members/paycollect.pl @@ +168,4 @@
Koha::Account->new( { patron_id => $borrowernumber } )->pay( { amount => $total_paid, + library_id => $branch,
Strange how, it was passed in a place above, but not these two changes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21801 M. Tompsett <mtompset@hotmail.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=21801
M. Tompsett <mtompset@hotmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #82172|0 |1
is obsolete| |
Attachment #82173|0 |1
is obsolete| |
--- Comment #6 from M. Tompsett <mtompset@hotmail.com> ---
Created attachment 91199
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91199&action=edit
Bug 21801: Make paycollect.pl pass library_id when calling ->pay
This patch makes paycollect store the branchcode of the current library
when payments are done.
- Try all the possible options, specially selecting things to pay for (not
using the individual buttons).
- Check on the DB, that the accountlines for the patron you're playin
with have the branchcode stored correctly in all cases:
$ sudo koha-mysql kohadev
> SELECT * FROM accountlines WHERE borrowernumber=<the_bn>;
=> SUCCESS: Things are as expected
- SIgn off :-D
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21801 --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 91200 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91200&action=edit Bug 21801: (follow-up) Use ->account This patch is a minor refactoring, that reuses the $account object we already get from $patron, instead of creating new ones all over the place. Code gets simpler to read too. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21801
Josef Moravec <josef.moravec@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #91199|0 |1
is obsolete| |
--- Comment #8 from Josef Moravec <josef.moravec@gmail.com> ---
Created attachment 91248
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91248&action=edit
Bug 21801: Make paycollect.pl pass library_id when calling ->pay
This patch makes paycollect store the branchcode of the current library
when payments are done.
- Try all the possible options, specially selecting things to pay for (not
using the individual buttons).
- Check on the DB, that the accountlines for the patron you're playin
with have the branchcode stored correctly in all cases:
$ sudo koha-mysql kohadev
> SELECT * FROM accountlines WHERE borrowernumber=<the_bn>;
=> SUCCESS: Things are as expected
- SIgn off :-D
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21801 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91200|0 |1 is obsolete| | --- Comment #9 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 91249 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91249&action=edit Bug 21801: (follow-up) Use ->account This patch is a minor refactoring, that reuses the $account object we already get from $patron, instead of creating new ones all over the place. Code gets simpler to read too. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21801 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |josef.moravec@gmail.com |y.org | Status|Signed Off |Passed QA CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21801 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.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=21801 --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21801 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to master |RESOLVED CC| |fridolin.somers@biblibre.co | |m --- Comment #11 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Enhancement not pushed to 19.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21801 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org