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

Fix Greece VAT number online check #64

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix Greece VAT number online check
  • Loading branch information
intarsz committed Feb 12, 2024
commit c7f60414d8d1f63b9f75e061dedd8edd62ec962a
5 changes: 5 additions & 0 deletions lib/sales_tax.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,11 @@ SalesTax.prototype.validateTaxNumber = function(
// Split VAT number (n extract actual VAT number)
var splitMatch = cleanTaxNumber.match(regex_eu_vat);

if (countryCode === 'GR') {
// Greece has 'EL' code in EU VAT
countryCode = 'EL';
}

// Check fraud on EU VAT number?
if (splitMatch && splitMatch[1]) {
check_fraud_eu_vat(
Expand Down