From d5e3f431e77be4d80405aedd2ca36c23a4e4c413 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. Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../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.39.5