Bug 39845

Summary: Add Koha::Acquisition::Orders->unreceived_totals
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 39845: Unit tests
Bug 39845: Add Koha::Acquisition::Orders->unreceived_totals
Bug 39845: Unit tests
Bug 39845: Add Koha::Acquisition::Orders->unreceived_totals

Description Tomás Cohen Arazi (tcohen) 2025-05-06 18:45:16 UTC
I wrote this method while working on bug 32266. I'm not sure if I'm gonna use it. Leaving here in case it is useful in the future.
Comment 1 Tomás Cohen Arazi (tcohen) 2025-05-06 18:52:19 UTC
Created attachment 181992 [details] [review]
Bug 39845: Unit tests
Comment 2 Tomás Cohen Arazi (tcohen) 2025-05-06 18:52:22 UTC
Created attachment 181993 [details] [review]
Bug 39845: Add Koha::Acquisition::Orders->unreceived_totals

This patch introduces a method for returning the following calculated values
for a `Koha::Acquisition::Orders` resultset:

* items_count
* total_replacement_price

To test:
1. Apply this patches
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Acquisition/Orders.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Comment 3 David Nind 2025-05-08 22:00:53 UTC
Created attachment 182127 [details] [review]
Bug 39845: Unit tests

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2025-05-08 22:00:56 UTC
Created attachment 182128 [details] [review]
Bug 39845: Add Koha::Acquisition::Orders->unreceived_totals

This patch introduces a method for returning the following calculated values
for a `Koha::Acquisition::Orders` resultset:

* items_count
* total_replacement_price

To test:
1. Apply this patches
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Acquisition/Orders.t
=> SUCCESS: Tests pass!
3. Sign off :-D

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