@things-factory/operato-wms 4.3.108 → 4.3.109
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/client/pages/bulk-operation/bulk-operation.js +15 -9
- package/client/pages/components/select-inventory-popup.js +1 -7
- package/client/pages/components/select-product-popup.js +2 -31
- package/client/pages/inbound/undo-putaway-popup.js +9 -5
- package/client/pages/inbound/undo-unload-popup.js +2 -15
- package/client/pages/inbound/unload-product.js +67 -72
- package/client/pages/inventory/inventory-adjustment-approval.js +5 -4
- package/client/pages/inventory/inventory-adjustment.js +2 -9
- package/client/pages/inventory/inventory-by-product-detail.js +13 -13
- package/client/pages/inventory-check/check-inventory-popup.js +3 -14
- package/client/pages/inventory-check/create-cycle-count.js +3 -2
- package/client/pages/inventory-check/inspecting-product.js +7 -25
- package/client/pages/inventory-check/inventory-check-list.js +10 -94
- package/client/pages/manifest/loading-manifest-detail.js +4 -7
- package/client/pages/master/generate-location-list.js +22 -30
- package/client/pages/master/location-list.js +71 -134
- package/client/pages/master/pallet-list.js +58 -137
- package/client/pages/master/product/product-details-popup.js +3 -3
- package/client/pages/master/tote-list.js +27 -40
- package/client/pages/master/transport-driver.js +41 -50
- package/client/pages/master/transport-vehicle.js +41 -45
- package/client/pages/master/warehouse-list.js +34 -56
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +25 -36
- package/client/pages/order/arrival-notice/create-arrival-notice.js +32 -53
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +0 -2
- package/client/pages/order/arrival-notice/edit-product-popup.js +7 -9
- package/client/pages/order/draft-release-good/draft-release-good-detail.js +4 -79
- package/client/pages/order/release-order/create-release-order.js +5 -22
- package/client/pages/order/release-order/release-extra-product-popup.js +1 -4
- package/client/pages/order/release-order/release-order-detail.js +0 -24
- package/client/pages/order/return-order/create-return-order.js +0 -5
- package/client/pages/order/return-order/return-order-inventory-popup.js +0 -1
- package/client/pages/order/transport-order/delivery-order-list.js +0 -26
- package/client/pages/outbound/inventory-reassign-popup.js +0 -6
- package/client/pages/outbound/packing-product.js +5 -5
- package/client/pages/outbound/packing-worksheet-list.js +1 -3
- package/client/pages/outbound/picking-product.js +7 -18
- package/client/pages/outbound/show-my-worksheet-list-popup.js +3 -12
- package/client/pages/report/custom-elccl/elccl-daily-collection-report.js +2 -5
- package/client/pages/report/custom-elccl/elccl-daily-order-inventory-report.js +2 -2
- package/client/pages/report/custom-elccl/elccl-delivery-order-summary.js +8 -48
- package/client/pages/report/custom-elccl/elccl-inventory-pallet-detail-report.js +4 -42
- package/client/pages/vas/print-product-label.js +11 -13
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js +5 -6
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js.map +1 -1
- package/dist-server/graphql/resolvers/other/add-release-good-products.js +11 -7
- package/dist-server/graphql/resolvers/other/add-release-good-products.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/costing-report.js +24 -18
- package/dist-server/graphql/resolvers/reports/costing-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +6 -6
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +6 -5
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/release-inventory-report.js +3 -3
- package/dist-server/graphql/resolvers/reports/release-inventory-report.js.map +1 -1
- package/package.json +50 -50
- package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.ts +5 -6
- package/server/graphql/resolvers/other/add-release-good-products.ts +12 -8
- package/server/graphql/resolvers/reports/costing-report.ts +24 -18
- package/server/graphql/resolvers/reports/inbound-order-details-report.ts +6 -6
- package/server/graphql/resolvers/reports/outbound-order-details-report.ts +6 -5
- package/server/graphql/resolvers/reports/release-inventory-report.ts +4 -6
- package/translations/en.json +13 -43
- package/translations/ko.json +11 -33
- package/translations/ms.json +11 -33
- package/translations/zh.json +4 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outbound-order-details-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/outbound-order-details-report.ts"],"names":[],"mappings":";;;AAEA,yDAAgD;AAChD,uDAAmD;AAGnD,0CAAiD;AAEpC,QAAA,0BAA0B,GAAG;IACxC,KAAK,CAAC,0BAA0B,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACtE,IAAI;YACF,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;YACnD,IAAI,cAAc,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;YAC1D,IAAI,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAA;YAClE,IAAI,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA;YACpE,IAAI,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAA;YAChE,IAAI,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAA;YAC5D,IAAI,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAA;YAC5D,IAAI,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAA;YAEhE,IAAI,UAAU,EAAE;gBACd,MAAM,IAAI,GA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,EAAE,GAAG,CAAC,UAAU;oBACzB,UAAU,EAAE,GAAG,CAAC,WAAW;iBAC5B,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,OAAO;gBACL,KAAK;gBACL,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK;aACtB,CAAA;SACF;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
|
|
@@ -94,7 +94,7 @@ exports.releaseInventoryReport = {
|
|
|
94
94
|
where release_good_id is not null
|
|
95
95
|
and od.status in ('PENDING', 'PENDING_RECEIVE', 'PENDING_CANCEL', 'PENDING_WORKSHEET', 'READY_TO_PICK', 'PICKING')
|
|
96
96
|
and od.domain_id = $1
|
|
97
|
-
and oi.status
|
|
97
|
+
and oi.status != 'REPLACED'
|
|
98
98
|
group by inventory_id, release_good_id
|
|
99
99
|
) oi
|
|
100
100
|
inner join release_goods od on od.id = oi.release_good_id
|
|
@@ -144,10 +144,10 @@ exports.releaseInventoryReport = {
|
|
|
144
144
|
sku: itm.product_sku,
|
|
145
145
|
name: itm.product_name,
|
|
146
146
|
description: itm.product_description,
|
|
147
|
-
brand: itm.product_brand
|
|
147
|
+
brand: itm.product_brand,
|
|
148
148
|
},
|
|
149
149
|
location: {
|
|
150
|
-
name: itm.location_name
|
|
150
|
+
name: itm.location_name,
|
|
151
151
|
},
|
|
152
152
|
packingType: itm.packing_type,
|
|
153
153
|
assignedQty: itm.assigned_qty,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release-inventory-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/release-inventory-report.ts"],"names":[],"mappings":";;;AAGA,uDAAmD;AAGnD,0CAAiD;AAEpC,QAAA,sBAAsB,GAAG;IACpC,KAAK,CAAC,sBAAsB,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QAClE,IAAI;YACF,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;YACnD,6DAA6D;YAC7D,qEAAqE;YACrE,IAAI,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAA;YAC9D,IAAI,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC,CAAA;YACtE,IAAI,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAA;YAClE,IAAI,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA;YACpE,IAAI,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA;YACpE,IAAI,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA;YAEpE,oBAAoB;YACpB,8DAA8D;YAC9D,uCAAuC;YACvC,+BAA+B;YAC/B,OAAO;YAEP,iDAAiD;YAEjD,IAAI,CAAC,QAAQ;gBAAE,MAAM,eAAe,CAAA;YAEpC,8EAA8E;YAC9E,WAAW;YACX,2EAA2E;YAC3E,IAAI;YAEJ,6CAA6C;YAC7C,IAAI,QAAQ,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"release-inventory-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/release-inventory-report.ts"],"names":[],"mappings":";;;AAGA,uDAAmD;AAGnD,0CAAiD;AAEpC,QAAA,sBAAsB,GAAG;IACpC,KAAK,CAAC,sBAA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ACpB,OAAO,EAAE,GAAG,CAAC,QAAQ;oBACrB,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,MAAM,EAAE,GAAG,CAAC,MAAM;oBAClB,OAAO,EAAE,GAAG,CAAC,QAAQ;oBACrB,WAAW,EAAE,GAAG,CAAC,YAAY;oBAC7B,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,OAAO,EAAE,GAAG,CAAC,QAAQ;oBACrB,UAAU,EAAE,GAAG,CAAC,YAAY;oBAC5B,cAAc,EAAE,GAAG,CAAC,eAAe;oBACnC,eAAe,EAAE,GAAG,CAAC,gBAAgB;iBACtC,CAAA;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CAAC,CAAA;YAEF,OAAO;gBACL,KAAK;gBACL,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK;aACtB,CAAA;SACF;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-wms",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.109",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -63,60 +63,60 @@
|
|
|
63
63
|
"@operato/scene-tab": "^0.1.8",
|
|
64
64
|
"@operato/scene-table": "^0.1.8",
|
|
65
65
|
"@operato/scene-wheel-sorter": "^0.1.8",
|
|
66
|
-
"@things-factory/apptool-ui": "^4.3.
|
|
67
|
-
"@things-factory/attachment-ui": "^4.3.
|
|
68
|
-
"@things-factory/auth-ui": "^4.3.
|
|
69
|
-
"@things-factory/barcode-ui": "^4.3.
|
|
70
|
-
"@things-factory/biz-ui": "^4.3.
|
|
71
|
-
"@things-factory/board-service": "^4.3.
|
|
72
|
-
"@things-factory/board-ui": "^4.3.
|
|
73
|
-
"@things-factory/code-ui": "^4.3.
|
|
74
|
-
"@things-factory/context-ui": "^4.3.
|
|
75
|
-
"@things-factory/export-ui": "^4.3.
|
|
76
|
-
"@things-factory/export-ui-csv": "^4.3.
|
|
77
|
-
"@things-factory/export-ui-excel": "^4.3.
|
|
78
|
-
"@things-factory/fav-base": "^4.3.
|
|
79
|
-
"@things-factory/form-ui": "^4.3.
|
|
80
|
-
"@things-factory/geography": "^4.3.
|
|
81
|
-
"@things-factory/grist-ui": "^4.3.
|
|
82
|
-
"@things-factory/help": "^4.3.
|
|
83
|
-
"@things-factory/i18n-base": "^4.3.
|
|
84
|
-
"@things-factory/id-rule-base": "^4.3.
|
|
85
|
-
"@things-factory/import-ui": "^4.3.
|
|
86
|
-
"@things-factory/import-ui-excel": "^4.3.
|
|
87
|
-
"@things-factory/menu-ui": "^4.3.
|
|
88
|
-
"@things-factory/more-ui": "^4.3.
|
|
89
|
-
"@things-factory/notification": "^4.3.
|
|
90
|
-
"@things-factory/pdf": "^4.3.
|
|
91
|
-
"@things-factory/print-proxy-service": "^4.3.
|
|
92
|
-
"@things-factory/print-ui": "^4.3.
|
|
93
|
-
"@things-factory/product-base": "^4.3.
|
|
94
|
-
"@things-factory/resource-ui": "^4.3.
|
|
95
|
-
"@things-factory/sales-ui": "^4.3.
|
|
96
|
-
"@things-factory/scene-data-transform": "^4.3.
|
|
97
|
-
"@things-factory/scene-excel": "^4.3.
|
|
98
|
-
"@things-factory/scene-firebase": "^4.3.
|
|
99
|
-
"@things-factory/scene-form": "^4.3.
|
|
100
|
-
"@things-factory/scene-google-map": "^4.3.
|
|
101
|
-
"@things-factory/scene-graphql": "^4.3.
|
|
102
|
-
"@things-factory/scene-label": "^4.3.
|
|
103
|
-
"@things-factory/scene-marker": "^4.3.
|
|
104
|
-
"@things-factory/scene-mqtt": "^4.3.
|
|
105
|
-
"@things-factory/scene-restful": "^4.3.
|
|
106
|
-
"@things-factory/scene-visualizer": "^4.3.
|
|
107
|
-
"@things-factory/setting-ui": "^4.3.
|
|
108
|
-
"@things-factory/system-ui": "^4.3.
|
|
109
|
-
"@things-factory/transport-base": "^4.3.
|
|
110
|
-
"@things-factory/tutorial-ui": "^4.3.
|
|
111
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
112
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
66
|
+
"@things-factory/apptool-ui": "^4.3.109",
|
|
67
|
+
"@things-factory/attachment-ui": "^4.3.109",
|
|
68
|
+
"@things-factory/auth-ui": "^4.3.109",
|
|
69
|
+
"@things-factory/barcode-ui": "^4.3.109",
|
|
70
|
+
"@things-factory/biz-ui": "^4.3.109",
|
|
71
|
+
"@things-factory/board-service": "^4.3.109",
|
|
72
|
+
"@things-factory/board-ui": "^4.3.109",
|
|
73
|
+
"@things-factory/code-ui": "^4.3.109",
|
|
74
|
+
"@things-factory/context-ui": "^4.3.109",
|
|
75
|
+
"@things-factory/export-ui": "^4.3.109",
|
|
76
|
+
"@things-factory/export-ui-csv": "^4.3.109",
|
|
77
|
+
"@things-factory/export-ui-excel": "^4.3.109",
|
|
78
|
+
"@things-factory/fav-base": "^4.3.109",
|
|
79
|
+
"@things-factory/form-ui": "^4.3.109",
|
|
80
|
+
"@things-factory/geography": "^4.3.109",
|
|
81
|
+
"@things-factory/grist-ui": "^4.3.109",
|
|
82
|
+
"@things-factory/help": "^4.3.109",
|
|
83
|
+
"@things-factory/i18n-base": "^4.3.109",
|
|
84
|
+
"@things-factory/id-rule-base": "^4.3.109",
|
|
85
|
+
"@things-factory/import-ui": "^4.3.109",
|
|
86
|
+
"@things-factory/import-ui-excel": "^4.3.109",
|
|
87
|
+
"@things-factory/menu-ui": "^4.3.109",
|
|
88
|
+
"@things-factory/more-ui": "^4.3.109",
|
|
89
|
+
"@things-factory/notification": "^4.3.109",
|
|
90
|
+
"@things-factory/pdf": "^4.3.109",
|
|
91
|
+
"@things-factory/print-proxy-service": "^4.3.109",
|
|
92
|
+
"@things-factory/print-ui": "^4.3.109",
|
|
93
|
+
"@things-factory/product-base": "^4.3.109",
|
|
94
|
+
"@things-factory/resource-ui": "^4.3.109",
|
|
95
|
+
"@things-factory/sales-ui": "^4.3.109",
|
|
96
|
+
"@things-factory/scene-data-transform": "^4.3.109",
|
|
97
|
+
"@things-factory/scene-excel": "^4.3.109",
|
|
98
|
+
"@things-factory/scene-firebase": "^4.3.109",
|
|
99
|
+
"@things-factory/scene-form": "^4.3.109",
|
|
100
|
+
"@things-factory/scene-google-map": "^4.3.109",
|
|
101
|
+
"@things-factory/scene-graphql": "^4.3.109",
|
|
102
|
+
"@things-factory/scene-label": "^4.3.109",
|
|
103
|
+
"@things-factory/scene-marker": "^4.3.109",
|
|
104
|
+
"@things-factory/scene-mqtt": "^4.3.109",
|
|
105
|
+
"@things-factory/scene-restful": "^4.3.109",
|
|
106
|
+
"@things-factory/scene-visualizer": "^4.3.109",
|
|
107
|
+
"@things-factory/setting-ui": "^4.3.109",
|
|
108
|
+
"@things-factory/system-ui": "^4.3.109",
|
|
109
|
+
"@things-factory/transport-base": "^4.3.109",
|
|
110
|
+
"@things-factory/tutorial-ui": "^4.3.109",
|
|
111
|
+
"@things-factory/warehouse-base": "^4.3.109",
|
|
112
|
+
"@things-factory/worksheet-base": "^4.3.109"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
|
-
"@things-factory/builder": "^4.3.
|
|
115
|
+
"@things-factory/builder": "^4.3.109",
|
|
116
116
|
"cypress": "^9.4.1",
|
|
117
117
|
"cypress-file-upload": "^5.0.8",
|
|
118
118
|
"cypress-localstorage-commands": "^1.6.1",
|
|
119
119
|
"eslint-plugin-cypress": "^2.12.1"
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "a1b81fa991795b27a9f30867347a3c1774d2c41b"
|
|
122
122
|
}
|
|
@@ -49,8 +49,6 @@ export const elcclInventoryHistoryReport = {
|
|
|
49
49
|
Lower(prd.name) LIKE ANY(ARRAY[${productValue}])
|
|
50
50
|
OR Lower(prd.sku) LIKE ANY(ARRAY[${productValue}])
|
|
51
51
|
OR Lower(prd.description) LIKE ANY(ARRAY[${productValue}])
|
|
52
|
-
OR Lower(prd.brand) LIKE ANY(ARRAY[${productValue}])
|
|
53
|
-
OR Lower(prd.brand_sku) LIKE ANY(ARRAY[${productValue}])
|
|
54
52
|
)`
|
|
55
53
|
}
|
|
56
54
|
|
|
@@ -59,7 +57,7 @@ export const elcclInventoryHistoryReport = {
|
|
|
59
57
|
create temp table temp_data_src AS
|
|
60
58
|
(
|
|
61
59
|
SELECT prd.sku AS product_sku, prd.name AS product_name, prd.description AS product_description, trim(invh.batch_id) as batch_id, invh.product_id,
|
|
62
|
-
invh.
|
|
60
|
+
invh.packing_type, invh.bizplace_id, invh.domain_id,
|
|
63
61
|
invh.ref_order_id, invh.order_no, invh.order_ref_no, invh.transaction_type, invh.created_at,
|
|
64
62
|
invh.qty, invh.opening_qty, invh.uom_value, invh.opening_uom_value
|
|
65
63
|
FROM reduced_inventory_histories invh
|
|
@@ -88,14 +86,15 @@ export const elcclInventoryHistoryReport = {
|
|
|
88
86
|
0 AS rn,
|
|
89
87
|
$1 AS created_at
|
|
90
88
|
FROM (
|
|
91
|
-
SELECT src.product_sku, src.product_name, src.product_description, src.batch_id, src.product_id, src.
|
|
89
|
+
SELECT src.product_sku, src.product_name, src.product_description, src.batch_id, src.product_id, src.packing_type, src.bizplace_id,
|
|
92
90
|
src.domain_id
|
|
93
91
|
FROM temp_data_src src
|
|
94
|
-
GROUP BY src.product_sku, src.product_name, src.product_description, src.batch_id, src.product_id, src.
|
|
92
|
+
GROUP BY src.product_sku, src.product_name, src.product_description, src.batch_id, src.product_id, src.packing_type, src.bizplace_id,
|
|
95
93
|
src.domain_id
|
|
96
94
|
) AS src
|
|
97
95
|
LEFT JOIN inventory_histories invh ON src.batch_id = trim(invh.batch_id) AND
|
|
98
|
-
src.
|
|
96
|
+
src.product_id = invh.product_id AND
|
|
97
|
+
src.packing_type = invh.packing_type AND
|
|
99
98
|
src.bizplace_id = invh.bizplace_id AND
|
|
100
99
|
src.domain_id = invh.domain_id AND
|
|
101
100
|
invh.created_at < $1::timestamp AND
|
|
@@ -2,7 +2,7 @@ import { EntityManager, In, Not } from 'typeorm'
|
|
|
2
2
|
|
|
3
3
|
import { User } from '@things-factory/auth-base'
|
|
4
4
|
import { Bizplace } from '@things-factory/biz-base'
|
|
5
|
-
import { Product
|
|
5
|
+
import { Product } from '@things-factory/product-base'
|
|
6
6
|
import {
|
|
7
7
|
ORDER_INVENTORY_STATUS,
|
|
8
8
|
ORDER_PRODUCT_STATUS,
|
|
@@ -48,7 +48,7 @@ export const addReleaseGoodProducts = {
|
|
|
48
48
|
curOrderInv.domain = domain
|
|
49
49
|
curOrderInv.bizplace = bizplace
|
|
50
50
|
curOrderInv.releaseGood = releaseGood
|
|
51
|
-
curOrderInv.
|
|
51
|
+
curOrderInv.product = await tx.getRepository(Product).findOne(oi.product.id)
|
|
52
52
|
|
|
53
53
|
let existingOrderInv: OrderInventory
|
|
54
54
|
|
|
@@ -59,8 +59,9 @@ export const addReleaseGoodProducts = {
|
|
|
59
59
|
existingOrderInv = await tx.getRepository(OrderInventory).findOne({
|
|
60
60
|
where: {
|
|
61
61
|
releaseGood,
|
|
62
|
-
|
|
62
|
+
product: curOrderInv.product,
|
|
63
63
|
batchId: curOrderInv.batchId,
|
|
64
|
+
packingType: curOrderInv.packingType,
|
|
64
65
|
inventory: foundInv
|
|
65
66
|
}
|
|
66
67
|
})
|
|
@@ -203,6 +204,7 @@ export const addReleaseGoodProducts = {
|
|
|
203
204
|
newOrderInv.status = pickingWorksheet ? ORDER_INVENTORY_STATUS.PICKING : ORDER_INVENTORY_STATUS.PENDING
|
|
204
205
|
newOrderInv.name = OrderNoGenerator.orderInventory()
|
|
205
206
|
newOrderInv.releaseGood = releaseGood
|
|
207
|
+
newOrderInv.product = await tx.getRepository(Product).findOne(oi.product.id)
|
|
206
208
|
newOrderInv.creator = user
|
|
207
209
|
newOrderInv.updater = user
|
|
208
210
|
|
|
@@ -213,7 +215,8 @@ export const addReleaseGoodProducts = {
|
|
|
213
215
|
domain,
|
|
214
216
|
releaseGood,
|
|
215
217
|
batchId: oi.batchId,
|
|
216
|
-
|
|
218
|
+
packingType: oi.packingType,
|
|
219
|
+
product: newOrderInv.product
|
|
217
220
|
}
|
|
218
221
|
})
|
|
219
222
|
|
|
@@ -229,8 +232,9 @@ export const addReleaseGoodProducts = {
|
|
|
229
232
|
existingOrderInv = await tx.getRepository(OrderInventory).findOne({
|
|
230
233
|
where: {
|
|
231
234
|
releaseGood,
|
|
232
|
-
|
|
235
|
+
product: newOrderInv.product,
|
|
233
236
|
batchId: newOrderInv.batchId,
|
|
237
|
+
packingType: newOrderInv.packingType,
|
|
234
238
|
inventory: foundInv
|
|
235
239
|
}
|
|
236
240
|
})
|
|
@@ -259,8 +263,9 @@ export const addReleaseGoodProducts = {
|
|
|
259
263
|
existingOrderInv = await tx.getRepository(OrderInventory).findOne({
|
|
260
264
|
where: {
|
|
261
265
|
releaseGood,
|
|
262
|
-
|
|
263
|
-
batchId: newOrderInv.batchId
|
|
266
|
+
product: newOrderInv.product,
|
|
267
|
+
batchId: newOrderInv.batchId,
|
|
268
|
+
packingType: newOrderInv.packingType
|
|
264
269
|
}
|
|
265
270
|
})
|
|
266
271
|
}
|
|
@@ -320,7 +325,6 @@ export const addReleaseGoodProducts = {
|
|
|
320
325
|
savedOrderInv.packingType = newOrderInv.packingType
|
|
321
326
|
savedOrderInv.uom = newOrderInv.uom
|
|
322
327
|
savedOrderInv.product = newOrderInv.product
|
|
323
|
-
savedOrderInv.productDetail = newOrderInv.productDetail
|
|
324
328
|
savedOrderInv.inventory = newOrderInv.inventory
|
|
325
329
|
savedOrderInv.status = newOrderInv.status
|
|
326
330
|
savedOrderInv.releaseGood = newOrderInv.releaseGood
|
|
@@ -41,18 +41,18 @@ export const costingReport = {
|
|
|
41
41
|
await tx.query(
|
|
42
42
|
`
|
|
43
43
|
create temp table tmp_outbound_ord on commit drop as (
|
|
44
|
-
select p.sku, rih.domain_id, rih.bizplace_id, rih.
|
|
44
|
+
select p.sku, rih.domain_id, rih.bizplace_id, rih.product_id, rih.packing_type, rih.packing_size, coalesce(rih.uom, pd.uom, pd2.uom) as uom,
|
|
45
45
|
sum(rih.qty) as total_picked_qty, sum(rih.uom_value) as total_picked_uom_value
|
|
46
46
|
from reduced_inventory_histories rih
|
|
47
47
|
inner join inventories inv on inv.domain_id = rih.domain_id and inv.pallet_id = rih.pallet_id
|
|
48
|
-
left join product_details pd on pd.
|
|
48
|
+
left join product_details pd on pd.product_id = rih.product_id and pd.packing_type = rih.packing_type and pd.packing_size = rih.packing_size
|
|
49
49
|
left join product_details pd2 on pd2.product_id = rih.product_id and pd2.is_default = true
|
|
50
50
|
left join products p on p.id = rih.product_id
|
|
51
51
|
where rih.domain_id = $1
|
|
52
52
|
and inv.bizplace_id = $2
|
|
53
53
|
and rih.created_at >= $3 and rih.created_at <= $4
|
|
54
54
|
and rih.transaction_type = 'PICKING'
|
|
55
|
-
group by p.sku, rih.domain_id, rih.bizplace_id, rih.
|
|
55
|
+
group by p.sku, rih.domain_id, rih.bizplace_id, rih.product_id, rih.packing_type, rih.packing_size, coalesce(rih.uom, pd.uom, pd2.uom)
|
|
56
56
|
);
|
|
57
57
|
`,
|
|
58
58
|
[context.state.domain.id, bizplace.id, fromDate.value, toDate.value]
|
|
@@ -61,14 +61,14 @@ export const costingReport = {
|
|
|
61
61
|
await tx.query(
|
|
62
62
|
`
|
|
63
63
|
create temp table tmp_stored_inv on commit drop as (
|
|
64
|
-
select src2.sku, src2.domain_id, src2.bizplace_id, src2.pallet_id, src2.
|
|
64
|
+
select src2.sku, src2.domain_id, src2.bizplace_id, src2.pallet_id, src2.product_id, src2.packing_type, src2.packing_size, src2.uom,
|
|
65
65
|
to_char(src2.created_at, 'YYYY-MM') as created_year_month, sum(closing_qty) as closing_qty from (
|
|
66
|
-
select distinct on (rih.pallet_id) p.sku, rih.domain_id, rih.bizplace_id, rih.pallet_id, rih.
|
|
66
|
+
select distinct on (rih.pallet_id) p.sku, rih.domain_id, rih.bizplace_id, rih.pallet_id, rih.product_id, rih.packing_type, rih.packing_size,
|
|
67
67
|
coalesce(rih.uom, pd.uom, pd2.uom) as uom,
|
|
68
68
|
rih.created_at, rih.transaction_type, rih.status, rih.opening_qty + rih.qty as closing_qty
|
|
69
69
|
from reduced_inventory_histories rih
|
|
70
70
|
inner join inventories i on i.domain_id = rih.domain_id and i.pallet_id = rih.pallet_id
|
|
71
|
-
left join product_details pd on pd.
|
|
71
|
+
left join product_details pd on pd.product_id = rih.product_id and pd.packing_type = rih.packing_type and pd.packing_size = rih.packing_size
|
|
72
72
|
left join product_details pd2 on pd2.product_id = rih.product_id and pd2.is_default = true
|
|
73
73
|
left join products p on p.id = rih.product_id
|
|
74
74
|
where rih.domain_id = $1
|
|
@@ -80,10 +80,12 @@ export const costingReport = {
|
|
|
80
80
|
select * from tmp_outbound_ord outboundOrd
|
|
81
81
|
where outboundOrd.domain_id = src2.domain_id
|
|
82
82
|
and outboundOrd.bizplace_id = src2.bizplace_id
|
|
83
|
-
and outboundOrd.
|
|
83
|
+
and outboundOrd.product_id = src2.product_id
|
|
84
|
+
and outboundOrd.packing_type = src2.packing_type
|
|
85
|
+
and outboundOrd.packing_size = src2.packing_size
|
|
84
86
|
and outboundOrd.uom = src2.uom
|
|
85
87
|
)
|
|
86
|
-
group by src2.sku, src2.domain_id, src2.bizplace_id, src2.pallet_id, src2.
|
|
88
|
+
group by src2.sku, src2.domain_id, src2.bizplace_id, src2.pallet_id, src2.product_id, src2.packing_type, src2.packing_size, src2.uom, to_char(src2.created_at, 'YYYY-MM')
|
|
87
89
|
);
|
|
88
90
|
`,
|
|
89
91
|
[context.state.domain.id, bizplace.id, toDate.value]
|
|
@@ -93,11 +95,11 @@ export const costingReport = {
|
|
|
93
95
|
`
|
|
94
96
|
create temp table temp_costing_report on commit drop as (
|
|
95
97
|
WITH RECURSIVE cte_forwarded_cost as (
|
|
96
|
-
select src.domain_id, src.bizplace_id, src.product_id, src.
|
|
98
|
+
select src.domain_id, src.bizplace_id, src.product_id, src.packing_type, src.packing_size, src.uom, TO_DATE(src.created_year_month,'YYYY-MM')::timestamp as running_year_month,
|
|
97
99
|
sum(src.qty) as qty, sum(src.total_cost)/ sum(src.qty) as monthly_avg_cost,
|
|
98
100
|
coalesce(sum(src.qty)) as closing_qty from (
|
|
99
101
|
select distinct on (pallet_id)
|
|
100
|
-
ih.domain_id, ih.bizplace_id, ih.pallet_id, ih.unit_cost, (ih.unit_cost * (ih.opening_qty + ih.qty)) as total_cost, ih.status, ih.transaction_type, ih.product_id, ih.
|
|
102
|
+
ih.domain_id, ih.bizplace_id, ih.pallet_id, ih.unit_cost, (ih.unit_cost * (ih.opening_qty + ih.qty)) as total_cost, ih.status, ih.transaction_type, ih.product_id, ih.packing_type, ih.packing_size, coalesce(ih.uom, pd.uom) as uom,
|
|
101
103
|
ih.created_at, to_char(ih.created_at, 'YYYY-MM') as created_year_month,
|
|
102
104
|
ih.opening_qty,
|
|
103
105
|
ih.qty as transaction_qty,
|
|
@@ -107,7 +109,7 @@ export const costingReport = {
|
|
|
107
109
|
ih.opening_uom_value + ih.uom_value as uom_value
|
|
108
110
|
from reduced_inventory_histories ih
|
|
109
111
|
inner join inventories i on i.domain_id = ih.domain_id and i.pallet_id = ih.pallet_id
|
|
110
|
-
left join product_details pd on pd.
|
|
112
|
+
left join product_details pd on pd.product_id = ih.product_id and pd.packing_type = ih.packing_type and pd.packing_size = ih.packing_size
|
|
111
113
|
where ih.domain_id = $1
|
|
112
114
|
and i.bizplace_id = $2
|
|
113
115
|
and ih.created_at <= $3 and ih.unit_cost is not null
|
|
@@ -115,29 +117,33 @@ export const costingReport = {
|
|
|
115
117
|
select * from tmp_outbound_ord outboundOrd
|
|
116
118
|
where outboundOrd.domain_id = ih.domain_id
|
|
117
119
|
and outboundOrd.bizplace_id = ih.bizplace_id
|
|
118
|
-
and outboundOrd.
|
|
120
|
+
and outboundOrd.product_id = ih.product_id
|
|
121
|
+
and outboundOrd.packing_type = ih.packing_type
|
|
122
|
+
and outboundOrd.packing_size = ih.packing_size
|
|
119
123
|
and outboundOrd.uom = ih.uom
|
|
120
124
|
)
|
|
121
125
|
order by ih.pallet_id, ih.seq
|
|
122
126
|
) src
|
|
123
|
-
group by src.domain_id, src.bizplace_id, src.product_id, src.
|
|
127
|
+
group by src.domain_id, src.bizplace_id, src.product_id, src.packing_type, src.packing_size, src.uom, src.created_year_month
|
|
124
128
|
union all
|
|
125
|
-
select dt1.domain_id, dt1.bizplace_id, dt1.product_id, dt1.
|
|
129
|
+
select dt1.domain_id, dt1.bizplace_id, dt1.product_id, dt1.packing_type, dt1.packing_size, dt1.uom,
|
|
126
130
|
dt1.running_year_month + interval '1 month' as running_year_month, dt1.qty, dt1.monthly_avg_cost, dt1.closing_qty
|
|
127
131
|
from cte_forwarded_cost dt1
|
|
128
132
|
where dt1.running_year_month + interval '1 month' < $3
|
|
129
133
|
) select fc.*, -outboundord.total_picked_qty as "qty", -outboundord.total_picked_uom_value as "uom_value", (-outboundord.total_picked_qty * fc.weighted_avg_unit_cost) as "total_cost" from (
|
|
130
134
|
select p.sku as "product_sku", p."name" as "product_name", p.description as "product_description", p."type" as "product_type",
|
|
131
|
-
fc.domain_id, fc.bizplace_id, fc.
|
|
135
|
+
fc.domain_id, fc.bizplace_id, fc.product_id, fc.packing_type, fc.packing_size, fc.uom, fc.running_year_month,
|
|
132
136
|
ROUND(cast(sum(fc.monthly_avg_cost * fc.closing_qty) / sum(fc.qty) as numeric),2) as "weighted_avg_unit_cost"
|
|
133
137
|
from cte_forwarded_cost fc
|
|
134
138
|
left join products p on p.id = fc.product_id
|
|
135
139
|
where running_year_month = to_date(to_char($3::date, 'YYYY-MM'),'YYYY-MM')::timestamp
|
|
136
|
-
group by p.sku, p."name", p.description, p."type", fc.domain_id, fc.bizplace_id, fc.
|
|
140
|
+
group by p.sku, p."name", p.description, p."type", fc.domain_id, fc.bizplace_id, fc.product_id, fc.packing_type, fc.packing_size, fc.uom, fc.running_year_month
|
|
137
141
|
) fc
|
|
138
142
|
left join tmp_outbound_ord outboundord on outboundord.domain_id = fc.domain_id
|
|
139
143
|
and outboundord.bizplace_id = fc.bizplace_id
|
|
140
|
-
and outboundord.
|
|
144
|
+
and outboundord.product_id = fc.product_id
|
|
145
|
+
and outboundord.packing_type = fc.packing_type
|
|
146
|
+
and outboundord.packing_size = fc.packing_size
|
|
141
147
|
and outboundord.uom = fc.uom
|
|
142
148
|
);
|
|
143
149
|
`,
|
|
@@ -145,7 +151,7 @@ export const costingReport = {
|
|
|
145
151
|
)
|
|
146
152
|
|
|
147
153
|
const total: any = await tx.query(`
|
|
148
|
-
select count(*) from temp_costing_report
|
|
154
|
+
select count(*) from temp_costing_report
|
|
149
155
|
`)
|
|
150
156
|
|
|
151
157
|
const result: any = await tx.query(
|
|
@@ -81,16 +81,16 @@ export const inboundOrderDetailsReport = {
|
|
|
81
81
|
ih.unit_cost,
|
|
82
82
|
ih.created_at as "unloaded_at",u2.name as "unloaded_by",
|
|
83
83
|
ih2.created_at as "putaway_at", u3.name as "putaway_by",
|
|
84
|
-
coalesce((select volume from product_details pd where pd.
|
|
84
|
+
coalesce((select volume from product_details pd where pd.product_id = i.product_id and pd.packing_type = i.packing_type and pd.packing_size = i.packing_size
|
|
85
85
|
order by created_at desc
|
|
86
86
|
fetch first 1 rows only),0) as unit_volume,
|
|
87
|
-
coalesce((select nett_weight from product_details pd where pd.
|
|
87
|
+
coalesce((select nett_weight from product_details pd where pd.product_id = i.product_id and pd.packing_type = i.packing_type and pd.packing_size = i.packing_size
|
|
88
88
|
order by created_at desc
|
|
89
89
|
fetch first 1 rows only),0) as unit_nett_weight,
|
|
90
|
-
coalesce((select gross_weight from product_details pd where pd.
|
|
90
|
+
coalesce((select gross_weight from product_details pd where pd.product_id = i.product_id and pd.packing_type = i.packing_type and pd.packing_size = i.packing_size
|
|
91
91
|
order by created_at desc
|
|
92
92
|
fetch first 1 rows only),0) as unit_gross_weight,
|
|
93
|
-
coalesce((select weight_unit from product_details pd where pd.
|
|
93
|
+
coalesce((select weight_unit from product_details pd where pd.product_id = i.product_id and pd.packing_type = i.packing_type and pd.packing_size = i.packing_size
|
|
94
94
|
order by created_at desc
|
|
95
95
|
fetch first 1 rows only),'') as weight_unit
|
|
96
96
|
from (
|
|
@@ -111,8 +111,8 @@ export const inboundOrderDetailsReport = {
|
|
|
111
111
|
inner join reduced_inventory_histories ih2 on ih2.inventory_id = oi.inventory_id and ih2.transaction_type ='PUTAWAY' and ih2.ref_order_id = an.id::varchar
|
|
112
112
|
left join users u3 on u3.id = ih2.creator_id
|
|
113
113
|
inner join temp_products p on p.id = ih.product_id
|
|
114
|
-
inner join order_products op on op.arrival_notice_id = an.id and op.actual_pack_qty is not null and op.
|
|
115
|
-
op.batch_id = ih.batch_id
|
|
114
|
+
inner join order_products op on op.arrival_notice_id = an.id and op.actual_pack_qty is not null and op.product_id = ih.product_id and
|
|
115
|
+
op.batch_id = ih.batch_id and op.packing_type = ih.packing_type
|
|
116
116
|
order by an.name, p.sku, ih.batch_id
|
|
117
117
|
) src
|
|
118
118
|
where 1=1
|
|
@@ -56,7 +56,7 @@ export const outboundOrderDetailsReport = {
|
|
|
56
56
|
select * from (
|
|
57
57
|
select oi.id,
|
|
58
58
|
oi.release_qty AS "release_qty", oi.picked_at, oi.picked_by, oi.packed_at, oi.packed_by, oi.loaded_at, oi.loaded_by,
|
|
59
|
-
oi.release_qty as "qty", oi.release_uom_value as "uom_value", oi.return_to_location_qty, oi.return_to_location_uom_value,
|
|
59
|
+
oi.release_qty as "qty", oi.release_uom_value as "uom_value", oi.return_to_location_qty, oi.return_to_location_uom_value,
|
|
60
60
|
coalesce(do2.other_driver, td.name) as driver_name,
|
|
61
61
|
coalesce(do2.truck_no, tv.name, rg.truck_no) as vehicle_no,
|
|
62
62
|
do2.name AS "delivery_order_no", do2.delivery_date AS "delivery_order_delivery_date", do2."to", do2.contact_point_ref_id, do2.pallet_qty,
|
|
@@ -68,6 +68,7 @@ export const outboundOrderDetailsReport = {
|
|
|
68
68
|
u1.name as "order_created_by", rg.created_at AS "order_created_at",
|
|
69
69
|
rg.accepted_at, u4.name as accepted_by, rg.checked_remark_by, rg.checked_remark_at, coalesce(do2.own_collection, rg.own_transport) AS own_transport,
|
|
70
70
|
p.id as "product_id", p.sku as "product_sku", p.name AS "product_name", p.description AS "product_description", p.type as "product_type",
|
|
71
|
+
i.packing_type as "pack_type", i.packing_size as "pack_size",
|
|
71
72
|
i.uom, i.unit_cost,
|
|
72
73
|
i.id as inventory_id, i.pallet_id, i.carton_id, i.batch_id, i.batch_id_ref, i.expiration_date, i.manufacture_date,
|
|
73
74
|
coalesce(ms.name,'') as manifest_no, coalesce(rg.manifested_at, ms.created_at) as manifested_at, coalesce(u6.name, u5.name) as manifested_by
|
|
@@ -125,16 +126,16 @@ export const outboundOrderDetailsReport = {
|
|
|
125
126
|
wsort.started_at as sorting_start, wsort.ended_at as sorting_complete,
|
|
126
127
|
wload.started_at as loading_start, wload.ended_at as loading_complete,
|
|
127
128
|
coalesce(delivery_address, concat(cp.address, cp.address_2)) as "delivery_address",
|
|
128
|
-
coalesce((select volume from product_details pd where pd.
|
|
129
|
+
coalesce((select volume from product_details pd where pd.product_id = oi.product_id and pd.packing_type = oi.pack_type and pd.packing_size = oi.pack_size
|
|
129
130
|
order by created_at desc
|
|
130
131
|
fetch first 1 rows only),0) as unit_volume,
|
|
131
|
-
coalesce((select nett_weight from product_details pd where pd.
|
|
132
|
+
coalesce((select nett_weight from product_details pd where pd.product_id = oi.product_id and pd.packing_type = oi.pack_type and pd.packing_size = oi.pack_size
|
|
132
133
|
order by created_at desc
|
|
133
134
|
fetch first 1 rows only),0) as unit_nett_weight,
|
|
134
|
-
coalesce((select gross_weight from product_details pd where pd.
|
|
135
|
+
coalesce((select gross_weight from product_details pd where pd.product_id = oi.product_id and pd.packing_type = oi.pack_type and pd.packing_size = oi.pack_size
|
|
135
136
|
order by created_at desc
|
|
136
137
|
fetch first 1 rows only),0) as unit_gross_weight,
|
|
137
|
-
coalesce((select weight_unit from product_details pd where pd.
|
|
138
|
+
coalesce((select weight_unit from product_details pd where pd.product_id = oi.product_id and pd.packing_type = oi.pack_type and pd.packing_size = oi.pack_size
|
|
138
139
|
order by created_at desc
|
|
139
140
|
fetch first 1 rows only),'') as weight_unit,
|
|
140
141
|
coalesce((select unit_cost from reduced_inventory_histories rih where
|
|
@@ -35,9 +35,7 @@ export const releaseInventoryReport = {
|
|
|
35
35
|
// }
|
|
36
36
|
|
|
37
37
|
// if (!bizplaceFilter) throw 'Invalid input'
|
|
38
|
-
let roFilter = '',
|
|
39
|
-
ccFilter = '',
|
|
40
|
-
queryFilter = ''
|
|
38
|
+
let roFilter = '', ccFilter = '', queryFilter = ''
|
|
41
39
|
if (order) {
|
|
42
40
|
let orderValue = order.value
|
|
43
41
|
.toLowerCase()
|
|
@@ -110,7 +108,7 @@ export const releaseInventoryReport = {
|
|
|
110
108
|
where release_good_id is not null
|
|
111
109
|
and od.status in ('PENDING', 'PENDING_RECEIVE', 'PENDING_CANCEL', 'PENDING_WORKSHEET', 'READY_TO_PICK', 'PICKING')
|
|
112
110
|
and od.domain_id = $1
|
|
113
|
-
and oi.status
|
|
111
|
+
and oi.status != 'REPLACED'
|
|
114
112
|
group by inventory_id, release_good_id
|
|
115
113
|
) oi
|
|
116
114
|
inner join release_goods od on od.id = oi.release_good_id
|
|
@@ -168,10 +166,10 @@ export const releaseInventoryReport = {
|
|
|
168
166
|
sku: itm.product_sku,
|
|
169
167
|
name: itm.product_name,
|
|
170
168
|
description: itm.product_description,
|
|
171
|
-
brand: itm.product_brand
|
|
169
|
+
brand: itm.product_brand,
|
|
172
170
|
},
|
|
173
171
|
location: {
|
|
174
|
-
name: itm.location_name
|
|
172
|
+
name: itm.location_name,
|
|
175
173
|
},
|
|
176
174
|
packingType: itm.packing_type,
|
|
177
175
|
assignedQty: itm.assigned_qty,
|