267e5b30ed9b6be848266ea4cdac9b64b5d74bb3
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / transaction_types.inc
1 [% USE AuthorisedValues %]
2 [% SET payment_types = [] %]
3 [% FOR pt IN AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %]
4     [% NEXT IF pt.authorised_value.grep("^SIP[[:digit:]]{2}$").size() %]
5     [% payment_types.push(pt) %]
6 [% END %]
7 [% IF payment_types.size > 0 %]
8     <li>
9         [% IF Koha.Preference('UseCashRegisters') %]
10             <label for="[% type | html %]_type" class="required">[% IF type == 'payment' %]Payment[% ELSE %]Transaction[% END %] type: </label>
11             <select name="[% type | html %]_type" id="[% type | html %]_type" class="required" required="required">
12                 [% IF type == 'refund' %]
13                 <option value="AC">Account credit</option>
14                 [% END %]
15                 [% FOREACH pt IN payment_types %]
16                     <option value="[% pt.authorised_value | html %]">[% pt.lib | html %]</option>
17                 [% END %]
18             </select>
19             <span class="required">Required</span>
20         [%- ELSE -%]
21             <label for="[% type | html %]_type">[% IF type == 'payment' %]Payment[% ELSE %]Transaction[% END %] type: </label>
22             <select name="[% type | html %]_type" id="[% type | html %]_type">
23                 <option value=""></option>
24                 [% IF type == 'refund' %]
25                 <option value="AC">Account credit</option>
26                 [% END %]
27                 [% FOREACH pt IN payment_types %]
28                     <option value="[% pt.authorised_value | html %]">[% pt.lib | html %]</option>
29                 [% END %]
30             </select>
31         [%- END -%]
32     </li>
33 [% END %]