-
Notifications
You must be signed in to change notification settings - Fork 314
Fix: Map BC country code to ISO code for Shopify Tax Area lookups #6130
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
base: main
Are you sure you want to change the base?
Fix: Map BC country code to ISO code for Shopify Tax Area lookups #6130
Conversation
Fixes microsoft#6129 ## Problem The Shopify Connector failed when exporting customers/companies with the EU country code 'EL' for Greece. Business Central uses 'EL' for VIES (VAT Information Exchange System) validation, but Shopify requires the ISO 3166-1 alpha-2 code 'GR'. The Shpfy Tax Area table stores Shopify's ISO country codes, but the export functions were using BC's country code directly for Tax Area lookups, causing province information lookups to fail. ## Solution Modified ShpfyCustomerExport and ShpfyCompanyExport codeunits to: 1. Get the ISO country code from the Country/Region table first 2. Use the ISO code for Tax Area lookups instead of BC's country code 3. Use the ISO code for the Shopify API (already was doing this, but moved it earlier in the process) ## Testing Added new tests to verify the ISO country code mapping works correctly: - UnitTestFillInShopifyCustomerDataISOCountryCodeMapping - UnitTestFillInShopifyCompanyLocationISOCountryCodeMapping Updated existing tests to ensure they set up ISO codes properly.
|
@frank-embleton please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
|
@frank-embleton You have compilation errors: |
Fixes #6129
Problem
The Shopify Connector fails when exporting customers/companies with the EU country code "EL" for Greece. Business Central correctly uses "EL" for VIES (VAT Information Exchange System) validation and EU regulatory compliance, but Shopify's API requires the ISO 3166-1 alpha-2 standard code "GR".
The
Shpfy Tax Areatable stores Shopify's ISO country codes (e.g., "GR"), but the export functions inShpfyCustomerExportandShpfyCompanyExportwere using BC's country code (e.g., "EL") directly for Tax Area lookups, causing province/county information lookups to fail.Solution
Modified
ShpfyCustomerExportandShpfyCompanyExportcodeunits to:Testing
UnitTestFillInShopifyCustomerDataISOCountryCodeMapping- verifies EL→GR mapping for customer exportUnitTestFillInShopifyCompanyLocationISOCountryCodeMapping- verifies EL→GR mapping for company exportFiles Changed
src/Apps/W1/Shopify/App/src/Customers/Codeunits/ShpfyCustomerExport.Codeunit.alsrc/Apps/W1/Shopify/App/src/Companies/Codeunits/ShpfyCompanyExport.Codeunit.alsrc/Apps/W1/Shopify/Test/Customers/ShpfyCustomerExportTest.Codeunit.alsrc/Apps/W1/Shopify/Test/Companies/ShpfyCompanyExportTest.Codeunit.alFixes AB#618714