From 45632721a210b18725a39d0f51fc4eacd12cb713 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 29 Mar 2023 14:30:16 +1100 Subject: [PATCH] Refactor for tax structure --- app/DataMapper/Tax/US/Rule.php | 10 ++++++++++ app/Helpers/Invoice/InvoiceItemSum.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/DataMapper/Tax/US/Rule.php b/app/DataMapper/Tax/US/Rule.php index 5531a341cb24..d6dde1a5e835 100644 --- a/app/DataMapper/Tax/US/Rule.php +++ b/app/DataMapper/Tax/US/Rule.php @@ -144,4 +144,14 @@ class Rule implements RuleInterface return $this; } + + public function init(): self + { + return $this; + } + + public function calculateRates(): self + { + return $this; + } } diff --git a/app/Helpers/Invoice/InvoiceItemSum.php b/app/Helpers/Invoice/InvoiceItemSum.php index 6070e176f3ee..adc8d562039e 100644 --- a/app/Helpers/Invoice/InvoiceItemSum.php +++ b/app/Helpers/Invoice/InvoiceItemSum.php @@ -141,7 +141,7 @@ class InvoiceItemSum //should we be filtering by client country here? do we need to reflect at the company <=> client level? if (in_array($this->client->country->iso_3166_2, $this->tax_jurisdictions)) { //only calculate for supported tax jurisdictions - $class = "App\DataMapper\Tax\\".strtolower($this->client->country->iso_3166_2)."\\Rule"; + $class = "App\DataMapper\Tax\\".$this->client->country->iso_3166_2."\\Rule"; $tax_data = new Response($this->invoice->tax_data);