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 <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Martin Renvoize 2020-10-15 13:41:16 +01:00 committed by Jonathan Druart
parent 085e5739db
commit d5e3f431e7

View file

@ -381,7 +381,14 @@
paid: { required: true },
collected: {
required: true
},
[% IF Koha.Preference('UseCashRegisters') %]
cash_register: {
required: function() {
return $('#payment_type').val() == 'CASH'
}
}
[% END %]
}
});
});