[Koha-bugs] [Bug 15165] REST API routes to list, edit and pay borrower's accountlines
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Jan 19 14:15:00 CET 2017
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15165
Josef Moravec <josef.moravec at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #57845|0 |1
is obsolete| |
--- Comment #40 from Josef Moravec <josef.moravec at gmail.com> ---
Created attachment 59241
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59241&action=edit
Bug 15165 - Add API routes to pay accountlines
POST /accountlines/(:accountlines_id)/payment (pay towards accountline)
POST /patrons/(:borrowernumber)/payment (pay towards borrower)
Test plan:
1. Open a browser tab on Koha staff and log in (to create CGISESSID
cookie). You must have permission updatecharges.
2. Create a fine to any patron and get the accountlines_id.
3. Send POST request to http://yourlibrary/api/v1/accountlines/YYY/payment
without body where YYY is the accountlines_id you created in step 2.
4. Check that the accountline that you created in step 2 is paid.
5. Create two payments with amount 5.00 (with no other outstanding payments)
6. Send POST request to
http://yourlibrary/api/v1/patrons/ZZZ/payment with body
{"amount": 10}
Replace ZZZ with the borrowernumber for which you have created two
fines
7. Check that the two accountlines are paid.
8. Repeat step 2.
9. Send POST request to
http://yourlibrary/api/v1/accountlines/YYY/payment with body
{"amount": XXX}
Replace YYY with the accountlines_id you created in step 8.
Set amount (XXX) to the half of the amount of the fine you created in
step 8.
10. Check that the fine is still outstanding with half of the original
amount.
11. Run unit tests at t/db_dependent/api/v1/accountlines.t and
t/db_dependent/api/v1/patrons.t
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list