From 0b55e491116c28b165dd1f6dc9585efa1e482f2e Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 3 Jul 2023 19:26:08 +1000 Subject: [PATCH] Catch edge case where client tax data is not configured --- app/DataMapper/Tax/BaseRule.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/DataMapper/Tax/BaseRule.php b/app/DataMapper/Tax/BaseRule.php index 060c3b1775e9..78cb2e41b416 100644 --- a/app/DataMapper/Tax/BaseRule.php +++ b/app/DataMapper/Tax/BaseRule.php @@ -145,6 +145,11 @@ class BaseRule implements RuleInterface $this->client = $invoice->client; + if(!$this->client->tax_data){ + $this->should_calc_tax = false; + return $this; + } + $this->resolveRegions(); if(!$this->isTaxableRegion())