Internal migration for tax model

This commit is contained in:
David Bomba 2025-06-14 08:36:33 +10:00
parent 16e65ff7f4
commit e33ed506bf
1 changed files with 14 additions and 2 deletions

View File

@ -18,7 +18,7 @@ class TaxModel
public string $seller_subregion = 'CA'; public string $seller_subregion = 'CA';
/** @var string $version */ /** @var string $version */
public string $version = 'gamma'; public string $version = 'delta';
/** @var object $regions */ /** @var object $regions */
public object $regions; public object $regions;
@ -132,6 +132,18 @@ class TaxModel
} }
if ($this->version == 'delta') {
$this->regions->EU->subregions->BG = new \stdClass();
$this->regions->EU->subregions->BG->tax_rate = 20;
$this->regions->EU->subregions->BG->tax_name = 'ДДС';
$this->regions->EU->subregions->BG->reduced_tax_rate = 5;
$this->regions->EU->subregions->BG->apply_tax = false;
$this->regions->EU->subregions->BG->vat_number = '';
$this->version = 'epsilon';
}
return $this; return $this;
} }
@ -592,7 +604,7 @@ class TaxModel
$this->regions->EU->subregions->BG = new \stdClass(); $this->regions->EU->subregions->BG = new \stdClass();
$this->regions->EU->subregions->BG->tax_rate = 20; $this->regions->EU->subregions->BG->tax_rate = 20;
$this->regions->EU->subregions->BG->tax_name = 'НДС'; $this->regions->EU->subregions->BG->tax_name = 'ДДС';
$this->regions->EU->subregions->BG->reduced_tax_rate = 9; $this->regions->EU->subregions->BG->reduced_tax_rate = 9;
$this->regions->EU->subregions->BG->apply_tax = false; $this->regions->EU->subregions->BG->apply_tax = false;