mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-08-07 10:01:47 -04:00
Fix for negative line item taxes
This commit is contained in:
parent
58e720ef40
commit
2b2373499d
@ -508,13 +508,17 @@ class InvoiceRepository extends BaseRepository
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$taxRate1 = Utils::parseFloat($item['tax_rate1']);
|
if (isset($item['tax_rate1'])) {
|
||||||
if ($taxRate1 != 0) {
|
$taxRate1 = Utils::parseFloat($item['tax_rate1']);
|
||||||
$itemTax += round($lineTotal * $taxRate1 / 100, 2);
|
if ($taxRate1 != 0) {
|
||||||
|
$itemTax += round($lineTotal * $taxRate1 / 100, 2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$taxRate2 = Utils::parseFloat($item['tax_rate2']);
|
if (isset($item['tax_rate2'])) {
|
||||||
if ($taxRate2 != 0) {
|
$taxRate2 = Utils::parseFloat($item['tax_rate2']);
|
||||||
$itemTax += round($lineTotal * $taxRate2 / 100, 2);
|
if ($taxRate2 != 0) {
|
||||||
|
$itemTax += round($lineTotal * $taxRate2 / 100, 2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user