Bug 24255

Summary: Add totals methods Koha::Account::Lines
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: Architecture, internals, and plumbingAssignee: Martin Renvoize <martin.renvoize>
Status: CLOSED FIXED QA Contact: Tomás Cohen Arazi <tomascohen>
Severity: enhancement    
Priority: P5 - low CC: 1joynelson, black23, kyle, testopia, tomascohen
Version: Main   
Hardware: All   
OS: All   
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
Bug Depends on: 24252    
Bug Blocks: 23442    
Attachments: Bug 24255: Add summation methods to Koha::Account::Lines
Bug 24255: Add summation methods to Koha::Account::Lines
Bug 24255: Add summation methods to Koha::Account::Lines
Bug 24255: Add summation methods to Koha::Account::Lines
Bug 24255: Add summation methods to Koha::Account::Lines

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