Bug 24255 - Add totals methods Koha::Account::Lines
Summary: Add totals methods Koha::Account::Lines
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on: 24252
Blocks: 23442
  Show dependency treegraph
 
Reported: 2019-12-17 14:14 UTC by Martin Renvoize
Modified: 2020-11-30 21:45 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement completes the set of summation methods available from a Koha::Account::Lines resultset object, complimenting the existing `total_outstanding` method. It introduces the following methods: * `total` - Sum of all `amount` fields in the accountlines set. * `credits_total` - Sum of all `amount` fields for credits in the accountlines set. * `debits_total` - Sum of all `amount` fields for debits in the accountlines set.
Version(s) released in:
20.05.00


Attachments
Bug 24255: Add summation methods to Koha::Account::Lines (11.41 KB, patch)
2019-12-17 16:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24255: Add summation methods to Koha::Account::Lines (11.46 KB, patch)
2019-12-18 08:50 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24255: Add summation methods to Koha::Account::Lines (11.72 KB, patch)
2019-12-18 09:35 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24255: Add summation methods to Koha::Account::Lines (11.79 KB, patch)
2020-01-08 14:48 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 24255: Add summation methods to Koha::Account::Lines (11.83 KB, patch)
2020-01-08 15:32 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2019-12-17 14:14:40 UTC
Add missing summation methods to the Koha::Account::Lines class.
Comment 1 Martin Renvoize 2019-12-17 16:21:21 UTC
Created attachment 96387 [details] [review]
Bug 24255: Add summation methods to Koha::Account::Lines

This patch adds a number of summation methods to Koha::Account::Lines
giving quick access to overall total, total credits and total debits.

Test plan
1) Run the included tests
Comment 2 Martin Renvoize 2019-12-18 08:50:07 UTC
Created attachment 96399 [details] [review]
Bug 24255: Add summation methods to Koha::Account::Lines

This patch adds a number of summation methods to Koha::Account::Lines
giving quick access to overall total, total credits and total debits.

Test plan
1) Run the included tests
Comment 3 Martin Renvoize 2019-12-18 09:35:01 UTC
Created attachment 96405 [details] [review]
Bug 24255: Add summation methods to Koha::Account::Lines

This patch adds a number of summation methods to Koha::Account::Lines
giving quick access to overall total, total credits and total debits.

Test plan
1) Run the included tests
Comment 4 Kyle M Hall 2020-01-08 14:48:40 UTC
Created attachment 96996 [details] [review]
Bug 24255: Add summation methods to Koha::Account::Lines

This patch adds a number of summation methods to Koha::Account::Lines
giving quick access to overall total, total credits and total debits.

Test plan
1) Run the included tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Tomás Cohen Arazi 2020-01-08 15:32:36 UTC
Created attachment 97006 [details] [review]
Bug 24255: Add summation methods to Koha::Account::Lines

This patch adds a number of summation methods to Koha::Account::Lines
giving quick access to overall total, total credits and total debits.

Test plan
1) Run the included tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Martin Renvoize 2020-01-09 16:34:07 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 7 Joy Nelson 2020-01-18 16:27:11 UTC
Enhancement Not backported to 19.11.x branch