Bug 33176: Handle RequirePaymentType
authorLucas Gass <lucas@bywatersolutions.com>
Thu, 13 Apr 2023 17:28:24 +0000 (17:28 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 12 Jun 2023 14:52:06 +0000 (11:52 -0300)
commitb15a15df9e2f579f984c804bdea4d2951ec75891
tree79d656755753a62fa5396abecf47cd9273d76553
parentcd5212ac2fef6fd0b9a435ebe9258ca1b13de014
Bug 33176: Handle RequirePaymentType

Test plan:

1. Turn on RequirePaymentType
2. Create a manual invocie on a patron account
3. Go to pay it, 'Payment type:' is marked as required.
4. In the inscept the select input ( #payment_type ) with your browser's dev tools. Removed the required attribute.
5. You are able to make the payment without a payment type.
6. Apply patch and restart_all
7. Try 4-5 again. This time you should get a 500 error and the payment should not go through.
8. Turn RequirePaymentType off. Try a payment with a payment type, you shoud be successful.
9. Make sure tests will pass:

prove -v t/db_dependent/Koha/Account.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Account.pm
Koha/Exceptions/Account.pm
t/db_dependent/Koha/Account.t