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: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on: 24080
Blocks: 8338 24255
  Show dependency treegraph
 
Reported: 2019-12-17 09:49 UTC by Martin Renvoize
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


Attachments
Bug 24252: Add relations to Koha::Account::Line (2.12 KB, patch)
2019-12-17 11:35 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24252: Add relations to Koha::Account::Line (5.50 KB, patch)
2019-12-17 13:23 UTC, Martin Renvoize
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
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
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
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 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>