@vendure/core 3.3.5-master-202506201216 → 3.3.5-master-202506201217
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,7 +4,8 @@ import { TaxZoneStrategy } from './tax-zone-strategy';
|
|
|
4
4
|
/**
|
|
5
5
|
* @description
|
|
6
6
|
* Address based {@link TaxZoneStrategy} which tries to find the applicable {@link Zone} based on the
|
|
7
|
-
* country of the
|
|
7
|
+
* country of the shipping address of the Order.
|
|
8
|
+
* This is useful for shops that do cross-border B2C orders and use the One-Stop-Shop (OSS) VAT scheme.
|
|
8
9
|
*
|
|
9
10
|
* Returns the default {@link Channel}'s default tax zone if no applicable zone is found.
|
|
10
11
|
*
|
|
@@ -6,7 +6,8 @@ const loggerCtx = 'AddressBasedTaxZoneStrategy';
|
|
|
6
6
|
/**
|
|
7
7
|
* @description
|
|
8
8
|
* Address based {@link TaxZoneStrategy} which tries to find the applicable {@link Zone} based on the
|
|
9
|
-
* country of the
|
|
9
|
+
* country of the shipping address of the Order.
|
|
10
|
+
* This is useful for shops that do cross-border B2C orders and use the One-Stop-Shop (OSS) VAT scheme.
|
|
10
11
|
*
|
|
11
12
|
* Returns the default {@link Channel}'s default tax zone if no applicable zone is found.
|
|
12
13
|
*
|
|
@@ -35,8 +36,8 @@ const loggerCtx = 'AddressBasedTaxZoneStrategy';
|
|
|
35
36
|
*/
|
|
36
37
|
class AddressBasedTaxZoneStrategy {
|
|
37
38
|
determineTaxZone(ctx, zones, channel, order) {
|
|
38
|
-
var _a
|
|
39
|
-
const countryCode = (
|
|
39
|
+
var _a;
|
|
40
|
+
const countryCode = (_a = order === null || order === void 0 ? void 0 : order.shippingAddress) === null || _a === void 0 ? void 0 : _a.countryCode;
|
|
40
41
|
if (order && countryCode) {
|
|
41
42
|
const zone = zones.find(z => { var _a; return (_a = z.members) === null || _a === void 0 ? void 0 : _a.find(member => member.code === countryCode); });
|
|
42
43
|
if (zone) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-based-tax-zone-strategy.js","sourceRoot":"","sources":["../../../src/config/tax/address-based-tax-zone-strategy.ts"],"names":[],"mappings":";;;AAEA,6DAAkD;AAIlD,MAAM,SAAS,GAAG,6BAA6B,CAAC;AAEhD
|
|
1
|
+
{"version":3,"file":"address-based-tax-zone-strategy.js","sourceRoot":"","sources":["../../../src/config/tax/address-based-tax-zone-strategy.ts"],"names":[],"mappings":";;;AAEA,6DAAkD;AAIlD,MAAM,SAAS,GAAG,6BAA6B,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAa,2BAA2B;IACpC,gBAAgB,CAAC,GAAmB,EAAE,KAAa,EAAE,OAAgB,EAAE,KAAa;;QAChF,MAAM,WAAW,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,eAAe,0CAAE,WAAW,CAAC;QACxD,IAAI,KAAK,IAAI,WAAW,EAAE,CAAC;YACvB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,WAAC,OAAA,MAAA,CAAC,CAAC,OAAO,0CAAE,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,WAAW,CAAC,CAAA,EAAA,CAAC,CAAC;YACrF,IAAI,IAAI,EAAE,CAAC;gBACP,OAAO,IAAI,CAAC;YAChB,CAAC;YACD,uBAAM,CAAC,KAAK,CACR,iCAAiC,WAAW,uBAAuB,OAAO,CAAC,cAAc,CAAC,IAAI,cAAc,KAAK,CAAC,IAAI,EAAE,EACxH,SAAS,CACZ,CAAC;QACN,CAAC;QACD,OAAO,OAAO,CAAC,cAAc,CAAC;IAClC,CAAC;CACJ;AAfD,kEAeC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendure/core",
|
|
3
|
-
"version": "3.3.5-master-
|
|
3
|
+
"version": "3.3.5-master-202506201217",
|
|
4
4
|
"description": "A modern, headless ecommerce framework",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@nestjs/platform-express": "^11.0.12",
|
|
50
50
|
"@nestjs/terminus": "^11.0.0",
|
|
51
51
|
"@nestjs/typeorm": "^11.0.0",
|
|
52
|
-
"@vendure/common": "^3.3.5-master-
|
|
52
|
+
"@vendure/common": "^3.3.5-master-202506201217",
|
|
53
53
|
"bcrypt": "^5.1.1",
|
|
54
54
|
"body-parser": "^1.20.2",
|
|
55
55
|
"cookie-session": "^2.1.0",
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"optional": true
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "733914de4db29adb760af0104078ddfe6cf8a053"
|
|
118
118
|
}
|