https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645
--- Comment #42 from Andrew Fuerste-Henry <[email protected]> --- Created attachment 205776 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205776&action=edit Bug 37645: Add batch writeoff filters and staff tool navigation Test plan: 1. Apply the patches and run the database update. 2. Grant a staff user: - tools > batch_writeoff - updatecharges > writeoff 3. Confirm “Batch writeoff” appears under Tools. 4. Create test data for at least two patrons. If possible, use patrons in different patron categories and create charges at different libraries. Create the following charges: Patron A: - A manual fee (for example, New card fee), with an outstanding balance. - A LOST charge, with an outstanding balance. - A returned OVERDUE fine, with an outstanding balance. Patron B: - A manual fee with an outstanding balance, using a different patron category and/or branch from Patron A. Also create an accruing OVERDUE fine: - Check an item out to a test patron. - Make the item overdue and generate an overdue fine. - Leave the item checked out so that the account line has: debit_type_code = OVERDUE status = UNRETURNED - Do not return the item before testing the batch writeoff. If practical, also leave one fully paid charge on a test patron for comparison. 5. Open Tools > Batch writeoff and confirm filtering is available by: - Created after - Created before - Patron category - Debit type - Branch - Account line ID 6. With no filters selected, click Preview and confirm the tool requires at least one filter. 7. Test the filters individually using the test charges: - Debit type returns only charges of the selected debit type. - Patron category returns only charges belonging to patrons in that category. - Branch returns only charges created for that branch. - Created after excludes older charges. - Created before excludes newer charges. - Account line ID returns the specified eligible charge. 8. Test a combination of filters and confirm only charges matching all selected criteria are returned. 9. Confirm eligible outstanding debts are included in the preview. 10. Confirm the accruing OVERDUE fine with status UNRETURNED is NOT included in the preview. 11. If a fully paid charge was created, confirm it is NOT included in the preview. 12. Select one or more eligible charges and submit the batch writeoff. 13. Confirm a background job is created. 14. Confirm the background job finishes successfully and reports the account lines that were written off. 15. Confirm each original debit that was written off has: - amountoutstanding = 0 - status = FORGIVEN 16. Confirm a WRITEOFF credit and APPLY offset are created for each successful writeoff. 17. Confirm the accruing OVERDUE fine remains unchanged and outstanding. 18. Confirm duplicate active submissions for the same staff user, branch, and account-line set do not create stacked background jobs. 19. Run a report that returns an accountlines_id column. 20. Confirm Batch operations > Batch writeoff is available in the report results. 21. Send the report results to Batch writeoff and confirm the visible account line IDs are loaded into the tool and eligible lines can be previewed and submitted. 22. Confirm misc/cronjobs/writeoff_debts.pl continues to work using the shared writeoff routines. Automated tests: prove -v t/db_dependent/Koha/Account/Line.t prove -v t/db_dependent/Koha/Account/Lines.t prove -v t/db_dependent/Koha/BackgroundJob/BatchWriteoff.t All tests pass. Signed-off-by: Marisha Sullivan <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
