From 4dba4ec35ae040254c3f0d1e61b4e5439b6ffda6 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 17 May 2023 15:45:06 +1000 Subject: [PATCH] Return early if we are not in a taxable region --- app/DataMapper/Tax/BaseRule.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/DataMapper/Tax/BaseRule.php b/app/DataMapper/Tax/BaseRule.php index cab06d7a4fae..5674a4d57717 100644 --- a/app/DataMapper/Tax/BaseRule.php +++ b/app/DataMapper/Tax/BaseRule.php @@ -140,8 +140,12 @@ class BaseRule implements RuleInterface $this->client = $invoice->client; - $this->resolveRegions() - ->configTaxData(); + $this->resolveRegions(); + + if(!$this->isTaxableRegion()) + return $this; + + $this->configTaxData(); $this->tax_data = new Response($this->invoice->tax_data);