public function SwissVat::buildZones in Commerce Core 8.2
Builds the tax zones.
Return value
\Drupal\commerce_tax\TaxZone[] The tax zones, keyed by ID.
Overrides LocalTaxTypeBase::buildZones
File
- modules/
tax/ src/ Plugin/ Commerce/ TaxType/ SwissVat.php, line 33
Class
- SwissVat
- Provides the Swiss VAT tax type.
Namespace
Drupal\commerce_tax\Plugin\Commerce\TaxTypeCode
public function buildZones() {
$zones = [];
$zones['ch'] = new TaxZone([
'id' => 'ch',
'label' => $this
->t('Switzerland'),
'display_label' => $this
->t('VAT'),
'territories' => [
[
'country_code' => 'CH',
],
[
'country_code' => 'LI',
],
// Büsingen.
[
'country_code' => 'DE',
'included_postal_codes' => '78266',
],
// Lake Lugano.
[
'country_code' => 'IT',
'included_postal_codes' => '22060',
],
],
'rates' => [
[
'id' => 'standard',
'label' => $this
->t('Standard'),
'percentages' => [
[
'number' => '0.08',
'start_date' => '2011-01-01',
'end_date' => '2017-12-31',
],
[
'number' => '0.077',
'start_date' => '2018-01-01',
],
],
'default' => TRUE,
],
[
'id' => 'hotel',
'label' => $this
->t('Hotel'),
'percentages' => [
[
'number' => '0.038',
'start_date' => '2011-01-01',
'end_date' => '2017-12-31',
],
[
'number' => '0.037',
'start_date' => '2018-01-01',
],
],
],
[
'id' => 'reduced',
'label' => $this
->t('Reduced'),
'percentages' => [
[
'number' => '0.025',
'start_date' => '2011-01-01',
],
],
],
],
]);
return $zones;
}