Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to handle portugal's VAT in autonomous region ? #39

Closed
PandaaAgency opened this issue Mar 9, 2021 · 3 comments · May be fixed by #42
Closed

how to handle portugal's VAT in autonomous region ? #39

PandaaAgency opened this issue Mar 9, 2021 · 3 comments · May be fixed by #42

Comments

@PandaaAgency
Copy link

PandaaAgency commented Mar 9, 2021

Hi there,

I would like to know how can I use this library with autonomous regions from portugal (from here) :

  • 22% in the Autonomous Region of Madeira
  • 18% in the Autonomous Region of the Azores

I've tried to add PT-20 (Azores ISO-Code from here) as a PT state but it seems that their VAT ared added to each other

  "PT": {
    "type": "vat",
    "rate": 0.23,
    "states": {
      "20": {
        "rate": 0.18,
        "type": "vat"
      }
    }
  },

results in a

// response
{
  type: 'vat+vat',
  rate: 0.41000000000000003,
  area: 'worldwide',
  exchange: 'consumer',
  charge: { direct: true, reverse: false },
  details: [ { type: 'vat', rate: 0.23 }, { type: 'vat', rate: 0.18 } ]
}

I cannot go with rate: -0.05 for the state because the details still contain the main PT VAT

Is there an existing solution/workaround ? Maybe we need PT-20 and PT-30 to be added as standalone countries within EU but it does not sound like the best solution

Thanks

@PandaaAgency PandaaAgency changed the title how to handle portugal's autonomous region ? how to handle portugal's VAT in autonomous region ? Mar 9, 2021
@PandaaAgency
Copy link
Author

Hi. Any news about this one ?

thx

@valeriansaliou
Copy link
Owner

Hello there!

This could be mapped the same way as done for Spain, where eg. Gran Canaria has no VAT.

The basic way to do that is to map a negative VAT for the region, which is then added to the main country VAT. So if the target region VAT is 18% where the country is 20% then mapping -2% would do.

I'm accepting PRs on to that.

@PandaaAgency
Copy link
Author

Hi @valeriansaliou and thanks for your answer.
I see your point and I just opened a PR.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants