Bug 20262: Add ability to refund lost item fees without creating credits
authorStefan Berndtsson <stefan.berndtsson@ub.gu.se>
Thu, 30 Sep 2021 13:11:59 +0000 (15:11 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 26 Aug 2022 18:55:41 +0000 (15:55 -0300)
commite166f7612f68e3daeeb05e58c73360d5c32d3e82
treef2fe964a4cfe5677c6efd7df288433e15a608473
parentaf00fbd22b59132b74faccc92b99e9cc8939eb9c
Bug 20262: Add ability to refund lost item fees without creating credits

Some libraries handle refunding of paid lost fees at a financial office and not within Koha. To facilitate this, it would be good for Koha to have the option to not generate lost returned credits by skipping fully paid lost items, and only refunding the outstanding balance on partially paid lost fees.

Test Plan:
1) Apply this patch
2) Set your lost item refund on return policies to 'Only if unpaid'
3) Mark an item lost, charging the lost fee
4) Return the item, a full refund should occur
5) Mark another item lost, charging the lost fee
6) Make a partial payment on this lost fee
7) Return the item
8) The remaining balance of that fee should be 0, but the patron should
   not recieve a credit for the already paid balance
8) Mark another item lost, charging the lost fee
9) Fully pay the lost fee
10) Return the item. The paid lost fee should be unaffected.
11) Run tests in t/db_dependent/Circulation.t

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Item.pm
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
t/db_dependent/Circulation.t