Lines 60-65
function moneyFormat(textObj) {
Link Here
|
60 |
|
60 |
|
61 |
textObj.value = dolAmount + "." + decAmount; |
61 |
textObj.value = dolAmount + "." + decAmount; |
62 |
} |
62 |
} |
|
|
63 |
|
64 |
$(document).ready(function() { |
65 |
$('#payform, #woindivfine').preventDoubleFormSubmit(); |
66 |
}); |
63 |
//]]> |
67 |
//]]> |
64 |
</script> |
68 |
</script> |
65 |
</head> |
69 |
</head> |
Lines 93-104
function moneyFormat(textObj) {
Link Here
|
93 |
</li> |
97 |
</li> |
94 |
</ul> |
98 |
</ul> |
95 |
<div class="tabs-container"> |
99 |
<div class="tabs-container"> |
96 |
[% IF ( error_over ) %] |
100 |
[% IF (error_negative) %] |
|
|
101 |
<div id="error_message" class="dialog alert"> |
102 |
<span>The amount paid can't be negative!</span> |
103 |
</div> |
104 |
[% END %] |
105 |
|
106 |
[% IF (error_collected_less) %] |
97 |
<div id="error_message" class="dialog alert"> |
107 |
<div id="error_message" class="dialog alert"> |
98 |
You must pay a value less than or equal to [% total_due | format('%.2f') %]. |
108 |
<span>The amount collected can't be lower than the amount paid!</span> |
99 |
</div> |
109 |
</div> |
100 |
[% END %] |
110 |
[% END %] |
101 |
|
111 |
|
|
|
112 |
[% UNLESS (writeoff_individual) %] |
113 |
<form name="payform" id="payform" action="/cgi-bin/koha/members/paycollect.pl" method="post"> |
114 |
[% END %] |
115 |
|
116 |
[% IF (give_change) %] |
117 |
<div id="change_message" class="dialog message"> |
118 |
<span>The amount collected is greater than the total amount paid.</span><br /> |
119 |
<strong>Change to give back: [% give_change %]</strong><br /><br /> |
120 |
<input type="submit" name="submitbutton" value="Confirm payment" /> |
121 |
<a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a> |
122 |
</div> |
123 |
[% END %] |
124 |
|
102 |
[% IF ( pay_individual ) %] |
125 |
[% IF ( pay_individual ) %] |
103 |
<form name="payindivfine" id="payindivfine" method="post" action="/cgi-bin/koha/members/paycollect.pl"> |
126 |
<form name="payindivfine" id="payindivfine" method="post" action="/cgi-bin/koha/members/paycollect.pl"> |
104 |
<input type="hidden" name="csrf_token" value="[% csrf_token %]" /> |
127 |
<input type="hidden" name="csrf_token" value="[% csrf_token %]" /> |
Lines 136-147
function moneyFormat(textObj) {
Link Here
|
136 |
</table> |
159 |
</table> |
137 |
|
160 |
|
138 |
<ol> |
161 |
<ol> |
139 |
|
162 |
[% IF ( give_change ) %] |
|
|
163 |
<li> |
164 |
<label for="paid">Amount paid:</label> |
165 |
<input type="hidden" name="paid" id="paid" value="[% amount_paid %]" /> |
166 |
<input type="hidden" name="collected" id="collected" value="[% amount_paid %]" /> |
167 |
[% amount_paid %] |
168 |
</li> |
140 |
<li> |
169 |
<li> |
141 |
<label for="paid">Collect from patron: </label> |
170 |
<label>Collect from patron:</label> |
142 |
<!-- default to paying all --> |
171 |
[% amount_collected %] |
143 |
<input name="paid" id="paid" value="[% amountoutstanding %]" /> |
|
|
144 |
</li> |
172 |
</li> |
|
|
173 |
<li> |
174 |
<label>Change to give back:</label> |
175 |
[% give_change %] |
176 |
</li> |
177 |
[% ELSE %] |
178 |
<li> |
179 |
<label for="paid">Amount paid :</label> |
180 |
<input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" onchange="moneyFormat(document.payform.paid)"/> |
181 |
[% amount_paid %] |
182 |
</li> |
183 |
<li> |
184 |
<label for="collected">Collect from patron:</label> |
185 |
<input name="collected" id="collected" value="[% amountoutstanding | format('%.2f') %]" onchange="moneyFormat(document.payform.collected)" /> |
186 |
</li> |
187 |
[% END %] |
145 |
</ol> |
188 |
</ol> |
146 |
</fieldset> |
189 |
</fieldset> |
147 |
|
190 |
|
Lines 204-214
function moneyFormat(textObj) {
Link Here
|
204 |
<span class="label">Total amount outstanding: </span> |
247 |
<span class="label">Total amount outstanding: </span> |
205 |
<span class="debit">[% total | format('%.2f') %]</span> |
248 |
<span class="debit">[% total | format('%.2f') %]</span> |
206 |
</li> |
249 |
</li> |
|
|
250 |
[% IF ( give_change ) %] |
251 |
<li> |
252 |
<label for="paid">Amount paid:</label> |
253 |
<input type="hidden" name="paid" id="paid" value="[% amount_paid %]" /> |
254 |
[% amount_paid %] |
255 |
</li> |
256 |
<li> |
257 |
<label>Collected from patron:</label> |
258 |
<input type="hidden" name="collected" id="collected" value="[% amount_paid %]" /> |
259 |
[% amount_collected %] |
260 |
</li> |
261 |
<li> |
262 |
<label>Change to give back:</label> |
263 |
[% give_change %] |
264 |
</li> |
265 |
[% ELSE %] |
266 |
<li> |
267 |
<label for="paid">Amount paid :</label> |
268 |
<input name="paid" id="paid" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payform.paid)" /> |
269 |
</li> |
207 |
<li> |
270 |
<li> |
208 |
<label for="paid">Collect from patron: </label> |
271 |
<label for="collected">Collect from patron:</label> |
209 |
<!-- default to paying all --> |
272 |
<!-- default to paying all --> |
210 |
<input name="paid" id="paid" value="[% total | format('%.2f') %]" /> |
273 |
<input name="collected" id="collected" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payform.collected)"/> |
211 |
</li> |
274 |
</li> |
|
|
275 |
[% END %] |
212 |
<li> |
276 |
<li> |
213 |
<label for="selected_accts_notes">Note: </label> |
277 |
<label for="selected_accts_notes">Note: </label> |
214 |
<textarea name="selected_accts_notes" id="selected_accts_notes">[% selected_accts_notes %]</textarea> |
278 |
<textarea name="selected_accts_notes" id="selected_accts_notes">[% selected_accts_notes %]</textarea> |