Lines 439-446
Link Here
|
439 |
var accountline = button.data('accountline'); |
439 |
var accountline = button.data('accountline'); |
440 |
$('#payoutline').val(accountline); |
440 |
$('#payoutline').val(accountline); |
441 |
var amount = button.data('amount') * -1; |
441 |
var amount = button.data('amount') * -1; |
442 |
$("#paid + span").replaceWith(amount.format_price()); |
442 |
$("#paid + span").text(amount.format_price()); |
443 |
$("#amount").attr({ "value": amount, "max": amount, "min": 0 }); |
443 |
$("#amount").attr({ "value": amount.format_price(), "max": amount, "min": 0 }); |
444 |
$("#amount, #payout_transaction_type").focus(); |
444 |
$("#amount, #payout_transaction_type").focus(); |
445 |
}); |
445 |
}); |
446 |
|
446 |
|
Lines 453-460
Link Here
|
453 |
var amount = button.data('amount'); |
453 |
var amount = button.data('amount'); |
454 |
var amountoutstanding = button.data('amountoutstanding') || 0; |
454 |
var amountoutstanding = button.data('amountoutstanding') || 0; |
455 |
var paid = amount - amountoutstanding; |
455 |
var paid = amount - amountoutstanding; |
456 |
$("#paid + span").replaceWith(paid.format_price()); |
456 |
$("#paid + span").text(paid.format_price()); |
457 |
$("#returned").attr({ "value": paid, "max": paid, "min": 0 }); |
457 |
$("#returned").attr({ "value": paid.format_price(), "max": paid.format_price(), "min": 0 }); |
458 |
var member = button.data('member'); |
458 |
var member = button.data('member'); |
459 |
if ( member === '' ) { |
459 |
if ( member === '' ) { |
460 |
$("#refund_type option[value='AC']").remove(); |
460 |
$("#refund_type option[value='AC']").remove(); |
Lines 470-478
Link Here
|
470 |
$("#item + span").replaceWith(item); |
470 |
$("#item + span").replaceWith(item); |
471 |
var accountline = button.data('accountline'); |
471 |
var accountline = button.data('accountline'); |
472 |
$('#discountline').val(accountline); |
472 |
$('#discountline').val(accountline); |
473 |
var amount = button.data('amount'); |
473 |
var amountoutstanding = button.data('amountoutstanding'); |
474 |
$("#charged + span").replaceWith(amount.format_price()); |
474 |
$("#charged + span").text(amountoutstanding); |
475 |
$("#discount").attr({ "max": amount, "min": 0 }); |
475 |
$("#discount").attr({ "value": (0).format_price(), "max": amountoutstanding, "min": 0 }); |
476 |
$("#discount").focus(); |
476 |
$("#discount").focus(); |
477 |
}); |
477 |
}); |
478 |
|
478 |
|