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

Julian Maurice <julian.maur...@biblibre.com> changed:

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

--- Comment #23 from Julian Maurice <julian.maur...@biblibre.com> ---
Created attachment 55035
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55035&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.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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