Browse Source

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>
20.11.x
Martin Renvoize 1 year ago
committed by Jonathan Druart
parent
commit
d5e3f431e7
  1. 7
      koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt

7
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 %]
}
});
});

Loading…
Cancel
Save