|
Lines 36-47
Link Here
|
| 36 |
</li> |
36 |
</li> |
| 37 |
</ul> |
37 |
</ul> |
| 38 |
<div class="tabs-container"> |
38 |
<div class="tabs-container"> |
| 39 |
[% IF ( error_over ) %] |
39 |
[% IF (error_negative) %] |
| 40 |
<div id="error_message" class="dialog alert"> |
40 |
<div id="error_message" class="dialog alert"> |
| 41 |
You must pay a value less than or equal to [% total_due | format('%.2f') %]. |
41 |
<span>The amount paid can't be negative!</span> |
| 42 |
</div> |
42 |
</div> |
| 43 |
[% END %] |
43 |
[% END %] |
| 44 |
|
44 |
|
|
|
45 |
[% IF (error_collected_less) %] |
| 46 |
<div id="error_message" class="dialog alert"> |
| 47 |
<span>The amount collected can't be lower than the amount paid!</span> |
| 48 |
</div> |
| 49 |
[% END %] |
| 50 |
|
| 51 |
[% UNLESS (writeoff_individual) %] |
| 52 |
<form name="payform" id="payform" action="/cgi-bin/koha/members/paycollect.pl" method="post"> |
| 53 |
[% END %] |
| 54 |
|
| 55 |
[% IF (give_change) %] |
| 56 |
<div id="change_message" class="dialog message"> |
| 57 |
<span>The amount collected is greater than the total amount paid.</span><br /> |
| 58 |
<strong>Change to give back: [% give_change %]</strong><br /><br /> |
| 59 |
<input type="submit" name="submitbutton" value="Confirm payment" /> |
| 60 |
<a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a> |
| 61 |
</div> |
| 62 |
[% END %] |
| 63 |
|
| 45 |
[% IF ( pay_individual ) %] |
64 |
[% IF ( pay_individual ) %] |
| 46 |
<form name="payindivfine" id="payindivfine" method="post" action="/cgi-bin/koha/members/paycollect.pl"> |
65 |
<form name="payindivfine" id="payindivfine" method="post" action="/cgi-bin/koha/members/paycollect.pl"> |
| 47 |
<input type="hidden" name="csrf_token" value="[% csrf_token %]" /> |
66 |
<input type="hidden" name="csrf_token" value="[% csrf_token %]" /> |
|
Lines 79-90
Link Here
|
| 79 |
</table> |
98 |
</table> |
| 80 |
|
99 |
|
| 81 |
<ol> |
100 |
<ol> |
| 82 |
|
101 |
[% IF ( give_change ) %] |
|
|
102 |
<li> |
| 103 |
<label for="paid">Amount paid:</label> |
| 104 |
<input type="hidden" name="paid" id="paid" value="[% amount_paid %]" /> |
| 105 |
<input type="hidden" name="collected" id="collected" value="[% amount_paid %]" /> |
| 106 |
[% amount_paid %] |
| 107 |
</li> |
| 108 |
<li> |
| 109 |
<label>Collect from patron:</label> |
| 110 |
[% amount_collected %] |
| 111 |
</li> |
| 83 |
<li> |
112 |
<li> |
| 84 |
<label for="paid">Collect from patron: </label> |
113 |
<label>Change to give back:</label> |
| 85 |
<!-- default to paying all --> |
114 |
[% give_change %] |
| 86 |
<input name="paid" id="paid" value="[% amountoutstanding %]" /> |
|
|
| 87 |
</li> |
115 |
</li> |
|
|
116 |
[% ELSE %] |
| 117 |
<li> |
| 118 |
<label for="paid">Amount paid :</label> |
| 119 |
<input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" onchange="moneyFormat(document.payform.paid)"/> |
| 120 |
[% amount_paid %] |
| 121 |
</li> |
| 122 |
<li> |
| 123 |
<label for="collected">Collect from patron:</label> |
| 124 |
<input name="collected" id="collected" value="[% amountoutstanding | format('%.2f') %]" onchange="moneyFormat(document.payform.collected)" /> |
| 125 |
</li> |
| 126 |
[% END %] |
| 88 |
</ol> |
127 |
</ol> |
| 89 |
</fieldset> |
128 |
</fieldset> |
| 90 |
|
129 |
|
|
Lines 147-157
Link Here
|
| 147 |
<span class="label">Total amount outstanding: </span> |
186 |
<span class="label">Total amount outstanding: </span> |
| 148 |
<span class="debit">[% total | format('%.2f') %]</span> |
187 |
<span class="debit">[% total | format('%.2f') %]</span> |
| 149 |
</li> |
188 |
</li> |
|
|
189 |
[% IF ( give_change ) %] |
| 190 |
<li> |
| 191 |
<label for="paid">Amount paid:</label> |
| 192 |
<input type="hidden" name="paid" id="paid" value="[% amount_paid %]" /> |
| 193 |
[% amount_paid %] |
| 194 |
</li> |
| 195 |
<li> |
| 196 |
<label>Collected from patron:</label> |
| 197 |
<input type="hidden" name="collected" id="collected" value="[% amount_paid %]" /> |
| 198 |
[% amount_collected %] |
| 199 |
</li> |
| 200 |
<li> |
| 201 |
<label>Change to give back:</label> |
| 202 |
[% give_change %] |
| 203 |
</li> |
| 204 |
[% ELSE %] |
| 205 |
<li> |
| 206 |
<label for="paid">Amount paid :</label> |
| 207 |
<input name="paid" id="paid" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payform.paid)" /> |
| 208 |
</li> |
| 150 |
<li> |
209 |
<li> |
| 151 |
<label for="paid">Collect from patron: </label> |
210 |
<label for="collected">Collect from patron:</label> |
| 152 |
<!-- default to paying all --> |
211 |
<!-- default to paying all --> |
| 153 |
<input name="paid" id="paid" value="[% total | format('%.2f') %]" /> |
212 |
<input name="collected" id="collected" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payform.collected)"/> |
| 154 |
</li> |
213 |
</li> |
|
|
214 |
[% END %] |
| 155 |
<li> |
215 |
<li> |
| 156 |
<label for="selected_accts_notes">Note: </label> |
216 |
<label for="selected_accts_notes">Note: </label> |
| 157 |
<textarea name="selected_accts_notes" id="selected_accts_notes">[% selected_accts_notes %]</textarea> |
217 |
<textarea name="selected_accts_notes" id="selected_accts_notes">[% selected_accts_notes %]</textarea> |
|
Lines 175-181
Link Here
|
| 175 |
<script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script> |
235 |
<script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script> |
| 176 |
<script type= "text/javascript"> |
236 |
<script type= "text/javascript"> |
| 177 |
$(document).ready(function() { |
237 |
$(document).ready(function() { |
| 178 |
$('#payindivfine, #woindivfine, #payfine').preventDoubleFormSubmit(); |
238 |
$('#payindivfine, #woindivfine, #payfine, #payform').preventDoubleFormSubmit(); |
| 179 |
$("#paid").on("change",function(){ |
239 |
$("#paid").on("change",function(){ |
| 180 |
moneyFormat( this ); |
240 |
moneyFormat( this ); |
| 181 |
}); |
241 |
}); |