1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

Add check for PHP/JS balances

This commit is contained in:
Hillel Coren 2017-08-29 22:13:02 +03:00
parent b534ad4e83
commit a9104c64b0

View File

@ -863,6 +863,13 @@
}
}
model.invoice().addItem(); // add blank item
// check amounts are correct
var phpBalance = invoice.balance;
var jsBalance = model.invoice().totals.rawTotal();
if (phpBalance != jsBalance) {
window.onerror('Balances do not match | PHP: ' + phpBalance + ', JS: ' + jsBalance);
}
@else
// set the default account tax rate
@if ($account->invoice_taxes)