|
Lines 53-64
Link Here
|
| 53 |
</li> |
53 |
</li> |
| 54 |
</ul> |
54 |
</ul> |
| 55 |
<div class="tabs-container"> |
55 |
<div class="tabs-container"> |
| 56 |
[% IF ( error_over ) %] |
56 |
[% IF (error_negative) %] |
| 57 |
<div id="error_message" class="dialog alert"> |
57 |
<div id="error_message" class="dialog alert"> |
| 58 |
You must pay a value less than or equal to [% total_due | format('%.2f') %]. |
58 |
<span>The amount paid can't be negative!</span> |
| 59 |
</div> |
59 |
</div> |
| 60 |
[% END %] |
60 |
[% END %] |
| 61 |
|
61 |
|
|
|
62 |
[% IF (error_collected_less) %] |
| 63 |
<div id="error_message" class="dialog alert"> |
| 64 |
<span>The amount collected can't be lower than the amount paid!</span> |
| 65 |
</div> |
| 66 |
[% END %] |
| 67 |
|
| 68 |
[% UNLESS (writeoff_individual) %] |
| 69 |
<form name="payform" id="payform" action="/cgi-bin/koha/members/paycollect.pl" method="post"> |
| 70 |
[% END %] |
| 71 |
|
| 72 |
[% IF (give_change) %] |
| 73 |
<div id="change_message" class="dialog message"> |
| 74 |
<span>The amount collected is greater than the total amount paid.</span><br /> |
| 75 |
<strong>Change to give back: [% give_change %]</strong><br /><br /> |
| 76 |
<input type="submit" name="submitbutton" value="Confirm payment" /> |
| 77 |
<a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a> |
| 78 |
</div> |
| 79 |
[% END %] |
| 80 |
|
| 62 |
[% IF ( pay_individual ) %] |
81 |
[% IF ( pay_individual ) %] |
| 63 |
<form name="payindivfine" id="payindivfine" method="post" action="/cgi-bin/koha/members/paycollect.pl"> |
82 |
<form name="payindivfine" id="payindivfine" method="post" action="/cgi-bin/koha/members/paycollect.pl"> |
| 64 |
<input type="hidden" name="csrf_token" value="[% csrf_token %]" /> |
83 |
<input type="hidden" name="csrf_token" value="[% csrf_token %]" /> |
|
Lines 96-106
Link Here
|
| 96 |
</table> |
115 |
</table> |
| 97 |
|
116 |
|
| 98 |
<ol> |
117 |
<ol> |
| 99 |
|
118 |
[% IF ( give_change ) %] |
|
|
119 |
<li> |
| 120 |
<label for="paid">Amount paid:</label> |
| 121 |
<input type="hidden" name="paid" id="paid" value="[% amount_paid %]" /> |
| 122 |
<input type="hidden" name="collected" id="collected" value="[% amount_paid %]" /> |
| 123 |
[% amount_paid %] |
| 124 |
</li> |
| 100 |
<li> |
125 |
<li> |
| 101 |
<label for="paid">Collect from patron: </label> |
126 |
<label>Collect from patron:</label> |
| 102 |
<!-- default to paying all --> |
127 |
[% amount_collected %] |
| 103 |
<input name="paid" id="paid" value="[% amountoutstanding %]" /> |
128 |
</li> |
|
|
129 |
<li> |
| 130 |
<label>Change to give back:</label> |
| 131 |
[% give_change %] |
| 132 |
</li> |
| 133 |
[% ELSE %] |
| 134 |
<li> |
| 135 |
<label for="paid">Amount paid :</label> |
| 136 |
<input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" onchange="moneyFormat(document.payform.paid)"/> |
| 137 |
[% amount_paid %] |
| 138 |
</li> |
| 139 |
<li> |
| 140 |
<label for="collected">Collect from patron:</label> |
| 141 |
<input name="collected" id="collected" value="[% amountoutstanding | format('%.2f') %]" onchange="moneyFormat(document.payform.collected)" /> |
| 104 |
</li> |
142 |
</li> |
| 105 |
[% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %] |
143 |
[% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %] |
| 106 |
[% IF payment_types %] |
144 |
[% IF payment_types %] |
|
Lines 114-119
Link Here
|
| 114 |
</select> |
152 |
</select> |
| 115 |
</li> |
153 |
</li> |
| 116 |
[% END %] |
154 |
[% END %] |
|
|
155 |
[% END %] |
| 117 |
</ol> |
156 |
</ol> |
| 118 |
</fieldset> |
157 |
</fieldset> |
| 119 |
|
158 |
|
|
Lines 190-203
Link Here
|
| 190 |
<span class="label">Total amount outstanding: </span> |
229 |
<span class="label">Total amount outstanding: </span> |
| 191 |
<span class="debit">[% total | format('%.2f') %]</span> |
230 |
<span class="debit">[% total | format('%.2f') %]</span> |
| 192 |
</li> |
231 |
</li> |
|
|
232 |
[% IF ( give_change ) %] |
| 233 |
<li> |
| 234 |
<label for="paid">Amount paid:</label> |
| 235 |
<input type="hidden" name="paid" id="paid" value="[% amount_paid %]" /> |
| 236 |
[% amount_paid %] |
| 237 |
</li> |
| 238 |
<li> |
| 239 |
<label>Collected from patron:</label> |
| 240 |
<input type="hidden" name="collected" id="collected" value="[% amount_paid %]" /> |
| 241 |
[% amount_collected %] |
| 242 |
</li> |
| 243 |
<li> |
| 244 |
<label>Change to give back:</label> |
| 245 |
[% give_change %] |
| 246 |
</li> |
| 247 |
[% ELSE %] |
| 248 |
<li> |
| 249 |
<label for="paid">Amount paid :</label> |
| 250 |
<input name="paid" id="paid" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payform.paid)" /> |
| 251 |
</li> |
| 193 |
<li> |
252 |
<li> |
| 194 |
[% IF type == 'writeoff' %] |
253 |
[% IF type == 'writeoff' %] |
| 195 |
<label for="paid">Writeoff amount: </label> |
254 |
<label for="collected">Writeoff amount: </label> |
| 196 |
[% ELSE %] |
255 |
[% ELSE %] |
| 197 |
<label for="paid">Collect from patron: </label> |
256 |
<label for="collected">Collect from patron: </label> |
| 198 |
[% END %] |
257 |
[% END %] |
| 199 |
<!-- default to paying all --> |
258 |
<!-- default to paying all --> |
| 200 |
<input name="paid" id="paid" value="[% total | format('%.2f') %]" /> |
259 |
<input name="collected" id="collected" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payform.collected)"/> |
| 201 |
</li> |
260 |
</li> |
| 202 |
[% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %] |
261 |
[% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %] |
| 203 |
[% IF payment_types %] |
262 |
[% IF payment_types %] |
|
Lines 211-216
Link Here
|
| 211 |
</select> |
270 |
</select> |
| 212 |
</li> |
271 |
</li> |
| 213 |
[% END %] |
272 |
[% END %] |
|
|
273 |
[% END %] |
| 214 |
<li> |
274 |
<li> |
| 215 |
<label for="selected_accts_notes">Note: </label> |
275 |
<label for="selected_accts_notes">Note: </label> |
| 216 |
<textarea name="selected_accts_notes" id="selected_accts_notes">[% selected_accts_notes %]</textarea> |
276 |
<textarea name="selected_accts_notes" id="selected_accts_notes">[% selected_accts_notes %]</textarea> |
|
Lines 236-242
Link Here
|
| 236 |
[% Asset.js("js/members-menu.js") %] |
296 |
[% Asset.js("js/members-menu.js") %] |
| 237 |
<script type= "text/javascript"> |
297 |
<script type= "text/javascript"> |
| 238 |
$(document).ready(function() { |
298 |
$(document).ready(function() { |
| 239 |
$('#payindivfine, #payfine').preventDoubleFormSubmit(); |
299 |
$('#payindivfine, #payfine, #payform').preventDoubleFormSubmit(); |
| 240 |
$("#paid").on("change",function(){ |
300 |
$("#paid").on("change",function(){ |
| 241 |
moneyFormat( this ); |
301 |
moneyFormat( this ); |
| 242 |
}); |
302 |
}); |