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="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" /> |
127 |
<input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" /> |
Lines 141-152
function moneyFormat(textObj) {
Link Here
|
141 |
</table> |
164 |
</table> |
142 |
|
165 |
|
143 |
<ol> |
166 |
<ol> |
144 |
|
167 |
[% IF ( give_change ) %] |
|
|
168 |
<li> |
169 |
<label for="paid">Amount paid:</label> |
170 |
<input type="hidden" name="paid" id="paid" value="[% amount_paid %]" /> |
171 |
<input type="hidden" name="collected" id="collected" value="[% amount_paid %]" /> |
172 |
[% amount_paid %] |
173 |
</li> |
145 |
<li> |
174 |
<li> |
146 |
<label for="paid">Collect from patron: </label> |
175 |
<label>Collect from patron:</label> |
147 |
<!-- default to paying all --> |
176 |
[% amount_collected %] |
148 |
<input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" /> |
|
|
149 |
</li> |
177 |
</li> |
|
|
178 |
<li> |
179 |
<label>Change to give back:</label> |
180 |
[% give_change %] |
181 |
</li> |
182 |
[% ELSE %] |
183 |
<li> |
184 |
<label for="paid">Amount paid :</label> |
185 |
<input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" onchange="moneyFormat(document.payform.paid)"/> |
186 |
[% amount_paid %] |
187 |
</li> |
188 |
<li> |
189 |
<label for="collected">Collect from patron:</label> |
190 |
<input name="collected" id="collected" value="[% amountoutstanding | format('%.2f') %]" onchange="moneyFormat(document.payform.collected)" /> |
191 |
</li> |
192 |
[% END %] |
150 |
</ol> |
193 |
</ol> |
151 |
</fieldset> |
194 |
</fieldset> |
152 |
|
195 |
|
Lines 206-216
function moneyFormat(textObj) {
Link Here
|
206 |
<span class="label">Total amount outstanding: </span> |
249 |
<span class="label">Total amount outstanding: </span> |
207 |
<span class="debit">[% total | format('%.2f') %]</span> |
250 |
<span class="debit">[% total | format('%.2f') %]</span> |
208 |
</li> |
251 |
</li> |
|
|
252 |
[% IF ( give_change ) %] |
253 |
<li> |
254 |
<label for="paid">Amount paid:</label> |
255 |
<input type="hidden" name="paid" id="paid" value="[% amount_paid %]" /> |
256 |
[% amount_paid %] |
257 |
</li> |
258 |
<li> |
259 |
<label>Collected from patron:</label> |
260 |
<input type="hidden" name="collected" id="collected" value="[% amount_paid %]" /> |
261 |
[% amount_collected %] |
262 |
</li> |
263 |
<li> |
264 |
<label>Change to give back:</label> |
265 |
[% give_change %] |
266 |
</li> |
267 |
[% ELSE %] |
268 |
<li> |
269 |
<label for="paid">Amount paid :</label> |
270 |
<input name="paid" id="paid" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payform.paid)" /> |
271 |
</li> |
209 |
<li> |
272 |
<li> |
210 |
<label for="paid">Collect from patron: </label> |
273 |
<label for="collected">Collect from patron:</label> |
211 |
<!-- default to paying all --> |
274 |
<!-- default to paying all --> |
212 |
<input name="paid" id="paid" value="[% total | format('%.2f') %]" /> |
275 |
<input name="collected" id="collected" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payform.collected)"/> |
213 |
</li> |
276 |
</li> |
|
|
277 |
[% END %] |
214 |
<li> |
278 |
<li> |
215 |
<label for="selected_accts_notes">Note: </label> |
279 |
<label for="selected_accts_notes">Note: </label> |
216 |
<textarea name="selected_accts_notes" id="selected_accts_notes">[% selected_accts_notes %]</textarea> |
280 |
<textarea name="selected_accts_notes" id="selected_accts_notes">[% selected_accts_notes %]</textarea> |