https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923

Andrew Fuerste-Henry <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #194555|0                           |1
        is obsolete|                            |

--- Comment #8 from Andrew Fuerste-Henry <[email protected]> ---
Created attachment 194556
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194556&action=edit
Bug 29923: Prevent overpayment credit when written-off accruing fine is
adjusted on check-in

When a staff member writes off an accruing fine and the item is
subsequently checked in (backdated or in fine-free mode), the fine
amount is recalculated downward via adjust(). The previous code
unconditionally created an OVERPAYMENT credit whenever the adjusted
outstanding went negative, regardless of whether the existing credits
were reversible payments or non-reversible writeoffs/discounts.

This caused patrons to receive an erroneous credit equal to the
written-off amount, since writeoffs should simply be absorbed when
the underlying fine shrinks - no refund is due.

The fix calculates the total non-reversible credits (writeoffs,
discounts, cancellations) applied to the debit using the existing
filter_by_non_reversible method, and only generates an OVERPAYMENT
credit for the portion attributable to reversible cash payments that
exceed the recalculated fine amount.

Test plan:
1. Write off an accruing fine in full
2. Check the item in (backdated or fine-free)
3. Confirm no overpayment credit is generated for the patron

Signed-off-by: Benjamin Daeuber <[email protected]>
Signed-off-by: Andrew Fuerste Henry <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to