The payment type is already required when using the cash register feature, but some users want to force selecting a payment type even when cash registers are not used
Created attachment 119507 [details] [review] Bug 28138: Add syspref to make the payment type required The payment type is already required when using the cash register feature, but some users want to force selecting a payment type even when cash registers are not used The new system preference name is RequirePaymentType Test plan: 1. Apply patch and run updatedatabase.pl 2. Disable UseCashRegisters and RequirePaymentType sysprefs 3. Create some authorised values in PAYMENT_TYPE category if needed 4. Create a manual invoice and pay it. Notice that the payment type is optional. 5. Enable RequirePaymentType 6. Create a manual invoice and pay it. Notice that the payment type is now required. 7. Enable UseCashRegisters and verify that the payment type is always required, even if RequirePaymentType is disabled
Created attachment 119509 [details] [review] Bug 28138: Add syspref to make the payment type required The payment type is already required when using the cash register feature, but some users want to force selecting a payment type even when cash registers are not used The new system preference name is RequirePaymentType Test plan: 1. Apply patch and run updatedatabase.pl 2. Disable UseCashRegisters and RequirePaymentType sysprefs 3. Create some authorised values in PAYMENT_TYPE category if needed 4. Create a manual invoice and pay it. Notice that the payment type is optional. 5. Enable RequirePaymentType 6. Create a manual invoice and pay it. Notice that the payment type is now required. 7. Enable UseCashRegisters and verify that the payment type is always required, even if RequirePaymentType is disabled
Needs rebase since Bug 27796 deleted payments.inc
After trying to rebase the patch by deleting payment.inc, I did not see any changes according to the test plan. Maybe a change has been applied to master and this patch has become useless? Or is this a mistake on my part?
Created attachment 128166 [details] [review] Bug 28138: Add syspref to make the payment type required The payment type is already required when using the cash register feature, but some users want to force selecting a payment type even when cash registers are not used The new system preference name is RequirePaymentType Test plan: 1. Apply patch and run updatedatabase.pl 2. Disable UseCashRegisters and RequirePaymentType sysprefs 3. Create some authorised values in PAYMENT_TYPE category if needed 4. Create a manual invoice and pay it. Notice that the payment type is optional. 5. Enable RequirePaymentType 6. Create a manual invoice and pay it. Notice that the payment type is now required. 7. Enable UseCashRegisters and verify that the payment type is always required, even if RequirePaymentType is disabled Rebased by Thibaud Guillot <thibaud.guillot@biblibre.com> on 21-12-02
Created attachment 131530 [details] [review] Bug 28138: Add syspref to make the payment type required The payment type is already required when using the cash register feature, but some users want to force selecting a payment type even when cash registers are not used The new system preference name is RequirePaymentType Test plan: 1. Apply patch and run updatedatabase.pl 2. Disable UseCashRegisters and RequirePaymentType sysprefs 3. Create some authorised values in PAYMENT_TYPE category if needed 4. Create a manual invoice and pay it. Notice that the payment type is optional. 5. Enable RequirePaymentType 6. Create a manual invoice and pay it. Notice that the payment type is now required. 7. Enable UseCashRegisters and verify that the payment type is always required, even if RequirePaymentType is disabled Rebased by Thibaud Guillot <thibaud.guillot@biblibre.com> on 21-12-02 Signed-off-by: shiyao <shiyao@inlibro.com>
> installer/data/mysql/atomicupdate/add-system-preference-RequirePaymentType.perl This needs to be in new format of DBrev https://wiki.koha-community.org/wiki/Database_updates#How_to_write_an_atomicupdate_file
Created attachment 131643 [details] [review] Bug 28138: (follow-up) New atomic update
When RequirePaymentType is enabled the dropdown for 'Payment type' defaults to the first choice in the list. I know this has been a problem in other parts of Koha since the user can submit the form without actually making a choice about payment type. In my opinion, if RequirePaymentType we should also add an empty value as the defualt choice. This actually forces the user to make a selection, instead of just clicking through.
Created attachment 133606 [details] [review] Bug 28138: (follow-up) Add empty option to payment type selection This patch adds an empty <option> to the "Payment type" selection when paying fine. This forces the user to actively make a selection. I've also added the text "None selected" to the other empty <option> on the page for consistency. To test, apply the patch and test the pay fine interface with and without the RequirePaymentType preference enabled. When enabled the payment type should be required and it should default to "None selected."
Created attachment 133609 [details] [review] Bug 28138: Add syspref to make the payment type required The payment type is already required when using the cash register feature, but some users want to force selecting a payment type even when cash registers are not used The new system preference name is RequirePaymentType Test plan: 1. Apply patch and run updatedatabase.pl 2. Disable UseCashRegisters and RequirePaymentType sysprefs 3. Create some authorised values in PAYMENT_TYPE category if needed 4. Create a manual invoice and pay it. Notice that the payment type is optional. 5. Enable RequirePaymentType 6. Create a manual invoice and pay it. Notice that the payment type is now required. 7. Enable UseCashRegisters and verify that the payment type is always required, even if RequirePaymentType is disabled Rebased by Thibaud Guillot <thibaud.guillot@biblibre.com> on 21-12-02 Signed-off-by: shiyao <shiyao@inlibro.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 133610 [details] [review] Bug 28138: (follow-up) New atomic update Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 133611 [details] [review] Bug 28138: (follow-up) Add empty option to payment type selection This patch adds an empty <option> to the "Payment type" selection when paying fine. This forces the user to actively make a selection. I've also added the text "None selected" to the other empty <option> on the page for consistency. To test, apply the patch and test the pay fine interface with and without the RequirePaymentType preference enabled. When enabled the payment type should be required and it should default to "None selected." Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 133814 [details] [review] Bug 28138: Add syspref to make the payment type required The payment type is already required when using the cash register feature, but some users want to force selecting a payment type even when cash registers are not used The new system preference name is RequirePaymentType Test plan: 1. Apply patch and run updatedatabase.pl 2. Disable UseCashRegisters and RequirePaymentType sysprefs 3. Create some authorised values in PAYMENT_TYPE category if needed 4. Create a manual invoice and pay it. Notice that the payment type is optional. 5. Enable RequirePaymentType 6. Create a manual invoice and pay it. Notice that the payment type is now required. 7. Enable UseCashRegisters and verify that the payment type is always required, even if RequirePaymentType is disabled Rebased by Thibaud Guillot <thibaud.guillot@biblibre.com> on 21-12-02 Signed-off-by: shiyao <shiyao@inlibro.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 133815 [details] [review] Bug 28138: (follow-up) New atomic update Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 133816 [details] [review] Bug 28138: (follow-up) Add empty option to payment type selection This patch adds an empty <option> to the "Payment type" selection when paying fine. This forces the user to actively make a selection. I've also added the text "None selected" to the other empty <option> on the page for consistency. To test, apply the patch and test the pay fine interface with and without the RequirePaymentType preference enabled. When enabled the payment type should be required and it should default to "None selected." Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 133817 [details] [review] Bug 28138: (QA follow-up) Slight rephrase of system preference text Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 133821 [details] [review] Bug 28138: (QA follow-up) Link system preference in new system preference description
Nice :)
Pushed to master for 22.05, thanks to everybody involved [U+1F984]