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

Removing check for the tax being 0 #3329

Merged
merged 2 commits into from
Dec 13, 2017

Conversation

Akarshit
Copy link
Contributor

@Akarshit Akarshit commented Nov 20, 2017

Fix for #3328

This basically keep the same tax flow even if the tax value is 0. And doesn't trigger an exception.

@zenweasel
Copy link
Collaborator

@Akarshit How would I go about testing this? Or testing the original issue?

Copy link
Collaborator

@zenweasel zenweasel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need some way of verifying that
a) there is a problem
b) that this fixes that problem

@Akarshit
Copy link
Contributor Author

Ok I am not 100% sure about this, but I was able to reproduce this in development mode using the following steps.

  1. Set up Avalara settings with Shipping Tax Code as PC040100
  2. Checkout the example product with delivery address as
    Country -> United States
    Address -> 250 S 900 E Address -> Cedar Cliff Apartments
    Postal -> 84102 City -> Salt Lake City Region -> Utah
    Phone -> 3852166582(random)
  3. You should see some exception on the server console like
Exception in callback of async function: TypeError: Cannot read property 'errorCode' of undefined
    at imports/plugins/included/taxes-avalara/server/hooks/hooks.js:38:13
    at Object.taxCalc.estimateCart (imports/plugins/included/taxes-avalara/server/methods/taxCalc.js:467:14)
    at [object Object].<anonymous> (imports/plugins/included/taxes-avalara/server/hooks/hooks.js:30:13)
    at server/api/method-hooks.js:126:36
    at arrayEach (/Users/z002twn/Akarshit/reaction/node_modules/lodash/_arrayEach.js:15:9)
    at forEach (/Users/z002twn/Akarshit/reaction/node_modules/lodash/forEach.js:38:10)
    at [object Object]._MethodHooks._wrappers.(anonymous function) (server/api/method-hooks.js:125:5)
    at packages/check.js:128:16
    at [object Object].EVp.withValue (packages/meteor.js:1134:15)
    at Object.exports.Match._failIfArgumentsAreNotAllChecked (packages/check.js:127:41)
    at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1765:18)
    at packages/ddp-server/livedata_server.js:1686:15
    at [object Object].EVp.withValue (packages/meteor.js:1134:15)
    at packages/ddp-server/livedata_server.js:1684:36
    at [object Object]._.extend.applyAsync (packages/ddp-server/livedata_server.js:1683:12)
    at [object Object]._.extend.apply (packages/ddp-server/livedata_server.js:1622:26)```

@spencern spencern changed the base branch from master to release-1.7.0 December 13, 2017 23:39
@spencern spencern merged commit e8ccc4a into reactioncommerce:release-1.7.0 Dec 13, 2017
This was referenced Dec 14, 2017
@Akarshit Akarshit deleted the bugfix-alavara0 branch February 23, 2021 19:11
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.

None yet

3 participants