-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Avalara Tax Compliance #1870
Merged
kieckhafer
merged 125 commits into
wip-release-0.20.0
from
brent-seun-avalara-taxcompliance-1793
Mar 10, 2017
Merged
Avalara Tax Compliance #1870
Changes from all commits
Commits
Show all changes
125 commits
Select commit
Hold shift + click to select a range
9f76387
Save company object from Avalara API
impactmass c354446
Load `appVersion` from package,json at startup. Create global `getApp…
brent-hoover e5c16fa
create avaGet function to pass in extra header info. Add getTaxCodes …
brent-hoover c9e7e84
Extend plugin to also provide tax codes
brent-hoover 6638741
Add Test connection option in Avalara admin dashboard
impactmass 91af920
Send taxCode along with cart/orders
brent-hoover 67e2fd8
Capture full tax detail in "taxes" field
brent-hoover 0533278
Update Test Credentials to use companyCode API
impactmass 4b11f1c
Add input field for shipping tax code
brent-hoover 10ad786
Add provides: taxCodes API to taxcloud
brent-hoover 4a3dfe1
add itemCode to cart/order payload
brent-hoover f59a3d9
use item id as line number. Pass in correct productId
brent-hoover 74fa576
Pass in shipping as additional non-taxable (based on taxcode) item
brent-hoover 6c4ed39
allow avaPost/avaGet to be used asynchronously
brent-hoover 1ee2c86
Add setting to turn off tax calculation separately from disabling the…
brent-hoover eeb68b8
Add the rest of the fields to the form (except validation countries)
brent-hoover 0203559
Use correct UID and correct URL for getTaxCode
brent-hoover 10b402e
Add setup for address validation by country
impactmass 71fe8c6
Don't commit documents when commit is turned off. Eliminate unneeded …
brent-hoover 66120a6
Eliminate async versions of avaGet/avaPost. These should never be cal…
brent-hoover 9f0753e
Add defaults for new configuration settings. Make shippingTaxCode req…
brent-hoover 10f0a7d
Make get/post methods use timeout, do some logging.
brent-hoover 2fdb4cb
Don't do address validation when package is disabled, even when addre…
brent-hoover 99b1d97
Enable addressValidation by default
brent-hoover 73908fc
Enable addressValidation by default
brent-hoover 19bcfd5
Fix date parameter
brent-hoover 20019eb
Merge. Fix conflicts.
brent-hoover b035266
Modify auth arg for test credentials setup
impactmass e859297
Extend timeout during test credentials call
impactmass 48a562b
Limit address validation country options to US and CA
impactmass f5cd7a4
Fix returned object for non-validated addresses
impactmass f953893
Log Avalara details to custom Avalogger
brent-hoover 45a7bc5
Set new defaults
brent-hoover b0269ca
Add tax settings to account profile page
impactmass b866095
Update account find for taxsettings to subscribe
impactmass ce2f853
Only log if logging is enabled
brent-hoover 60c8400
Write out Avalara requests to Logs collection via Bunyan logger
brent-hoover 071edbc
Add log retention duration setting
brent-hoover df23bb7
Merge branch 'release-0.20.0' into brent-seun-avalara-taxcompliance-1793
brent-hoover cd55f91
Add jobs to cleanup logs older than configured setting
brent-hoover 64366fd
Add logs subscription that totally doesn't work
brent-hoover 1c8aeaf
Add logs publication
brent-hoover c098fce
Get logs and pass into Template
brent-hoover 6c23f51
Add Log-specific wrapper for Griddle
brent-hoover 3a16c98
Show individual log records in detail form
brent-hoover 9d5b21b
Refine grid and detail results
brent-hoover 26ba803
Populate entity codes and plug into taxCalc
impactmass b87a412
Use new field names confirmed by AvaTax
impactmass b9be7b0
Add taxSettings to recordOrder
impactmass 8e974c6
Update entity code field key
impactmass 855c880
removed excess panel wrapper around griddle table
kieckhafer d48a62e
Merge branch 'wip-release-0.20.0' into brent-seun-avalara-taxcomplian…
brent-hoover 27f825d
Add translations
brent-hoover 0ef2817
Show tax settings only if avalara enabled
impactmass f130c12
Fix import order.
brent-hoover f9cabb3
Setup error handling on Avalara methods
impactmass 4567608
Add dimensions/tax code to PDP (#1931)
d7e458a
Correct the way we test for validation on address2
brent-hoover 646f3e2
Remove extra panel divs
brent-hoover cae3d1e
Add account ID to account management screen
brent-hoover b7f9c7d
Adjust log details for when there is no document type
brent-hoover b68265d
Rename files to match style guide
brent-hoover 5d3fded
Use individual taxSettings form each account
impactmass 3905c45
Add check to prevent populating duplicates
impactmass 8278baf
Fix reference to accountschema
impactmass 9b14db9
Fix form update to corresponding accounts
impactmass d8b0527
Add unique tax setting by customer to Avalara payload
impactmass dfec5ba
Fix exception error on geoCoder call
impactmass b809085
Only pass in regions when it's a "country with regions"
brent-hoover 064aa3a
Revert "Only pass in regions when it's a "country with regions""
brent-hoover 1663ccc
Create a refundReference which is cartId + date
brent-hoover 114f913
Ignore line items are not marked taxable
brent-hoover bd8e03c
Move taxDescription down to the variant level and pass if exists
brent-hoover c97de61
Move tax settings form into manage sidebar
impactmass 6c389a5
Fix tax settings saving bug
impactmass 92ce4e5
Merge branch 'wip-release-0.20.0' into brent-seun-avalara-taxcomplian…
brent-hoover 9b407ee
Renamed files to fit style guide
brent-hoover 54defcf
Don't allow a wide-open Account publication
brent-hoover b5ff3ca
Remove unnecessary subscription
brent-hoover 6a4f25f
Don't call API if entity codes is already populated
brent-hoover 970d82b
Simplify logic for returning no results
brent-hoover fdb9a31
Don't select a tax rate but a tax code
brent-hoover dca26d7
Rename function
brent-hoover d420e1c
Properly set Avalara countryList defaultValues
impactmass eea4cb9
Eliminate extra slash
brent-hoover 764ef90
Eliminate all extra slashes
brent-hoover 26dc92a
Check to ensure data is returned from API
impactmass 3ff33c9
Also log errors in Avalogger. Correctly filter for taxable items.
brent-hoover 9bda0d2
Require shopId
brent-hoover e3ebcc8
linting fixes
kieckhafer fe64d50
Add label to plain select. Rename method
brent-hoover b949d4a
JSDoc linting
brent-hoover 376d26d
Remove unused import
brent-hoover e75a813
Remove unused import
brent-hoover 562d8ad
Linting
brent-hoover 10d53fb
Check configuration and throw meaningful errors if not configured pro…
brent-hoover 7cfb019
Add level to log so we can filter for errors
brent-hoover 2f084d1
Tweak HTML and styling in settings panel
brent-hoover 97a26a1
Fix i18n and timeout on testCredential
impactmass 1374710
Log error with error log level
brent-hoover 29f472f
Moving select2 under community packages
5e0569b
Adding error checks to taxcodes method
1c25409
Merge branch 'brent-seun-avalara-taxcompliance-1793' of https://githu…
28f6b29
Skip config check when testing credentials
impactmass de9caa8
Trigger form validation before testcredentials
impactmass eca3f7f
Use native methods for assign and each
impactmass c7397cb
Handle error on populating Avalara entity codes
impactmass 6e234e0
Add i18n for custom label
impactmass 1cac94a
Move i18n entry to appropriate module
impactmass 2450b12
Move exemption settings into avalara module
impactmass 116656b
Implement i18n for missing fields in PDP
4d94de1
Merge branch 'brent-seun-avalara-taxcompliance-1793' of https://githu…
66f0f78
Fix CircleCI failed tests
3b238a8
Fix CircleCI failed tests
505a0de
Revert "Fix CircleCI failed tests"
9336e00
Revert "Fix CircleCI failed tests"
e4173c9
Removing empty selector per CR
brent-hoover a32b2a7
Use import rather than fs to get package.json
brent-hoover 38d1f31
Change per CR
brent-hoover 4804e82
Restructure Class syntax per CR
brent-hoover b2b1fa3
Put back "Custom Packages" header
brent-hoover f96aeba
Add TODO
brent-hoover 632b9d5
Changing default timeout to 3000 ms
brent-hoover 7c01c46
Correct error name and make error message more specific
brent-hoover 2629c6c
- updated Accounts publication name
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,6 +122,7 @@ [email protected] | |
[email protected] | ||
[email protected] | ||
mrt:[email protected] | ||
natestrauser:[email protected] | ||
[email protected] | ||
[email protected]_1 | ||
[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from "./countries"; | ||
export * from "./taxEntitycodes"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { Mongo } from "meteor/mongo"; | ||
|
||
/** | ||
* Client side collections | ||
*/ | ||
export const TaxEntityCodes = new Mongo.Collection(null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,6 @@ <h3 class="panel-title"> | |
{{/each}} | ||
</ul> | ||
</div> | ||
|
||
</div> | ||
{{/if}} | ||
</template> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { Router, i18next } from "/client/api"; | ||
import { i18next } from "/client/api"; | ||
|
||
export default { | ||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Reaction } from "/server/api"; | ||
|
||
Reaction.registerPackage({ | ||
label: "Logging", | ||
name: "reaction-logging", | ||
autoEnable: true | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import "./publications"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Meteor } from "meteor/meteor"; | ||
import { check, Match } from "meteor/check"; | ||
import { Roles } from "meteor/alanning:roles"; | ||
import { Counts } from "meteor/tmeasday:publish-counts"; | ||
import { Logs } from "/lib/collections"; | ||
import { Reaction } from "/server/api"; | ||
|
||
|
||
/** | ||
* Publish logs | ||
* Poor admins get swamped with a ton of data so let's just only subscribe to one | ||
* logType at a time | ||
*/ | ||
Meteor.publish("Logs", function (query, options) { | ||
check(query, Match.OneOf(undefined, Object)); | ||
check(options, Match.OneOf(undefined, Object)); | ||
|
||
const shopId = Reaction.getShopId(); | ||
if (!query || !query.logType || !shopId) { | ||
return this.ready(); | ||
} | ||
|
||
const logType = query.logType; | ||
if (Roles.userIsInRole(this.userId, ["admin", "owner"])) { | ||
Counts.publish(this, "logs-count", Logs.find({ shopId, logType })); | ||
return Logs.find({ shopId, logType }, { sort: { date: 1 } }); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,12 +11,21 @@ export const TaxCodes = new SimpleSchema({ | |
unique: true | ||
}, | ||
shopId: { | ||
type: String | ||
}, | ||
taxCode: { | ||
type: String, | ||
optional: true | ||
label: "Tax Code" | ||
}, | ||
taxCodeProvider: { | ||
type: String, | ||
label: "Tax Code Provider" | ||
}, | ||
ssuta: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Assuming this is correct, but just want to make sure There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't new code, is there a reason we think it's incorrect? |
||
type: Boolean, | ||
label: "Streamlined Sales Tax" | ||
label: "Streamlined Sales Tax", | ||
optional: true, | ||
defaultValue: false | ||
}, | ||
title: { | ||
type: String, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be avoiding introducing new atmosphere packages. Can't this be used as an npm import?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aaronjudd there's an NPM package for this (select2), but under its usage is a bunch of CDNs to source from, and alternative integrations, hence the use of the meteor package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've talked about this a couple of times and the feeling was that this package was coming out as soon as the variant stuff was converted to React anyway