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-4 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE Price %]
2
[% USE Branches %]
3
[% USE Branches %]
3
[% SET footerjs = 1 %]
4
[% SET footerjs = 1 %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
Lines 38-50 Link Here
38
<div class="tabs-container">
39
<div class="tabs-container">
39
[% IF (error_negative) %]
40
[% IF (error_negative) %]
40
    <div id="error_message" class="dialog alert">
41
    <div id="error_message" class="dialog alert">
41
        <span>The amount paid can't be negative!</span>
42
        The amount paid can't be negative.
42
    </div>
43
    </div>
43
[% END %]
44
[% END %]
44
45
45
[% IF (error_collected_less) %]
46
[% IF (error_collected_less) %]
46
    <div id="error_message" class="dialog alert">
47
    <div id="error_message" class="dialog alert">
47
        <span>The amount collected can't be lower than the amount paid!</span>
48
        The amount collected can't be lower than the amount paid.
48
    </div>
49
    </div>
49
[% END %]
50
[% END %]
50
51
Lines 85-99 Link Here
85
            <th>Amount outstanding</th>
86
            <th>Amount outstanding</th>
86
        </tr></thead>
87
        </tr></thead>
87
    <tfoot>
88
    <tfoot>
88
        <td colspan="3">Total amount payable:</td><td>[% amountoutstanding | format('%.2f') %]</td>
89
        <td colspan="3">Total amount payable:</td><td>[% amountoutstanding | $Price %]</td>
89
    </tfoot>
90
    </tfoot>
90
    <tbody><tr>
91
    <tbody><tr>
91
            <td>
92
            <td>
92
                [% individual_description %]
93
                [% individual_description %]
93
            </td>
94
            </td>
94
            <td>[% accounttype %]</td>
95
            <td>[% accounttype %]</td>
95
            <td class="debit">[% amount | format('%.2f') %]</td>
96
            <td class="debit">[% amount | $Price %]</td>
96
            <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
97
            <td class="debit">[% amountoutstanding | $Price %]</td>
97
        </tr></tbody>
98
        </tr></tbody>
98
</table>
99
</table>
99
100
Lines 103-127 Link Here
103
        <label for="paid">Amount paid:</label>
104
        <label for="paid">Amount paid:</label>
104
        <input type="hidden" name="paid" id="paid" value="[% amount_paid %]" />
105
        <input type="hidden" name="paid" id="paid" value="[% amount_paid %]" />
105
        <input type="hidden" name="collected" id="collected" value="[% amount_paid %]" />
106
        <input type="hidden" name="collected" id="collected" value="[% amount_paid %]" />
106
        [% amount_paid %]
107
        [% amount_paid | $Price %]
107
    </li>
108
    </li>
108
    <li>
109
    <li>
109
        <label>Collect from patron:</label>
110
        <label>Collect from patron:</label>
110
        [% amount_collected %]
111
        [% amount_collected | $Price %]
111
    </li>
112
    </li>
112
    <li>
113
    <li>
113
        <label>Change to give back:</label>
114
        <label>Change to give back:</label>
114
        [% give_change %]
115
        [% give_change | $Price %]
115
    </li>
116
    </li>
116
    [% ELSE %]
117
    [% ELSE %]
117
    <li>
118
    <li>
118
        <label for="paid">Amount paid :</label>
119
        <label for="paid">Amount paid:</label>
119
        <input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" onchange="moneyFormat(document.payform.paid)"/>
120
        <input name="paid" id="paid" value="[% amountoutstanding %]" onchange="moneyFormat(document.payform.paid)"/>
120
        [% amount_paid %]
121
        [% amount_paid | $Price %]
121
    </li>
122
    </li>
122
    <li>
123
    <li>
123
        <label for="collected">Collect from patron:</label>
124
        <label for="collected">Collect from patron:</label>
124
        <input name="collected" id="collected" value="[% amountoutstanding | format('%.2f') %]" onchange="moneyFormat(document.payform.collected)" />
125
        <input name="collected" id="collected" value="[% amountoutstanding %]" onchange="moneyFormat(document.payform.collected)" />
125
    </li>
126
    </li>
126
    [% END %]
127
    [% END %]
127
</ol>
128
</ol>
Lines 151-162 Link Here
151
            <th>Amount</th>
152
            <th>Amount</th>
152
            <th>Amount outstanding</th>
153
            <th>Amount outstanding</th>
153
        </tr></thead>
154
        </tr></thead>
154
    <tfoot><td colspan="3">Total amount outstanding:</td><td>[% amountoutstanding | format('%.2f') %]</td></tfoot>
155
    <tfoot><td colspan="3">Total amount outstanding:</td><td>[% amountoutstanding | $Price %]</td></tfoot>
155
    <tbody><tr>
156
    <tbody><tr>
156
            <td>[% description %] [% title %]</td>
157
            <td>[% description %] [% title %]</td>
157
            <td>[% accounttype %]</td>
158
            <td>[% accounttype %]</td>
158
            <td class="debit">[% amount | format('%.2f') %]</td>
159
            <td class="debit">[% amount | $Price %]</td>
159
            <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
160
            <td class="debit">[% amountoutstanding | $Price %]</td>
160
        </tr></tbody>
161
        </tr></tbody>
161
    </table>
162
    </table>
162
163
Lines 184-215 Link Here
184
    <ol>
185
    <ol>
185
        <li>
186
        <li>
186
            <span class="label">Total amount outstanding: </span>
187
            <span class="label">Total amount outstanding: </span>
187
            <span class="debit">[% total | format('%.2f') %]</span>
188
            <span class="debit">[% total | $Price %]</span>
188
        </li>
189
        </li>
189
    [% IF ( give_change ) %]
190
    [% IF ( give_change ) %]
190
    <li>
191
    <li>
191
        <label for="paid">Amount paid:</label>
192
        <label for="paid">Amount paid:</label>
192
        <input type="hidden" name="paid" id="paid" value="[% amount_paid %]" />
193
        <input type="hidden" name="paid" id="paid" value="[% amount_paid %]" />
193
        [% amount_paid %]
194
        [% amount_paid | $Price %]
194
    </li>
195
    </li>
195
    <li>
196
    <li>
196
        <label>Collected from patron:</label>
197
        <label>Collected from patron:</label>
197
        <input type="hidden" name="collected" id="collected" value="[% amount_paid %]" />
198
        <input type="hidden" name="collected" id="collected" value="[% amount_paid %]" />
198
        [% amount_collected %]
199
        [% amount_collected | $Price %]
199
    </li>
200
    </li>
200
    <li>
201
    <li>
201
        <label>Change to give back:</label>
202
        <label>Change to give back:</label>
202
        [% give_change %]
203
        [% give_change | $Price %]
203
    </li>
204
    </li>
204
    [% ELSE %]
205
    [% ELSE %]
205
    <li>
206
    <li>
206
        <label for="paid">Amount paid :</label>
207
        <label for="paid">Amount paid :</label>
207
        <input name="paid" id="paid" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payform.paid)" />
208
        <input name="paid" id="paid" value="[% total %]" onchange="moneyFormat(document.payform.paid)" />
208
    </li>
209
    </li>
209
    <li>
210
    <li>
210
        <label for="collected">Collect from patron:</label>
211
        <label for="collected">Collect from patron:</label>
211
        <!-- default to paying all -->
212
        <!-- default to paying all -->
212
        <input name="collected" id="collected" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payform.collected)"/>
213
        <input name="collected" id="collected" value="[% total %]" onchange="moneyFormat(document.payform.collected)"/>
213
    </li>
214
    </li>
214
    [% END %]
215
    [% END %]
215
    <li>
216
    <li>
(-)a/members/paycollect.pl (-7 / +6 lines)
Lines 115-130 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
115
    }
115
    }
116
    elsif ($total_paid >=  $total_due and $total_collected ne $total_paid) {
116
    elsif ($total_paid >=  $total_due and $total_collected ne $total_paid) {
117
        $template->param(
117
        $template->param(
118
            amount_paid => sprintf('%.2f', $total_due),
118
            amount_paid => $total_due,
119
            amount_collected => sprintf('%.2f', $total_collected),
119
            amount_collected => $total_collected,
120
            give_change => sprintf('%.2f',($total_collected-$total_due))
120
            give_change => $total_collected-$total_due,
121
        );
121
        );
122
    }
122
    }
123
    elsif ($total_paid < $total_due and $total_collected ne $total_paid) {
123
    elsif ($total_paid < $total_due and $total_collected ne $total_paid) {
124
         $template->param(
124
         $template->param(
125
            amount_paid => sprintf('%.2f', $total_paid),
125
            amount_paid => $total_paid,
126
            amount_collected => sprintf('%.2f', $total_collected),
126
            amount_collected => $total_collected,
127
            give_change => sprintf('%.2f',($total_collected-$total_paid))
127
            give_change => $total_collected-$total_paid,
128
        );
128
        );
129
    } else {
129
    } else {
130
        die "Wrong CSRF token"
130
        die "Wrong CSRF token"
131
- 

Return to bug 11373