diff --git a/resources/views/payments/edit.blade.php b/resources/views/payments/edit.blade.php index ff9dc5d0e29a..81d1aace03cc 100644 --- a/resources/views/payments/edit.blade.php +++ b/resources/views/payments/edit.blade.php @@ -220,6 +220,10 @@ 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;