[Koha-bugs] [Bug 24603] Allow to cancel charges in patron accounting

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Nov 5 10:32:44 CET 2020


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

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

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

--- Comment #28 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 113048
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113048&action=edit
Bug 24603: Allow to cancel charges in patron accounting

There is already a button to void a payment. It should be possible to
cancel a charge too.

This patch adds a button in patron's accounting section (Transactions
tab) that allow to cancel charges.
Charges that have been fully or partially paid cannot be cancelled.

It also fixes Koha::Account::Line::is_credit by looking at
credit_type_code instead of amount (amount can be 0 for voided payments)

It also fixes the tests for Koha::Account::Line::void when database does
not contain the borrowernumber 51 (the default in
t::lib::Mocks::mock_userenv)

Test plan:
1. Go to a patron's accounting section
2. Create a manual invoice
3. In Transactions tab, you should see a 'Cancel charge' button. Click
   on it. It should now be marked as cancelled
4. Create another manual invoice
5. Pay it (partially or fully)
6. Notice that the 'Cancel charge' button is not available
7. Void the payment
8. 'Cancel charge' button is available again. Click on it and verify
   that it still works
9. prove t/db_dependent/Koha/Account/Lines.t

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

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

Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>

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

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


More information about the Koha-bugs mailing list