1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Set tax %0 on line item if zero rated tax is selecteD

This commit is contained in:
David Bomba 2024-01-22 11:02:17 +11:00
parent fee1f7311d
commit 339c9d549a

View File

@ -319,6 +319,7 @@ class BaseRule implements RuleInterface
Product::PRODUCT_TYPE_EXEMPT => $this->taxExempt($item),
Product::PRODUCT_TYPE_REDUCED_TAX => $this->taxReduced($item),
Product::PRODUCT_TYPE_OVERRIDE_TAX => $this->override($item),
Product::PRODUCT_TYPE_ZERO_RATED => $this->zeroRated($item),
default => $this->defaultForeign(),
};
@ -327,6 +328,14 @@ class BaseRule implements RuleInterface
}
public function zeroRated($item): self
{
$this->tax_rate1 = 0;
$this->tax_name1 = ctrans('texts.zero_rated');
return $this;
}
public function taxByType(mixed $type): self
{
return $this;