View | Details | Raw Unified | Return to bug 24490
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt (-11 / +12 lines)
Lines 123-139 Link Here
123
        <label>Change to give: </label>
123
        <label>Change to give: </label>
124
        <span id="change">0.00</span>
124
        <span id="change">0.00</span>
125
    </li>
125
    </li>
126
    [% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %]
126
    [% SET payment_types = [] %]
127
    [% SET excluded = ['SIP00', 'SIP01', 'SIP02'] %]
127
    [% FOR pt IN AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %]
128
    [% IF payment_types.size > 3 %]
128
        [% NEXT IF pt.authorised_value.grep("^SIP[[:digit:]]{2}$").size() %]
129
        [% payment_types.push(pt) %]
130
    [% END %]
131
    [% IF payment_types.size > 0 %]
129
        <li>
132
        <li>
130
            <label for="payment_type">Payment type: </label>
133
            <label for="payment_type">Payment type: </label>
131
            <select name="payment_type" id="payment_type">
134
            <select name="payment_type" id="payment_type">
132
                <option value=""></option>
135
                <option value=""></option>
133
                [% FOREACH pt IN payment_types %]
136
                [% FOREACH pt IN payment_types %]
134
                    [% UNLESS excluded.grep("^$pt.authorised_value\$").size %]
135
                    <option value="[% pt.authorised_value | html %]">[% pt.lib | html %]</option>
137
                    <option value="[% pt.authorised_value | html %]">[% pt.lib | html %]</option>
136
                    [% END %]
137
                [% END %]
138
                [% END %]
138
            </select>
139
            </select>
139
        </li>
140
        </li>
Lines 256-272 Link Here
256
            <label>Change to give: </label>
257
            <label>Change to give: </label>
257
            <span id="change">0.00</span>
258
            <span id="change">0.00</span>
258
        </li>
259
        </li>
259
    [% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %]
260
    [% SET payment_types = [] %]
260
    [% SET excluded = ['SIP00', 'SIP01', 'SIP02'] %]
261
    [% FOR pt IN AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %]
261
    [% IF payment_types.size > 3 %]
262
        [% NEXT IF pt.authorised_value.grep("^SIP[[:digit:]]{2}$").size() %]
263
        [% payment_types.push(pt) %]
264
    [% END %]
265
    [% IF payment_types.size > 0 %]
262
        <li>
266
        <li>
263
            <label for="payment_type">Payment type: </label>
267
            <label for="payment_type">Payment type: </label>
264
            <select name="payment_type" id="payment_type">
268
            <select name="payment_type" id="payment_type">
265
                <option value=""></option>
269
                <option value=""></option>
266
                [% FOREACH pt IN payment_types %]
270
                [% FOREACH pt IN payment_types %]
267
                    [% UNLESS excluded.grep("^$pt.authorised_value\$").size %]
268
                    <option value="[% pt.authorised_value | html %]">[% pt.lib | html %]</option>
271
                    <option value="[% pt.authorised_value | html %]">[% pt.lib | html %]</option>
269
                    [% END %]
270
                [% END %]
272
                [% END %]
271
            </select>
273
            </select>
272
        </li>
274
        </li>
273
- 

Return to bug 24490