Add check for PHP/JS balances
This commit is contained in:
parent
b534ad4e83
commit
a9104c64b0
1 changed files with 7 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue