mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Remove broken balance check
This commit is contained in:
parent
d973cf5d4d
commit
841b0aea89
@ -1204,7 +1204,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
var origInvoiceNumber = false;
|
var origInvoiceNumber = false;
|
||||||
var checkedInvoiceBalances = false;
|
|
||||||
|
|
||||||
function getPDFString(cb, force) {
|
function getPDFString(cb, force) {
|
||||||
@if (! $invoice->id && $account->credit_number_counter > 0)
|
@if (! $invoice->id && $account->credit_number_counter > 0)
|
||||||
@ -1219,28 +1218,13 @@
|
|||||||
}
|
}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
var invoice = createInvoiceModel();
|
|
||||||
var design = getDesignJavascript();
|
|
||||||
|
|
||||||
@if ($invoice->exists)
|
|
||||||
if (! checkedInvoiceBalances) {
|
|
||||||
checkedInvoiceBalances = true;
|
|
||||||
var phpBalance = roundSignificant(invoice.balance);
|
|
||||||
var koBalance = roundSignificant(model.invoice().totals.rawTotal());
|
|
||||||
var jsBalance = roundSignificant(calculateAmounts(invoice).total_amount);
|
|
||||||
if (phpBalance == koBalance && koBalance == jsBalance) {
|
|
||||||
// do nothing
|
|
||||||
} else {
|
|
||||||
var invitationKey = invoice.invitations[0].invitation_key;
|
|
||||||
window.onerror(invitationKey + ': Balances do not match | PHP: ' + phpBalance + ', JS: ' + jsBalance + ', KO: ' + koBalance);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if ( ! $account->live_preview)
|
@if ( ! $account->live_preview)
|
||||||
return;
|
return;
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
var invoice = createInvoiceModel();
|
||||||
|
var design = getDesignJavascript();
|
||||||
|
|
||||||
if (! design) {
|
if (! design) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user