[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
Wed Jun 22 14:12:33 CEST 2016


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

Lari Taskula <larit at student.uef.fi> changed:

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

--- Comment #14 from Lari Taskula <larit at student.uef.fi> ---
Created attachment 52683
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52683&action=edit
Bug 15165 - Add API routes to pay accountlines

PUT /accountlines/(:accountlines_id)/payment         (pay towards accountline)
PUT /accountlines/(:borrowernumber)/amountpayment    (pay towards borrower)
PUT /accountlines/(:accountlines_id)/partialpayment  (pay accountline
partially)

Test plan:
    1. Open a browser tab on Koha staff and log in (to create CGISESSID
       cookie). You should have permission updatecharges.
    2. Create a fine to any patron and get the accountlines_id.
    3. Send PUT 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 PUT request to
       http://yourlibrary/api/v1/accountlines/ZZZ/amountpayment with body
       defined in definitions/partialpayAccountlineBody.json. Replace ZZZ with
       the borrowernumber that you created two fines to. Set amount to 10.
    7. Check that the two accountlines are paid.
    8. Repeat step 2.
    9. Send PUT request to
       http://yourlibrary/api/v1/accountlines/YYY/partialpayment with body
       defined in definitions/partialpayAccountlineBody.json. Replace YYY with
       the accountlines_id you created in step 8. Set amount to half of the
       amount of 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

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


More information about the Koha-bugs mailing list