]> git.koha-community.org Git - koha.git/commit
Bug 28138: Add syspref to make the payment type required
authorJulian Maurice <julian.maurice@biblibre.com>
Tue, 13 Apr 2021 08:06:24 +0000 (10:06 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 5 May 2022 00:29:23 +0000 (14:29 -1000)
commita7139af17a35e7051504f055a4a324438da723ef
tree1fb76e8e6e39ea02ac1e82e206d84380b8e2aba5
parentbbcc781ba456a342af72a58bc12dbeda0a46a23c
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>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
installer/data/mysql/atomicupdate/add-system-preference-RequirePaymentType.perl [new file with mode: 0644]
installer/data/mysql/mandatory/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/includes/transaction_types.inc
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/accounting.pref