Skip to content
This repository has been archived by the owner on Apr 22, 2019. It is now read-only.

Need to configure Customer Code Format using another attribute #99

Closed
JesKingDev opened this issue Dec 13, 2017 · 10 comments
Closed

Need to configure Customer Code Format using another attribute #99

JesKingDev opened this issue Dec 13, 2017 · 10 comments
Assignees

Comments

@JesKingDev
Copy link

Preconditions

  1. Magento 2.2 Open Source
  2. Avatax module 1.2.6
  3. PHP 7.1.8
  4. MySQL 5.6.35

Steps to reproduce

  1. In Avatax configuration, locate Data Mapping Section.
  2. Locate Customer Code Format dropdown.
  3. Attempt to select a custom attribute used to map the customer number in Avalara.

Expected result

  1. Expect to provide text based entry or select from dropdown of all customer attributes (ex. field called ext_customer_number, erp_customer_number, avalara_customer_number, etc.)

Actual result

  1. Only options are ID, Email, Name (ID)
@rsisco rsisco self-assigned this Dec 27, 2017
@rsisco
Copy link

rsisco commented Dec 27, 2017

@JesKingDev - I am working on adding this enhancement to the next version of the extension.

@JesKingDev
Copy link
Author

Awesome thanks! Any ETA on availability?

@rsisco
Copy link

rsisco commented Dec 28, 2017

@JesKingDev - I hope to release a new version by the end of next week.

@rsisco
Copy link

rsisco commented Dec 29, 2017

@JesKingDev - This has been added to the latest release (1.3.0); which I have just published.

Closing this issue.

@rsisco rsisco closed this as completed Dec 29, 2017
@JesKingDev
Copy link
Author

@rsisco This enhancement works if the is_user_defined field = 1, however there are other scenarios where the value needs to be defined by administrators, or by 3rd party extensions, and is_user_defined needs to be 0. Can you refine this functionality to allow for this scenario as well?

@rsisco rsisco reopened this Mar 27, 2018
@JesKingDev
Copy link
Author

@rsisco Any ETA on a fix for this issue?

@rsisco
Copy link

rsisco commented Apr 3, 2018

@JesKingDev - I just published release 1.4.0 to include the ability to use any customer attribute for the Customer Code.

@rsisco rsisco closed this as completed Apr 3, 2018
@JesKingDev
Copy link
Author

Thanks, @rsisco !

@JesKingDev
Copy link
Author

JesKingDev commented Apr 10, 2018

@rsisco -
We ran into an error scenario with the latest change #118. If the customer code attribute is not set on the customer entity (ex use cases: new B2B accounts which haven't yet been registered with Avalara, B2C customers on a site where only B2B customers are registered in Avalara), we see an error 500 with the below output:

Fatal error: Uncaught Error: Call to a member function getValue() on null in /var/app/current/vendor/classyllama/module-avatax/Framework/Interaction/Tax.php:942 Stack trace: #0 /var/app/current/vendor/classyllama/module-avatax/Framework/Interaction/Tax.php(368): ClassyLlama\AvaTax\Framework\Interaction\Tax->retrieveCustomerCode(Object(Magento\Customer\Model\Data\Customer), 'erp_customer_nu...') #1 /var/app/current/vendor/classyllama/module-avatax/Framework/Interaction/Tax.php(506): ClassyLlama\AvaTax\Framework\Interaction\Tax->getCustomerCode(Object(Magento\Quote\Model\Quote)) #2 /var/app/current/vendor/classyllama/module-avatax/Framework/Interaction/Tax.php(587): ClassyLlama\AvaTax\Framework\Interaction\Tax->convertTaxQuoteDetailsToData(Object(Magento\Tax\Model\Sales\Quote\QuoteDetails), Object(Magento\Quote\Model\ShippingAssignment), Object(Magento\Quote\Model\Quote)) #3 /var/app/current/vendor/classyllama/module-avatax/Framework/Interaction/Tax/Get.php(223): ClassyLlama\AvaTax\Framework\Interaction\Tax->getGetTaxReques in /var/app/current/vendor/classyllama/module-avatax/Framework/Interaction/Tax.php on line 942

@rsisco
Copy link

rsisco commented Apr 12, 2018

@JesKingDev - Wow, this is the issue that just won't die. I just published a new release that addresses this problem.

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

No branches or pull requests

2 participants