Bug 24252

Summary: Add credits, debits, credit_offsets and debit_offsets relationships to Koha::Account::Line
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, kyle, tomascohen
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement allows for fetching related credits, debits and offsets directly from an existing Koha::Account::Line object and includes compatibility for prefetching of relations for performance.
Version(s) released in:
20.05.00
Bug Depends on: 24080    
Bug Blocks: 8338, 24255    
Attachments: Bug 24252: Add relations to Koha::Account::Line
Bug 24252: Add relations to Koha::Account::Line
Bug 24252: Add relations to Koha::Account::Line
Bug 24252: Add relations to Koha::Account::Line
Bug 24252: [19.11] Add relations to Koha::Account::Line

Description Martin Renvoize 2019-12-17 09:49:51 UTC
Add the Koha::Objects expansion of the credit and debit offset relationships to the Koha::Account::Line class.
Comment 1 Martin Renvoize 2019-12-17 11:35:44 UTC
Created attachment 96363 [details] [review]
Bug 24252: Add relations to Koha::Account::Line

This patch adds two new relationships to the Koha::Account::Line object.

* credit_offsets - returns all credit type Koha::Account::Offsets
  related to this Koha::Account::Line.
* debit_offsets - returns all debit type Koha::Account::Offsets related
  to this Koha::Account::Line.
Comment 2 Martin Renvoize 2019-12-17 13:23:21 UTC
Created attachment 96371 [details] [review]
Bug 24252: Add relations to Koha::Account::Line

This patch adds two new relationships to the Koha::Account::Line object.

* credit_offsets - returns all credit type Koha::Account::Offsets
  related to this Koha::Account::Line.
* debit_offsets - returns all debit type Koha::Account::Offsets related
  to this Koha::Account::Line.
* credits - returns all credits related to this Koha::Account::Line.
* debits - returns all debits related to this Koha::Account::Line.
Comment 3 Kyle M Hall 2019-12-20 11:56:54 UTC
Created attachment 96518 [details] [review]
Bug 24252: Add relations to Koha::Account::Line

This patch adds two new relationships to the Koha::Account::Line object.

* credit_offsets - returns all credit type Koha::Account::Offsets
  related to this Koha::Account::Line.
* debit_offsets - returns all debit type Koha::Account::Offsets related
  to this Koha::Account::Line.
* credits - returns all credits related to this Koha::Account::Line.
* debits - returns all debits related to this Koha::Account::Line.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Tomás Cohen Arazi 2020-01-08 14:08:40 UTC
Created attachment 96995 [details] [review]
Bug 24252: Add relations to Koha::Account::Line

This patch adds two new relationships to the Koha::Account::Line object.

* credit_offsets - returns all credit type Koha::Account::Offsets
  related to this Koha::Account::Line.
* debit_offsets - returns all debit type Koha::Account::Offsets related
  to this Koha::Account::Line.
* credits - returns all credits related to this Koha::Account::Line.
* debits - returns all debits related to this Koha::Account::Line.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Martin Renvoize 2020-01-08 14:48:52 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 6 Joy Nelson 2020-01-18 16:20:16 UTC
Enhancement not backported to 19.11.x
Comment 7 Martin Renvoize 2020-09-24 09:11:35 UTC
Created attachment 110639 [details] [review]
Bug 24252: [19.11] Add relations to Koha::Account::Line

This patch adds two new relationships to the Koha::Account::Line object.

* credit_offsets - returns all credit type Koha::Account::Offsets
  related to this Koha::Account::Line.
* debit_offsets - returns all debit type Koha::Account::Offsets related
  to this Koha::Account::Line.
* credits - returns all credits related to this Koha::Account::Line.
* debits - returns all debits related to this Koha::Account::Line.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>