From a2bcde7c570d15e45877bcc45730a61867cad663 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 15 Oct 2020 13:41:16 +0100 Subject: [PATCH] Bug 24786: (QA follow-up) Add validation to paycollect This patch adds conditional validation to the cash register field on paycollect such that if 'CASH' is selected as the payment type and cash registers are enabled, then a cash register will be required. --- .../intranet-tmpl/prog/en/modules/members/paycollect.tt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt index 5738db9277..3cd3b93afb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -381,7 +381,14 @@ paid: { required: true }, collected: { required: true + }, + [% IF Koha.Preference('UseCashRegisters') %] + cash_register: { + required: function() { + return $('#payment_type').val() == 'CASH' + } } + [% END %] } }); }); -- 2.20.1