From e5c3c1b257f2b661723966d27b3282e185962c9f Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 24 May 2023 23:31:19 +1000 Subject: [PATCH] FIxes for the base rule --- app/DataMapper/Tax/BaseRule.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/DataMapper/Tax/BaseRule.php b/app/DataMapper/Tax/BaseRule.php index c30f8a5d7a..b5be906b23 100644 --- a/app/DataMapper/Tax/BaseRule.php +++ b/app/DataMapper/Tax/BaseRule.php @@ -182,7 +182,7 @@ class BaseRule implements RuleInterface * Destination - Client Tax Data * */ - // $tax_data = new Response([]); + $tax_data = false; if($this->seller_region == 'US' && $this->client_region == 'US'){ @@ -193,14 +193,12 @@ class BaseRule implements RuleInterface /** We should never encounter this scenario */ if(!$company->origin_tax_data) { - $this->should_calc_tax = false; - + $this->should_calc_tax = false; return $this; - } /** If we are in a Origin based state, force the company tax here */ - if($company?->origin_tax_data?->originDestination == 'O' && ($company->tax_data?->seller_subregion == $this->client_subregion)) { + if($company->origin_tax_data?->originDestination == 'O' && ($company->tax_data?->seller_subregion == $this->client_subregion)) { $tax_data = $company->origin_tax_data;