https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43910
Bug ID: 43910
Summary: Cash payout throws a 500 error when no cash register
is selected
Initiative type: ---
Sponsorship ---
status:
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Fines and fees
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Target Milestone: ---
With UseCashRegisters enabled, choosing Cash in the "Issue payout" modal on a
patron's Accounting tab and leaving the Cash register select on its placeholder
submits the form with no register. The controller (members/boraccount.pl) then
throws Koha::Exceptions::Account::RegisterRequired, which is not caught, and
the staff member gets a 500 error page.
The refund modal on the same page already blocks this client-side (Bug 41585).
The payout modal has no equivalent check.
This patch adds the same client-side check to the payout form: when the payout
type is CASH or SIP00 and no register is selected, alert the user and keep the
modal open.
Test plan:
1. Enable UseCashRegisters and create at least two cash registers for your
library, so that none is selected automatically. Log out and in again, and do
not choose a register at login.
2. Give a patron a credit (for example a manual credit of 10.00).
3. On the patron's Accounting tab, click "Issue payout" on the credit.
4. Choose Cash as the payout type, leave Cash register unselected and click
Confirm.
=> Without the patch: a 500 error page
(Koha::Exceptions::Account::RegisterRequired).
=> With the patch: an alert "Cash register is required for cash payouts" and
the form is not submitted.
5. Select a register and click Confirm.
=> The payout is recorded against that register.
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
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/