Currently, the cash register field is required only if the CASH payment type is selected. Some users want to make it required no matter which payment type is selected.
Created attachment 133393 [details] [review] Bug 30563: Add syspref to make the "cash register" field mandatory Test plan: 1. Apply patch and run updatedatabase 2. Enable 'UseCashRegisters' syspref and create at least one cash register for your library 3. Verify that you have several authorized values in the 'PAYMENT_TYPE' category. One of them should be 'CASH' 4. Go to a patron accounting tab, create a manual invoice and go to the payment form. Select payment type 'CASH' and verify that you cannot submit the form if no cash register is selected. Select another payment type and verify that you can submit the form even if no cash register is selected 5. Set syspref 'RequireCashRegister' to 'always require a cash register' 6. Repeat step 4 but this time you should not be able to submit the form if no cash register is selected, no matter which payment type is selected.
Created attachment 133698 [details] [review] Bug 30563: Add syspref to make the "cash register" field mandatory Test plan: 1. Apply patch and run updatedatabase 2. Enable 'UseCashRegisters' syspref and create at least one cash register for your library 3. Verify that you have several authorized values in the 'PAYMENT_TYPE' category. One of them should be 'CASH' 4. Go to a patron accounting tab, create a manual invoice and go to the payment form. Select payment type 'CASH' and verify that you cannot submit the form if no cash register is selected. Select another payment type and verify that you can submit the form even if no cash register is selected 5. Set syspref 'RequireCashRegister' to 'always require a cash register' 6. Repeat step 4 but this time you should not be able to submit the form if no cash register is selected, no matter which payment type is selected. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 133878 [details] [review] Bug 30563: Add syspref to make the "cash register" field mandatory Test plan: 1. Apply patch and run updatedatabase 2. Enable 'UseCashRegisters' syspref and create at least one cash register for your library 3. Verify that you have several authorized values in the 'PAYMENT_TYPE' category. One of them should be 'CASH' 4. Go to a patron accounting tab, create a manual invoice and go to the payment form. Select payment type 'CASH' and verify that you cannot submit the form if no cash register is selected. Select another payment type and verify that you can submit the form even if no cash register is selected 5. Set syspref 'RequireCashRegister' to 'always require a cash register' 6. Repeat step 4 but this time you should not be able to submit the form if no cash register is selected, no matter which payment type is selected. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 133879 [details] [review] Bug 30563: (QA follow-up) Fix permission on atomicupdate file Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 133880 [details] [review] Bug 30563: (QA follow-up) Fix system preference values and add link to description Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
BTW we should rewrite koha-tmpl/intranet-tmpl/prog/en/includes/transaction_types.inc to use the same IF/ELSE syntax. There is a lot of copy/paste in actual code.
Pushed to master for 22.05, thanks to everybody involved [U+1F984]