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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt (-21 / +22 lines)
Lines 1-5 Link Here
1
[% USE Asset %]
1
[% USE Asset %]
2
[% USE Koha %]
2
[% USE Koha %]
3
[% USE Price %]
3
[% USE Branches %]
4
[% USE Branches %]
4
[% USE AuthorisedValues %]
5
[% USE AuthorisedValues %]
5
[% USE Price %]
6
[% USE Price %]
Lines 55-67 Link Here
55
<div class="tabs-container">
56
<div class="tabs-container">
56
[% IF (error_negative) %]
57
[% IF (error_negative) %]
57
    <div id="error_message" class="dialog alert">
58
    <div id="error_message" class="dialog alert">
58
        <span>The amount paid can't be negative!</span>
59
        The amount paid can't be negative.
59
    </div>
60
    </div>
60
[% END %]
61
[% END %]
61
62
62
[% IF (error_collected_less) %]
63
[% IF (error_collected_less) %]
63
    <div id="error_message" class="dialog alert">
64
    <div id="error_message" class="dialog alert">
64
        <span>The amount collected can't be lower than the amount paid!</span>
65
        The amount collected can't be lower than the amount paid.
65
    </div>
66
    </div>
66
[% END %]
67
[% END %]
67
68
Lines 102-116 Link Here
102
            <th>Amount outstanding</th>
103
            <th>Amount outstanding</th>
103
        </tr></thead>
104
        </tr></thead>
104
    <tfoot>
105
    <tfoot>
105
        <td colspan="3">Total amount payable:</td><td>[% amountoutstanding | format('%.2f') %]</td>
106
        <td colspan="3">Total amount payable:</td><td>[% amountoutstanding | $Price %]</td>
106
    </tfoot>
107
    </tfoot>
107
    <tbody><tr>
108
    <tbody><tr>
108
            <td>
109
            <td>
109
                [% individual_description %]
110
                [% individual_description %]
110
            </td>
111
            </td>
111
            <td>[% accounttype %]</td>
112
            <td>[% accounttype %]</td>
112
            <td class="debit">[% amount | format('%.2f') %]</td>
113
            <td class="debit">[% amount | $Price %]</td>
113
            <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
114
            <td class="debit">[% amountoutstanding | $Price %]</td>
114
        </tr></tbody>
115
        </tr></tbody>
115
</table>
116
</table>
116
117
Lines 120-144 Link Here
120
        <label for="paid">Amount paid:</label>
121
        <label for="paid">Amount paid:</label>
121
        <input type="hidden" name="paid" id="paid" value="[% amount_paid %]" />
122
        <input type="hidden" name="paid" id="paid" value="[% amount_paid %]" />
122
        <input type="hidden" name="collected" id="collected" value="[% amount_paid %]" />
123
        <input type="hidden" name="collected" id="collected" value="[% amount_paid %]" />
123
        [% amount_paid %]
124
        [% amount_paid | $Price %]
124
    </li>
125
    </li>
125
    <li>
126
    <li>
126
        <label>Collect from patron:</label>
127
        <label>Collect from patron:</label>
127
        [% amount_collected %]
128
        [% amount_collected | $Price %]
128
    </li>
129
    </li>
129
    <li>
130
    <li>
130
        <label>Change to give back:</label>
131
        <label>Change to give back:</label>
131
        [% give_change %]
132
        [% give_change | $Price %]
132
    </li>
133
    </li>
133
    [% ELSE %]
134
    [% ELSE %]
134
    <li>
135
    <li>
135
        <label for="paid">Amount paid :</label>
136
        <label for="paid">Amount paid:</label>
136
        <input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" onchange="moneyFormat(document.payform.paid)"/>
137
        <input name="paid" id="paid" value="[% amountoutstanding %]" onchange="moneyFormat(document.payform.paid)"/>
137
        [% amount_paid %]
138
        [% amount_paid | $Price %]
138
    </li>
139
    </li>
139
    <li>
140
    <li>
140
        <label for="collected">Collect from patron:</label>
141
        <label for="collected">Collect from patron:</label>
141
        <input name="collected" id="collected" value="[% amountoutstanding | format('%.2f') %]" onchange="moneyFormat(document.payform.collected)" />
142
        <input name="collected" id="collected" value="[% amountoutstanding %]" onchange="moneyFormat(document.payform.collected)" />
142
    </li>
143
    </li>
143
    [% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %]
144
    [% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %]
144
    [% IF payment_types %]
145
    [% IF payment_types %]
Lines 182-193 Link Here
182
            <th>Amount</th>
183
            <th>Amount</th>
183
            <th>Amount outstanding</th>
184
            <th>Amount outstanding</th>
184
        </tr></thead>
185
        </tr></thead>
185
    <tfoot><td colspan="3">Total amount outstanding:</td><td>[% amountoutstanding | format('%.2f') %]</td></tfoot>
186
    <tfoot><td colspan="3">Total amount outstanding:</td><td>[% amountoutstanding | $Price %]</td></tfoot>
186
    <tbody><tr>
187
    <tbody><tr>
187
            <td>[% description %] [% title %]</td>
188
            <td>[% description %] [% title %]</td>
188
            <td>[% accounttype %]</td>
189
            <td>[% accounttype %]</td>
189
            <td class="debit">[% amount | format('%.2f') %]</td>
190
            <td class="debit">[% amount | $Price %]</td>
190
            <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
191
            <td class="debit">[% amountoutstanding | $Price %]</td>
191
        </tr></tbody>
192
        </tr></tbody>
192
    </table>
193
    </table>
193
194
Lines 227-253 Link Here
227
    <ol>
228
    <ol>
228
        <li>
229
        <li>
229
            <span class="label">Total amount outstanding: </span>
230
            <span class="label">Total amount outstanding: </span>
230
            <span class="debit">[% total | format('%.2f') %]</span>
231
            <span class="debit">[% total | $Price %]</span>
231
        </li>
232
        </li>
232
    [% IF ( give_change ) %]
233
    [% IF ( give_change ) %]
233
    <li>
234
    <li>
234
        <label for="paid">Amount paid:</label>
235
        <label for="paid">Amount paid:</label>
235
        <input type="hidden" name="paid" id="paid" value="[% amount_paid %]" />
236
        <input type="hidden" name="paid" id="paid" value="[% amount_paid %]" />
236
        [% amount_paid %]
237
        [% amount_paid | $Price %]
237
    </li>
238
    </li>
238
    <li>
239
    <li>
239
        <label>Collected from patron:</label>
240
        <label>Collected from patron:</label>
240
        <input type="hidden" name="collected" id="collected" value="[% amount_paid %]" />
241
        <input type="hidden" name="collected" id="collected" value="[% amount_paid %]" />
241
        [% amount_collected %]
242
        [% amount_collected | $Price %]
242
    </li>
243
    </li>
243
    <li>
244
    <li>
244
        <label>Change to give back:</label>
245
        <label>Change to give back:</label>
245
        [% give_change %]
246
        [% give_change | $Price %]
246
    </li>
247
    </li>
247
    [% ELSE %]
248
    [% ELSE %]
248
    <li>
249
    <li>
249
        <label for="paid">Amount paid :</label>
250
        <label for="paid">Amount paid :</label>
250
        <input name="paid" id="paid" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payform.paid)" />
251
        <input name="paid" id="paid" value="[% total %]" onchange="moneyFormat(document.payform.paid)" />
251
    </li>
252
    </li>
252
    <li>
253
    <li>
253
        [% IF type == 'writeoff' %]
254
        [% IF type == 'writeoff' %]
Lines 256-262 Link Here
256
            <label for="collected">Collect from patron: </label>
257
            <label for="collected">Collect from patron: </label>
257
        [% END %]
258
        [% END %]
258
        <!-- default to paying all -->
259
        <!-- default to paying all -->
259
        <input name="collected" id="collected" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payform.collected)"/>
260
        <input name="collected" id="collected" value="[% total %]" onchange="moneyFormat(document.payform.collected)"/>
260
    </li>
261
    </li>
261
    [% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %]
262
    [% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %]
262
    [% IF payment_types %]
263
    [% IF payment_types %]
(-)a/members/paycollect.pl (-7 / +6 lines)
Lines 119-134 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
119
    }
119
    }
120
    elsif ($total_paid >=  $total_due and $total_collected ne $total_paid) {
120
    elsif ($total_paid >=  $total_due and $total_collected ne $total_paid) {
121
        $template->param(
121
        $template->param(
122
            amount_paid => sprintf('%.2f', $total_due),
122
            amount_paid => $total_due,
123
            amount_collected => sprintf('%.2f', $total_collected),
123
            amount_collected => $total_collected,
124
            give_change => sprintf('%.2f',($total_collected-$total_due))
124
            give_change => $total_collected-$total_due,
125
        );
125
        );
126
    }
126
    }
127
    elsif ($total_paid < $total_due and $total_collected ne $total_paid) {
127
    elsif ($total_paid < $total_due and $total_collected ne $total_paid) {
128
         $template->param(
128
         $template->param(
129
            amount_paid => sprintf('%.2f', $total_paid),
129
            amount_paid => $total_paid,
130
            amount_collected => sprintf('%.2f', $total_collected),
130
            amount_collected => $total_collected,
131
            give_change => sprintf('%.2f',($total_collected-$total_paid))
131
            give_change => $total_collected-$total_paid,
132
        );
132
        );
133
    } else {
133
    } else {
134
        die "Wrong CSRF token"
134
        die "Wrong CSRF token"
135
- 

Return to bug 11373