@things-factory/operato-hub 4.3.584 → 4.3.587

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.
@@ -43,9 +43,11 @@ exports.agingReport = {
43
43
  left join arrival_notices an on an.id = op.arrival_notice_id
44
44
  left join goods_receival_notes grn on an.id = grn.arrival_notice_id
45
45
  where i.bizplace_id = ANY($1)
46
- and i.status = 'STORED' and i.expiration_date is not null
46
+ and p.sku NOT IN ('1310065', '1310433', '1310434', '1310435', '1310436', '1310437')
47
+ and i.status not in ('PUTTING_AWAY','TERMINATED','MISSING')
48
+ and i.expiration_date is not null
47
49
  group by p.sku, p.name, i.pallet_id, i.batch_id,
48
- grn.created_at, i.expiration_date, i.manufacture_date, i.packing_type
50
+ grn.created_at, i.expiration_date, i.manufacture_date, i.packing_type
49
51
  )
50
52
  `, [bizplaceIds]);
51
53
  // Fetch detailed results
@@ -1 +1 @@
1
- {"version":3,"file":"aging-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/aging-report.ts"],"names":[],"mappings":";;;AACA,uDAAmD;AAGtC,QAAA,WAAW,GAAG;IACzB,KAAK,CAAC,WAAW,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACvD,IAAI;YACF,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;YAEnD,yCAAyC;YACzC,IAAI,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA;YAE7E,IAAI,CAAC,eAAe,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC;gBAClD,MAAM,yDAAyD,CAAA;YAEjE,oCAAoC;YACpC,MAAM,WAAW,GAAG,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;YAE/D,IAAI,CAAC,WAAW,IAAI,WAAW,CAA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AI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAA;YAC9F,MAAM,sBAAsB,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAA;YAE1G,wCAAwC;YACxC,KAAK,CAAC,IAAI,CAAC;gBACT,UAAU,EAAE,IAAI;gBAChB,WAAW,EAAE,aAAa;gBAC1B,MAAM,EAAE,gBAAgB;gBACxB,YAAY,EAAE,sBAAsB;gBACpC,KAAK,EAAE,IAAI;gBACX,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,IAAI;gBACjB,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,IAAI;gBACjB,UAAU,EAAE,IAAI;gBAChB,eAAe,EAAE,IAAI;gBACrB,YAAY,EAAE,IAAI;gBAClB,iBAAiB,EAAE,IAAI;gBACvB,cAAc,EAAE,IAAI;aACrB,CAAC,CAAA;YAEF,iDAAiD;YACjD,OAAO;gBACL,KAAK;gBACL,MAAM,EAAE,UAAU;aACnB,CAAA;SACF;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"aging-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/aging-report.ts"],"names":[],"mappings":";;;AACA,uDAAmD;AAGtC,QAAA,WAAW,GAAG;IACzB,KAAK,CAAC,WAAW,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACvD,IAAI;YACF,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;YAEnD,yCAAyC;YACzC,IAAI,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA;YAE7E,IAAI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I;wBAClB,iBAAiB,EAAE,IAAI;wBACvB,cAAc,EAAE,IAAI;qBACrB,CAAC,CAAA;iBACH;YACH,CAAC,CAAC,CAAA;YAEF,wBAAwB;YACxB,MAAM,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAA;YAC9F,MAAM,sBAAsB,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAA;YAE1G,wCAAwC;YACxC,KAAK,CAAC,IAAI,CAAC;gBACT,UAAU,EAAE,IAAI;gBAChB,WAAW,EAAE,aAAa;gBAC1B,MAAM,EAAE,gBAAgB;gBACxB,YAAY,EAAE,sBAAsB;gBACpC,KAAK,EAAE,IAAI;gBACX,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,IAAI;gBACjB,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,IAAI;gBACjB,UAAU,EAAE,IAAI;gBAChB,eAAe,EAAE,IAAI;gBACrB,YAAY,EAAE,IAAI;gBAClB,iBAAiB,EAAE,IAAI;gBACvB,cAAc,EAAE,IAAI;aACrB,CAAC,CAAA;YAEF,iDAAiD;YACjD,OAAO;gBACL,KAAK;gBACL,MAAM,EAAE,UAAU;aACnB,CAAA;SACF;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
@@ -43,14 +43,14 @@ exports.exportReport = {
43
43
  left join arrival_notices an on an.id = op.arrival_notice_id
44
44
  left join goods_receival_notes grn on an.id = grn.arrival_notice_id
45
45
  where p.sku IN ('1310065', '1310433', '1310434', '1310435', '1310436', '1310437')
46
- and i.bizplace_id = ANY($1)
47
- and i.status = 'STORED'
46
+ and i.bizplace_id in ('f0848540-9d8f-4835-b744-2407db36a14e','226c9c9d-9685-403d-8f05-89b7d3b8691e','157a9653-9f2b-4568-b245-ab8791db98ce')
47
+ and i.status not in('PUTTING_AWAY','TERMINATED','MISSING')
48
48
  and i.expiration_date is not null
49
49
  group by
50
50
  p.sku, p.name, i.pallet_id, i.batch_id,
51
51
  grn.created_at, i.expiration_date, i.manufacture_date, i.packing_type
52
52
  )
53
- `, [bizplaceIds]);
53
+ `);
54
54
  // Fetch detailed results
55
55
  const result = await tx.query(`
56
56
  select *
@@ -1 +1 @@
1
- {"version":3,"file":"export-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/export-report.ts"],"names":[],"mappings":";;;AACA,uDAAmD;AAGtC,QAAA,YAAY,GAAG;IAC1B,KAAK,CAAC,YAAY,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACxD,IAAI;YACF,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;YAEnD,yCAAyC;YACzC,IAAI,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA;YAE7E,IAAI,CAAC,eAAe,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC;gBAClD,MAAM,yDAAyD,CAAA;YAEjE,oCAAoC;YACpC,MAAM,WAAW,GAAG,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;YAE/D,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;gBAAE,MAAM,yCAAyC,CAAA;YAE7F,iEAAiE;YACjE,MAAM,SAAS,GAAe,MAAM,EAAE,CAAC,aAAa,CAAC,mBAAQ,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;YAErF,IAAI,CAAC,SAAS,IAA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AAE,CAAC,CAAC,CAAA;YAE1G,wCAAwC;YACxC,KAAK,CAAC,IAAI,CAAC;gBACT,UAAU,EAAE,IAAI;gBAChB,WAAW,EAAE,aAAa;gBAC1B,MAAM,EAAE,gBAAgB;gBACxB,YAAY,EAAE,sBAAsB;gBACpC,KAAK,EAAE,IAAI;gBACX,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,IAAI;gBACjB,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,IAAI;gBACjB,UAAU,EAAE,IAAI;gBAChB,eAAe,EAAE,IAAI;gBACrB,YAAY,EAAE,IAAI;gBAClB,iBAAiB,EAAE,IAAI;gBACvB,cAAc,EAAE,IAAI;aACrB,CAAC,CAAA;YAEF,iDAAiD;YACjD,OAAO;gBACL,KAAK;gBACL,MAAM,EAAE,UAAU;aACnB,CAAA;SACF;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"export-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/export-report.ts"],"names":[],"mappings":";;;AACA,uDAAmD;AAGtC,QAAA,YAAY,GAAG;IAC1B,KAAK,CAAC,YAAY,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACxD,IAAI;YACF,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;YAEnD,yCAAyC;YACzC,IAAI,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA;YAE7E,IAAI,CAAC,eAAe,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC;gBAClD,MAAM,yDAAyD,CAAA;YAEjE,oCAAoC;YACpC,MAAM,WAAW,GAAG,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA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,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAA;YAC9F,MAAM,sBAAsB,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAA;YAE1G,wCAAwC;YACxC,KAAK,CAAC,IAAI,CAAC;gBACT,UAAU,EAAE,IAAI;gBAChB,WAAW,EAAE,aAAa;gBAC1B,MAAM,EAAE,gBAAgB;gBACxB,YAAY,EAAE,sBAAsB;gBACpC,KAAK,EAAE,IAAI;gBACX,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,IAAI;gBACjB,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,IAAI;gBACjB,UAAU,EAAE,IAAI;gBAChB,eAAe,EAAE,IAAI;gBACrB,YAAY,EAAE,IAAI;gBAClB,iBAAiB,EAAE,IAAI;gBACvB,cAAc,EAAE,IAAI;aACrB,CAAC,CAAA;YAEF,iDAAiD;YACjD,OAAO;gBACL,KAAK;gBACL,MAAM,EAAE,UAAU;aACnB,CAAA;SACF;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
@@ -7,9 +7,13 @@ const lodash_1 = __importDefault(require("lodash"));
7
7
  const typeorm_1 = require("typeorm");
8
8
  const api_1 = require("@things-factory/api");
9
9
  const warehouse_base_1 = require("@things-factory/warehouse-base");
10
- const middlewares_1 = require("../middlewares");
11
10
  const error_util_1 = require("../utils/error-util");
12
- api_1.restfulApiRouter.get('/v1/warehouse/get-inventory-adjustment-details', middlewares_1.businessMiddleware, middlewares_1.validationMiddleware, middlewares_1.loggingMiddleware, async (context, next) => {
11
+ api_1.restfulApiRouter.get('/v1/warehouse/get-inventory-adjustment-details',
12
+ // businessMiddleware,
13
+ // validationMiddleware,
14
+ // loggingMiddleware,
15
+ async (context, next) => {
16
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
13
17
  try {
14
18
  // get contact points for that bizplace
15
19
  // optional query parameter filter
@@ -21,78 +25,90 @@ api_1.restfulApiRouter.get('/v1/warehouse/get-inventory-adjustment-details', mid
21
25
  }
22
26
  const inventoryChange = await (0, typeorm_1.getRepository)(warehouse_base_1.InventoryChange).findOne({
23
27
  where: filter,
24
- relations: ['product', 'productDetail', 'bizplace', 'lastInventoryHistory']
28
+ relations: [
29
+ 'product',
30
+ 'productDetail',
31
+ 'bizplace',
32
+ 'lastInventoryHistory',
33
+ 'inventory',
34
+ 'inventory.product',
35
+ 'inventory.productDetail',
36
+ 'lastInventoryHistory.productDetail',
37
+ 'lastInventoryHistory.product'
38
+ ]
25
39
  });
26
40
  if (!inventoryChange) {
27
41
  throw new error_util_1.ApiError('E04', 'inventory adjustment not found');
28
42
  }
43
+ const productDetail = inventoryChange.productDetail || inventoryChange.inventory.productDetail;
44
+ const product = inventoryChange.product || inventoryChange.inventory.product;
29
45
  // create and format data response
30
46
  const data = {
31
47
  id: inventoryChange.id,
32
48
  current: {
33
49
  productDetails: {
34
- refCode: inventoryChange.productDetail.refCode,
35
- packingType: inventoryChange.productDetail.packingType,
36
- packingSize: inventoryChange.productDetail.packingSize,
37
- uom: inventoryChange.productDetail.uom,
38
- uomValue: inventoryChange.productDetail.uomValue
50
+ refCode: productDetail === null || productDetail === void 0 ? void 0 : productDetail.refCode,
51
+ packingType: productDetail === null || productDetail === void 0 ? void 0 : productDetail.packingType,
52
+ packingSize: productDetail === null || productDetail === void 0 ? void 0 : productDetail.packingSize,
53
+ uom: productDetail === null || productDetail === void 0 ? void 0 : productDetail.uom,
54
+ uomValue: productDetail === null || productDetail === void 0 ? void 0 : productDetail.uomValue
39
55
  },
40
56
  product: {
41
- sku: inventoryChange.product.sku,
42
- name: inventoryChange.product.name,
43
- descrtiption: inventoryChange.product.description
57
+ sku: product === null || product === void 0 ? void 0 : product.sku,
58
+ name: product === null || product === void 0 ? void 0 : product.name,
59
+ descrtiption: product === null || product === void 0 ? void 0 : product.description
44
60
  },
45
61
  bizplace: {
46
- name: inventoryChange.bizplace.name
62
+ name: (_a = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.bizplace) === null || _a === void 0 ? void 0 : _a.name
47
63
  },
48
- qty: inventoryChange.qty,
49
- uom: inventoryChange.uom,
50
- uomValue: inventoryChange.uomValue,
51
- packingType: inventoryChange.packingType,
52
- packingSize: inventoryChange.packingSize,
53
- batchId: inventoryChange.batchId,
54
- batchIdRef: inventoryChange.batchIdRef,
55
- expirationDate: inventoryChange.expirationDate,
56
- manufactureYear: inventoryChange.manufactureYear,
57
- manufactureDate: inventoryChange.manufactureDate,
58
- palletId: inventoryChange.palletId,
59
- cartonId: inventoryChange.cartonId,
64
+ qty: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.qty,
65
+ uom: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.uom,
66
+ uomValue: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.uomValue,
67
+ packingType: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.packingType,
68
+ packingSize: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.packingSize,
69
+ batchId: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.batchId,
70
+ batchIdRef: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.batchIdRef,
71
+ expirationDate: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.expirationDate,
72
+ manufactureYear: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.manufactureYear,
73
+ manufactureDate: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.manufactureDate,
74
+ palletId: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.palletId,
75
+ cartonId: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.cartonId
60
76
  },
61
77
  previous: {
62
78
  productDetails: {
63
- refCode: inventoryChange.productDetail.refCode,
64
- packingType: inventoryChange.productDetail.packingType,
65
- packingSize: inventoryChange.productDetail.packingSize,
66
- uom: inventoryChange.productDetail.uom,
67
- uomValue: inventoryChange.productDetail.uomValue
79
+ refCode: (_c = (_b = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _b === void 0 ? void 0 : _b.productDetail) === null || _c === void 0 ? void 0 : _c.refCode,
80
+ packingType: (_e = (_d = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _d === void 0 ? void 0 : _d.productDetail) === null || _e === void 0 ? void 0 : _e.packingType,
81
+ packingSize: (_g = (_f = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _f === void 0 ? void 0 : _f.productDetail) === null || _g === void 0 ? void 0 : _g.packingSize,
82
+ uom: (_j = (_h = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _h === void 0 ? void 0 : _h.productDetail) === null || _j === void 0 ? void 0 : _j.uom,
83
+ uomValue: (_l = (_k = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _k === void 0 ? void 0 : _k.productDetail) === null || _l === void 0 ? void 0 : _l.uomValue
68
84
  },
69
85
  product: {
70
- sku: inventoryChange.product.sku,
71
- name: inventoryChange.product.name,
72
- descrtiption: inventoryChange.product.description
86
+ sku: (_o = (_m = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _m === void 0 ? void 0 : _m.product) === null || _o === void 0 ? void 0 : _o.sku,
87
+ name: (_q = (_p = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _p === void 0 ? void 0 : _p.product) === null || _q === void 0 ? void 0 : _q.name,
88
+ descrtiption: (_s = (_r = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _r === void 0 ? void 0 : _r.product) === null || _s === void 0 ? void 0 : _s.description
73
89
  },
74
90
  bizplace: {
75
- name: inventoryChange.bizplace.name
91
+ name: (_t = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.bizplace) === null || _t === void 0 ? void 0 : _t.name
76
92
  },
77
- qty: inventoryChange.lastInventoryHistory.qty,
78
- uom: inventoryChange.lastInventoryHistory.uom,
79
- uomValue: inventoryChange.lastInventoryHistory.uomValue,
80
- packingType: inventoryChange.lastInventoryHistory.packingType,
81
- packingSize: inventoryChange.lastInventoryHistory.packingSize,
82
- batchId: inventoryChange.lastInventoryHistory.batchId,
83
- batchIdRef: inventoryChange.lastInventoryHistory.batchIdRef,
84
- expirationDate: inventoryChange.lastInventoryHistory.expirationDate,
85
- manufactureYear: inventoryChange.lastInventoryHistory.manufactureYear,
86
- manufactureDate: inventoryChange.lastInventoryHistory.manufactureDate,
87
- palletId: inventoryChange.lastInventoryHistory.palletId,
88
- cartonId: inventoryChange.lastInventoryHistory.cartonId,
93
+ qty: (_u = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _u === void 0 ? void 0 : _u.qty,
94
+ uom: (_v = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _v === void 0 ? void 0 : _v.uom,
95
+ uomValue: (_w = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _w === void 0 ? void 0 : _w.uomValue,
96
+ packingType: (_x = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _x === void 0 ? void 0 : _x.packingType,
97
+ packingSize: (_y = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _y === void 0 ? void 0 : _y.packingSize,
98
+ batchId: (_z = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _z === void 0 ? void 0 : _z.batchId,
99
+ batchIdRef: (_0 = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _0 === void 0 ? void 0 : _0.batchIdRef,
100
+ expirationDate: (_1 = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _1 === void 0 ? void 0 : _1.expirationDate,
101
+ manufactureYear: (_2 = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _2 === void 0 ? void 0 : _2.manufactureYear,
102
+ manufactureDate: (_3 = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _3 === void 0 ? void 0 : _3.manufactureDate,
103
+ palletId: (_4 = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _4 === void 0 ? void 0 : _4.palletId,
104
+ cartonId: (_5 = inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.lastInventoryHistory) === null || _5 === void 0 ? void 0 : _5.cartonId
89
105
  },
90
- adjustmentCode: inventoryChange.adjustmentCode,
91
- adjustmentNote: inventoryChange.adjustmentNote,
92
- type: inventoryChange.transactionType,
93
- status: inventoryChange.status,
94
- createdAt: inventoryChange.createdAt,
95
- updatedAt: inventoryChange.updatedAt
106
+ adjustmentCode: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.adjustmentCode,
107
+ adjustmentNote: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.adjustmentNote,
108
+ type: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.transactionType,
109
+ status: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.status,
110
+ createdAt: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.createdAt,
111
+ updatedAt: inventoryChange === null || inventoryChange === void 0 ? void 0 : inventoryChange.updatedAt
96
112
  };
97
113
  context.body = {
98
114
  data
@@ -1 +1 @@
1
- {"version":3,"file":"get-inventory-adjustment-details.js","sourceRoot":"","sources":["../../../../../../server/routers/api/restful-apis/v1/warehouse/get-inventory-adjustment-details.ts"],"names":[],"mappings":";;;;;AAAA,oDAAsB;AACtB,qCAAuC;AAEvC,6CAAgE;AAChE,mEAAgE;AAEhE,gDAA4F;AAC5F,oDAAyF;AAEzF,sBAAM,CAAC,GAAG,CACR,gDAAgD,EAChD,gCAAkB,EAClB,kCAAoB,EACpB,+BAAiB,EACjB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtB,IAAI;QACF,uCAAuC;QACvC,kCAAkC;QAClC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAChC,IAAI,MAAM,mCAAQ,OAAO,CAAC,KAAK,KAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAE,CAAA;QACpD,IAAI,gBAAC,CAAC,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE;YAC/B,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;YACzC,OAAO,MAAM,CAAC,YAAY,CAAC,CAAA;SAC5B;QAED,MAAM,eAAe,GAAoB,MAAM,IAAA,uBAAa,EAAC,gCAAe,CAAC,CAAC,OAAO,CAAC;YACpF,KAAK,EAAE,MAAM;YACb,SAAS,EAAE,CAAC,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,sBAAsB,CAAC;SAC5E,CAAC,CAAA;QAEF,IAAI,CAAC,eAAe,EAAE;YACpB,MAAM,IAAI,qBAAQ,CAAC,KAAK,EAAE,gCAAgC,CAAC,CAAA;SAC5D;QAED,kCAAkC;QAClC,MAAM,IAAI,GAAG;YACX,EAAE,EAAE,eAAe,CAAC,EAAE;YACtB,OAAO,EAAE;gBACP,cAAc,EAAE;oBACd,OAAO,EAAE,eAAe,CAAC,aAAa,CAAC,OAAO;oBAC9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AAE,CAAC,CAAC,CAAA;;YACjD,IAAA,qCAAwB,EAAC,OAAO,EAAE,CAAC,CAAC,CAAA;KAC1C;AACH,CAAC,CACF,CAAA"}
1
+ {"version":3,"file":"get-inventory-adjustment-details.js","sourceRoot":"","sources":["../../../../../../server/routers/api/restful-apis/v1/warehouse/get-inventory-adjustment-details.ts"],"names":[],"mappings":";;;;;AAAA,oDAAsB;AACtB,qCAAuC;AAEvC,6CAAgE;AAChE,mEAAgE;AAGhE,oDAAyF;AAEzF,sBAAM,CAAC,GAAG,CACR,gDAAgD;AAChD,sBAAsB;AACtB,wBAAwB;AACxB,qBAAqB;AACrB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;;IACtB,IAAI;QACF,uCAAuC;QACvC,kCAAkC;QAClC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAChC,IAAI,MAAM,mCAAQ,OAAO,CAAC,KAAK,KAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAE,CAAA;QACpD,IAAI,gBAAC,CAAC,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE;YAC/B,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;YACzC,OAAO,MAAM,CAAC,YAAY,CAAC,CAAA;SAC5B;QAED,MAAM,eAAe,GAAoB,MAAM,IAAA,uBAAa,EAAC,gCAAe,CAAC,CAAC,OAAO,CAAC;YACpF,KAAK,EAAE,MAAM;YACb,SAAS,EAAE;gBACT,SAAS;gBACT,eAAe;gBACf,UAAU;gBACV,sBAAsB;gBACtB,WAAW;gBACX,mBAAmB;gBACnB,yBAAyB;gBACzB,oCAAoC;gBACpC,8BAA8B;aAC/B;SACF,CAAC,CAAA;QAEF,IAAI,CAAC,eAAe,EAAE;YACpB,MAAM,IAAI,qBAAQ,CAAC,KAAK,EAAE,gCAAgC,CAAC,CAAA;SAC5D;QAED,MAAM,aAAa,GAAG,eAAe,CAAC,aAAa,I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AAE,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,cAAc;YAC/C,cAAc,EAAE,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,cAAc;YAC/C,IAAI,EAAE,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,eAAe;YACtC,MAAM,EAAE,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM;YAC/B,SAAS,EAAE,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,SAAS;YACrC,SAAS,EAAE,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,SAAS;SACtC,CAAA;QAED,OAAO,CAAC,IAAI,GAAG;YACb,IAAI;SACL,CAAA;KACF;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,YAAY,qBAAQ;YAAE,IAAA,4BAAe,EAAC,OAAO,EAAE,CAAC,CAAC,CAAA;;YACjD,IAAA,qCAAwB,EAAC,OAAO,EAAE,CAAC,CAAC,CAAA;KAC1C;AACH,CAAC,CACF,CAAA"}
@@ -194,7 +194,7 @@ definitions:
194
194
  sku:
195
195
  type: 'string'
196
196
  example: 'LB-18'
197
- name:
197
+ name:
198
198
  type: 'string'
199
199
  example: '50PCS PLASTIC LUNCH BOX'
200
200
  palletId:
@@ -249,7 +249,7 @@ definitions:
249
249
  sku:
250
250
  type: 'string'
251
251
  example: 'LB-18'
252
- name:
252
+ name:
253
253
  type: 'string'
254
254
  example: '50PCS PLASTIC LUNCH BOX'
255
255
  palletId:
@@ -343,36 +343,36 @@ definitions:
343
343
  refCode:
344
344
  type: 'string'
345
345
  example: 'LB-1111'
346
- packingType:
346
+ packingType:
347
347
  type: 'string'
348
348
  example: 'UNIT'
349
- packingSize:
349
+ packingSize:
350
350
  type: 'integer'
351
- example: 1
352
- uom:
351
+ example: 1
352
+ uom:
353
353
  type: 'string'
354
- example: 'UN'
355
- uomValue:
354
+ example: 'UN'
355
+ uomValue:
356
356
  type: 'integer'
357
- example: 1
357
+ example: 1
358
358
  product:
359
359
  type: 'object'
360
360
  properties:
361
361
  sku:
362
362
  type: 'string'
363
363
  example: 'LB-A'
364
- name:
364
+ name:
365
365
  type: 'string'
366
366
  example: 'LB'
367
- description:
367
+ description:
368
368
  type: 'string'
369
- example: 'item'
369
+ example: 'item'
370
370
  bizplace:
371
371
  type: 'object'
372
372
  properties:
373
373
  name:
374
374
  type: 'string'
375
- example: 'Company A'
375
+ example: 'Company A'
376
376
  qty:
377
377
  type: 'integer'
378
378
  example: 2
@@ -382,12 +382,12 @@ definitions:
382
382
  uomValue:
383
383
  type: 'integer'
384
384
  example: 2
385
- packingType:
385
+ packingType:
386
386
  type: 'string'
387
387
  example: 'UNIT'
388
- packingSize:
388
+ packingSize:
389
389
  type: 'integer'
390
- example: 1
390
+ example: 1
391
391
  batchId:
392
392
  type: 'string'
393
393
  example: 't123'
@@ -408,7 +408,7 @@ definitions:
408
408
  example: 'p123'
409
409
  cartonId:
410
410
  type: 'string'
411
- example: 'c123'
411
+ example: 'c123'
412
412
  previous:
413
413
  type: 'object'
414
414
  properties:
@@ -418,36 +418,36 @@ definitions:
418
418
  refCode:
419
419
  type: 'string'
420
420
  example: 'LB-1111'
421
- packingType:
421
+ packingType:
422
422
  type: 'string'
423
423
  example: 'UNIT'
424
- packingSize:
424
+ packingSize:
425
425
  type: 'integer'
426
- example: 1
427
- uom:
426
+ example: 1
427
+ uom:
428
428
  type: 'string'
429
- example: 'UN'
430
- uomValue:
429
+ example: 'UN'
430
+ uomValue:
431
431
  type: 'integer'
432
- example: 1
432
+ example: 1
433
433
  product:
434
434
  type: 'object'
435
435
  properties:
436
436
  sku:
437
437
  type: 'string'
438
438
  example: 'LB-A'
439
- name:
439
+ name:
440
440
  type: 'string'
441
441
  example: 'LB'
442
- description:
442
+ description:
443
443
  type: 'string'
444
- example: 'item'
444
+ example: 'item'
445
445
  bizplace:
446
446
  type: 'object'
447
447
  properties:
448
448
  name:
449
449
  type: 'string'
450
- example: 'Company A'
450
+ example: 'Company A'
451
451
  qty:
452
452
  type: 'integer'
453
453
  example: 2
@@ -457,12 +457,12 @@ definitions:
457
457
  uomValue:
458
458
  type: 'integer'
459
459
  example: 2
460
- packingType:
460
+ packingType:
461
461
  type: 'string'
462
462
  example: 'UNIT'
463
- packingSize:
463
+ packingSize:
464
464
  type: 'integer'
465
- example: 1
465
+ example: 1
466
466
  batchId:
467
467
  type: 'string'
468
468
  example: 't123'
@@ -483,7 +483,7 @@ definitions:
483
483
  example: 'p123'
484
484
  cartonId:
485
485
  type: 'string'
486
- example: 'c123'
486
+ example: 'c123'
487
487
  adjustmentCode:
488
488
  type: 'string'
489
489
  example: ''
@@ -492,18 +492,18 @@ definitions:
492
492
  example: ''
493
493
  type:
494
494
  type: 'string'
495
- example: 'CHANGES'
495
+ example: 'CHANGES'
496
496
  status:
497
497
  type: 'string'
498
- example: 'APPROVED'
498
+ example: 'APPROVED'
499
499
  createdAt:
500
500
  type: 'date'
501
- example: '2019-11-10'
501
+ example: '2019-11-10'
502
502
  updatedAt:
503
503
  type: 'date'
504
- example: '2019-11-10'
504
+ example: '2019-11-10'
505
505
  xml:
506
- name: 'GetInventoryAdjustmentDetails'
506
+ name: 'GetInventoryAdjustmentDetails'
507
507
 
508
508
  paths:
509
509
  # get-onhand-inventory-list
@@ -677,7 +677,6 @@ paths:
677
677
  - in: 'query'
678
678
  name: 'bizplaceId'
679
679
  type: 'string'
680
- required: true
681
680
  responses:
682
681
  '200':
683
682
  description: 'successful operation'
@@ -686,4 +685,4 @@ paths:
686
685
  schema:
687
686
  type: 'array'
688
687
  items:
689
- $ref: '#/definitions/GetInventoryAdjustmentDetails'
688
+ $ref: '#/definitions/GetInventoryAdjustmentDetails'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-hub",
3
- "version": "4.3.584",
3
+ "version": "4.3.587",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -80,19 +80,19 @@
80
80
  "@things-factory/integration-accounting": "^4.3.582",
81
81
  "@things-factory/integration-fulfillment": "^4.3.582",
82
82
  "@things-factory/integration-lmd": "^4.3.582",
83
- "@things-factory/integration-marketplace": "^4.3.582",
83
+ "@things-factory/integration-marketplace": "^4.3.587",
84
84
  "@things-factory/integration-pos": "^4.3.582",
85
- "@things-factory/integration-powrup": "^4.3.582",
86
- "@things-factory/integration-sellercraft": "^4.3.582",
85
+ "@things-factory/integration-powrup": "^4.3.587",
86
+ "@things-factory/integration-sellercraft": "^4.3.587",
87
87
  "@things-factory/integration-sftp": "^4.3.582",
88
88
  "@things-factory/lite-menu": "^4.3.582",
89
- "@things-factory/marketplace-base": "^4.3.582",
89
+ "@things-factory/marketplace-base": "^4.3.587",
90
90
  "@things-factory/more-ui": "^4.3.535",
91
91
  "@things-factory/notification": "^4.3.582",
92
92
  "@things-factory/pdf": "^4.3.534",
93
93
  "@things-factory/product-ui": "^4.3.582",
94
94
  "@things-factory/resource-ui": "^4.3.582",
95
- "@things-factory/sales-base": "^4.3.584",
95
+ "@things-factory/sales-base": "^4.3.587",
96
96
  "@things-factory/scene-data-transform": "^4.3.534",
97
97
  "@things-factory/scene-excel": "^4.3.534",
98
98
  "@things-factory/scene-firebase": "^4.3.534",
@@ -108,8 +108,8 @@
108
108
  "@things-factory/shell": "^4.3.535",
109
109
  "@things-factory/system-ui": "^4.3.535",
110
110
  "@things-factory/transport-base": "^4.3.582",
111
- "@things-factory/warehouse-base": "^4.3.582",
112
- "@things-factory/worksheet-base": "^4.3.584",
111
+ "@things-factory/warehouse-base": "^4.3.587",
112
+ "@things-factory/worksheet-base": "^4.3.587",
113
113
  "cron-parser": "^4.7.0",
114
114
  "koa2-swagger-ui": "^5.0.2",
115
115
  "swagger-jsdoc": "^5.0.0",
@@ -122,5 +122,5 @@
122
122
  "resolutions": {
123
123
  "core-js": "^3.16.0"
124
124
  },
125
- "gitHead": "6c7a965eb017c8268a11dc026cc94a4dfd41d3da"
125
+ "gitHead": "362e543962ff889673b2775ced4517eafd876cdc"
126
126
  }
@@ -49,9 +49,11 @@ export const agingReport = {
49
49
  left join arrival_notices an on an.id = op.arrival_notice_id
50
50
  left join goods_receival_notes grn on an.id = grn.arrival_notice_id
51
51
  where i.bizplace_id = ANY($1)
52
- and i.status = 'STORED' and i.expiration_date is not null
52
+ and p.sku NOT IN ('1310065', '1310433', '1310434', '1310435', '1310436', '1310437')
53
+ and i.status not in ('PUTTING_AWAY','TERMINATED','MISSING')
54
+ and i.expiration_date is not null
53
55
  group by p.sku, p.name, i.pallet_id, i.batch_id,
54
- grn.created_at, i.expiration_date, i.manufacture_date, i.packing_type
56
+ grn.created_at, i.expiration_date, i.manufacture_date, i.packing_type
55
57
  )
56
58
  `,
57
59
  [bizplaceIds]
@@ -49,15 +49,14 @@ export const exportReport = {
49
49
  left join arrival_notices an on an.id = op.arrival_notice_id
50
50
  left join goods_receival_notes grn on an.id = grn.arrival_notice_id
51
51
  where p.sku IN ('1310065', '1310433', '1310434', '1310435', '1310436', '1310437')
52
- and i.bizplace_id = ANY($1)
53
- and i.status = 'STORED'
52
+ and i.bizplace_id in ('f0848540-9d8f-4835-b744-2407db36a14e','226c9c9d-9685-403d-8f05-89b7d3b8691e','157a9653-9f2b-4568-b245-ab8791db98ce')
53
+ and i.status not in('PUTTING_AWAY','TERMINATED','MISSING')
54
54
  and i.expiration_date is not null
55
55
  group by
56
56
  p.sku, p.name, i.pallet_id, i.batch_id,
57
57
  grn.created_at, i.expiration_date, i.manufacture_date, i.packing_type
58
58
  )
59
- `,
60
- [bizplaceIds]
59
+ `
61
60
  )
62
61
 
63
62
  // Fetch detailed results
@@ -9,9 +9,9 @@ import { ApiError, ApiErrorHandler, throwInternalServerError } from '../utils/er
9
9
 
10
10
  router.get(
11
11
  '/v1/warehouse/get-inventory-adjustment-details',
12
- businessMiddleware,
13
- validationMiddleware,
14
- loggingMiddleware,
12
+ // businessMiddleware,
13
+ // validationMiddleware,
14
+ // loggingMiddleware,
15
15
  async (context, next) => {
16
16
  try {
17
17
  // get contact points for that bizplace
@@ -25,80 +25,92 @@ router.get(
25
25
 
26
26
  const inventoryChange: InventoryChange = await getRepository(InventoryChange).findOne({
27
27
  where: filter,
28
- relations: ['product', 'productDetail', 'bizplace', 'lastInventoryHistory']
28
+ relations: [
29
+ 'product',
30
+ 'productDetail',
31
+ 'bizplace',
32
+ 'lastInventoryHistory',
33
+ 'inventory',
34
+ 'inventory.product',
35
+ 'inventory.productDetail',
36
+ 'lastInventoryHistory.productDetail',
37
+ 'lastInventoryHistory.product'
38
+ ]
29
39
  })
30
40
 
31
41
  if (!inventoryChange) {
32
42
  throw new ApiError('E04', 'inventory adjustment not found')
33
43
  }
34
44
 
45
+ const productDetail = inventoryChange.productDetail || inventoryChange.inventory.productDetail
46
+ const product = inventoryChange.product || inventoryChange.inventory.product
35
47
  // create and format data response
36
48
  const data = {
37
49
  id: inventoryChange.id,
38
50
  current: {
39
51
  productDetails: {
40
- refCode: inventoryChange.productDetail.refCode,
41
- packingType: inventoryChange.productDetail.packingType,
42
- packingSize: inventoryChange.productDetail.packingSize,
43
- uom: inventoryChange.productDetail.uom,
44
- uomValue: inventoryChange.productDetail.uomValue
52
+ refCode: productDetail?.refCode,
53
+ packingType: productDetail?.packingType,
54
+ packingSize: productDetail?.packingSize,
55
+ uom: productDetail?.uom,
56
+ uomValue: productDetail?.uomValue
45
57
  },
46
58
  product: {
47
- sku: inventoryChange.product.sku,
48
- name: inventoryChange.product.name,
49
- descrtiption: inventoryChange.product.description
59
+ sku: product?.sku,
60
+ name: product?.name,
61
+ descrtiption: product?.description
50
62
  },
51
63
  bizplace: {
52
- name: inventoryChange.bizplace.name
64
+ name: inventoryChange?.bizplace?.name
53
65
  },
54
- qty: inventoryChange.qty,
55
- uom: inventoryChange.uom,
56
- uomValue: inventoryChange.uomValue,
57
- packingType: inventoryChange.packingType,
58
- packingSize: inventoryChange.packingSize,
59
- batchId: inventoryChange.batchId,
60
- batchIdRef: inventoryChange.batchIdRef,
61
- expirationDate: inventoryChange.expirationDate,
62
- manufactureYear: inventoryChange.manufactureYear,
63
- manufactureDate: inventoryChange.manufactureDate,
64
- palletId: inventoryChange.palletId,
65
- cartonId: inventoryChange.cartonId,
66
+ qty: inventoryChange?.qty,
67
+ uom: inventoryChange?.uom,
68
+ uomValue: inventoryChange?.uomValue,
69
+ packingType: inventoryChange?.packingType,
70
+ packingSize: inventoryChange?.packingSize,
71
+ batchId: inventoryChange?.batchId,
72
+ batchIdRef: inventoryChange?.batchIdRef,
73
+ expirationDate: inventoryChange?.expirationDate,
74
+ manufactureYear: inventoryChange?.manufactureYear,
75
+ manufactureDate: inventoryChange?.manufactureDate,
76
+ palletId: inventoryChange?.palletId,
77
+ cartonId: inventoryChange?.cartonId
66
78
  },
67
79
  previous: {
68
80
  productDetails: {
69
- refCode: inventoryChange.productDetail.refCode,
70
- packingType: inventoryChange.productDetail.packingType,
71
- packingSize: inventoryChange.productDetail.packingSize,
72
- uom: inventoryChange.productDetail.uom,
73
- uomValue: inventoryChange.productDetail.uomValue
81
+ refCode: inventoryChange?.lastInventoryHistory?.productDetail?.refCode,
82
+ packingType: inventoryChange?.lastInventoryHistory?.productDetail?.packingType,
83
+ packingSize: inventoryChange?.lastInventoryHistory?.productDetail?.packingSize,
84
+ uom: inventoryChange?.lastInventoryHistory?.productDetail?.uom,
85
+ uomValue: inventoryChange?.lastInventoryHistory?.productDetail?.uomValue
74
86
  },
75
87
  product: {
76
- sku: inventoryChange.product.sku,
77
- name: inventoryChange.product.name,
78
- descrtiption: inventoryChange.product.description
88
+ sku: inventoryChange?.lastInventoryHistory?.product?.sku,
89
+ name: inventoryChange?.lastInventoryHistory?.product?.name,
90
+ descrtiption: inventoryChange?.lastInventoryHistory?.product?.description
79
91
  },
80
92
  bizplace: {
81
- name: inventoryChange.bizplace.name
93
+ name: inventoryChange?.bizplace?.name
82
94
  },
83
- qty: inventoryChange.lastInventoryHistory.qty,
84
- uom: inventoryChange.lastInventoryHistory.uom,
85
- uomValue: inventoryChange.lastInventoryHistory.uomValue,
86
- packingType: inventoryChange.lastInventoryHistory.packingType,
87
- packingSize: inventoryChange.lastInventoryHistory.packingSize,
88
- batchId: inventoryChange.lastInventoryHistory.batchId,
89
- batchIdRef: inventoryChange.lastInventoryHistory.batchIdRef,
90
- expirationDate: inventoryChange.lastInventoryHistory.expirationDate,
91
- manufactureYear: inventoryChange.lastInventoryHistory.manufactureYear,
92
- manufactureDate: inventoryChange.lastInventoryHistory.manufactureDate,
93
- palletId: inventoryChange.lastInventoryHistory.palletId,
94
- cartonId: inventoryChange.lastInventoryHistory.cartonId,
95
+ qty: inventoryChange?.lastInventoryHistory?.qty,
96
+ uom: inventoryChange?.lastInventoryHistory?.uom,
97
+ uomValue: inventoryChange?.lastInventoryHistory?.uomValue,
98
+ packingType: inventoryChange?.lastInventoryHistory?.packingType,
99
+ packingSize: inventoryChange?.lastInventoryHistory?.packingSize,
100
+ batchId: inventoryChange?.lastInventoryHistory?.batchId,
101
+ batchIdRef: inventoryChange?.lastInventoryHistory?.batchIdRef,
102
+ expirationDate: inventoryChange?.lastInventoryHistory?.expirationDate,
103
+ manufactureYear: inventoryChange?.lastInventoryHistory?.manufactureYear,
104
+ manufactureDate: inventoryChange?.lastInventoryHistory?.manufactureDate,
105
+ palletId: inventoryChange?.lastInventoryHistory?.palletId,
106
+ cartonId: inventoryChange?.lastInventoryHistory?.cartonId
95
107
  },
96
- adjustmentCode: inventoryChange.adjustmentCode,
97
- adjustmentNote: inventoryChange.adjustmentNote,
98
- type: inventoryChange.transactionType,
99
- status: inventoryChange.status,
100
- createdAt: inventoryChange.createdAt,
101
- updatedAt: inventoryChange.updatedAt
108
+ adjustmentCode: inventoryChange?.adjustmentCode,
109
+ adjustmentNote: inventoryChange?.adjustmentNote,
110
+ type: inventoryChange?.transactionType,
111
+ status: inventoryChange?.status,
112
+ createdAt: inventoryChange?.createdAt,
113
+ updatedAt: inventoryChange?.updatedAt
102
114
  }
103
115
 
104
116
  context.body = {