@vates/cart
Advanced tools
Comparing version 0.0.2 to 0.1.0
@@ -80,2 +80,7 @@ 'use strict'; | ||
}, | ||
subCompany: { | ||
get: function get() { | ||
return order.subCompany; | ||
} | ||
}, | ||
onUpgrade: { | ||
@@ -340,3 +345,3 @@ get: function get() { | ||
item.tax = getTax(countryCode, item.amount, item.currency, { | ||
item.tax = getTax(countryCode, this.subCompany, item.amount, item.currency, { | ||
taxRatio: taxRatio, | ||
@@ -742,5 +747,5 @@ taxName: taxName | ||
function getTax(countryCode, amount) { | ||
var currency = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'USD'; | ||
var _ref7 = arguments[3]; | ||
function getTax(countryCode, subCompany, amount) { | ||
var currency = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'USD'; | ||
var _ref7 = arguments[4]; | ||
var _ref7$taxRatio = _ref7.taxRatio, | ||
@@ -751,3 +756,3 @@ taxRatio = _ref7$taxRatio === undefined ? undefined : _ref7$taxRatio, | ||
var vatRatio = taxRatio !== undefined ? taxRatio : Utils.getVatRate(countryCode); | ||
var vatRatio = taxRatio !== undefined ? taxRatio : Utils.getVatRate(countryCode, subCompany); | ||
var tax = amount * vatRatio; | ||
@@ -754,0 +759,0 @@ |
{ | ||
"name": "@vates/cart", | ||
"version": "0.0.2", | ||
"version": "0.1.0", | ||
"description": "A class to wrap and add methods to an Order's Cart.", | ||
@@ -22,4 +22,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@vates/discount": "^0.0.0", | ||
"@vates/www-xo-utils": "^0.25.0", | ||
"@vates/discount": "^0.1.0", | ||
"@vates/www-xo-utils": "^0.29.0", | ||
"lodash": "^4.17.21", | ||
@@ -26,0 +26,0 @@ "moment": "^2.29.4" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24867
692
+ Added@vates/discount@0.1.0(transitive)
+ Added@vates/www-xo-utils@0.29.0(transitive)
- Removed@vates/discount@0.0.0(transitive)
- Removed@vates/www-xo-utils@0.25.0(transitive)
Updated@vates/discount@^0.1.0
Updated@vates/www-xo-utils@^0.29.0