Koha-clms/reserve
Martin Renvoize b322e3e959
Bug 40769: Display hold fees in staff client when placing holds
This patch adds hold fee information display in the staff client's hold
request interface, bringing it to feature parity with the OPAC.

The OPAC already shows patrons the fee that will be charged for placing
a hold, but the staff client did not display this information when staff
place holds on behalf of patrons. This creates a transparency gap where
staff cannot inform patrons about potential charges.

Changes:
- Import GetReserveFee function in reserve/request.pl
- Calculate reserve charges for each biblio record
- Display fee information in both single and multi-hold interfaces
- Show appropriate messaging based on HoldFeeMode system preference
- Use consistent formatting with currency display

Test Plan:
1. Set up hold fees:
   - Go to Administration > Patron categories
   - Edit a patron category and set a "Hold fee" (e.g., 1.00)
   - Ensure HoldFeeMode system preference is set (default: "only if all
     items are checked out and the record has at least one")

2. Test single hold with fee display:
   - Go to a bibliographic record
   - Click "Place hold"
   - Find a patron from the category with hold fees configured
   - Verify fee information displays after the title:
     * Shows "Note: [Patron Name] will be charged a hold fee of $1.00
       for placing this hold" when the HoldFeeMode is set to "any time
       a hold is placed"
     * Or "...when they collect this item" if HoldFeeMode is set to "any
       time a hold is collected"

3. Test multi-hold with fee display:
   - Ensure 'DisplayMultiPlaceHold' preference is set to 'Enable'
   - Search the catalog
   - On the search results page, select multiple biblios and click
     'Place hold'
   - Search for the same patron
   - In the confirmation table, verify each record shows:
     * "Hold fee: $1.00 (charged when placed)" in the Information column
     * Or "(charged when collected)" based on HoldFeeMode

4. Test no fee display:
   - Repeat tests with a patron from a category with no hold fee
   - Verify no fee information is displayed

5. Test different HoldFeeMode settings:
   - Change HoldFeeMode system preference to 'any_time_is_collected'
   - Verify messaging changes to "when they collect this item"
   - Test with 'not_always' mode and verify fee only shows when appropriate

6. Verify existing functionality:
   - Ensure hold placement still works normally
   - Verify all other hold interface elements remain unchanged
   - Test that holds are properly placed with or without fees

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:08 -07:00
..
hold-group.pl Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
modrequest.pl Bug 41416: Add skip_fix_priority option to ModReserve 2026-01-16 14:07:18 -07:00
modrequest_suspendall.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
placerequest.pl Bug 40517: (QA follow-up): Cleanup obsolete code 2025-10-29 11:50:10 -06:00
request.pl Bug 40769: Display hold fees in staff client when placing holds 2026-01-30 10:54:08 -07:00