Bug 24252 - Add credits, debits, credit_offsets and debit_offsets relationships to Koha::Account::Line
Summary: Add credits, debits, credit_offsets and debit_offsets relationships to Koha::...
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
Assignee: Martin Renvoize (ashimema)
QA Contact: Tomás Cohen Arazi (tcohen)
URL:
Keywords:
Depends on: 24080
Blocks: 8338 24255
  Show dependency treegraph
 
Reported: 2019-12-17 09:49 UTC by Martin Renvoize (ashimema)
Modified: 2021-06-14 21:28 UTC (History)
3 users (show)

See Also:
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
Circulation function:


Attachments
Bug 24252: Add relations to Koha::Account::Line (2.12 KB, patch)
2019-12-17 11:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 24252: Add relations to Koha::Account::Line (5.50 KB, patch)
2019-12-17 13:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 24252: Add relations to Koha::Account::Line (5.56 KB, patch)
2019-12-20 11:56 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 24252: Add relations to Koha::Account::Line (5.60 KB, patch)
2020-01-08 14:08 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 24252: [19.11] Add relations to Koha::Account::Line (5.61 KB, patch)
2020-09-24 09:11 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 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 (ashimema) 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 (ashimema) 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 (khall) 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 (tcohen) 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 (ashimema) 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 (ashimema) 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>