[Koha-bugs] [Bug 29759] Revert credit when cancelling an article request

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Dec 22 22:21:08 CET 2021


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

--- Comment #2 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 128875
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128875&action=edit
Bug 29759: Make cancelling an AR refund

This patch makes the Koha::ArticleRequest->cancel method perform a
refund if it applies.

The sequence is:
- Find refundable (potentially partial) payments against the fee
- Generate a refund for the refundable amount
- Reduce the fee to zero
=> RESULT: the patron owes nothing, any credits applied to the debit are
refunded.

1. Apply the unit tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/ArticleRequest.t
=> FAIL: Nothing is refunded
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! Refunds take place!
5. Try on the UI
=> SUCCESS: All good
6. Sign off :-D

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list