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. |