|
Lines 1-7
Link Here
|
| 1 |
[% USE raw %] |
1 |
[% USE raw %] |
| 2 |
[% USE Asset %] |
2 |
[% USE Asset %] |
| 3 |
[% USE Koha %] |
3 |
[% USE Koha %] |
| 4 |
[% USE Price %] |
|
|
| 5 |
[% USE Branches %] |
4 |
[% USE Branches %] |
| 6 |
[% USE AuthorisedValues %] |
5 |
[% USE AuthorisedValues %] |
| 7 |
[% USE Price %] |
6 |
[% USE Price %] |
|
Lines 71-85
Link Here
|
| 71 |
<form name="payform" id="payform" action="/cgi-bin/koha/members/paycollect.pl" method="post"> |
70 |
<form name="payform" id="payform" action="/cgi-bin/koha/members/paycollect.pl" method="post"> |
| 72 |
[% END %] |
71 |
[% END %] |
| 73 |
|
72 |
|
| 74 |
[% IF (give_change) %] |
|
|
| 75 |
<div id="change_message" class="dialog message"> |
| 76 |
<span>The amount collected is greater than the total amount paid.</span><br /> |
| 77 |
<strong>Change to give back: [% give_change | $Price %]</strong><br /><br /> |
| 78 |
<input type="submit" name="submitbutton" value="Confirm payment" /> |
| 79 |
<a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber %]">Cancel</a> |
| 80 |
</div> |
| 81 |
[% END %] |
| 82 |
|
| 83 |
[% IF ( pay_individual ) %] |
73 |
[% IF ( pay_individual ) %] |
| 84 |
<form name="payindivfine" id="payindivfine" method="post" action="/cgi-bin/koha/members/paycollect.pl"> |
74 |
<form name="payindivfine" id="payindivfine" method="post" action="/cgi-bin/koha/members/paycollect.pl"> |
| 85 |
<input type="hidden" name="csrf_token" value="[% csrf_token | html %]" /> |
75 |
<input type="hidden" name="csrf_token" value="[% csrf_token | html %]" /> |
|
Lines 117-147
Link Here
|
| 117 |
</table> |
107 |
</table> |
| 118 |
|
108 |
|
| 119 |
<ol> |
109 |
<ol> |
| 120 |
[% IF ( give_change ) %] |
110 |
[% IF FineChange %] |
| 121 |
<li> |
111 |
<li> |
| 122 |
<label for="paid">Amount paid:</label> |
112 |
<label for="paid">Amount paid:</label> |
| 123 |
<input type="hidden" name="paid" id="paid" value="[% amount_paid %]" /> |
113 |
<input name="paid" id="paid" value="[% amountoutstanding | $Price %]"/> |
| 124 |
<input type="hidden" name="collected" id="collected" value="[% amount_paid %]" /> |
|
|
| 125 |
[% amount_paid | $Price %] |
| 126 |
</li> |
114 |
</li> |
| 127 |
<li> |
115 |
<li> |
| 128 |
<label>Collect from patron:</label> |
116 |
<label for="collected">Collect from patron:</label> |
| 129 |
[% amount_collected | $Price %] |
117 |
<input name="collected" id="collected" value="[% amountoutstanding | $Price %]"/> |
| 130 |
</li> |
118 |
</li> |
| 131 |
<li> |
119 |
<li> |
| 132 |
<label>Change to give back:</label> |
120 |
<label>Change to give back:</label> |
| 133 |
[% give_change | $Price %] |
121 |
<input id="change" value="0.00" disabled/> |
| 134 |
</li> |
122 |
</li> |
| 135 |
[% ELSE %] |
123 |
[% ELSE %] |
| 136 |
<li> |
124 |
<li> |
| 137 |
<label for="paid">Amount paid:</label> |
125 |
<label for="paid">Collect from patron:</label> |
| 138 |
<input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" onchange="moneyFormat(document.payform.paid)"/> |
126 |
<input name="paid" id="collected" value="[% amountoutstanding | $Price %]"/> |
| 139 |
[% amount_paid | $Price %] |
|
|
| 140 |
</li> |
| 141 |
<li> |
| 142 |
<label for="collected">Collect from patron:</label> |
| 143 |
<input name="collected" id="collected" value="[% amountoutstanding %]" onchange="moneyFormat(document.payform.collected)" /> |
| 144 |
</li> |
127 |
</li> |
|
|
128 |
[% END %] |
| 145 |
[% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %] |
129 |
[% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %] |
| 146 |
[% IF payment_types %] |
130 |
[% IF payment_types %] |
| 147 |
<li> |
131 |
<li> |
|
Lines 154-160
Link Here
|
| 154 |
</select> |
138 |
</select> |
| 155 |
</li> |
139 |
</li> |
| 156 |
[% END %] |
140 |
[% END %] |
| 157 |
[% END %] |
|
|
| 158 |
</ol> |
141 |
</ol> |
| 159 |
</fieldset> |
142 |
</fieldset> |
| 160 |
|
143 |
|
|
Lines 231-265
Link Here
|
| 231 |
<span class="label">Total amount outstanding: </span> |
214 |
<span class="label">Total amount outstanding: </span> |
| 232 |
<span class="debit">[% total | $Price %]</span> |
215 |
<span class="debit">[% total | $Price %]</span> |
| 233 |
</li> |
216 |
</li> |
| 234 |
[% IF ( give_change ) %] |
217 |
[% IF FineChange %] |
| 235 |
<li> |
218 |
<li> |
| 236 |
<label for="paid">Amount paid:</label> |
219 |
<label for="paid">Amount paid :</label> |
| 237 |
<input type="hidden" name="paid" id="paid" value="[% amount_paid %]" /> |
220 |
<input name="paid" id="paid" value="[% total | $Price %]"/> |
| 238 |
[% amount_paid | $Price %] |
|
|
| 239 |
</li> |
221 |
</li> |
| 240 |
<li> |
222 |
<li> |
| 241 |
<label>Collected from patron:</label> |
223 |
[% IF type == 'writeoff' %] |
| 242 |
<input type="hidden" name="collected" id="collected" value="[% amount_paid %]" /> |
224 |
<label for="collected">Writeoff amount: </label> |
| 243 |
[% amount_collected | $Price %] |
225 |
[% ELSE %] |
|
|
226 |
<label for="collected">Collect from patron: </label> |
| 227 |
[% END %] |
| 228 |
<!-- default to paying all --> |
| 229 |
<input name="collected" id="collected" value="[% total | $Price %]"/> |
| 244 |
</li> |
230 |
</li> |
| 245 |
<li> |
231 |
<li> |
| 246 |
<label>Change to give back:</label> |
232 |
<label>Change to give back:</label> |
| 247 |
[% give_change | $Price %] |
233 |
<input id="change" value="0.00" disabled/> |
| 248 |
</li> |
234 |
</li> |
| 249 |
[% ELSE %] |
235 |
[% ELSE %] |
| 250 |
<li> |
236 |
<li> |
| 251 |
<label for="paid">Amount paid :</label> |
|
|
| 252 |
<input name="paid" id="paid" value="[% total %]" onchange="moneyFormat(document.payform.paid)" /> |
| 253 |
</li> |
| 254 |
<li> |
| 255 |
[% IF type == 'writeoff' %] |
237 |
[% IF type == 'writeoff' %] |
| 256 |
<label for="collected">Writeoff amount: </label> |
238 |
<label for="paid">Writeoff amount: </label> |
| 257 |
[% ELSE %] |
239 |
[% ELSE %] |
| 258 |
<label for="collected">Collect from patron: </label> |
240 |
<label for="paid">Collect from patron: </label> |
| 259 |
[% END %] |
241 |
[% END %] |
| 260 |
<!-- default to paying all --> |
242 |
<!-- default to paying all --> |
| 261 |
<input name="collected" id="collected" value="[% total %]" onchange="moneyFormat(document.payform.collected)"/> |
243 |
<input name="paid" id="paid" value="[% total | $Price %]"/> |
| 262 |
</li> |
244 |
</li> |
|
|
245 |
[% END %] |
| 263 |
[% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %] |
246 |
[% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %] |
| 264 |
[% IF payment_types %] |
247 |
[% IF payment_types %] |
| 265 |
<li> |
248 |
<li> |
|
Lines 272-278
Link Here
|
| 272 |
</select> |
255 |
</select> |
| 273 |
</li> |
256 |
</li> |
| 274 |
[% END %] |
257 |
[% END %] |
| 275 |
[% END %] |
|
|
| 276 |
<li> |
258 |
<li> |
| 277 |
<label for="selected_accts_notes">Note: </label> |
259 |
<label for="selected_accts_notes">Note: </label> |
| 278 |
<textarea name="selected_accts_notes" id="selected_accts_notes">[% selected_accts_notes | html %]</textarea> |
260 |
<textarea name="selected_accts_notes" id="selected_accts_notes">[% selected_accts_notes | html %]</textarea> |
|
Lines 302-307
Link Here
|
| 302 |
$('#payindivfine, #payfine, #payform').preventDoubleFormSubmit(); |
284 |
$('#payindivfine, #payfine, #payform').preventDoubleFormSubmit(); |
| 303 |
$("#paid").on("change",function(){ |
285 |
$("#paid").on("change",function(){ |
| 304 |
moneyFormat( this ); |
286 |
moneyFormat( this ); |
|
|
287 |
updateChangeInput(); |
| 288 |
}); |
| 289 |
$("#collected").on("change",function(){ |
| 290 |
moneyFormat( this ); |
| 291 |
updateChangeInput(); |
| 305 |
}); |
292 |
}); |
| 306 |
}); |
293 |
}); |
| 307 |
|
294 |
|
|
Lines 371-376
Link Here
|
| 371 |
|
358 |
|
| 372 |
textObj.value = dolAmount + "." + decAmount; |
359 |
textObj.value = dolAmount + "." + decAmount; |
| 373 |
} |
360 |
} |
|
|
361 |
|
| 362 |
function updateChangeInput() { |
| 363 |
var change = $('#change')[0]; |
| 364 |
change.value = Math.round(($('#collected')[0].value - $('#paid')[0].value) * 100) / 100; |
| 365 |
|
| 366 |
if (change.value < 0) { |
| 367 |
change.value = change.defaultValue; |
| 368 |
} else { |
| 369 |
moneyFormat(change); |
| 370 |
} |
| 371 |
} |
| 374 |
</script> |
372 |
</script> |
| 375 |
[% END %] |
373 |
[% END %] |
| 376 |
|
374 |
|