Bug 39845 - Add Koha::Acquisition::Orders->unreceived_totals
Summary: Add Koha::Acquisition::Orders->unreceived_totals
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-06 18:45 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2025-05-08 22:00 UTC (History)
1 user (show)

See Also:
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 (2.26 KB, patch)
2025-05-06 18:52 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39845: Add Koha::Acquisition::Orders->unreceived_totals (1.89 KB, patch)
2025-05-06 18:52 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39845: Unit tests (2.30 KB, patch)
2025-05-08 22:00 UTC, David Nind
Details | Diff | Splinter Review
Bug 39845: Add Koha::Acquisition::Orders->unreceived_totals (1.93 KB, patch)
2025-05-08 22:00 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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>