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:
parent
085e5739db
commit
d5e3f431e7
1 changed files with 7 additions and 0 deletions
|
@ -381,7 +381,14 @@
|
|||
paid: { required: true },
|
||||
collected: {
|
||||
required: true
|
||||
},
|
||||
[% IF Koha.Preference('UseCashRegisters') %]
|
||||
cash_register: {
|
||||
required: function() {
|
||||
return $('#payment_type').val() == 'CASH'
|
||||
}
|
||||
}
|
||||
[% END %]
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue