Bug 30612

Summary: Add account_lines method to Koha::[Old::]Checkout
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: Architecture, internals, and plumbingAssignee: Kyle M Hall (khall) <kyle>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: caroline.cyr-la-rose, cbrannon, jonathan.druart, lucas, m.de.rooy, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Circulation function:
Attachments: Bug 30612: Add accountlines method to Koha::Checkout and Koha::Old::Checkout
Bug 30612: Add accountlines method to Koha::Checkout and Koha::Old::Checkout
Bug 30612: Add accountlines method to Koha::Checkout and Koha::Old::Checkout
Bug 30612: Update schema files [DO NOT PUSH]
Bug 30612: Update schema files
Bug 30612: (QA follow-up) Rename accountlines method to account_lines
Bug 30612: Add accountlines method to Koha::Checkout and Koha::Old::Checkout
Bug 30612: Update schema files
Bug 30612: (QA follow-up) Rename accountlines method to account_lines
Bug 30612: Rename other occurrences

Description Kyle M Hall (khall) 2022-04-25 17:39:09 UTC
It would be very useful to have an accountlines method on checkouts objects. In particular it would make fees related to a checkout available from the checkout objects in overdue notices.
Comment 1 Kyle M Hall (khall) 2022-04-25 17:40:28 UTC
Created attachment 133841 [details] [review]
Bug 30612: Add accountlines method to Koha::Checkout and Koha::Old::Checkout

It would be very useful to have an accountlines method on checkouts objects. In particular it would make fees related to a checkout available from the checkout objects in overdue notices.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Account/Line.t
3) prove t/db_dependent/Koha/Checkouts.t
Comment 2 David Nind 2022-05-04 03:31:25 UTC
Created attachment 134567 [details] [review]
Bug 30612: Add accountlines method to Koha::Checkout and Koha::Old::Checkout

It would be very useful to have an accountlines method on checkouts objects. In particular it would make fees related to a checkout available from the checkout objects in overdue notices.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Account/Line.t
3) prove t/db_dependent/Koha/Checkouts.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Marcel de Rooy 2022-05-20 07:00:12 UTC
Dont mix Koha/Schema/Result files with regular ones.
Comment 4 Kyle M Hall (khall) 2022-06-08 17:43:23 UTC
Created attachment 135827 [details] [review]
Bug 30612: Add accountlines method to Koha::Checkout and Koha::Old::Checkout

It would be very useful to have an accountlines method on checkouts objects. In particular it would make fees related to a checkout available from the checkout objects in overdue notices.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Account/Line.t
3) prove t/db_dependent/Koha/Checkouts.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Kyle M Hall (khall) 2022-06-08 17:43:34 UTC
Created attachment 135828 [details] [review]
Bug 30612: Update schema files [DO NOT PUSH]
Comment 6 Kyle M Hall (khall) 2022-06-08 17:44:43 UTC
Created attachment 135829 [details] [review]
Bug 30612: Update schema files
Comment 7 Kyle M Hall (khall) 2022-06-08 17:45:17 UTC
Removed the "DO NOT PUSH", as these changes *do* need pushed!
Comment 8 Jonathan Druart 2022-08-01 10:10:24 UTC
Shouldn't be named account_lines instead of accountlines?
Comment 9 Kyle M Hall (khall) 2022-08-01 12:34:31 UTC
Created attachment 138461 [details] [review]
Bug 30612: (QA follow-up) Rename accountlines method to account_lines
Comment 10 Jonathan Druart 2022-08-01 12:45:39 UTC
Created attachment 138462 [details] [review]
Bug 30612: Add accountlines method to Koha::Checkout and Koha::Old::Checkout

It would be very useful to have an accountlines method on checkouts objects. In particular it would make fees related to a checkout available from the checkout objects in overdue notices.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Account/Line.t
3) prove t/db_dependent/Koha/Checkouts.t

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Jonathan Druart 2022-08-01 12:45:43 UTC
Created attachment 138463 [details] [review]
Bug 30612: Update schema files

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Jonathan Druart 2022-08-01 12:45:47 UTC
Created attachment 138464 [details] [review]
Bug 30612: (QA follow-up) Rename accountlines method to account_lines

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 13 Jonathan Druart 2022-08-01 12:45:51 UTC
Created attachment 138465 [details] [review]
Bug 30612: Rename other occurrences

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 14 Tomás Cohen Arazi (tcohen) 2022-08-01 13:03:00 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 15 Tomás Cohen Arazi (tcohen) 2022-08-01 15:09:06 UTC
Just a note, it might be more handy to have ->debits and ->credits. But I will let devs decide later how they're gonna use this! Code will tell.
Comment 16 Lucas Gass (lukeg) 2022-09-29 15:53:30 UTC
Enhancement will not be backported to 22.05.x series
Comment 17 Caroline Cyr La Rose 2023-05-05 18:37:04 UTC
Not sure what needs to be documented here. Closing, but feel free to reopen with details if needed.