Koha/koha-tmpl/intranet-tmpl/prog/en/includes/payments.inc
Martin Renvoize 9de9976cb2
Bug 24525: (QA follow-up) Make payment type required with cash registers
The use of cash registers adds the requirement to enter a payment type,
this patch adds the required status when cash registers are configured.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-10 09:17:22 +00:00

23 lines
915 B
HTML

[% USE AuthorisedValues %]
[%- BLOCK account_payment_types -%]
[% SET payment_types = [] %]
[% FOR pt IN AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %]
[% NEXT IF pt.authorised_value.grep("^SIP[[:digit:]]{2}$").size() %]
[% payment_types.push(pt) %]
[% END %]
[% IF payment_types.size > 0 %]
<li>
<label for="payment_type">Payment type: </label>
[% IF Koha.Preference('UseCashRegisters') %]
<select name="payment_type" id="payment_type" required>
[% ELSE %]
<select name="payment_type" id="payment_type">
<option value=""></option>
[% END %]
[% FOREACH pt IN payment_types %]
<option value="[% pt.authorised_value | html %]">[% pt.lib | html %]</option>
[% END %]
</select>
</li>
[% END %]
[%- END -%]