Bug 33176: Handle RequirePaymentType
authorLucas Gass <lucas@bywatersolutions.com>
Thu, 13 Apr 2023 17:28:24 +0000 (17:28 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 17 Jul 2023 07:15:09 +0000 (08:15 +0100)
commit98347e1612949cffa11e750f2dfb76d7e33b8eaa
tree573869bd3c63d66995e68fd046a787e21c1d9524
parentea1ed9e2333fd256804d5ed356ba8e612c462e7c
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>
(cherry picked from commit b15a15df9e2f579f984c804bdea4d2951ec75891)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Account.pm
Koha/Exceptions/Account.pm
t/db_dependent/Koha/Account.t