|
Lines 6-15
Link Here
|
| 6 |
<script type= "text/javascript"> |
6 |
<script type= "text/javascript"> |
| 7 |
//<![CDATA[ |
7 |
//<![CDATA[ |
| 8 |
$(document).ready(function() { |
8 |
$(document).ready(function() { |
| 9 |
$('#payindivfine, #woindivfine, #payfine').preventDoubleFormSubmit(); |
9 |
$('#payindivfine, #payfine').preventDoubleFormSubmit(); |
| 10 |
$("#paid").on("change",function(){ |
10 |
$("#paid").on("change",function(){ |
| 11 |
moneyFormat( this ); |
11 |
moneyFormat( this ); |
| 12 |
}); |
12 |
}); |
|
|
13 |
|
| 14 |
prevent_default = 1; |
| 15 |
$('#woindivfine').on('submit', function(e){ |
| 16 |
if ( prevent_default ) { |
| 17 |
e.preventDefault(); |
| 18 |
|
| 19 |
let amount_outstanding = $('#amountoutstanding').attr('value'); |
| 20 |
let amount_writeoff = $('#amountwrittenoff').attr('value');; |
| 21 |
if ( amount_writeoff > amount_outstanding ) { |
| 22 |
alert(_("You are attemping to writeoff more than the value of the fee.")); |
| 23 |
$('#woindivfine').beenSubmitted = false; |
| 24 |
} else { |
| 25 |
prevent_default = 0; |
| 26 |
$('#woindivfine').preventDoubleFormSubmit(); |
| 27 |
$('#woindivfine').submit(); |
| 28 |
} |
| 29 |
} |
| 30 |
}); |
| 13 |
}); |
31 |
}); |
| 14 |
|
32 |
|
| 15 |
function moneyFormat(textObj) { |
33 |
function moneyFormat(textObj) { |
|
Lines 162-167
function moneyFormat(textObj) {
Link Here
|
| 162 |
<input type="hidden" name="accountlines_id" id="accountlines_id" value="[% accountlines_id %]" /> |
180 |
<input type="hidden" name="accountlines_id" id="accountlines_id" value="[% accountlines_id %]" /> |
| 163 |
<input type="hidden" name="title" id="title" value="[% title %]" /> |
181 |
<input type="hidden" name="title" id="title" value="[% title %]" /> |
| 164 |
<input type="hidden" name="payment_note" id="payment_note" value="[% payment_note %]" /> |
182 |
<input type="hidden" name="payment_note" id="payment_note" value="[% payment_note %]" /> |
|
|
183 |
<input type="hidden" name="amountoutstanding" id="amountoutstanding" value="[% amountoutstanding %]" /> |
| 165 |
<table> |
184 |
<table> |
| 166 |
<thead><tr> |
185 |
<thead><tr> |
| 167 |
<th>Description</th> |
186 |
<th>Description</th> |
|
Lines 186-192
function moneyFormat(textObj) {
Link Here
|
| 186 |
</li> |
205 |
</li> |
| 187 |
</ol> |
206 |
</ol> |
| 188 |
</fieldset> |
207 |
</fieldset> |
| 189 |
<div class="action"><input type="submit" name="confirm_writeoff" id="confirm_writeoff" value="Write off this charge" /> |
208 |
<input type="hidden" name="confirm_writeoff" value="1" /> |
|
|
209 |
<div class="action"><input type="submit" value="Write off this charge" /> |
| 190 |
<a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a></div> |
210 |
<a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a></div> |
| 191 |
</form> |
211 |
</form> |
| 192 |
[% ELSE %] |
212 |
[% ELSE %] |