-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial commit tax-rebase plugin Initial commit for issue #972 * split providers to plugins/included * Griddle updates - fork MeteorGriddle into core/ui-grid - move fetchTI - add i18n taxSettings * initial grid editing * add taxSettings labels * initial custom add / edit tax rates - initial working forms, edit toggling.. bit rough.. * rename tax-base to taxes * updated custom grid - adds row selection * add custom rate form reset * updated custom settings * add cart hooks to trigger taxes/calculate * update hooks, taxes/deleteRate - also adds taxes/deleteRate * migrate schemas to plugins - also set taxCloud jobs to not run by default * add custom tax rates calculation - add taxes, tax to cart schema - taxes not published to client - updates global cartTotal helpers * check for shipping * migrate settings to plugins * add tax hooks to plugins -abort idea on “provides” as a package property * Avalara Tax Lookup - adds taxes/setRate method * comment unused fields - comment out first implementation unused fields These are fields that will be used future enhancements to taxes. They are commented out for now. * logger cleanup - move info to debug * updated product data with default taxable items - add taxCode placeholder to schema * taxCloud tax rate calculations * disable taxjar, check for packages - disable while module is not functional - WIP fetch rates and api configuration * custom rate ui cleanup * taxes method test - a weak attempt at a test but gets the ball rolling and actually fixes a todo * updated test, versions - add done to test - updated meteor package versions * remove unused template registry entries - final cleanup, ready for PR to development - pending tests - pending docs * avoid running country-data unless address exists * add tax rate delete - adds delete and confirm to edit form * linted griddle.js * remove unused import * fix display of taxes in order workflow perhaps this should be updated to “tax”, instead of taxes in the invoice object. * line item calculations - added for custom rates - added for avalara rates are calculated by individual line items but on a general rate for the cart. * update case linted * updated variant methods - update products/updateProductField to handle boolean - kludge update of childVariants when parentVariant is updated - remove default value from form - small cleanups
- Loading branch information
1 parent
3fa9c37
commit 2dece38
Showing
79 changed files
with
2,204 additions
and
189 deletions.
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 |
---|---|---|
|
@@ -133,6 +133,7 @@ raix:[email protected] | |
raix:[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
|
@@ -148,6 +149,7 @@ [email protected] | |
[email protected] | ||
[email protected] | ||
[email protected] | ||
tmeasday:[email protected] | ||
tmeasday:[email protected] | ||
[email protected] | ||
[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
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,4 @@ | ||
import "./settings/custom.html"; | ||
import "./settings/custom.js"; | ||
import "./settings/settings.html"; | ||
import "./settings/settings.js"; |
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,97 @@ | ||
<template name="customTaxRates"> | ||
<div> | ||
{{> React taxGrid }} | ||
</div> | ||
|
||
<div class="pull-right"> | ||
{{> React editButton }} | ||
</div> | ||
|
||
{{#if instance.state.get 'isEditing'}} | ||
<div> | ||
{{#if instance.state.get 'editingId'}} | ||
|
||
{{#autoForm | ||
schema=taxSchema | ||
type="method-update" | ||
meteormethod="taxes/addRate" | ||
doc=taxRate | ||
id="customTaxRates-update-form" | ||
resetOnSuccess=true | ||
}} | ||
<div> | ||
<!-- {{> afQuickField name='taxCode' options=taxCodes class='form-control'}} | ||
{{> afQuickField name='cartMethod' options="allowed" class='form-control'}} | ||
{{> afQuickField name='taxLocale' options="allowed" class='form-control'}} | ||
{{> afQuickField name='taxShipping'}} | ||
{{> afQuickField name='taxIncluded'}} | ||
{{> afQuickField name='discountsIncluded'}} --> | ||
{{> afQuickField name='country' options=countryOptions class='form-control'}} | ||
|
||
<label class="control-label">{{afFieldLabelText name='region'}}</label> | ||
{{#if statesForCountry}} | ||
{{>afFieldInput name="region" value=region options=statesForCountry class='form-control'}} | ||
{{else}} | ||
{{>afFieldInput name="region" value=region class='form-control'}} | ||
{{/if}} | ||
{{#if afFieldIsInvalid name="region"}} | ||
<span class="help-block">{{afFieldMessage name="region"}}</span> | ||
{{/if}} | ||
|
||
{{> afQuickField name='postal' class='form-control' placeholder="Postal Code"}} | ||
{{> afQuickField name='rate' class='form-control' placeholder="Rate as a percentage"}} | ||
</div> | ||
{{> taxSettingsSubmitButton instance=instance}} | ||
{{/autoForm}} | ||
|
||
{{else}} | ||
|
||
{{#autoForm | ||
schema=taxSchema | ||
type="method" | ||
meteormethod="taxes/addRate" | ||
id="customTaxRates-insert-form" | ||
doc=taxRate | ||
resetOnSuccess=true | ||
}} | ||
<div> | ||
<!-- {{> afQuickField name='taxCode' options=taxCodes class='form-control'}} | ||
{{> afQuickField name='cartMethod' options="allowed" class='form-control'}} | ||
{{> afQuickField name='taxLocale' options="allowed" class='form-control'}} | ||
{{> afQuickField name='taxShipping'}} | ||
{{> afQuickField name='taxIncluded'}} | ||
{{> afQuickField name='discountsIncluded'}} --> | ||
{{> afQuickField name='country' options=countryOptions class='form-control'}} | ||
|
||
<label class="control-label">{{afFieldLabelText name='region'}}</label> | ||
{{#if statesForCountry}} | ||
{{>afFieldInput name="region" value=region options=statesForCountry class='form-control'}} | ||
{{else}} | ||
{{>afFieldInput name="region" value=region class='form-control'}} | ||
{{/if}} | ||
{{#if afFieldIsInvalid name="region"}} | ||
<span class="help-block">{{afFieldMessage name="region" placeholder="State/Region/Province"}}</span> | ||
{{/if}} | ||
|
||
{{> afQuickField name='postal' class='form-control' placeholder="Postal Code"}} | ||
{{> afQuickField name='rate' class='form-control' placeholder="Rate as a percentage"}} | ||
</div> | ||
{{> taxSettingsSubmitButton instance=instance}} | ||
{{/autoForm}} | ||
{{/if}} | ||
</div> | ||
{{/if}} | ||
</template> | ||
|
||
|
||
<template name="taxSettingsSubmitButton"> | ||
<div class="clearfix"> | ||
<div class="pull-right"> | ||
<button type="button" class="btn btn-primary cancel" data-i18n="app.cancel">Cancel</button> | ||
{{#if instance.state.get 'editingId'}} | ||
<button type="button" class="btn btn-primary delete" data-i18n="app.delete">Delete</button> | ||
{{/if}} | ||
<button type="submit" class="btn btn-primary" data-i18n="app.saveChanges">Save Changes</button> | ||
</div> | ||
</div> | ||
</template> |
Oops, something went wrong.