Refactor for tax structure

This commit is contained in:
David Bomba 2023-03-29 14:30:16 +11:00
parent d471604862
commit 45632721a2
2 changed files with 11 additions and 1 deletions

View File

@ -144,4 +144,14 @@ class Rule implements RuleInterface
return $this; return $this;
} }
public function init(): self
{
return $this;
}
public function calculateRates(): self
{
return $this;
}
} }

View File

@ -141,7 +141,7 @@ class InvoiceItemSum
//should we be filtering by client country here? do we need to reflect at the company <=> client level? //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 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); $tax_data = new Response($this->invoice->tax_data);