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

Fixes for invoice calculations (#2981)

This commit is contained in:
David Bomba 2019-10-11 17:08:41 +11:00 committed by GitHub
parent dde3f1192a
commit 01d6b854fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,7 +177,7 @@ class InvoiceCalc
private function calcTaxes()
{
if (! $this->settings->inclusive_taxes) {
if (property_exists($this->settings, 'inclusive_taxes') && ! $this->settings->inclusive_taxes) {
$taxAmount1 = round($this->total * ($this->invoice->tax_rate1 ? $this->invoice->tax_rate1 : 0) / 100, 2);
$taxAmount2 = round($this->total * ($this->invoice->tax_rate2 ? $this->invoice->tax_rate2 : 0) / 100, 2);
$this->total_taxes = round($taxAmount1 + $taxAmount2, 2) + $this->total_item_taxes;