Bug 30563: Add syspref to make the "cash register" field mandatory
authorJulian Maurice <julian.maurice@biblibre.com>
Fri, 15 Apr 2022 08:01:00 +0000 (10:01 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 6 May 2022 20:33:09 +0000 (10:33 -1000)
commitd8163c0fc5f2ad3045e49ec6f4289296ce5aec8a
tree476c2da36af7ec8782e271c4d27868aae945da6b
parent5d50e736528c11a35a9270e8946f8a7442483198
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>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
installer/data/mysql/atomicupdate/add-syspref-RequireCashRegister.pl [new file with mode: 0644]
installer/data/mysql/mandatory/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/accounting.pref
koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt