Martin Renvoize
4904abf1c3
The payment type field is also required when using cash registers, this patch updates the formatting to work as expected in that case too. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
29 lines
1.3 KiB
HTML
29 lines
1.3 KiB
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>
|
|
[% IF Koha.Preference('UseCashRegisters') %]
|
|
<label for="payment_type" class="required">Payment type: </label>
|
|
<select name="payment_type" id="payment_type" class="required" required="required">
|
|
[% FOREACH pt IN payment_types %]
|
|
<option value="[% pt.authorised_value | html %]">[% pt.lib | html %]</option>
|
|
[% END %]
|
|
</select>
|
|
<span class="required">Required</span>
|
|
[%- ELSE -%]
|
|
<label for="payment_type">Payment type: </label>
|
|
<select name="payment_type" id="payment_type">
|
|
<option value=""></option>
|
|
[% FOREACH pt IN payment_types %]
|
|
<option value="[% pt.authorised_value | html %]">[% pt.lib | html %]</option>
|
|
[% END %]
|
|
</select>
|
|
[%- END -%]
|
|
</li>
|
|
[% END %]
|
|
[%- END -%]
|