@things-factory/operato-wms 4.3.643 → 4.3.644
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/outbound/loading-v2/loading-execution-base.js +625 -153
- package/client/pages/outbound/loading-v2/loading-execution.js +239 -139
- package/client/pages/outbound/loading-v2/loading.js +297 -179
- package/client/pages/outbound/loading-v2/release-good-info.js +8 -8
- package/client/pages/outbound/picking-v2/picking.js +4 -0
- package/client/pages/outbound/show-ro-list-popup.js +17 -3
- package/client/pages/report/billing-module-report.js +421 -0
- package/client/route.js +4 -0
- package/dist-server/graphql/resolvers/outbound/complete-load.js +6 -1
- package/dist-server/graphql/resolvers/outbound/complete-load.js.map +1 -1
- package/dist-server/graphql/resolvers/outbound/find-loadable-release-good-by-bin.js +148 -0
- package/dist-server/graphql/resolvers/outbound/find-loadable-release-good-by-bin.js.map +1 -0
- package/dist-server/graphql/resolvers/outbound/find-loadable-release-good.js +67 -13
- package/dist-server/graphql/resolvers/outbound/find-loadable-release-good.js.map +1 -1
- package/dist-server/graphql/resolvers/outbound/get-delivery-orders.js +20 -3
- package/dist-server/graphql/resolvers/outbound/get-delivery-orders.js.map +1 -1
- package/dist-server/graphql/resolvers/outbound/index.js +2 -1
- package/dist-server/graphql/resolvers/outbound/index.js.map +1 -1
- package/dist-server/graphql/resolvers/outbound/load-by-qty.js +15 -3
- package/dist-server/graphql/resolvers/outbound/load-by-qty.js.map +1 -1
- package/dist-server/graphql/resolvers/outbound/loading-worksheet-v2.js +36 -15
- package/dist-server/graphql/resolvers/outbound/loading-worksheet-v2.js.map +1 -1
- package/dist-server/graphql/resolvers/outbound/sort-item.js +53 -52
- package/dist-server/graphql/resolvers/outbound/sort-item.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/billing-module-report.js +355 -0
- package/dist-server/graphql/resolvers/reports/billing-module-report.js.map +1 -0
- package/dist-server/graphql/resolvers/reports/index.js +2 -1
- package/dist-server/graphql/resolvers/reports/index.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +3 -0
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/pg-udf-query.js +5 -3
- package/dist-server/graphql/resolvers/reports/pg-udf-query.js.map +1 -1
- package/dist-server/graphql/resolvers/zone-worksheet/zone-picking.js +3 -3
- package/dist-server/graphql/types/outbound/index.js +2 -1
- package/dist-server/graphql/types/outbound/index.js.map +1 -1
- package/dist-server/graphql/types/reports/billing-module-report-list.js +14 -0
- package/dist-server/graphql/types/reports/billing-module-report-list.js.map +1 -0
- package/dist-server/graphql/types/reports/billing-module-report.js +15 -0
- package/dist-server/graphql/types/reports/billing-module-report.js.map +1 -0
- package/dist-server/graphql/types/reports/index.js +5 -0
- package/dist-server/graphql/types/reports/index.js.map +1 -1
- package/package.json +4 -4
- package/server/graphql/resolvers/outbound/complete-load.ts +6 -1
- package/server/graphql/resolvers/outbound/find-loadable-release-good-by-bin.ts +154 -0
- package/server/graphql/resolvers/outbound/find-loadable-release-good.ts +82 -16
- package/server/graphql/resolvers/outbound/get-delivery-orders.ts +27 -3
- package/server/graphql/resolvers/outbound/index.ts +2 -0
- package/server/graphql/resolvers/outbound/load-by-qty.ts +19 -7
- package/server/graphql/resolvers/outbound/loading-worksheet-v2.ts +116 -22
- package/server/graphql/resolvers/outbound/sort-item.ts +56 -58
- package/server/graphql/resolvers/reports/billing-module-report.ts +372 -0
- package/server/graphql/resolvers/reports/index.ts +2 -0
- package/server/graphql/resolvers/reports/outbound-order-details-report.ts +5 -8
- package/server/graphql/resolvers/reports/pg-udf-query.ts +15 -13
- package/server/graphql/resolvers/zone-worksheet/zone-picking.ts +3 -3
- package/server/graphql/types/outbound/index.ts +2 -1
- package/server/graphql/types/reports/billing-module-report-list.ts +8 -0
- package/server/graphql/types/reports/billing-module-report.ts +9 -0
- package/server/graphql/types/reports/index.ts +6 -0
- package/things-factory.config.js +4 -0
- package/translations/en.json +7 -0
- package/translations/ko.json +2 -0
- package/translations/ms.json +2 -0
- package/translations/zh.json +2 -0
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.billingModuleReport = void 0;
|
|
4
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
5
|
+
const biz_base_1 = require("@things-factory/biz-base");
|
|
6
|
+
exports.billingModuleReport = {
|
|
7
|
+
async billingModuleReport(_, params, context) {
|
|
8
|
+
try {
|
|
9
|
+
const { tx } = context.state;
|
|
10
|
+
let bizplaceFilter = { name: '', operator: '', value: '' };
|
|
11
|
+
let userFilter = params.filters.find(data => data.name === 'user');
|
|
12
|
+
let fromDate = params.filters.find(data => data.name === 'fromDate');
|
|
13
|
+
let toDate = params.filters.find(data => data.name === 'toDate');
|
|
14
|
+
let locationType = params.filters.find(data => data.name === 'locationType');
|
|
15
|
+
if (userFilter) {
|
|
16
|
+
const user = await tx.getRepository(auth_base_1.User).findOne({
|
|
17
|
+
where: { id: userFilter.value },
|
|
18
|
+
relations: ['bizplaces']
|
|
19
|
+
});
|
|
20
|
+
const bizplace = user.bizplaces[0];
|
|
21
|
+
if (!bizplace)
|
|
22
|
+
throw 'Invalid input';
|
|
23
|
+
bizplaceFilter = { name: 'bizplace', operator: 'eq', value: bizplace.id };
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
bizplaceFilter = params.filters.find(data => data.name === 'bizplace');
|
|
27
|
+
}
|
|
28
|
+
if (!bizplaceFilter || !fromDate || !toDate)
|
|
29
|
+
throw 'Invalid input';
|
|
30
|
+
const bizplace = await tx.getRepository(biz_base_1.Bizplace).findOne({
|
|
31
|
+
id: bizplaceFilter.value
|
|
32
|
+
});
|
|
33
|
+
// Prepare dynamic locationType clause and query params
|
|
34
|
+
const queryParams = [context.state.domain.id, bizplace.id];
|
|
35
|
+
let locationTypeClause = '';
|
|
36
|
+
if (locationType && locationType.value) {
|
|
37
|
+
locationTypeClause = 'AND l.type = $3';
|
|
38
|
+
queryParams.push(locationType.value);
|
|
39
|
+
}
|
|
40
|
+
console.time('temp');
|
|
41
|
+
await tx.query(`
|
|
42
|
+
CREATE TEMP TABLE temp_data_src ON COMMIT DROP AS (
|
|
43
|
+
-- Inventory Histories
|
|
44
|
+
SELECT
|
|
45
|
+
invh.inventory_id,
|
|
46
|
+
UPPER(TRIM(invh.packing_type)) AS packing_type,
|
|
47
|
+
CASE
|
|
48
|
+
WHEN invh.order_no ILIKE 'RTO-%' OR invh.transaction_type = 'RETURN' THEN REPLACE((transaction_type)::text, 'UNLOADING', 'RETURN')
|
|
49
|
+
WHEN invh.transaction_type = 'RETURN' THEN REPLACE((transaction_type)::text, 'RETURN', 'RETURN')
|
|
50
|
+
ELSE invh.transaction_type
|
|
51
|
+
END AS transaction_type,
|
|
52
|
+
invh.status, invh.created_at + INTERVAL '8 hours' AS created_at,
|
|
53
|
+
invh.qty,
|
|
54
|
+
invh.opening_qty,
|
|
55
|
+
pd.volume,
|
|
56
|
+
l."type" as location,
|
|
57
|
+
w."type" as warehouse,
|
|
58
|
+
invh.domain_id,
|
|
59
|
+
invh.bizplace_id
|
|
60
|
+
FROM reduced_inventory_histories invh
|
|
61
|
+
INNER JOIN inventories i on i.id = invh.inventory_id
|
|
62
|
+
INNER JOIN locations l on l.id = i.location_id
|
|
63
|
+
INNER JOIN warehouses w on w.id = l.warehouse_id
|
|
64
|
+
LEFT JOIN product_details pd ON pd.id = i.product_detail_id
|
|
65
|
+
WHERE
|
|
66
|
+
invh.domain_id = $1
|
|
67
|
+
AND invh.bizplace_id = $2
|
|
68
|
+
${locationTypeClause}
|
|
69
|
+
UNION ALL
|
|
70
|
+
|
|
71
|
+
-- VAS Records
|
|
72
|
+
SELECT
|
|
73
|
+
ov.inventory_id,
|
|
74
|
+
UPPER(TRIM(COALESCE(ov.new_packing_type, ov.packing_type))) AS packing_type,
|
|
75
|
+
'VAS' AS transaction_type,
|
|
76
|
+
'VAS' AS status,
|
|
77
|
+
ov.updated_at + interval '8 hours' AS created_at,
|
|
78
|
+
COALESCE(ov.adjusted_output_qty, ov.qty) AS qty,
|
|
79
|
+
'0' as opening_qty,
|
|
80
|
+
COALESCE(p.volume, 0) as volume,
|
|
81
|
+
'-' as location,
|
|
82
|
+
'-' as warehouse,
|
|
83
|
+
ov.domain_id,
|
|
84
|
+
ov.bizplace_id
|
|
85
|
+
FROM order_vass ov
|
|
86
|
+
LEFT JOIN products p ON p.id = ov.target_product_id
|
|
87
|
+
WHERE
|
|
88
|
+
ov.domain_id = $1
|
|
89
|
+
AND ov.bizplace_id = $2
|
|
90
|
+
AND ov.qty IS NOT NULL
|
|
91
|
+
);
|
|
92
|
+
`, queryParams);
|
|
93
|
+
console.timeEnd('temp');
|
|
94
|
+
const result = await tx.query(`
|
|
95
|
+
WITH RECURSIVE date_series AS (
|
|
96
|
+
SELECT
|
|
97
|
+
CASE
|
|
98
|
+
WHEN $1::DATE < (SELECT MIN(created_at)::DATE FROM temp_data_src)
|
|
99
|
+
THEN (SELECT (MIN(created_at)+ INTERVAL '1 DAY')::DATE FROM temp_data_src)
|
|
100
|
+
ELSE $1 ::DATE
|
|
101
|
+
END AS query_date
|
|
102
|
+
UNION ALL
|
|
103
|
+
SELECT (query_date + INTERVAL '1 DAY')::DATE
|
|
104
|
+
FROM date_series
|
|
105
|
+
WHERE query_date < $2
|
|
106
|
+
),
|
|
107
|
+
distinct_groups AS (
|
|
108
|
+
SELECT DISTINCT
|
|
109
|
+
UPPER(TRIM(packing_type)) AS packing_type,
|
|
110
|
+
warehouse,
|
|
111
|
+
location
|
|
112
|
+
FROM temp_data_src
|
|
113
|
+
WHERE packing_type IS NOT NULL
|
|
114
|
+
),
|
|
115
|
+
date_packing_combinations AS (
|
|
116
|
+
SELECT DISTINCT ds.query_date, pt.packing_type
|
|
117
|
+
FROM date_series ds
|
|
118
|
+
CROSS JOIN distinct_groups pt
|
|
119
|
+
),
|
|
120
|
+
order_number AS(
|
|
121
|
+
SELECT
|
|
122
|
+
rg.name,
|
|
123
|
+
(rg.updated_at + interval '8 hours')::DATE AS query_date
|
|
124
|
+
FROM release_goods rg
|
|
125
|
+
INNER JOIN (SELECT domain_id, bizplace_id FROM temp_data_src src limit 1)src
|
|
126
|
+
ON rg.domain_id = src.domain_id
|
|
127
|
+
AND rg.bizplace_id = src.bizplace_id
|
|
128
|
+
WHERE rg.status = 'DONE'
|
|
129
|
+
),
|
|
130
|
+
inbound AS (
|
|
131
|
+
SELECT
|
|
132
|
+
dpc.query_date,
|
|
133
|
+
SUM(COALESCE(src.opening_qty, 0)) AS qty,
|
|
134
|
+
'Inbound ' || '(' || INITCAP(dpc.packing_type) || ')' AS data_type
|
|
135
|
+
FROM date_packing_combinations dpc
|
|
136
|
+
LEFT JOIN temp_data_src src
|
|
137
|
+
ON dpc.query_date = src.created_at::DATE
|
|
138
|
+
AND src.transaction_type = 'PUTAWAY'
|
|
139
|
+
AND dpc.packing_type = src.packing_type
|
|
140
|
+
GROUP BY dpc.query_date, dpc.packing_type
|
|
141
|
+
ORDER BY dpc.query_date
|
|
142
|
+
),
|
|
143
|
+
outbound AS (
|
|
144
|
+
SELECT
|
|
145
|
+
dpc.query_date,
|
|
146
|
+
SUM(ABS(COALESCE(src.qty, 0))) AS qty,
|
|
147
|
+
'Outbound ' || '(' || INITCAP(dpc.packing_type) || ')' AS data_type
|
|
148
|
+
FROM date_packing_combinations dpc
|
|
149
|
+
LEFT JOIN temp_data_src src
|
|
150
|
+
ON dpc.query_date = src.created_at::DATE
|
|
151
|
+
AND src.transaction_type = 'PICKING'
|
|
152
|
+
AND dpc.packing_type = src.packing_type
|
|
153
|
+
GROUP BY dpc.query_date, dpc.packing_type
|
|
154
|
+
ORDER BY dpc.query_date
|
|
155
|
+
),
|
|
156
|
+
return AS (
|
|
157
|
+
SELECT
|
|
158
|
+
dpc.query_date,
|
|
159
|
+
SUM(COALESCE(src.qty, 0)) AS qty,
|
|
160
|
+
'Return ' || '(' || INITCAP(dpc.packing_type) || ')' AS data_type
|
|
161
|
+
FROM date_packing_combinations dpc
|
|
162
|
+
LEFT JOIN temp_data_src src
|
|
163
|
+
ON dpc.query_date = src.created_at::DATE
|
|
164
|
+
AND src.transaction_type = 'RETURN'
|
|
165
|
+
AND dpc.packing_type = src.packing_type
|
|
166
|
+
GROUP BY dpc.query_date, dpc.packing_type
|
|
167
|
+
ORDER BY dpc.query_date
|
|
168
|
+
),
|
|
169
|
+
vas AS(
|
|
170
|
+
SELECT
|
|
171
|
+
dpc.query_date,
|
|
172
|
+
SUM(COALESCE(src.qty, 0)) AS qty,
|
|
173
|
+
'Vas ' || '(' || INITCAP(dpc.packing_type) || ')' AS data_type
|
|
174
|
+
FROM date_packing_combinations dpc
|
|
175
|
+
LEFT JOIN temp_data_src src
|
|
176
|
+
ON dpc.query_date = src.created_at::DATE
|
|
177
|
+
AND src.transaction_type = 'VAS'
|
|
178
|
+
AND dpc.packing_type = src.packing_type
|
|
179
|
+
GROUP BY dpc.query_date, dpc.packing_type
|
|
180
|
+
ORDER BY dpc.query_date
|
|
181
|
+
),
|
|
182
|
+
orders AS(
|
|
183
|
+
SELECT
|
|
184
|
+
dpc.query_date,
|
|
185
|
+
COUNT(DISTINCT rg.name) AS qty,
|
|
186
|
+
'Total Order Fulfilled' AS data_type
|
|
187
|
+
FROM date_series dpc
|
|
188
|
+
LEFT JOIN order_number rg ON dpc.query_date = rg.query_date
|
|
189
|
+
GROUP BY dpc.query_date
|
|
190
|
+
ORDER BY dpc.query_date
|
|
191
|
+
),
|
|
192
|
+
total_unit_processed AS(
|
|
193
|
+
SELECT
|
|
194
|
+
o.query_date,
|
|
195
|
+
SUM(ABS(qty)) as qty,
|
|
196
|
+
'Total Unit Processed' AS data_type
|
|
197
|
+
FROM outbound o
|
|
198
|
+
GROUP BY o.query_date
|
|
199
|
+
ORDER BY o.query_date
|
|
200
|
+
),
|
|
201
|
+
inbound_volume AS (
|
|
202
|
+
SELECT
|
|
203
|
+
dpc.query_date,
|
|
204
|
+
SUM(COALESCE(src.qty * src.volume, 0)) AS qty,
|
|
205
|
+
'Inbound (CBM)' AS data_type
|
|
206
|
+
FROM date_packing_combinations dpc
|
|
207
|
+
LEFT JOIN temp_data_src src
|
|
208
|
+
ON dpc.query_date = src.created_at::DATE
|
|
209
|
+
AND src.transaction_type IN ('UNLOADING', 'RETURN')
|
|
210
|
+
AND dpc.packing_type = src.packing_type
|
|
211
|
+
GROUP BY dpc.query_date
|
|
212
|
+
),
|
|
213
|
+
outbound_volume AS (
|
|
214
|
+
SELECT
|
|
215
|
+
dpc.query_date,
|
|
216
|
+
SUM(ABS(COALESCE(src.qty * src.volume, 0))) AS qty,
|
|
217
|
+
'Outbound (CBM)' AS data_type
|
|
218
|
+
FROM date_packing_combinations dpc
|
|
219
|
+
LEFT JOIN temp_data_src src
|
|
220
|
+
ON dpc.query_date = src.created_at::DATE
|
|
221
|
+
AND src.transaction_type = 'PICKING'
|
|
222
|
+
AND dpc.packing_type = src.packing_type
|
|
223
|
+
GROUP BY dpc.query_date
|
|
224
|
+
),
|
|
225
|
+
vas_volume AS (
|
|
226
|
+
SELECT
|
|
227
|
+
dpc.query_date,
|
|
228
|
+
SUM(COALESCE(src.qty * src.volume, 0)) AS qty,
|
|
229
|
+
'VAS (CBM)' AS data_type
|
|
230
|
+
FROM date_packing_combinations dpc
|
|
231
|
+
LEFT JOIN temp_data_src src
|
|
232
|
+
ON dpc.query_date = src.created_at::DATE
|
|
233
|
+
AND src.transaction_type = 'VAS'
|
|
234
|
+
AND dpc.packing_type = src.packing_type
|
|
235
|
+
GROUP BY dpc.query_date
|
|
236
|
+
),
|
|
237
|
+
-- Determine the cutoff date from date_series.
|
|
238
|
+
cutoff AS (
|
|
239
|
+
SELECT MIN(query_date) AS cutoff_date
|
|
240
|
+
FROM date_series
|
|
241
|
+
),
|
|
242
|
+
-- For each unique inventory_id, return the row with the latest created_at (before cutoff)
|
|
243
|
+
-- and calculate its effective opening using opening_qty + qty.
|
|
244
|
+
latest_opening AS (
|
|
245
|
+
SELECT DISTINCT ON (inventory_id)
|
|
246
|
+
inventory_id,
|
|
247
|
+
packing_type,
|
|
248
|
+
warehouse,
|
|
249
|
+
location,
|
|
250
|
+
(COALESCE(opening_qty, 0) + COALESCE(qty, 0)) AS effective_opening,
|
|
251
|
+
created_at AS last_record_date
|
|
252
|
+
FROM temp_data_src, cutoff
|
|
253
|
+
WHERE created_at::DATE < cutoff.cutoff_date
|
|
254
|
+
ORDER BY inventory_id, created_at DESC
|
|
255
|
+
),
|
|
256
|
+
---------------group by locations----------------
|
|
257
|
+
-- Aggregate the effective_opening from the latest record (per inventory_id) by group.
|
|
258
|
+
first_count AS (
|
|
259
|
+
SELECT
|
|
260
|
+
cutoff.cutoff_date AS query_date,
|
|
261
|
+
SUM(effective_opening) AS opening_balance,
|
|
262
|
+
0 AS closing_qty,
|
|
263
|
+
packing_type,
|
|
264
|
+
warehouse,
|
|
265
|
+
location
|
|
266
|
+
FROM latest_opening, cutoff
|
|
267
|
+
GROUP BY packing_type, warehouse, location, cutoff.cutoff_date
|
|
268
|
+
),
|
|
269
|
+
day_transaction AS (
|
|
270
|
+
SELECT
|
|
271
|
+
ds.query_date,
|
|
272
|
+
COALESCE(SUM(src.qty), 0) AS qty,
|
|
273
|
+
dg.packing_type, dg.warehouse, dg.location
|
|
274
|
+
FROM date_series ds
|
|
275
|
+
CROSS JOIN distinct_groups dg
|
|
276
|
+
LEFT JOIN temp_data_src src
|
|
277
|
+
ON src.created_at::DATE = ds.query_date
|
|
278
|
+
AND src.packing_type = dg.packing_type
|
|
279
|
+
AND src.warehouse = dg.warehouse
|
|
280
|
+
AND src.location = dg.location
|
|
281
|
+
GROUP BY ds.query_date, dg.packing_type, dg.warehouse, dg.location
|
|
282
|
+
),
|
|
283
|
+
c_transaction AS (
|
|
284
|
+
SELECT
|
|
285
|
+
dt.query_date,
|
|
286
|
+
dt.qty,
|
|
287
|
+
SUM(dt.qty) OVER (PARTITION BY dt.packing_type, dt.warehouse, dt.location ORDER BY dt.query_date) AS c_qty,
|
|
288
|
+
dt.packing_type, dt.warehouse, dt.location
|
|
289
|
+
FROM day_transaction dt
|
|
290
|
+
),
|
|
291
|
+
by_day_qty AS(
|
|
292
|
+
SELECT * from first_count
|
|
293
|
+
UNION ALL
|
|
294
|
+
SELECT
|
|
295
|
+
(ct.query_date + interval '1 day')::DATE as query_date,
|
|
296
|
+
fc.opening_balance + ct.c_qty AS opening_balance,
|
|
297
|
+
0 AS closing_qty,
|
|
298
|
+
ct.packing_type, ct.warehouse, ct.location
|
|
299
|
+
FROM c_transaction ct
|
|
300
|
+
JOIN first_count fc
|
|
301
|
+
ON fc.packing_type = ct.packing_type
|
|
302
|
+
AND ct.warehouse = fc.warehouse
|
|
303
|
+
AND ct.location = fc.location
|
|
304
|
+
WHERE ct.query_date < (SELECT MAX(query_date) FROM date_series)
|
|
305
|
+
ORDER BY packing_type, warehouse, location, query_date
|
|
306
|
+
),
|
|
307
|
+
by_location AS(
|
|
308
|
+
SELECT
|
|
309
|
+
query_date,
|
|
310
|
+
opening_balance as opening_balance,
|
|
311
|
+
INITCAP(SUBSTRING(warehouse FROM 1 FOR 1)) || LOWER(SUBSTRING(warehouse FROM 2)) || ' ' ||
|
|
312
|
+
INITCAP(SUBSTRING(location FROM 1 FOR 1)) || LOWER(SUBSTRING(location FROM 2)) || ' (' ||
|
|
313
|
+
INITCAP(SUBSTRING(packing_type FROM 1 FOR 1)) || LOWER(SUBSTRING(packing_type FROM 2)) || ')' as data_type
|
|
314
|
+
FROM by_day_qty
|
|
315
|
+
ORDER BY data_type, query_date
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
SELECT * FROM inbound
|
|
319
|
+
UNION ALL
|
|
320
|
+
SELECT * FROM outbound
|
|
321
|
+
UNION ALL
|
|
322
|
+
SELECT * FROM return
|
|
323
|
+
UNION ALL
|
|
324
|
+
SELECT * FROM vas
|
|
325
|
+
UNION ALL
|
|
326
|
+
SELECT * FROM orders
|
|
327
|
+
UNION ALL
|
|
328
|
+
SELECT * FROM total_unit_processed
|
|
329
|
+
UNION ALL
|
|
330
|
+
SELECT * FROM by_location
|
|
331
|
+
UNION ALL
|
|
332
|
+
SELECT * FROM inbound_volume
|
|
333
|
+
UNION ALL
|
|
334
|
+
SELECT * FROM outbound_volume
|
|
335
|
+
UNION ALL
|
|
336
|
+
SELECT * FROM vas_volume
|
|
337
|
+
ORDER BY query_date, data_type;
|
|
338
|
+
`, [fromDate.value, toDate.value]);
|
|
339
|
+
let items = result.map(itm => {
|
|
340
|
+
return {
|
|
341
|
+
date: itm.query_date,
|
|
342
|
+
packingType: itm.data_type,
|
|
343
|
+
quantity: itm.qty
|
|
344
|
+
};
|
|
345
|
+
});
|
|
346
|
+
return {
|
|
347
|
+
items
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
catch (error) {
|
|
351
|
+
throw error;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
//# sourceMappingURL=billing-module-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-module-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/billing-module-report.ts"],"names":[],"mappings":";;;AAEA,yDAAgD;AAChD,uDAAmD;AAKtC,QAAA,mBAAmB,GAAG;IACjC,KAAK,CAAC,mBAAmB,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QAC/D,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,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ACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
|
|
@@ -14,7 +14,8 @@ const product_label_report_1 = require("./product-label-report");
|
|
|
14
14
|
const release_inventory_report_1 = require("./release-inventory-report");
|
|
15
15
|
const shortage_report_1 = require("./shortage-report");
|
|
16
16
|
const tote_loading_qc_report_1 = require("./tote-loading-qc-report");
|
|
17
|
+
const billing_module_report_1 = require("./billing-module-report");
|
|
17
18
|
const vas_report_1 = require("./vas-report");
|
|
18
19
|
const pg_udf_query_1 = require("./pg-udf-query");
|
|
19
|
-
exports.Query = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, inbound_serial_number_report_1.inboundSerialNumberReport), outbound_serial_number_report_1.outboundSerialNumberReport), costing_report_1.costingReport), inbound_order_details_report_1.inboundOrderDetailsReport), outbound_order_details_report_1.outboundOrderDetailsReport), product_label_report_1.productLabelReport), release_inventory_report_1.releaseInventoryReport), shortage_report_1.shortageReport), tote_loading_qc_report_1.loadingQcReport), vas_report_1.orderVasReport), vas_report_1.vasReport), analysis_picking_packing_report_1.analysisPickingPackingReport), cycle_count_report_1.cycleCountReport), non_loaded_inventory_report_1.nonLoadedOrderInventoriesReport), manifest_report_1.manifestReport), pg_udf_query_1.pgUdfQuery);
|
|
20
|
+
exports.Query = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, inbound_serial_number_report_1.inboundSerialNumberReport), outbound_serial_number_report_1.outboundSerialNumberReport), costing_report_1.costingReport), inbound_order_details_report_1.inboundOrderDetailsReport), outbound_order_details_report_1.outboundOrderDetailsReport), product_label_report_1.productLabelReport), release_inventory_report_1.releaseInventoryReport), shortage_report_1.shortageReport), tote_loading_qc_report_1.loadingQcReport), vas_report_1.orderVasReport), vas_report_1.vasReport), analysis_picking_packing_report_1.analysisPickingPackingReport), cycle_count_report_1.cycleCountReport), non_loaded_inventory_report_1.nonLoadedOrderInventoriesReport), manifest_report_1.manifestReport), billing_module_report_1.billingModuleReport), pg_udf_query_1.pgUdfQuery);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/index.ts"],"names":[],"mappings":";;;AAAA,uFAAgF;AAChF,qDAAgD;AAChD,6DAAuD;AACvD,iFAA0E;AAC1E,iFAA0E;AAC1E,uDAAkD;AAClD,+EAA+E;AAC/E,mFAA4E;AAC5E,mFAA4E;AAC5E,iEAA2D;AAC3D,yEAAmE;AACnE,uDAAkD;AAClD,qEAA0D;AAC1D,6CAGqB;AACrB,iDAA2C;AAE9B,QAAA,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/index.ts"],"names":[],"mappings":";;;AAAA,uFAAgF;AAChF,qDAAgD;AAChD,6DAAuD;AACvD,iFAA0E;AAC1E,iFAA0E;AAC1E,uDAAkD;AAClD,+EAA+E;AAC/E,mFAA4E;AAC5E,mFAA4E;AAC5E,iEAA2D;AAC3D,yEAAmE;AACnE,uDAAkD;AAClD,qEAA0D;AAC1D,mEAA6D;AAC7D,6CAGqB;AACrB,iDAA2C;AAE9B,QAAA,KAAK,qPACb,wDAAyB,GACzB,0DAA0B,GAC1B,8BAAa,GACb,wDAAyB,GACzB,0DAA0B,GAC1B,yCAAkB,GAClB,iDAAsB,GACtB,gCAAc,GACd,wCAAe,GACf,2BAAc,GACd,sBAAS,GACT,8DAA4B,GAC5B,qCAAgB,GAChB,6DAA+B,GAC/B,gCAAc,GACd,2CAAmB,GACnB,yBAAU,EACd"}
|
|
@@ -84,9 +84,11 @@ exports.outboundOrderDetailsReport = {
|
|
|
84
84
|
where rg.bizplace_id = $2 and rg.domain_id = $1
|
|
85
85
|
and rg.created_at >= $3 and rg.created_at <= $4
|
|
86
86
|
and oi.status <> 'REPLACED'
|
|
87
|
+
and oi.release_qty > 0
|
|
87
88
|
${status ? `and rg.status = '${status.value}' ` : ``}
|
|
88
89
|
${binLocation ? `and l.name ilike '${binLocation.value}' ` : ``}
|
|
89
90
|
${priorityDelivery ? `and rg.priority_delivery = ${priorityDelivery.value} ` : ``}
|
|
91
|
+
and oi.release_qty > 0
|
|
90
92
|
) src
|
|
91
93
|
where 1=1
|
|
92
94
|
${extraQueryFilters}
|
|
@@ -122,6 +124,7 @@ exports.outboundOrderDetailsReport = {
|
|
|
122
124
|
and rg.assigned_inventory = false
|
|
123
125
|
${status ? `and rg.status = '${status.value}' ` : ``}
|
|
124
126
|
and rg.assigned_inventory = false
|
|
127
|
+
and op.release_qty > 0
|
|
125
128
|
) src2
|
|
126
129
|
where 1=1
|
|
127
130
|
${extraQueryFilters}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outbound-order-details-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/outbound-order-details-report.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"outbound-order-details-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/outbound-order-details-report.ts"],"names":[],"mappings":";;;AACA,yDAAgD;AAChD,uDAAmD;AAEnD,0CAAiD;AAEpC,QAAA,0BAA0B,GAAG;IACxC,KAAK,CAAC,0BAA0B,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACtE,IAAI;YACF,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAsD,OAAO,CAAC,KAAK,CAAA;YAC7F,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,IAA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gB;oBACrC,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,eAAe,EAAE,GAAG,CAAC,iBAAiB;oBACtC,eAAe,EAAE,GAAG,CAAC,iBAAiB;oBACtC,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,YAAY,EAAE,GAAG,CAAC,aAAa;oBAC/B,YAAY,EAAE,GAAG,CAAC,aAAa;oBAC/B,WAAW,EAAE,GAAG,CAAC,WAAW;oBAC5B,YAAY,EAAE,GAAG,CAAC,aAAa;oBAC/B,WAAW,EAAE,GAAG,CAAC,YAAY;oBAC7B,aAAa,EAAE,GAAG,CAAC,cAAc;oBACjC,SAAS,EAAE,GAAG,CAAC,UAAU;oBACzB,eAAe,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,qBAAqB;oBAC5E,SAAS,EAAE,GAAG,CAAC,UAAU;oBACzB,UAAU,EAAE,GAAG,CAAC,WAAW;oBAC3B,gBAAgB,EAAE,GAAG,CAAC,iBAAiB;iBACxC,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"}
|
|
@@ -5,10 +5,14 @@ exports.pgUdfQuery = {
|
|
|
5
5
|
async pgUdfQuery(_, params, context) {
|
|
6
6
|
const { domain, tx } = context.state;
|
|
7
7
|
let udfName = params.filters.find(param => param.name === 'udf');
|
|
8
|
+
let domainParam = params.filters.find(param => param.name === 'domain_id');
|
|
8
9
|
try {
|
|
9
10
|
if (!(udfName === null || udfName === void 0 ? void 0 : udfName.value)) {
|
|
10
11
|
throw new Error('UDF name is required');
|
|
11
12
|
}
|
|
13
|
+
if (!(domainParam === null || domainParam === void 0 ? void 0 : domainParam.value)) {
|
|
14
|
+
params.filters.push({ name: 'domain_id', operator: 'eq', value: domain.id });
|
|
15
|
+
}
|
|
12
16
|
// Remove the udf filter and convert remaining filters to an object
|
|
13
17
|
const parameters = params.filters
|
|
14
18
|
.filter(f => f.name !== 'udf')
|
|
@@ -57,9 +61,7 @@ async function callPostgresFunction(functionName, entityManager, parameters) {
|
|
|
57
61
|
// Execute the query with the provided parameters
|
|
58
62
|
const result = await entityManager.query(query, params);
|
|
59
63
|
// PostgreSQL functions typically return rows, so we handle both single and multiple results
|
|
60
|
-
return Array.isArray(result) && result.length === 1
|
|
61
|
-
? result[0]
|
|
62
|
-
: result;
|
|
64
|
+
return Array.isArray(result) && result.length === 1 ? result[0] : result;
|
|
63
65
|
}
|
|
64
66
|
catch (error) {
|
|
65
67
|
throw new Error(`Error calling PostgreSQL function '${functionName}': ${error.message}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pg-udf-query.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/pg-udf-query.ts"],"names":[],"mappings":";;;AAGa,QAAA,UAAU,GAAG;IACxB,KAAK,CAAC,UAAU,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACtD,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,GAA0C,OAAO,CAAC,KAAK,CAAA;QAC3E,IAAI,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"pg-udf-query.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/pg-udf-query.ts"],"names":[],"mappings":";;;AAGa,QAAA,UAAU,GAAG;IACxB,KAAK,CAAC,UAAU,CAAC,CAAM,EAA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,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;KACzF;AACH,CAAC"}
|
|
@@ -267,12 +267,12 @@ async function completeZonePicking(worksheetId, context, isPartial) {
|
|
|
267
267
|
if (roWithLoadingWorksheet.length > 0) {
|
|
268
268
|
//update picked oi to loading
|
|
269
269
|
await tx.getRepository(sales_base_1.OrderInventory).update({ releaseGood: (0, typeorm_1.In)(roWithLoadingWorksheet), status: sales_base_1.ORDER_INVENTORY_STATUS.PICKED }, {
|
|
270
|
-
status: sales_base_1.ORDER_INVENTORY_STATUS.
|
|
270
|
+
status: sales_base_1.ORDER_INVENTORY_STATUS.SORTING,
|
|
271
271
|
updater: user,
|
|
272
272
|
updatedAt: new Date()
|
|
273
273
|
});
|
|
274
274
|
const loadingOrderInventories = await tx.getRepository(sales_base_1.OrderInventory).find({
|
|
275
|
-
where: { releaseGood: (0, typeorm_1.In)(roWithLoadingWorksheet), status: sales_base_1.ORDER_INVENTORY_STATUS.
|
|
275
|
+
where: { releaseGood: (0, typeorm_1.In)(roWithLoadingWorksheet), status: sales_base_1.ORDER_INVENTORY_STATUS.SORTING }
|
|
276
276
|
});
|
|
277
277
|
//update loading wsd deactivated to executing
|
|
278
278
|
await tx.getRepository(worksheet_base_1.WorksheetDetail).update({
|
|
@@ -322,7 +322,7 @@ async function generateLoadingWorksheets(tx, domain, user, roWithoutLoadingWorks
|
|
|
322
322
|
await tx.getRepository(worksheet_base_1.WorksheetDetail).insert(loadingWorksheetDetails);
|
|
323
323
|
//update picked oi to loading
|
|
324
324
|
await tx.getRepository(sales_base_1.OrderInventory).update({ id: (0, typeorm_1.In)(orderInventories.map(oi => oi.id)), status: sales_base_1.ORDER_INVENTORY_STATUS.PICKED }, {
|
|
325
|
-
status: sales_base_1.ORDER_INVENTORY_STATUS.
|
|
325
|
+
status: sales_base_1.ORDER_INVENTORY_STATUS.SORTING,
|
|
326
326
|
updater: user,
|
|
327
327
|
updatedAt: new Date()
|
|
328
328
|
});
|
|
@@ -5,7 +5,8 @@ const loading_worksheet_type_1 = require("./loading-worksheet-type");
|
|
|
5
5
|
const delivery_order_info_list_1 = require("./delivery-order-info-list");
|
|
6
6
|
const loading_assignment_1 = require("./loading-assignment");
|
|
7
7
|
exports.Query = `
|
|
8
|
-
findLoadableReleaseGood(orderNo: String!): [ReleaseGood] @transaction
|
|
8
|
+
findLoadableReleaseGood(orderNo: String!, tabName: String!): [ReleaseGood] @transaction
|
|
9
|
+
findLoadableReleaseGoodByBin(orderNo: String!): LoadingWorksheet @transaction
|
|
9
10
|
loadingWorksheetv2(orderNo: String!, filter: String): LoadingWorksheet @transaction
|
|
10
11
|
getDeliveryOrders(releaseGoodNo: String!): DeliveryOrderInfoList
|
|
11
12
|
myLoadingAssignmentStatus: LoadingAssignmentStatus
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/types/outbound/index.ts"],"names":[],"mappings":";;;AAAA,qEAAoF;AACpF,yEAAkE;AAClE,6DAA8D;AAEjD,QAAA,KAAK,GAAG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/types/outbound/index.ts"],"names":[],"mappings":";;;AAAA,qEAAoF;AACpF,yEAAkE;AAClE,6DAA8D;AAEjD,QAAA,KAAK,GAAG;;;;;;CAMpB,CAAA;AAEY,QAAA,QAAQ,GAAG;;;;;;;;CAQvB,CAAA;AAEY,QAAA,KAAK,GAAG,CAAC,yCAAgB,EAAE,gDAAuB,EAAE,gDAAqB,EAAE,4CAAuB,CAAC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BillingModuleReportList = void 0;
|
|
7
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
+
exports.BillingModuleReportList = (0, graphql_tag_1.default) `
|
|
9
|
+
type BillingModuleReportList {
|
|
10
|
+
items: [BillingModuleReport]
|
|
11
|
+
total: Int
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
//# sourceMappingURL=billing-module-report-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-module-report-list.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/billing-module-report-list.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,uBAAuB,GAAG,IAAA,qBAAG,EAAA;;;;;CAKzC,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BillingModuleReport = void 0;
|
|
7
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
+
exports.BillingModuleReport = (0, graphql_tag_1.default) `
|
|
9
|
+
type BillingModuleReport {
|
|
10
|
+
date: String
|
|
11
|
+
packingType: String
|
|
12
|
+
quantity: Float
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
//# sourceMappingURL=billing-module-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-module-report.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/billing-module-report.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,mBAAmB,GAAG,IAAA,qBAAG,EAAA;;;;;;CAMrC,CAAA"}
|
|
@@ -27,6 +27,8 @@ const release_inventory_report_1 = require("./release-inventory-report");
|
|
|
27
27
|
const release_inventory_report_list_1 = require("./release-inventory-report-list");
|
|
28
28
|
const shortage_report_list_1 = require("./shortage-report-list");
|
|
29
29
|
const shortage_report_type_1 = require("./shortage-report-type");
|
|
30
|
+
const billing_module_report_1 = require("./billing-module-report");
|
|
31
|
+
const billing_module_report_list_1 = require("./billing-module-report-list");
|
|
30
32
|
const vas_report_1 = require("./vas-report");
|
|
31
33
|
const vas_report_list_1 = require("./vas-report-list");
|
|
32
34
|
const pg_udf_query_list_1 = require("./pg-udf-query-list");
|
|
@@ -46,6 +48,7 @@ exports.Query = `
|
|
|
46
48
|
cycleCountReport(filters: [Filter], pagination: Pagination, sortings: [Sorting], name: String!): CycleCountReportList @transaction
|
|
47
49
|
nonLoadedOrderInventories(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): NonLoadedOrderInventoryReportList @transaction
|
|
48
50
|
manifestReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): ManifestReportList @transaction
|
|
51
|
+
billingModuleReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): BillingModuleReportList @transaction
|
|
49
52
|
pgUdfQuery(filters: [Filter!]): PgUdfQueryList @transaction
|
|
50
53
|
`;
|
|
51
54
|
exports.Types = [
|
|
@@ -79,6 +82,8 @@ exports.Types = [
|
|
|
79
82
|
non_loaded_inventory_report_list_1.NonLoadedOrderInventoryReportList,
|
|
80
83
|
manifest_report_type_1.ManifestReport,
|
|
81
84
|
manifest_report_list_1.ManifestReportList,
|
|
85
|
+
billing_module_report_1.BillingModuleReport,
|
|
86
|
+
billing_module_report_list_1.BillingModuleReportList,
|
|
82
87
|
pg_udf_query_list_1.PgUdfQueryList
|
|
83
88
|
];
|
|
84
89
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/index.ts"],"names":[],"mappings":";;;AACA,uFAAgF;AAChF,iGAAyF;AACzF,qDAAgD;AAChD,+DAAyD;AACzD,6DAAuD;AACvD,uEAAgE;AAChE,iFAA0E;AAC1E,2FAAmF;AACnF,iFAA0E;AAC1E,2FAAmF;AACnF,2DAAqD;AACrD,qEAA8D;AAC9D,iEAA2D;AAC3D,iEAAuD;AACvD,+EAA6E;AAC7E,yFAAsF;AACtF,mFAA4E;AAC5E,6FAAqF;AACrF,mFAA4E;AAC5E,6FAAqF;AACrF,iEAA2D;AAC3D,2EAAoE;AACpE,yEAAmE;AACnE,mFAA4E;AAC5E,iEAA2D;AAC3D,iEAAuD;AACvD,mEAA6D;AAC7D,6EAAsE;AACtE,6CAAwD;AACxD,uDAAqE;AACrE,2DAAoD;AAEvC,QAAA,KAAK,GAAG;;;;;;;;;;;;;;;;;;CAkBpB,CAAA;AAEY,QAAA,KAAK,GAAG;IACnB,wDAAyB;IACzB,iEAA6B;IAC7B,0DAA0B;IAC1B,mEAA8B;IAC9B,wDAAyB;IACzB,iEAA6B;IAC7B,0DAA0B;IAC1B,mEAA8B;IAC9B,yCAAkB;IAClB,kDAAsB;IACtB,8BAAa;IACb,uCAAiB;IACjB,iDAAsB;IACtB,0DAA0B;IAC1B,qCAAc;IACd,yCAAkB;IAClB,mCAAe;IACf,4CAAmB;IACnB,2BAAc;IACd,oCAAkB;IAClB,sBAAS;IACT,+BAAa;IACb,8DAA4B;IAC5B,uEAAgC;IAChC,qCAAgB;IAChB,8CAAoB;IACpB,2DAA6B;IAC7B,oEAAiC;IACjC,qCAAc;IACd,yCAAkB;IAClB,2CAAmB;IACnB,oDAAuB;IACvB,kCAAc;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.644",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@things-factory/print-ui": "^4.3.591",
|
|
92
92
|
"@things-factory/product-base": "^4.3.642",
|
|
93
93
|
"@things-factory/resource-ui": "^4.3.642",
|
|
94
|
-
"@things-factory/sales-ui": "^4.3.
|
|
94
|
+
"@things-factory/sales-ui": "^4.3.644",
|
|
95
95
|
"@things-factory/scene-data-transform": "^4.3.591",
|
|
96
96
|
"@things-factory/scene-excel": "^4.3.591",
|
|
97
97
|
"@things-factory/scene-firebase": "^4.3.591",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@things-factory/transport-base": "^4.3.631",
|
|
109
109
|
"@things-factory/tutorial-ui": "^4.3.591",
|
|
110
110
|
"@things-factory/warehouse-base": "^4.3.642",
|
|
111
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
111
|
+
"@things-factory/worksheet-base": "^4.3.644"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@things-factory/builder": "^4.3.591",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"cypress-localstorage-commands": "^1.6.1",
|
|
118
118
|
"eslint-plugin-cypress": "^2.12.1"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "4794b8e96796eea592fc068a9f12ef32b8a8bfc5"
|
|
121
121
|
}
|
|
@@ -49,7 +49,12 @@ async function completeLoading(
|
|
|
49
49
|
const orderInventories: OrderInventory[] = releaseGood.orderInventories
|
|
50
50
|
|
|
51
51
|
const worksheet: Worksheet = await tx.getRepository(Worksheet).findOne({
|
|
52
|
-
where: {
|
|
52
|
+
where: {
|
|
53
|
+
id: worksheetId,
|
|
54
|
+
domain: domain,
|
|
55
|
+
status: In([WORKSHEET_STATUS.EXECUTING, WORKSHEET_STATUS.PARTIAL_EXECUTING]),
|
|
56
|
+
type: WORKSHEET_TYPE.LOADING
|
|
57
|
+
},
|
|
53
58
|
relations: ['worksheetDetails']
|
|
54
59
|
})
|
|
55
60
|
if (!worksheet) {
|