From 339c9d549a3d946b0497e815e10f9c116fa6b347 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 22 Jan 2024 11:02:17 +1100 Subject: [PATCH] Set tax %0 on line item if zero rated tax is selecteD --- app/DataMapper/Tax/BaseRule.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/DataMapper/Tax/BaseRule.php b/app/DataMapper/Tax/BaseRule.php index 41f9abd867..ccc0d46a44 100644 --- a/app/DataMapper/Tax/BaseRule.php +++ b/app/DataMapper/Tax/BaseRule.php @@ -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;