Summary: | Koha::Account::Lines->total_outstanding must be used when needed | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Fines and fees | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Martin Renvoize <martin.renvoize> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | nick, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17140 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | 13098 | ||
Bug Blocks: | 21696 | ||
Attachments: |
Bug 21673: Use Koha::Account::Lines->total_amountoutstanding when needed
Bug 21673: Use Koha::Account::Lines->total_amountoutstanding when needed Bug 21673: (QA follow-up) Fix typo and remove unused library Bug 21673: Use Koha::Account::Lines->total_amountoutstanding when needed Bug 21673: (QA follow-up) Fix typo and remove unused library |
Description
Jonathan Druart
2018-10-25 19:55:21 UTC
Created attachment 81196 [details] [review] 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. Comment on attachment 81196 [details] [review] Bug 21673: Use Koha::Account::Lines->total_amountoutstanding when needed Review of attachment 81196 [details] [review]: ----------------------------------------------------------------- ::: 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 ;) Created attachment 81355 [details] [review] 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> Created attachment 81356 [details] [review] Bug 21673: (QA follow-up) Fix typo and remove unused library Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 81744 [details] [review] 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> Created attachment 81745 [details] [review] 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> Nice bit of cleaning up.. Passing QA Awesome work all! Pushed to master for 18.11 Enhancement, will not be backported for 18.05.x series. |