Koha-clms/reserve
Martin Renvoize fd7cab9c41
Bug 3492: (follow-up) Replace GetReserveFee with holds_fee method
GetReserveFee was removed as part of the migration to circulation
rules-based hold fees, but reserve/request.pl still imported and
used it, causing compilation errors.

This patch replaces the two usages of GetReserveFee with the modern
approach using Koha::Item->holds_fee($patron), matching the
implementation in opac-reserve.pl.

The fee is calculated by iterating through available items and using
the first non-zero fee found, which provides backward compatibility
with the legacy reserve_charge template variable.

This implementation uses ReservesControlBranch to determine which
branch's circulation rules apply (either item home library or patron
home library), consistent with the existing Koha policy framework.

Test plan:
1. Apply patch
2. Verify reserve/request.pl compiles: perl -wc reserve/request.pl
3. Navigate to staff interface holds page with patron and biblio
4. Verify hold fee is displayed correctly if configured in
   circulation rules
5. Place a hold and verify fee is charged correctly

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 08:51:09 -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 3492: (follow-up) Replace GetReserveFee with holds_fee method 2026-02-10 08:51:09 -07:00