mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-08-07 10:01:47 -04:00
Fix for tests
This commit is contained in:
parent
1de93e0f03
commit
8a8483bcbd
@ -215,21 +215,21 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function onFormSubmit(event) {
|
function onFormSubmit(event) {
|
||||||
// warn if amount is more than balance/credit will be created
|
@if ($payment)
|
||||||
var invoiceId = $('input[name=invoice]').val();
|
|
||||||
var invoice = invoiceMap[invoiceId];
|
|
||||||
var amount = $('#amount').val();
|
|
||||||
|
|
||||||
if (! invoice) {
|
|
||||||
logError('Warning: invoice not found: ' + invoiceId);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (amount <= invoice.balance || confirm("{{ trans('texts.amount_greater_than_balance') }}")) {
|
|
||||||
$('#saveButton').attr('disabled', true);
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
@else
|
||||||
return false;
|
// warn if amount is more than balance/credit will be created
|
||||||
}
|
var invoiceId = $('input[name=invoice]').val();
|
||||||
|
var invoice = invoiceMap[invoiceId];
|
||||||
|
var amount = $('#amount').val();
|
||||||
|
|
||||||
|
if (amount <= invoice.balance || confirm("{{ trans('texts.amount_greater_than_balance') }}")) {
|
||||||
|
$('#saveButton').attr('disabled', true);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@endif
|
||||||
}
|
}
|
||||||
|
|
||||||
function submitAction(action) {
|
function submitAction(action) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user