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

Taxid minorchanges withunittests #10

Open
wants to merge 37 commits into
base: main
Choose a base branch
from

Conversation

GediminasGaubys
Copy link
Owner

This pull request does not have a related issue as it's part of the delivery for development agreed directly with @AndreiPanko

Implementation 1 (Customer No. in Shopify Catalogs)

  • New functionality has been added to assign 'Customer No.' in Shopify Catalogs during Customer as Company export.

Implementation 2 (Import of Multiple Company Locations)

  • New functionality has been added that stores all Company Locations during import from Shopify. The first Company Location in the response is marked as 'Default'. To receive all Company Locations instead of one, new Query 'Shpfy GQL CompLocations' has been created. And Locations part has been removed from 'Shpfy GQL Company' query.
  • During the Customer as Company export, new created Shopify Company Location is marked as 'Default'.
  • Additionally Company Locations page was created to be able to see information from Business Central side. Company Locations page can be opened from Shopify Companies and Shopify Company Card pages.

Implementation 3 (Tax ID export and Company/Customer mapping by Tax Id)

  • Tax ID export to Shopify - Added functionality to update Tax Id on Company Creation and Synchronization (new GraphQL 'companyLocationCreateTaxRegistration' created and extended GraphQL 'companyCreate' by including Tax ID). Which Customer field has to be used as Tax Id is determined by field 'Company Tax Id Mapping' value on 'Shopify Shop Card'. There are 2 possible options: 'Registration Number' and 'VAT Registration No.'. Enum is extensible, so that user could add any other option to which fields Tax ID has to be linked (implementation codeunit has to be created and linked to new Enum value).
  • Company/Customer mapping by Tax Id - The logic how Company is linked to customer has to be mapped (by email/phone, by tax id, default company) is defined on 'Company Mapping Type' field on 'Shopify Shop Card' page. The 'Company Mapping Type' enum value has to be linked with implementation codeunits that are doing actual Company/Customer mapping. The changes that has been made:
  1. Interface "Shpfy ICompany Mapping" has been extended by creating new interface 'Shpfy IFind Company Mapping' that has new procedure FindMapping()
  2. Moved Existing Mapping by email/phone logic to implementation codeunit
  3. Added new functionality to implementation codeunit for 'Default Company' selection
  4. Created new implementation codeunit to do mapping by Tax ID
  5. Updated existing code by implementing 'Type testing and casting operators for interfaces - 'is' 'as' '. This functionality identifies if implementation codeunit has new interface 'Shpfy IFind Company Mapping' implemented. If so - 'FindMapping' procedure is executed, if not - mapping using email/phone is used as default option.

Implementation 4 (Company Location Payment Terms Export/Import)

  • Company Location Payment Terms Export - new GraphQL implementation codeunit for 'Shpfy GraphQL Type' has been created which allows to send Payment Terms to Shopify. If mapped value for Customer Payment Terms Code exist in 'Payment Terms Mapping', Shopify Payment Terms ID is exported to Shopify for that Company/Customer.
  • Company Location Payment Terms Import - GraphQL 'Shpfy GQL Company' that retrieves Company information from Shopify has been updated by adding new field 'paymentTermsTemplate'. If During the import the mapping in 'Payment Terms Mapping' exist, the Customer in BC is updated by the Payment Terms from Shopify.

Implementation 5 (Populate External ID during the export customer as a company)

  • Existing GraphQL that creates new Companies in Shopify has been updated by adding new field 'externalId'. The value which is 'Customer No.'

jzaksauskas and others added 30 commits September 30, 2024 16:14
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 this pull request may close these issues.

3 participants