From 065b9e8ab189074923be05ad4e5d0189b5770320 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..31d6a0151e 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