@things-factory/operato-mms 4.1.18 → 4.1.19
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.
- package/dist-server/graphql/resolvers/interface-with-hub/auto-update-all-marketplace-product-variation-quantity.js +100 -70
- package/dist-server/graphql/resolvers/interface-with-hub/auto-update-all-marketplace-product-variation-quantity.js.map +1 -1
- package/package.json +43 -43
- package/server/graphql/resolvers/interface-with-hub/auto-update-all-marketplace-product-variation-quantity.ts +136 -84
- package/config.development.js +0 -88
|
@@ -10,82 +10,112 @@ const shell_1 = require("@things-factory/shell");
|
|
|
10
10
|
const warehouse_base_1 = require("@things-factory/warehouse-base");
|
|
11
11
|
exports.autoUpdateAllMarketplaceProductVariationQuantityResolver = {
|
|
12
12
|
async autoUpdateAllMarketplaceProductVariationQuantity(_, { companyDomainId, warehouseId }, context) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
const companyDomain = await (0, typeorm_1.getRepository)(shell_1.Domain).findOne(companyDomainId);
|
|
14
|
+
const marketplaceStores = await (0, typeorm_1.getRepository)(integration_marketplace_1.MarketplaceStore).find({
|
|
15
|
+
where: { domain: companyDomain, status: 'ACTIVE' },
|
|
16
|
+
relations: ['marketplaceDistributors']
|
|
17
|
+
});
|
|
18
|
+
const fulfilmentCenter = await integration_fulfillment_1.FulfillmentAPI.getFulfillmentCenter(warehouseId);
|
|
19
|
+
const centerId = fulfilmentCenter.centerId;
|
|
20
|
+
const warehouseDomain = await (0, typeorm_1.getRepository)(shell_1.Domain).findOne({ where: { subdomain: centerId } });
|
|
21
|
+
let products = await (0, typeorm_1.getRepository)(product_base_1.Product).find({
|
|
22
|
+
where: { domain: companyDomain },
|
|
23
|
+
relations: ['productDetails']
|
|
24
|
+
});
|
|
25
|
+
let inventoryProducts = await Promise.all(products.map(async (product) => {
|
|
26
|
+
const productDetails = product.productDetails;
|
|
27
|
+
const defaultProductDetail = productDetails.filter(productDetail => productDetail.isDefault)[0];
|
|
28
|
+
let qb = await (0, typeorm_1.getRepository)(warehouse_base_1.Inventory).createQueryBuilder('inv');
|
|
29
|
+
qb.leftJoinAndSelect('inv.location', 'loc')
|
|
30
|
+
.andWhere('"inv"."domain_id" = :domainId')
|
|
31
|
+
.andWhere('"inv"."product_id" = :productId')
|
|
32
|
+
.andWhere('"inv"."status" != :status')
|
|
33
|
+
.andWhere('"loc"."type" NOT IN (:...locationTypes)')
|
|
34
|
+
.setParameters({
|
|
35
|
+
domainId: warehouseDomain.id,
|
|
36
|
+
productId: product.id,
|
|
37
|
+
status: warehouse_base_1.INVENTORY_STATUS.TERMINATED,
|
|
38
|
+
locationTypes: [warehouse_base_1.LOCATION_TYPE.QUARANTINE, warehouse_base_1.LOCATION_TYPE.RESERVE]
|
|
26
39
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
40
|
+
let inventories = await qb.getMany();
|
|
41
|
+
const inventoryQty = inventories.reduce((total, currentValue) => {
|
|
42
|
+
total += currentValue.qty;
|
|
43
|
+
return total;
|
|
44
|
+
}, 0);
|
|
45
|
+
const inventoryLockedQty = inventories.reduce((total, currentValue) => {
|
|
46
|
+
total += currentValue.lockedQty;
|
|
47
|
+
return total;
|
|
48
|
+
}, 0);
|
|
49
|
+
return {
|
|
50
|
+
product,
|
|
51
|
+
sku: product.sku,
|
|
52
|
+
name: product.name,
|
|
53
|
+
packingType: defaultProductDetail.packingType,
|
|
54
|
+
packingSize: defaultProductDetail.packingSize,
|
|
55
|
+
uom: defaultProductDetail.uom,
|
|
56
|
+
qty: inventoryQty - inventoryLockedQty
|
|
57
|
+
};
|
|
58
|
+
}));
|
|
59
|
+
await (0, typeorm_1.getConnection)().transaction(async (tx) => {
|
|
60
|
+
let bundleProductInventories = await (0, warehouse_base_1.getProductBundleInventory)(warehouseDomain, companyDomain, inventoryProducts, tx);
|
|
61
|
+
bundleProductInventories.map(bundleProductInventory => {
|
|
62
|
+
inventoryProducts.push(bundleProductInventory);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
for (let i = 0; i < marketplaceStores.length; i++) {
|
|
66
|
+
try {
|
|
67
|
+
const marketplaceStore = marketplaceStores[i];
|
|
68
|
+
const marketplaceSetting = await (0, typeorm_1.getRepository)(marketplace_base_1.MarketplaceSetting).findOne({
|
|
69
|
+
where: { marketplaceStore, category: 'stock_allocation' }
|
|
70
|
+
});
|
|
71
|
+
for (let j = 0; j < inventoryProducts.length; j++) {
|
|
72
|
+
await (0, typeorm_1.getConnection)().transaction(async (tx) => {
|
|
73
|
+
var _a;
|
|
74
|
+
const inventoryProduct = inventoryProducts[j];
|
|
75
|
+
const marketplaceProductVariations = await tx
|
|
76
|
+
.getRepository(marketplace_base_1.MarketplaceProductVariation)
|
|
77
|
+
.find({
|
|
78
|
+
where: { domain: companyDomain, sku: inventoryProduct.sku },
|
|
79
|
+
relations: ['marketplaceProduct', 'marketplaceProduct.marketplaceStore']
|
|
80
|
+
});
|
|
81
|
+
let marketplaceProductVariation = marketplaceProductVariations.filter(productVariation => productVariation.marketplaceProduct.marketplaceStore.id === marketplaceStore.id)[0];
|
|
82
|
+
let percentageValue = 100;
|
|
83
|
+
if (marketplaceProductVariation) {
|
|
84
|
+
if (marketplaceSetting) {
|
|
85
|
+
percentageValue = parseInt(marketplaceSetting.value);
|
|
86
|
+
}
|
|
87
|
+
let productVariationLocationId = marketplaceProductVariation === null || marketplaceProductVariation === void 0 ? void 0 : marketplaceProductVariation.locationId;
|
|
88
|
+
let adjustQty = Math.floor((inventoryProduct.qty - marketplaceProductVariation.reserveQty) * (percentageValue / 100));
|
|
89
|
+
if (marketplaceStore.platform === 'shopify') {
|
|
90
|
+
let locationIds = JSON.parse(productVariationLocationId);
|
|
91
|
+
adjustQty = adjustQty - marketplaceProductVariation.qty;
|
|
92
|
+
if ((_a = locationIds[0]) === null || _a === void 0 ? void 0 : _a.location_id)
|
|
93
|
+
productVariationLocationId = locationIds[0].location_id;
|
|
70
94
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
await integration_marketplace_1.StoreAPI.updateStoreProductStock(marketplaceStore, [
|
|
75
|
-
{
|
|
76
|
-
itemId: productVariation.marketplaceProduct.itemId,
|
|
77
|
-
variationId: productVariation.variationId,
|
|
78
|
-
variationSku: productVariation.variationSku,
|
|
79
|
-
qty: adjustQty,
|
|
80
|
-
distributors: marketplaceStore.marketplaceDistributors
|
|
95
|
+
let validMarketplaceDistributors = [];
|
|
96
|
+
if (marketplaceStore.marketplaceDistributors) {
|
|
97
|
+
validMarketplaceDistributors = marketplaceStore.marketplaceDistributors.filter(distributor => distributor.status === 'ACTIVE');
|
|
81
98
|
}
|
|
82
|
-
|
|
83
|
-
|
|
99
|
+
await integration_marketplace_1.StoreAPI.updateStoreProductVariationStock(marketplaceStore, [
|
|
100
|
+
{
|
|
101
|
+
itemId: marketplaceProductVariation.marketplaceProduct.itemId,
|
|
102
|
+
variationId: marketplaceProductVariation.variationId,
|
|
103
|
+
variationSku: marketplaceProductVariation.variationSku,
|
|
104
|
+
qty: adjustQty,
|
|
105
|
+
locationId: productVariationLocationId,
|
|
106
|
+
inventoryItemId: marketplaceProductVariation.inventoryItemId,
|
|
107
|
+
distributors: validMarketplaceDistributors
|
|
108
|
+
}
|
|
109
|
+
]);
|
|
110
|
+
marketplaceProductVariation.qty = Math.floor(inventoryProduct.qty * (percentageValue / 100));
|
|
111
|
+
await tx.getRepository(marketplace_base_1.MarketplaceProductVariation).save(marketplaceProductVariation);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
84
114
|
}
|
|
85
115
|
}
|
|
86
|
-
|
|
116
|
+
catch (e) { }
|
|
87
117
|
}
|
|
88
|
-
|
|
118
|
+
return true;
|
|
89
119
|
}
|
|
90
120
|
};
|
|
91
121
|
//# sourceMappingURL=auto-update-all-marketplace-product-variation-quantity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-update-all-marketplace-product-variation-quantity.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/interface-with-hub/auto-update-all-marketplace-product-variation-quantity.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"auto-update-all-marketplace-product-variation-quantity.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/interface-with-hub/auto-update-all-marketplace-product-variation-quantity.ts"],"names":[],"mappings":";;;AAAA,qCAAsD;AAEtD,qFAAwE;AACxE,qFAAoF;AACpF,uEAAkG;AAClG,+DAAqE;AACrE,iDAA8C;AAC9C,mEAAsH;AAEzG,QAAA,wDAAwD,GAAG;IACtE,KAAK,CAAC,gDAAgD,CAAC,CAAM,EAAE,EAAE,eAAe,EAAE,WAAW,EAAE,EAAE,OAAY;QAC3G,MAAM,aAAa,GAAW,MAAM,IAAA,uBAAa,EAAC,cAAM,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;QAElF,MAAM,iBAAiB,GAAuB,MAAM,IAAA,uBAAa,EAAC,0CAAgB,CAAC,CAAC,IAAI,CAA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AG,CAAC,CAAC,CAAA;4BAC5F,MAAM,EAAE,CAAC,aAAa,CAAC,8CAA2B,CAAC,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAA;yBACtF;oBACH,CAAC,CAAC,CAAA;iBACH;aACF;YAAC,OAAO,CAAC,EAAE,GAAE;SACf;QAED,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-mms",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.19",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -60,50 +60,50 @@
|
|
|
60
60
|
"@operato/scene-table": "^0.1.5",
|
|
61
61
|
"@operato/scene-timer": "^0.1.5",
|
|
62
62
|
"@operato/scene-wheel-sorter": "^0.1.5",
|
|
63
|
-
"@things-factory/apptool-ui": "^4.1.
|
|
64
|
-
"@things-factory/attachment-base": "^4.1.
|
|
65
|
-
"@things-factory/auth-ui": "^4.1.
|
|
66
|
-
"@things-factory/biz-base": "^4.1.
|
|
67
|
-
"@things-factory/board-service": "^4.1.
|
|
68
|
-
"@things-factory/board-ui": "^4.1.
|
|
69
|
-
"@things-factory/code-ui": "^4.1.
|
|
70
|
-
"@things-factory/context-ui": "^4.1.
|
|
71
|
-
"@things-factory/dashboard": "^4.1.
|
|
72
|
-
"@things-factory/export-ui": "^4.1.
|
|
73
|
-
"@things-factory/export-ui-csv": "^4.1.
|
|
74
|
-
"@things-factory/export-ui-excel": "^4.1.
|
|
75
|
-
"@things-factory/geography": "^4.1.
|
|
76
|
-
"@things-factory/grist-ui": "^4.1.
|
|
77
|
-
"@things-factory/help": "^4.1.
|
|
78
|
-
"@things-factory/i18n-base": "^4.1.
|
|
79
|
-
"@things-factory/integration-fulfillment": "^4.1.
|
|
80
|
-
"@things-factory/integration-lmd": "^4.1.
|
|
81
|
-
"@things-factory/lite-menu": "^4.1.
|
|
82
|
-
"@things-factory/marketplace-base": "^4.1.
|
|
83
|
-
"@things-factory/more-ui": "^4.1.
|
|
84
|
-
"@things-factory/notification": "^4.1.
|
|
85
|
-
"@things-factory/oauth2-client": "^4.1.
|
|
86
|
-
"@things-factory/pdf": "^4.1.
|
|
87
|
-
"@things-factory/product-base": "^4.1.
|
|
88
|
-
"@things-factory/resource-ui": "^4.1.
|
|
89
|
-
"@things-factory/scene-data-transform": "^4.1.
|
|
90
|
-
"@things-factory/scene-excel": "^4.1.
|
|
91
|
-
"@things-factory/scene-firebase": "^4.1.
|
|
92
|
-
"@things-factory/scene-form": "^4.1.
|
|
93
|
-
"@things-factory/scene-google-map": "^4.1.
|
|
94
|
-
"@things-factory/scene-graphql": "^4.1.
|
|
95
|
-
"@things-factory/scene-label": "^4.1.
|
|
96
|
-
"@things-factory/scene-marker": "^4.1.
|
|
97
|
-
"@things-factory/scene-mqtt": "^4.1.
|
|
98
|
-
"@things-factory/scene-restful": "^4.1.
|
|
99
|
-
"@things-factory/scene-visualizer": "^4.1.
|
|
100
|
-
"@things-factory/setting-ui": "^4.1.
|
|
101
|
-
"@things-factory/system-ui": "^4.1.
|
|
102
|
-
"@things-factory/warehouse-base": "^4.1.
|
|
63
|
+
"@things-factory/apptool-ui": "^4.1.19",
|
|
64
|
+
"@things-factory/attachment-base": "^4.1.19",
|
|
65
|
+
"@things-factory/auth-ui": "^4.1.19",
|
|
66
|
+
"@things-factory/biz-base": "^4.1.19",
|
|
67
|
+
"@things-factory/board-service": "^4.1.19",
|
|
68
|
+
"@things-factory/board-ui": "^4.1.19",
|
|
69
|
+
"@things-factory/code-ui": "^4.1.19",
|
|
70
|
+
"@things-factory/context-ui": "^4.1.19",
|
|
71
|
+
"@things-factory/dashboard": "^4.1.19",
|
|
72
|
+
"@things-factory/export-ui": "^4.1.19",
|
|
73
|
+
"@things-factory/export-ui-csv": "^4.1.19",
|
|
74
|
+
"@things-factory/export-ui-excel": "^4.1.19",
|
|
75
|
+
"@things-factory/geography": "^4.1.19",
|
|
76
|
+
"@things-factory/grist-ui": "^4.1.19",
|
|
77
|
+
"@things-factory/help": "^4.1.19",
|
|
78
|
+
"@things-factory/i18n-base": "^4.1.19",
|
|
79
|
+
"@things-factory/integration-fulfillment": "^4.1.19",
|
|
80
|
+
"@things-factory/integration-lmd": "^4.1.19",
|
|
81
|
+
"@things-factory/lite-menu": "^4.1.19",
|
|
82
|
+
"@things-factory/marketplace-base": "^4.1.19",
|
|
83
|
+
"@things-factory/more-ui": "^4.1.19",
|
|
84
|
+
"@things-factory/notification": "^4.1.19",
|
|
85
|
+
"@things-factory/oauth2-client": "^4.1.19",
|
|
86
|
+
"@things-factory/pdf": "^4.1.19",
|
|
87
|
+
"@things-factory/product-base": "^4.1.19",
|
|
88
|
+
"@things-factory/resource-ui": "^4.1.19",
|
|
89
|
+
"@things-factory/scene-data-transform": "^4.1.19",
|
|
90
|
+
"@things-factory/scene-excel": "^4.1.19",
|
|
91
|
+
"@things-factory/scene-firebase": "^4.1.19",
|
|
92
|
+
"@things-factory/scene-form": "^4.1.19",
|
|
93
|
+
"@things-factory/scene-google-map": "^4.1.19",
|
|
94
|
+
"@things-factory/scene-graphql": "^4.1.19",
|
|
95
|
+
"@things-factory/scene-label": "^4.1.19",
|
|
96
|
+
"@things-factory/scene-marker": "^4.1.19",
|
|
97
|
+
"@things-factory/scene-mqtt": "^4.1.19",
|
|
98
|
+
"@things-factory/scene-restful": "^4.1.19",
|
|
99
|
+
"@things-factory/scene-visualizer": "^4.1.19",
|
|
100
|
+
"@things-factory/setting-ui": "^4.1.19",
|
|
101
|
+
"@things-factory/system-ui": "^4.1.19",
|
|
102
|
+
"@things-factory/warehouse-base": "^4.1.19"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@things-factory/builder": "^4.1.
|
|
105
|
+
"@things-factory/builder": "^4.1.19",
|
|
106
106
|
"@types/node-fetch": "^2.5.7"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "d7acb254cb15ce5e20a1dc013af52b057b2ef0b3"
|
|
109
109
|
}
|
|
@@ -1,99 +1,151 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getConnection, getRepository } from 'typeorm'
|
|
2
2
|
|
|
3
3
|
import { FulfillmentAPI } from '@things-factory/integration-fulfillment'
|
|
4
|
-
import { StoreAPI } from '@things-factory/integration-marketplace'
|
|
5
|
-
import { MarketplaceProductVariation } from '@things-factory/marketplace-base'
|
|
6
|
-
import { Product } from '@things-factory/product-base'
|
|
4
|
+
import { MarketplaceStore, StoreAPI } from '@things-factory/integration-marketplace'
|
|
5
|
+
import { MarketplaceProductVariation, MarketplaceSetting } from '@things-factory/marketplace-base'
|
|
6
|
+
import { Product, ProductDetail } from '@things-factory/product-base'
|
|
7
7
|
import { Domain } from '@things-factory/shell'
|
|
8
|
-
import { Inventory } from '@things-factory/warehouse-base'
|
|
8
|
+
import { getProductBundleInventory, Inventory, INVENTORY_STATUS, LOCATION_TYPE } from '@things-factory/warehouse-base'
|
|
9
9
|
|
|
10
10
|
export const autoUpdateAllMarketplaceProductVariationQuantityResolver = {
|
|
11
11
|
async autoUpdateAllMarketplaceProductVariationQuantity(_: any, { companyDomainId, warehouseId }, context: any) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
12
|
+
const companyDomain: Domain = await getRepository(Domain).findOne(companyDomainId)
|
|
13
|
+
|
|
14
|
+
const marketplaceStores: MarketplaceStore[] = await getRepository(MarketplaceStore).find({
|
|
15
|
+
where: { domain: companyDomain, status: 'ACTIVE' },
|
|
16
|
+
relations: ['marketplaceDistributors']
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const fulfilmentCenter = await FulfillmentAPI.getFulfillmentCenter(warehouseId)
|
|
20
|
+
|
|
21
|
+
const centerId: string = fulfilmentCenter.centerId
|
|
22
|
+
const warehouseDomain: Domain = await getRepository(Domain).findOne({ where: { subdomain: centerId } })
|
|
23
|
+
|
|
24
|
+
let products: Product[] = await getRepository(Product).find({
|
|
25
|
+
where: { domain: companyDomain },
|
|
26
|
+
relations: ['productDetails']
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
let inventoryProducts: any[] = await Promise.all(
|
|
30
|
+
products.map(async product => {
|
|
31
|
+
const productDetails: ProductDetail[] = product.productDetails
|
|
32
|
+
const defaultProductDetail: ProductDetail = productDetails.filter(productDetail => productDetail.isDefault)[0]
|
|
27
33
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
34
|
+
let qb = await getRepository(Inventory).createQueryBuilder('inv')
|
|
35
|
+
qb.leftJoinAndSelect('inv.location', 'loc')
|
|
36
|
+
.andWhere('"inv"."domain_id" = :domainId')
|
|
37
|
+
.andWhere('"inv"."product_id" = :productId')
|
|
38
|
+
.andWhere('"inv"."status" != :status')
|
|
39
|
+
.andWhere('"loc"."type" NOT IN (:...locationTypes)')
|
|
40
|
+
.setParameters({
|
|
41
|
+
domainId: warehouseDomain.id,
|
|
42
|
+
productId: product.id,
|
|
43
|
+
status: INVENTORY_STATUS.TERMINATED,
|
|
44
|
+
locationTypes: [LOCATION_TYPE.QUARANTINE, LOCATION_TYPE.RESERVE]
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
let inventories: Inventory[] = await qb.getMany()
|
|
48
|
+
|
|
49
|
+
const inventoryQty: number = inventories.reduce((total, currentValue) => {
|
|
50
|
+
total += currentValue.qty
|
|
51
|
+
return total
|
|
52
|
+
}, 0)
|
|
53
|
+
|
|
54
|
+
const inventoryLockedQty: number = inventories.reduce((total, currentValue) => {
|
|
55
|
+
total += currentValue.lockedQty
|
|
56
|
+
return total
|
|
57
|
+
}, 0)
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
product,
|
|
61
|
+
sku: product.sku,
|
|
62
|
+
name: product.name,
|
|
63
|
+
packingType: defaultProductDetail.packingType,
|
|
64
|
+
packingSize: defaultProductDetail.packingSize,
|
|
65
|
+
uom: defaultProductDetail.uom,
|
|
66
|
+
qty: inventoryQty - inventoryLockedQty
|
|
48
67
|
}
|
|
68
|
+
})
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
await getConnection().transaction(async tx => {
|
|
72
|
+
let bundleProductInventories: any[] = await getProductBundleInventory(
|
|
73
|
+
warehouseDomain,
|
|
74
|
+
companyDomain,
|
|
75
|
+
inventoryProducts,
|
|
76
|
+
tx
|
|
77
|
+
)
|
|
49
78
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
bundleProductInventories.map(bundleProductInventory => {
|
|
80
|
+
inventoryProducts.push(bundleProductInventory)
|
|
81
|
+
})
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
for (let i = 0; i < marketplaceStores.length; i++) {
|
|
85
|
+
try {
|
|
86
|
+
const marketplaceStore: MarketplaceStore = marketplaceStores[i]
|
|
87
|
+
const marketplaceSetting: MarketplaceSetting = await getRepository(MarketplaceSetting).findOne({
|
|
88
|
+
where: { marketplaceStore, category: 'stock_allocation' }
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
for (let j = 0; j < inventoryProducts.length; j++) {
|
|
92
|
+
await getConnection().transaction(async tx => {
|
|
93
|
+
const inventoryProduct = inventoryProducts[j]
|
|
94
|
+
const marketplaceProductVariations: MarketplaceProductVariation[] = await tx
|
|
95
|
+
.getRepository(MarketplaceProductVariation)
|
|
96
|
+
.find({
|
|
97
|
+
where: { domain: companyDomain, sku: inventoryProduct.sku },
|
|
98
|
+
relations: ['marketplaceProduct', 'marketplaceProduct.marketplaceStore']
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
let marketplaceProductVariation: MarketplaceProductVariation = marketplaceProductVariations.filter(
|
|
102
|
+
productVariation => productVariation.marketplaceProduct.marketplaceStore.id === marketplaceStore.id
|
|
103
|
+
)[0]
|
|
104
|
+
|
|
105
|
+
let percentageValue: number = 100
|
|
106
|
+
if (marketplaceProductVariation) {
|
|
107
|
+
if (marketplaceSetting) {
|
|
108
|
+
percentageValue = parseInt(marketplaceSetting.value)
|
|
80
109
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
110
|
+
|
|
111
|
+
let productVariationLocationId = marketplaceProductVariation?.locationId
|
|
112
|
+
let adjustQty: number = Math.floor(
|
|
113
|
+
(inventoryProduct.qty - marketplaceProductVariation.reserveQty) * (percentageValue / 100)
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
if (marketplaceStore.platform === 'shopify') {
|
|
117
|
+
let locationIds: any[] = JSON.parse(productVariationLocationId)
|
|
118
|
+
adjustQty = adjustQty - marketplaceProductVariation.qty
|
|
119
|
+
if (locationIds[0]?.location_id) productVariationLocationId = locationIds[0].location_id
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
let validMarketplaceDistributors: any[] = []
|
|
123
|
+
if (marketplaceStore.marketplaceDistributors) {
|
|
124
|
+
validMarketplaceDistributors = marketplaceStore.marketplaceDistributors.filter(
|
|
125
|
+
distributor => distributor.status === 'ACTIVE'
|
|
126
|
+
)
|
|
90
127
|
}
|
|
91
|
-
|
|
92
|
-
|
|
128
|
+
|
|
129
|
+
await StoreAPI.updateStoreProductVariationStock(marketplaceStore, [
|
|
130
|
+
{
|
|
131
|
+
itemId: marketplaceProductVariation.marketplaceProduct.itemId,
|
|
132
|
+
variationId: marketplaceProductVariation.variationId,
|
|
133
|
+
variationSku: marketplaceProductVariation.variationSku,
|
|
134
|
+
qty: adjustQty,
|
|
135
|
+
locationId: productVariationLocationId,
|
|
136
|
+
inventoryItemId: marketplaceProductVariation.inventoryItemId,
|
|
137
|
+
distributors: validMarketplaceDistributors
|
|
138
|
+
}
|
|
139
|
+
])
|
|
140
|
+
|
|
141
|
+
marketplaceProductVariation.qty = Math.floor(inventoryProduct.qty * (percentageValue / 100))
|
|
142
|
+
await tx.getRepository(MarketplaceProductVariation).save(marketplaceProductVariation)
|
|
143
|
+
}
|
|
144
|
+
})
|
|
93
145
|
}
|
|
94
|
-
}
|
|
146
|
+
} catch (e) {}
|
|
147
|
+
}
|
|
95
148
|
|
|
96
|
-
|
|
97
|
-
} catch (ex) {}
|
|
149
|
+
return true
|
|
98
150
|
}
|
|
99
151
|
}
|
package/config.development.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
domainType: 'company',
|
|
3
|
-
ormconfig: {
|
|
4
|
-
name: 'default',
|
|
5
|
-
type: 'sqlite',
|
|
6
|
-
database: 'db.sqlite',
|
|
7
|
-
synchronize: false,
|
|
8
|
-
logging: true,
|
|
9
|
-
logger: 'debug'
|
|
10
|
-
// name: 'default',
|
|
11
|
-
// type: 'postgres',
|
|
12
|
-
// database: 'postgres',
|
|
13
|
-
// username: 'postgres',
|
|
14
|
-
// password: 'abcd1234',
|
|
15
|
-
// host: 'localhost',
|
|
16
|
-
// port: 15432,
|
|
17
|
-
// synchronize: true,
|
|
18
|
-
// logging: true
|
|
19
|
-
},
|
|
20
|
-
oauth2: {
|
|
21
|
-
platforms: [
|
|
22
|
-
{
|
|
23
|
-
name: 'Operato Hub',
|
|
24
|
-
apiURL: 'http://operato-m.localhost:3000/api'
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
useVirtualHostBasedDomain: false,
|
|
29
|
-
port: 5000,
|
|
30
|
-
uploads: 'uploads',
|
|
31
|
-
attachmentsPath: 'attachments',
|
|
32
|
-
SECRET: '0xD58F835B69D207A76CC5F84a70a1D0d4C79dfC95',
|
|
33
|
-
logger: {
|
|
34
|
-
file: {
|
|
35
|
-
filename: 'logs/application-%DATE%.log',
|
|
36
|
-
datePattern: 'YYYY-MM-DD-HH',
|
|
37
|
-
zippedArchive: true,
|
|
38
|
-
maxSize: '200m',
|
|
39
|
-
maxFiles: '1m',
|
|
40
|
-
level: 'info'
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
fulfillmentIntegrationOperato: {
|
|
44
|
-
host: 'operatohub.com',
|
|
45
|
-
platform: 'operato',
|
|
46
|
-
application: 'Operato MMS',
|
|
47
|
-
appKey: '480d19cbfb0655357878119559d47333',
|
|
48
|
-
appSecret: 'dc5078bc17d50a18ef6fc3188934bbbd',
|
|
49
|
-
callback: 'https://www.myoperato.com/callback-operato'
|
|
50
|
-
},
|
|
51
|
-
marketplaceIntegrationShopee: {
|
|
52
|
-
platform: 'shopee',
|
|
53
|
-
isUAT: false,
|
|
54
|
-
application: 'Operato MMS',
|
|
55
|
-
partnerId: 846025,
|
|
56
|
-
partnerKey: 'd34cfd85a603f196a0d74ebe08043280c1a27788bb36bdffd61e7e0bb1c90b64'
|
|
57
|
-
},
|
|
58
|
-
marketplaceIntegrationLazada: {
|
|
59
|
-
platform: 'lazada',
|
|
60
|
-
application: 'operato-mms',
|
|
61
|
-
appKey: '120961',
|
|
62
|
-
appSecret: 'HB3RTNEXHlVSlBr9SmWF8AjbSUT7a825',
|
|
63
|
-
callback: 'https://myoperato.com/lazada-callback'
|
|
64
|
-
},
|
|
65
|
-
notification: {
|
|
66
|
-
fcm: {
|
|
67
|
-
serviceAccount: {
|
|
68
|
-
project_id: 'operato',
|
|
69
|
-
private_key:
|
|
70
|
-
'-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDYNOfyNjPMSeG9\nzU1qs0cpVK5cVfadcUaw5g+hkQZMOMlAA7uqW2eX4vkayj7MzbYUayH+sei8044Q\nJIyl6f26dNX1VT3UgTmSmCS0v48EBEZHCgusrUGFjduLRN6OS6uvrXW1xKA18k9q\nai1C2EHCXF2AE4PTvf239RC1UIOnVePcMtT7rMTdHRO4s8OKVuSDbzIt8k1cV3Zt\nES0YsJlkELqBisYpV//2/ZSILTt39J9JzrVef03X9kkoo9p+YnNyy6tWsfQPfgJO\nybiRGBNxiyJ/E2pxRo/WqU0go9OzYJlGaSUrUx09heNiRD1b0MAOmyPDJz/6AaTk\nkU/A+kLzAgMBAAECggEADQ5s2gtR53VSujk1V/Xe8e0Di99DwaWUj5w6YhcK7/wX\nPdQRN4Fw6RLeLjL7xeG/rCNSwzm6hKSrQJL5zLnWW7XbMdyQRk6jdmnVAEv3zACi\nFH9+eFK3e+Q214XfgWz/v4p/FZdRLCYni5VBNHcwyWxLLS/V1ynzB3KM1sDiTRmI\npcT7+uTtwrKgJq64sXtFE2pYrFxDdCiyqzkhv/2ed4YIowAjpKBbbcCDKeVxVkoz\nC1P4PAzs9EeUuKSWYrWaUjN17lqtRlYeT1ylR1PIJuWqd4cKfgoEgz+lHwRPDCEX\nAYbk3nofiJIPBhSfCHrXS755wK48mY8vMwFdfCPJeQKBgQDsz4tjYTHdat5A25n5\nekwMxZwFQ5OvMV4eulwZUDMypTAYSz1iB6sDlgwKDm5omZIfuneqCEIvrqxV/kx3\n5wV/DANHO3hYxdp/NV7rM23xmqlaKZhHQbDono1Fm/LP6DEmJiD7N2eFKsXYcPpR\nSAIdCv0X3zkDQ4zRi51yJlCXzQKBgQDpufJBxCoXngiQJ2j14lWVAeOOdQ6zh5Ip\nBcDwF0X67cNSN3Wl40bS4yLFdolhEAyj5m0WPuYYXpjzhHhZ0W3V3ItdBkrmwIvy\nWOWu26qN0ZbwxVS2qVpHuj6iHWJKHuDZZUkFtJg3BeeBSOUHSA8TvjnA0xd83xeb\n8ZJasWoFvwKBgQDFs/gQ/gIdcq0exLfluh5nw0qgcmyHpNWJHdjqITS9IX/nqFkU\n0IYLtmdStf2jQiLmbkydHcvz9wZVvLqml67VBHhwLcwpgPULoskd34/4V0Dvzy4c\nv1Esw8H5zVqIDLeLu+VpFjZMzQrjyl6RIWbyTExEc84rVWfpQYAu3qIGOQKBgAFr\nXatEk7TdAtRNSPflTfu/rTAaSeKROjQBkvBiU8x4US1YpOBDBxUUyAtG8wKh5FHC\nfnsaGq+fM3KXJVv2R6J62mXQOfg4xyDLpWlwcBK4aSBBMoiBcsjouqSlZQlqMpdf\nZBgixqHe6U8BsFJg/6ZxC0y+e3AIss4Bo4/lb+1lAoGAFOexvaBh21K6W3inmRW4\nLlkVYJaBJ20OwokXg5aXjBiHxqmk7VLAuFbkpb5LOKH2xPILRQ0OEkn51yVymS3T\n9lLpHOFTQXt5tF2/F7NW7kaQJNlLr/h5jPi3O9XHeFmuaN2z150ZB6zzgjeGKzr8\ni+1fgTsRfDtNw8xkSH9qL1Y=\n-----END PRIVATE KEY-----\n',
|
|
71
|
-
client_email: 'firebase-adminsdk-xmm2e@operato.iam.gserviceaccount.com'
|
|
72
|
-
},
|
|
73
|
-
appConfig: {
|
|
74
|
-
apiKey: 'AIzaSyDdTM2BTLHSt2LNS0G5QB8G0i4KBXFiG7U',
|
|
75
|
-
projectId: 'operato',
|
|
76
|
-
messagingSenderId: 79537064975,
|
|
77
|
-
appId: '1:79537064975:web:32f53119e9c8c6ee2a277a'
|
|
78
|
-
},
|
|
79
|
-
serverKey:
|
|
80
|
-
'AAAAEoTHTA8:APA91bGwt-4HT82Dfwf_VwbQaKT0_qHd0Y3tuW41udjWz5Lz0Ko0mEMD6WbHHSILvQpa6yuoGGKCMsrU7VW2qWRrUm3CYpyG9oSwshNm1tIhljAnOuUfwHCoawbVLwf9qlWpHt4dwCoc'
|
|
81
|
-
},
|
|
82
|
-
vapidKey: {
|
|
83
|
-
subject: 'mailto:heartyoh@hatiolab.com',
|
|
84
|
-
publicKey: 'BAkVkITsCXBIsYL1yeaBmx5_dn57we-ZXMjirPPHzC2dan82cdEnAio_53PQ-1_w3ykWCBPrrFAWQ_d9N4cFF0o',
|
|
85
|
-
privateKey: '4pmlt3Wk019u7nqU3Q_oGZE6LbUDjjf8DpmAcn9-iss'
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|