Koha/circ
Aleisha Amohia d4556b786d
Bug 23012: Apply processing fee return policy when lost item found
This enhancement gives the ability to set a policy for the lost item
processing fee that may get charged additional to the lost item
replacement cost. The processing fee can be:
- refunded
- refunded if unpaid
- kept

To test:

Set-up

1. Find an item, Item A. Go to Administration -> Item types and edit the
item type for Item A. Add a default replacement cost and a processing
fee and Save.
2. Go to Administration -> system preferences and set the following:
- WhenLostChargeReplacementFee: Charge
- BlockReturnOfLostItems: Don't block
3. Scroll down to the default lost item fee refund on return policy. Set
the refund lost item replacement fee policy to 'refund lost item charge'.
4. Edit Item A and set a replacement cost.

Reproduce

5. Check out Item A to Patron A.
6. Click the barcode to view Item A's information. Edit Item A and set
the Lost status to 'lost'.
7. Go back to Patron A's checkouts. The item should now be checked in
with two new charges applied - a lost item fee (the item's replacement
cost) and a lost item processing fee (set in item types).
8. Check in Item A to mark it as found.
9. Go back to Patron A's account. Notice the lost item fee has been
refunded, but the processing fee remains.
10. Manually pay or write off the processing fee. This enhancement
removes the need for this manual step.

11. Apply the patch and restart services

Test with lost item - refund

12. Go to Administration -> circulation and fines rules. Scroll down to
the default lost item fee refund on return policy. Notice there is now a
refund lost item processing fee policy. Set this to 'refund lost item
processing charge'.
13. Repeat steps 6 to 9.
14. Go back to Patron A's account. Both the lost item fee and processing
fee should have been refunded.

15. Repeat steps 6 to 8 (do not check it yet).
16. Go back to Patron A's account. Pay the processing fee.
17. Repeat step 9.
18. Go back to Patron A's account. Both the lost item fee and processing
fee should have been refunded (you'll now be in a credit because the
paid processing fee was also refunded).

Test with lost item - refund_unpaid

19. Go to Administration -> circulation and fines rules. Scroll down to
the default lost item fee refund on return policy. Notice there is now a
refund lost item processing fee policy. Set this to 'refund lost item
processing charge (only if unpaid)'.
20. Repeat steps 6 to 9.
21. Go back to Patron A's account. Both the lost item fee and processing
fee should have been refunded.

22. Repeat steps 16 to 19.
23. Go back to Patron A's account. The lost item fee should have been
refunded but not the processing fee, as this was already paid.

Test with lost item - leave

24. Go to Administration -> circulation and fines rules. Scroll down to
the default lost item fee refund on return policy. Notice there is now a
refund lost item processing fee policy. Set this to 'leave lost item
processing charge'.
25. Repeat steps 6 to 9.
26. Go back to Patron A's account. The lost item fee and processing fee
should have been refunded but not the processing fee.

Other tests

27. Confirm tests pass
- t/db_dependent/Koha/Item.t
- t/db_dependent/Koha/CirculationRules.t

Sponsored-by: Auckland University of Technology

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-24 17:43:29 -03:00
..
add_message.pl
article-request-slip.pl Bug 29771: Scalar context for split 2022-03-08 23:03:34 -10:00
article-requests.pl
bookcount.pl
branchoverdues.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
branchtransfers.pl Bug 30409: barcodedecode() should always trim barcode 2022-06-14 07:54:58 -03:00
checkout-notes.pl
circulation-home.pl
circulation.pl Bug 23681: Move to ::Patron::Restriction::Type(s) 2022-08-25 08:50:35 -03:00
curbside_pickups.pl Bug 30965: Add patron autocomplete search to curbside pickups 2022-08-01 09:02:44 -03:00
del_message.pl
hold-transfer-slip.pl
offline-mf.pl
offline.pl
on-site_checkouts.pl
overdue.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
pendingreserves.pl Bug 31105: Holds to pull counts items from other branches when independentbranches is active 2022-09-23 09:44:18 -03:00
renew.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
request-article.pl Bug 30094: Make the patron search from request-article.pl use the REST API 2022-04-04 09:47:00 +02:00
reserveratios.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
returns.pl Bug 23012: Apply processing fee return policy when lost item found 2022-10-24 17:43:29 -03:00
set-library.pl Bug 28167: Remove uninitialized variable warnings from circ/set-library.pl 2022-09-22 08:09:34 -03:00
transfer-slip.pl
transfers_to_send.pl Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
transferstoreceive.pl Bug 24295: Remove GetTransfers from circ/transferstoreceive.pl 2022-08-26 15:42:52 -03:00
view_holdsqueue.pl
waitingreserves.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00