[Bug 21673] New: Koha::Account::Lines->total_outstanding must be used when needed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21673 Bug ID: 21673 Summary: Koha::Account::Lines->total_outstanding must be used when needed Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 13098 There are several times the same pattern to retrieve the sum of amountoutstanding columns for Koha::Account::Line set. We should use Koha::Account::Lines->total_outstanding instead. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13098 [Bug 13098] Item lost multiple times by the same patron will create only be charged once -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21673 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=21673 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 81196 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81196&action=edit Bug 21673: Use Koha::Account::Lines->total_amountoutstanding when needed There are several times the same pattern to retrieve the sum of amountoutstanding columns for Koha::Account::Line set. We should use Koha::Account::Lines->total_outstanding instead. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21673 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21696 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21696 [Bug 21696] Use Koha::Account->lines from Koha::Account -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21673 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Comment on attachment 81196 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81196 Bug 21673: Use Koha::Account::Lines->total_amountoutstanding when needed Review of attachment 81196: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=21673&attachment=81196) ----------------------------------------------------------------- ::: Koha/Account/Lines.pm @@ -46,4 @@
sub total_outstanding { my ( $self ) = @_;
- my $total = sum0( $self->get_column('amountoutstanding') );
You've removed the only use of sum0, but not removed the List::Util import above ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21673 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master CC| |tomascohen@gmail.com Component|Architecture, internals, |Fines and fees |and plumbing | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21673 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81196|0 |1 is obsolete| | --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 81355 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81355&action=edit Bug 21673: Use Koha::Account::Lines->total_amountoutstanding when needed There are several times the same pattern to retrieve the sum of amountoutstanding columns for Koha::Account::Line set. We should use Koha::Account::Lines->total_outstanding instead. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21673 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 81356 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81356&action=edit Bug 21673: (QA follow-up) Fix typo and remove unused library Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21673 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21673 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21673 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81355|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 81744 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81744&action=edit Bug 21673: Use Koha::Account::Lines->total_amountoutstanding when needed There are several times the same pattern to retrieve the sum of amountoutstanding columns for Koha::Account::Line set. We should use Koha::Account::Lines->total_outstanding instead. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21673 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81356|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 81745 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81745&action=edit Bug 21673: (QA follow-up) Fix typo and remove unused library Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21673 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice bit of cleaning up.. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21673 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21673 Bug 21673 depends on bug 13098, which changed state. Bug 13098 Summary: Item lost multiple times by the same patron will create only be charged once https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13098 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=21673 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Enhancement, will not be backported for 18.05.x series. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21673 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17140 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org