@things-factory/operato-wms 4.3.325 → 4.3.327
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/order/release-order/create-release-order.js +55 -51
- package/client/pages/order/release-order/release-order-detail.js +31 -74
- package/client/pages/order/vas-order/popup/vas-create-popup.js +1 -1
- package/client/pages/order/vas-order/popup/vas-target-product-popup.js +1 -1
- package/client/pages/outbound/sorting-product.js +2 -1
- package/client/pages/report/inbound-order-details-report.js +7 -7
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +50 -65
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/types/reports/inbound-order-details-report.js +3 -3
- package/helps/release-note.ko.md +16 -6
- package/helps/release-note.md +16 -6
- package/helps/release-note.ms.md +16 -6
- package/helps/release-note.zh.md +16 -6
- package/package.json +5 -5
- package/server/graphql/resolvers/reports/inbound-order-details-report.ts +52 -67
- package/server/graphql/types/reports/inbound-order-details-report.ts +3 -3
|
@@ -1228,7 +1228,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1228
1228
|
name: 'remark',
|
|
1229
1229
|
header: i18next.t('field.remark'),
|
|
1230
1230
|
record: { editable: true },
|
|
1231
|
-
width:
|
|
1231
|
+
width: 400
|
|
1232
1232
|
}
|
|
1233
1233
|
]
|
|
1234
1234
|
}
|
|
@@ -2298,12 +2298,14 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
2298
2298
|
mutation: gql`
|
|
2299
2299
|
mutation (
|
|
2300
2300
|
$releaseGood: NewReleaseGood
|
|
2301
|
+
$orderVasPatch: [OrderVasPatch!]!
|
|
2301
2302
|
$shippingOrder: ShippingOrderPatch
|
|
2302
2303
|
$shippingOrderInfo: ShippingOrderInfoPatch
|
|
2303
2304
|
$attachments: [Upload!]
|
|
2304
2305
|
) {
|
|
2305
2306
|
generateReleaseGood(
|
|
2306
2307
|
releaseGood: $releaseGood
|
|
2308
|
+
orderVasPatch: $orderVasPatch
|
|
2307
2309
|
shippingOrder: $shippingOrder
|
|
2308
2310
|
shippingOrderInfo: $shippingOrderInfo
|
|
2309
2311
|
attachments: $attachments
|
|
@@ -2318,9 +2320,9 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
2318
2320
|
...releaseGood,
|
|
2319
2321
|
partnerBizplaceId: this._bizplaceId
|
|
2320
2322
|
},
|
|
2323
|
+
orderVasPatch: await this.getVasOrderPatch(),
|
|
2321
2324
|
shippingOrder: this._exportOption ? this._serializeForm(this.exportInfoForm) : null,
|
|
2322
2325
|
shippingOrderInfo: shippingOrderInfo ? shippingOrderInfo : null,
|
|
2323
|
-
orderVas: null,
|
|
2324
2326
|
attachments: this._document?.files ? this._document.files : undefined
|
|
2325
2327
|
},
|
|
2326
2328
|
context: { hasUpload: true }
|
|
@@ -2337,7 +2339,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
2337
2339
|
this._recallInput.checked = false
|
|
2338
2340
|
|
|
2339
2341
|
// create order Vas
|
|
2340
|
-
await this.createVasOrder(response.data.generateReleaseGood)
|
|
2342
|
+
//await this.createVasOrder(response.data.generateReleaseGood)
|
|
2341
2343
|
// await this.createOrderVas(response.data.generateReleaseGood)
|
|
2342
2344
|
|
|
2343
2345
|
navigate(`release_order_detail/${response.data.generateReleaseGood.name}`)
|
|
@@ -2375,57 +2377,59 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
2375
2377
|
}
|
|
2376
2378
|
}
|
|
2377
2379
|
|
|
2378
|
-
async
|
|
2380
|
+
async getVasOrderPatch() {
|
|
2379
2381
|
let orderVasPatch = []
|
|
2380
|
-
orderVasPatch = this.vasGrist.dirtyData.records
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
}
|
|
2413
|
-
})
|
|
2414
|
-
|
|
2415
|
-
const response = await client.mutate({
|
|
2416
|
-
mutation: gql`
|
|
2417
|
-
mutation editVas($orderVasPatch: [OrderVasPatch], $orderVasItemPatch: [OrderVasItemPatch], $orderNo: String) {
|
|
2418
|
-
editVas(orderVasPatch: $orderVasPatch, orderVasItemPatch: $orderVasItemPatch, orderNo: $orderNo)
|
|
2382
|
+
orderVasPatch = this.vasGrist.dirtyData.records
|
|
2383
|
+
.filter(p => p.product)
|
|
2384
|
+
.map(ov => {
|
|
2385
|
+
return {
|
|
2386
|
+
bizplace: { id: this._bizplaceId },
|
|
2387
|
+
batchId: ov.batchId,
|
|
2388
|
+
qty: ov.qty,
|
|
2389
|
+
product: { id: ov.product.id, name: ov.product.name },
|
|
2390
|
+
name: `${ov.batchId} (${ov.sku})- ${new Date().toISOString()}`,
|
|
2391
|
+
productName: ov.productName,
|
|
2392
|
+
productDetail: ov.productDetail
|
|
2393
|
+
? { id: ov.productDetail.id, name: ov.productDetail.name }
|
|
2394
|
+
: { id: ov.productDetailId },
|
|
2395
|
+
status: 'PENDING',
|
|
2396
|
+
packingType: ov.packingType,
|
|
2397
|
+
uom: ov.uom,
|
|
2398
|
+
uomValue: ov.uomValue,
|
|
2399
|
+
newProduct: ov.newProductId,
|
|
2400
|
+
newProductDetail: ov.newProductDetailId,
|
|
2401
|
+
newPackingType: ov.newPackingType,
|
|
2402
|
+
newUom: ov.newUom,
|
|
2403
|
+
newUomValue: ov.newUomValue,
|
|
2404
|
+
outputQty: ov.outputQty ? ov.outputQty : ov.qty,
|
|
2405
|
+
remark: ov.remark,
|
|
2406
|
+
orderVasItemsPatch: this.vasGrist.dirtyData.records.reduce((acc, cur) => {
|
|
2407
|
+
if (cur.vasGristId === ov.vasGristId) {
|
|
2408
|
+
return [...acc, { vas: { id: cur.vas.id, name: cur.vas.name }, vasQty: cur.vasQty, cuFlag: '+' }]
|
|
2409
|
+
} else {
|
|
2410
|
+
return acc
|
|
2411
|
+
}
|
|
2412
|
+
}, []),
|
|
2413
|
+
cuFlag: '+'
|
|
2419
2414
|
}
|
|
2420
|
-
|
|
2421
|
-
variables: {
|
|
2422
|
-
orderVasPatch: orderVasPatch,
|
|
2423
|
-
orderNo: releaseGood.name
|
|
2424
|
-
}
|
|
2425
|
-
})
|
|
2415
|
+
})
|
|
2426
2416
|
|
|
2427
|
-
|
|
2428
|
-
|
|
2417
|
+
return orderVasPatch
|
|
2418
|
+
|
|
2419
|
+
// const response = await client.mutate({
|
|
2420
|
+
// mutation: gql`
|
|
2421
|
+
// mutation editVas($orderVasPatch: [OrderVasPatch], $orderVasItemPatch: [OrderVasItemPatch], $orderNo: String) {
|
|
2422
|
+
// editVas(orderVasPatch: $orderVasPatch, orderVasItemPatch: $orderVasItemPatch, orderNo: $orderNo)
|
|
2423
|
+
// }
|
|
2424
|
+
// `,
|
|
2425
|
+
// variables: {
|
|
2426
|
+
// orderVasPatch: orderVasPatch,
|
|
2427
|
+
// orderNo: releaseGood.name
|
|
2428
|
+
// }
|
|
2429
|
+
// })
|
|
2430
|
+
|
|
2431
|
+
// if (!response.errors) {
|
|
2432
|
+
// }
|
|
2429
2433
|
}
|
|
2430
2434
|
|
|
2431
2435
|
async _executeRelatedTrxs() {
|
|
@@ -12,26 +12,14 @@ import '../../order/vas-order/popup/vas-target-product-popup'
|
|
|
12
12
|
import '../../order/vas-order/popup/select-vas-popup'
|
|
13
13
|
|
|
14
14
|
import gql from 'graphql-tag'
|
|
15
|
-
import {
|
|
16
|
-
css,
|
|
17
|
-
html
|
|
18
|
-
} from 'lit-element'
|
|
15
|
+
import { css, html } from 'lit-element'
|
|
19
16
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
20
17
|
|
|
21
18
|
import { getCodeByName } from '@things-factory/code-base'
|
|
22
19
|
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
23
|
-
import {
|
|
24
|
-
i18next,
|
|
25
|
-
localize
|
|
26
|
-
} from '@things-factory/i18n-base'
|
|
20
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
27
21
|
import { openPopup } from '@things-factory/layout-base'
|
|
28
|
-
import {
|
|
29
|
-
client,
|
|
30
|
-
CustomAlert,
|
|
31
|
-
navigate,
|
|
32
|
-
PageView,
|
|
33
|
-
store
|
|
34
|
-
} from '@things-factory/shell'
|
|
22
|
+
import { client, CustomAlert, navigate, PageView, store } from '@things-factory/shell'
|
|
35
23
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
36
24
|
import { isMobileDevice } from '@things-factory/utils'
|
|
37
25
|
|
|
@@ -947,7 +935,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
947
935
|
]
|
|
948
936
|
|
|
949
937
|
if (cancelOrderStatus.indexOf(this._status) >= 0) {
|
|
950
|
-
if ((this.vasData?.records?.length > 0 && this._status !== 'LOADING')|| this.vasData?.records?.length == 0) {
|
|
938
|
+
if ((this.vasData?.records?.length > 0 && this._status !== 'LOADING') || this.vasData?.records?.length == 0) {
|
|
951
939
|
actions.push({
|
|
952
940
|
title: i18next.t('button.cancel_order'),
|
|
953
941
|
action: this._submitCancellationReleaseOrder.bind(this),
|
|
@@ -1342,7 +1330,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1342
1330
|
name: 'remark',
|
|
1343
1331
|
header: i18next.t('field.remark'),
|
|
1344
1332
|
record: { editable: true },
|
|
1345
|
-
width:
|
|
1333
|
+
width: 400
|
|
1346
1334
|
}
|
|
1347
1335
|
]
|
|
1348
1336
|
}
|
|
@@ -2178,13 +2166,10 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
2178
2166
|
status: record.status,
|
|
2179
2167
|
cuFlag: 'M',
|
|
2180
2168
|
__dirty__: 'M',
|
|
2181
|
-
__dirtyfields__:
|
|
2182
|
-
record.
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
productSKU: { before: record.productSKU, after: d.productSKU }
|
|
2186
|
-
// qty: { before: record.qty, after: d.qty }
|
|
2187
|
-
}
|
|
2169
|
+
__dirtyfields__: {
|
|
2170
|
+
productSKU: { before: record.productSKU, after: d.productSKU }
|
|
2171
|
+
// qty: { before: record.qty, after: d.qty }
|
|
2172
|
+
}
|
|
2188
2173
|
|
|
2189
2174
|
// group: ++group
|
|
2190
2175
|
}
|
|
@@ -2242,10 +2227,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
2242
2227
|
newProductDetailId: e.detail.productDetailId,
|
|
2243
2228
|
cuFlag: 'M',
|
|
2244
2229
|
__dirty__: 'M',
|
|
2245
|
-
__dirtyfields__:
|
|
2246
|
-
record.__dirtyfields__ !== {}
|
|
2247
|
-
? { ...record.__dirtyfields__, newSku: { before: record.newSku, after: e.detail.product.sku } }
|
|
2248
|
-
: { newSku: { before: record.newSku, after: e.detail.product.sku } }
|
|
2230
|
+
__dirtyfields__: { newSku: { before: record.newSku, after: e.detail.product.sku } }
|
|
2249
2231
|
}
|
|
2250
2232
|
// for (let i = 0; i < e.detail.multipleProducts.length; i++) {
|
|
2251
2233
|
// newRecords.push(e.detail.multipleProducts[i])
|
|
@@ -2322,31 +2304,17 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
2322
2304
|
vasQty: this.vasGrist.dirtyData.records[firstIndex].qty,
|
|
2323
2305
|
cuFlag: '+',
|
|
2324
2306
|
__dirty__: '+',
|
|
2325
|
-
__dirtyfields__:
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
after: this.vasGrist.dirtyData.records[firstIndex].qty
|
|
2337
|
-
}
|
|
2338
|
-
}
|
|
2339
|
-
: {
|
|
2340
|
-
productSKU: {
|
|
2341
|
-
before: this.vasGrist.dirtyData.records[firstIndex].productSKU,
|
|
2342
|
-
after: e.detail[i].productSKU
|
|
2343
|
-
},
|
|
2344
|
-
vas: { before: this.vasGrist.dirtyData.records[firstIndex].vas, after: e.detail[i] },
|
|
2345
|
-
vasQty: {
|
|
2346
|
-
before: 0,
|
|
2347
|
-
after: this.vasGrist.dirtyData.records[firstIndex].qty
|
|
2348
|
-
}
|
|
2349
|
-
}
|
|
2307
|
+
__dirtyfields__: {
|
|
2308
|
+
productSKU: {
|
|
2309
|
+
before: this.vasGrist.dirtyData.records[firstIndex].productSKU,
|
|
2310
|
+
after: e.detail[i].productSKU
|
|
2311
|
+
},
|
|
2312
|
+
vas: { before: this.vasGrist.dirtyData.records[firstIndex].vas, after: e.detail[i] },
|
|
2313
|
+
vasQty: {
|
|
2314
|
+
before: 0,
|
|
2315
|
+
after: this.vasGrist.dirtyData.records[firstIndex].qty
|
|
2316
|
+
}
|
|
2317
|
+
}
|
|
2350
2318
|
})
|
|
2351
2319
|
} else {
|
|
2352
2320
|
newRecords.push({
|
|
@@ -2359,23 +2327,13 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
2359
2327
|
},
|
|
2360
2328
|
cuFlag: '+',
|
|
2361
2329
|
__dirty__: '+',
|
|
2362
|
-
__dirtyfields__:
|
|
2363
|
-
this.vasGrist.dirtyData.records[firstIndex].
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
after: this.vasGrist.dirtyData.records[firstIndex].qty
|
|
2370
|
-
}
|
|
2371
|
-
}
|
|
2372
|
-
: {
|
|
2373
|
-
vas: { before: this.vasGrist.dirtyData.records[firstIndex].vas, after: e.detail[i] },
|
|
2374
|
-
vasQty: {
|
|
2375
|
-
before: 0,
|
|
2376
|
-
after: this.vasGrist.dirtyData.records[firstIndex].qty
|
|
2377
|
-
}
|
|
2378
|
-
}
|
|
2330
|
+
__dirtyfields__: {
|
|
2331
|
+
vas: { before: this.vasGrist.dirtyData.records[firstIndex].vas, after: e.detail[i] },
|
|
2332
|
+
vasQty: {
|
|
2333
|
+
before: 0,
|
|
2334
|
+
after: this.vasGrist.dirtyData.records[firstIndex].qty
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2379
2337
|
})
|
|
2380
2338
|
}
|
|
2381
2339
|
}
|
|
@@ -3173,14 +3131,13 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
3173
3131
|
|
|
3174
3132
|
const response = await client.mutate({
|
|
3175
3133
|
mutation: gql`
|
|
3176
|
-
mutation editVas($orderVasPatch: [OrderVasPatch]
|
|
3177
|
-
editVas(orderVasPatch: $orderVasPatch, orderVasItemPatch: $orderVasItemPatch
|
|
3134
|
+
mutation editVas($orderVasPatch: [OrderVasPatch!]!, $orderVasItemPatch: [OrderVasItemPatch!]) {
|
|
3135
|
+
editVas(orderVasPatch: $orderVasPatch, orderVasItemPatch: $orderVasItemPatch)
|
|
3178
3136
|
}
|
|
3179
3137
|
`,
|
|
3180
3138
|
variables: {
|
|
3181
3139
|
orderVasPatch: orderVasPatch,
|
|
3182
|
-
orderVasItemPatch: orderVasItemPatch
|
|
3183
|
-
orderNo: this._releaseOrderNo
|
|
3140
|
+
orderVasItemPatch: orderVasItemPatch
|
|
3184
3141
|
}
|
|
3185
3142
|
})
|
|
3186
3143
|
|
|
@@ -588,7 +588,8 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
588
588
|
let response
|
|
589
589
|
if (this._enableProductScanning) {
|
|
590
590
|
const records = this.data.records.filter(
|
|
591
|
-
record =>
|
|
591
|
+
record =>
|
|
592
|
+
record.productBarcodes.find(pb => pb.gtin == this.productBarcodeInput.value) && record.status !== 'SORTED'
|
|
592
593
|
)
|
|
593
594
|
|
|
594
595
|
if (records.length > 1 && !this?._lastScannedProductId) {
|
|
@@ -371,13 +371,13 @@ class InboundOrderDetailsReport extends connect(store)(localize(i18next)(PageVie
|
|
|
371
371
|
},
|
|
372
372
|
{
|
|
373
373
|
type: 'float',
|
|
374
|
-
name: '
|
|
374
|
+
name: 'actualPackQty',
|
|
375
375
|
header: i18next.t('field.qty'),
|
|
376
376
|
width: 120
|
|
377
377
|
},
|
|
378
378
|
{
|
|
379
379
|
type: 'float',
|
|
380
|
-
name: '
|
|
380
|
+
name: 'actualPackUomValue',
|
|
381
381
|
header: i18next.t('field.uom_value'),
|
|
382
382
|
width: 120
|
|
383
383
|
},
|
|
@@ -434,7 +434,7 @@ class InboundOrderDetailsReport extends connect(store)(localize(i18next)(PageVie
|
|
|
434
434
|
name: 'weightUnit',
|
|
435
435
|
header: i18next.t('field.weight_unit'),
|
|
436
436
|
width: 100
|
|
437
|
-
},
|
|
437
|
+
},
|
|
438
438
|
{
|
|
439
439
|
type: 'string',
|
|
440
440
|
name: 'palletId',
|
|
@@ -638,8 +638,8 @@ class InboundOrderDetailsReport extends connect(store)(localize(i18next)(PageVie
|
|
|
638
638
|
}
|
|
639
639
|
packType
|
|
640
640
|
packSize
|
|
641
|
-
|
|
642
|
-
|
|
641
|
+
actualPackQty
|
|
642
|
+
actualPackUomValue
|
|
643
643
|
uom
|
|
644
644
|
unitCost
|
|
645
645
|
unitVolume
|
|
@@ -789,8 +789,8 @@ class InboundOrderDetailsReport extends connect(store)(localize(i18next)(PageVie
|
|
|
789
789
|
{ header: i18next.t('field.product_type'), key: 'product|type', width: 30, type: 'string' },
|
|
790
790
|
{ header: i18next.t('field.packing_type'), key: 'packType', width: 25, type: 'string' },
|
|
791
791
|
{ header: i18next.t('field.packing_size'), key: 'packSize', width: 25, type: 'string' },
|
|
792
|
-
{ header: i18next.t('field.qty'), key: '
|
|
793
|
-
{ header: i18next.t('field.uom_value'), key: '
|
|
792
|
+
{ header: i18next.t('field.qty'), key: 'actualPackQty', width: 15, type: 'string' },
|
|
793
|
+
{ header: i18next.t('field.uom_value'), key: 'actualPackUomValue', width: 15, type: 'string' },
|
|
794
794
|
{ header: i18next.t('field.uom'), key: 'uom', width: 15, type: 'string' },
|
|
795
795
|
{ header: i18next.t('field.unit_cost'), key: 'unitCost', width: 15, type: 'string' },
|
|
796
796
|
{ header: i18next.t('field.unit_volume'), key: 'unitVolume', width: 15, type: 'string' },
|
|
@@ -54,75 +54,60 @@ exports.inboundOrderDetailsReport = {
|
|
|
54
54
|
}
|
|
55
55
|
await tx.query(`
|
|
56
56
|
create temp table temp_inbound_order_report on commit drop as (
|
|
57
|
-
select
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
inner join order_inventories oi on oi.arrival_notice_id = an.id
|
|
101
|
-
inner join inventories i on i.id = oi.inventory_id
|
|
102
|
-
left join worksheets w on w.arrival_notice_id = an.id and w."type" ='UNLOADING'
|
|
103
|
-
inner join reduced_inventory_histories ih on ih.inventory_id = oi.inventory_id and ih.transaction_type ='UNLOADING' and ih.ref_order_id = an.id::varchar
|
|
104
|
-
left join users u2 on u2.id = ih.creator_id
|
|
105
|
-
left join worksheets w2 on w2.arrival_notice_id = an.id and w2."type" ='PUTAWAY'
|
|
106
|
-
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
|
|
107
|
-
left join users u3 on u3.id = ih2.creator_id
|
|
108
|
-
inner join temp_products p on p.id = ih.product_id
|
|
109
|
-
inner join order_products op on op.arrival_notice_id = an.id and op.actual_pack_qty is not null and op.product_detail_id = ih.product_detail_id and
|
|
110
|
-
op.batch_id = ih.batch_id
|
|
111
|
-
order by an.name, p.sku, ih.batch_id
|
|
112
|
-
) src
|
|
113
|
-
where 1=1
|
|
114
|
-
${extraQueryFilters}
|
|
57
|
+
select src2.*,
|
|
58
|
+
w.started_at as "unload_start", w.ended_at as "unload_complete",
|
|
59
|
+
w2.started_at as "putaway_start", w2.ended_at as "putaway_complete",
|
|
60
|
+
cp.id as "supplier_id", cp.company_name as "supplier_name",
|
|
61
|
+
u.name as "accepted_by", u2.name as "unloaded_by", u3.name as "putaway_by"
|
|
62
|
+
from (
|
|
63
|
+
select * from (
|
|
64
|
+
select an.id, an.accepted_by_id, an.name as "gan_no", an.ref_no as "ref_no_1", an.ref_no_2 as "ref_no_2", an.ref_no_3 as "ref_no_3",
|
|
65
|
+
an.loose_item, an.import_cargo, an.container_no, an.container_size, an.own_transport,
|
|
66
|
+
an.accepted_at, an.created_at as "order_created_at", an.delivery_order_no,
|
|
67
|
+
b2.id as "bizplace_id", b2.name as "bizplace_name", b2.description as "bizplace_description",
|
|
68
|
+
grn.name as "grn_no",
|
|
69
|
+
po.id as "purchase_order_id", po.name as "purchase_order_name", po.supplier_id as "po_supplier_id",
|
|
70
|
+
row_number() over(partition by an.name order by an.name, p.sku, oi.batch_id) as "order_line_item",
|
|
71
|
+
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",
|
|
72
|
+
oi.packing_size as "pack_size", oi.packing_type as "pack_type", oi.actual_pack_qty, oi.actual_pack_uom_value, oi.uom, oi.batch_id, oi.batch_id_ref,
|
|
73
|
+
oi.unloaded_at as "unloaded_at", oi.putaway_at as "putaway_at", oi.unloaded_by_id as "oi_unloaded_by_id", oi.putaway_by_id as "oi_putaway_by_id",
|
|
74
|
+
i.pallet_id, i.carton_id, i.expiration_date, i.manufacture_date, i.unit_cost,
|
|
75
|
+
pd.volume as "unit_volume", pd.nett_weight as "unit_nett_weight", pd.gross_weight as "unit_gross_weight", pd.weight_unit as "weight_unit"
|
|
76
|
+
from (
|
|
77
|
+
select * from arrival_notices
|
|
78
|
+
where domain_id = $1 and bizplace_id = $2 and status ='DONE'
|
|
79
|
+
and created_at >= $3 and created_at <= $4
|
|
80
|
+
) an
|
|
81
|
+
left join purchase_orders po on po.id = an.purchase_order_id
|
|
82
|
+
left join goods_receival_notes grn on grn.arrival_notice_id = an.id
|
|
83
|
+
left join order_inventories oi on oi.arrival_notice_id = an.id
|
|
84
|
+
inner join bizplaces b2 on b2.id = an.bizplace_id
|
|
85
|
+
inner join inventories i on i.id = oi.inventory_id
|
|
86
|
+
inner join temp_products p on p.id = oi.product_id
|
|
87
|
+
inner join product_details pd on pd.id = oi.product_detail_id
|
|
88
|
+
inner join order_products op on op.arrival_notice_id = an.id and op.actual_pack_qty is not null and op.product_detail_id = oi.product_detail_id and op.batch_id = oi.batch_id
|
|
89
|
+
order by an.name, p.sku, oi.batch_id
|
|
90
|
+
) src
|
|
91
|
+
where 1=1
|
|
92
|
+
${extraQueryFilters}
|
|
93
|
+
) src2
|
|
94
|
+
left join contact_points cp on cp.id = src2.po_supplier_id
|
|
95
|
+
left join users u on u.id = src2.accepted_by_id
|
|
96
|
+
left join users u2 on u2.id = src2.oi_unloaded_by_id
|
|
97
|
+
left join users u3 on u3.id = src2.oi_putaway_by_id
|
|
98
|
+
left join worksheets w on w.arrival_notice_id = src2.id and w."type" ='UNLOADING'
|
|
99
|
+
left join worksheets w2 on w2.arrival_notice_id = src2.id and w2."type" ='PUTAWAY'
|
|
115
100
|
)
|
|
116
101
|
`, [context.state.domain.id, bizplace.id, fromDate.value, toDate.value]);
|
|
117
102
|
const total = await tx.query(`
|
|
118
103
|
select count(*) from temp_inbound_order_report
|
|
119
104
|
`);
|
|
120
105
|
const result = await tx.query(`
|
|
121
|
-
select
|
|
122
|
-
round((
|
|
123
|
-
round((
|
|
124
|
-
round((
|
|
125
|
-
from temp_inbound_order_report
|
|
106
|
+
select src2.*,
|
|
107
|
+
round((src2.actual_pack_qty * src2.unit_volume)::numeric ,4) as total_volume,
|
|
108
|
+
round((src2.actual_pack_qty * src2.unit_nett_weight)::numeric ,4) as total_unit_nett_weight,
|
|
109
|
+
round((src2.actual_pack_qty * src2.unit_gross_weight)::numeric ,4) as total_unit_gross_weight
|
|
110
|
+
from temp_inbound_order_report src2
|
|
126
111
|
offset $1 limit $2
|
|
127
112
|
`, [(params.pagination.page - 1) * params.pagination.limit, params.pagination.limit]);
|
|
128
113
|
let items = result.map(itm => {
|
|
@@ -161,8 +146,8 @@ exports.inboundOrderDetailsReport = {
|
|
|
161
146
|
purchaseOrderNo: itm.purchase_order_name,
|
|
162
147
|
packType: itm.pack_type,
|
|
163
148
|
packSize: itm.pack_size,
|
|
164
|
-
|
|
165
|
-
|
|
149
|
+
actualPackQty: itm.actual_pack_qty,
|
|
150
|
+
actualPackUomValue: itm.actual_pack_uom_value,
|
|
166
151
|
uom: itm.uom,
|
|
167
152
|
unitVolume: itm.unit_volume,
|
|
168
153
|
unitCost: itm.unit_cost,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbound-order-details-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/inbound-order-details-report.ts"],"names":[],"mappings":";;;AAEA,yDAAgD;AAChD,uDAAmD;AAGnD,0CAAiD;AAEpC,QAAA,yBAAyB,GAAG;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B,GAAG,GAAG,iBAAiB,mCAAmC,IAAI,CAAC,KAAK,KAAK,CAAA;aAC3F;YACD,IAAI,IAAI,EAAE;gBACR,iBAAiB,GAAG,GAAG,iBAAiB,iCAAiC,IAAI,CAAC,KAAK,KAAK,CAAA;aACzF;YACD,IAAG,KAAK,EAAE;gBACR,iBAAiB,GAAG,GAAG,iBAAiB,yBAAyB,KAAK,CAAC,KAAK,KAAK,CAAA;aAClF;YAED,MAAM,EAAE,CAAC,KAAK,CACZ
|
|
1
|
+
{"version":3,"file":"inbound-order-details-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/inbound-order-details-report.ts"],"names":[],"mappings":";;;AAEA,yDAAgD;AAChD,uDAAmD;AAGnD,0CAAiD;AAEpC,QAAA,yBAAyB,GAAG;IACvC,KAAK,CAAC,yBAAyB,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACrE,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,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,C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AAK,CAAC,CAAC,CAAC,CAAC,KAAK;aACtB,CAAA;SACF;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
|
|
@@ -16,7 +16,7 @@ exports.InboundOrderDetailsReport = (0, graphql_tag_1.default) `
|
|
|
16
16
|
refNo3: String
|
|
17
17
|
looseItem: Boolean
|
|
18
18
|
importCargo: Boolean
|
|
19
|
-
containerNo: String
|
|
19
|
+
containerNo: String
|
|
20
20
|
containerSize: String
|
|
21
21
|
ownTransport: Boolean
|
|
22
22
|
acceptedBy: String
|
|
@@ -33,8 +33,8 @@ exports.InboundOrderDetailsReport = (0, graphql_tag_1.default) `
|
|
|
33
33
|
contactPoint: ContactPoint
|
|
34
34
|
packType: String
|
|
35
35
|
packSize: Int
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
actualPackQty: Int
|
|
37
|
+
actualPackUomValue: Float
|
|
38
38
|
uom: String
|
|
39
39
|
unitCost: Float
|
|
40
40
|
unitVolume: Float
|
package/helps/release-note.ko.md
CHANGED
|
@@ -2,22 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 29 September Update
|
|
6
6
|
|
|
7
|
-
#### V4.3.
|
|
7
|
+
#### V4.3.327 Release Note
|
|
8
8
|
|
|
9
9
|
#### Greetings to all,
|
|
10
10
|
|
|
11
|
-
####
|
|
11
|
+
#### Celebrating the end of September with our latest updates for past two months.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
<div style="text-align: left; display: inline-block;">
|
|
14
|
+
|
|
15
|
+
- Warehouse Picking/Packing Rate
|
|
16
|
+
- Option to Print Packing Type for Route Label
|
|
17
|
+
- Inventory by Product
|
|
18
|
+
- Assign Inventory during Worksheet Activation
|
|
19
|
+
- Update Tracking Number
|
|
20
|
+
- Shortage Report
|
|
21
|
+
- Export Outbound Order Report with Picking Bin column
|
|
22
|
+
|
|
23
|
+
</div>
|
|
14
24
|
|
|
15
25
|
<br>
|
|
16
26
|
For additional information about the aspects of the release, see the following link
|
|
17
|
-
<a href="
|
|
27
|
+
<a href="http://bit.ly/20230929_Hatio_Release">V4.3.327 Release Note</a>
|
|
18
28
|
<br>
|
|
19
29
|
|
|
20
|
-
Should you have any inquiries, feel free to contact support@hatio.asia
|
|
30
|
+
Should you have any inquiries, feel free to contact <a href="mailto: support@hatio.asia">support@hatio.asia</a>! Stay safe and positively negative!
|
|
21
31
|
<br>
|
|
22
32
|
|
|
23
33
|
_**Team Hatio**
|
package/helps/release-note.md
CHANGED
|
@@ -2,22 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 29 September Update
|
|
6
6
|
|
|
7
|
-
#### V4.3.
|
|
7
|
+
#### V4.3.327 Release Note
|
|
8
8
|
|
|
9
9
|
#### Greetings to all,
|
|
10
10
|
|
|
11
|
-
####
|
|
11
|
+
#### Celebrating the end of September with our latest updates for past two months.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
<div style="text-align: left; display: inline-block;">
|
|
14
|
+
|
|
15
|
+
- Warehouse Picking/Packing Rate
|
|
16
|
+
- Option to Print Packing Type for Route Label
|
|
17
|
+
- Inventory by Product
|
|
18
|
+
- Assign Inventory during Worksheet Activation
|
|
19
|
+
- Update Tracking Number
|
|
20
|
+
- Shortage Report
|
|
21
|
+
- Export Outbound Order Report with Picking Bin column
|
|
22
|
+
|
|
23
|
+
</div>
|
|
14
24
|
|
|
15
25
|
<br>
|
|
16
26
|
For additional information about the aspects of the release, see the following link
|
|
17
|
-
<a href="
|
|
27
|
+
<a href="http://bit.ly/20230929_Hatio_Release">V4.3.327 Release Note</a>
|
|
18
28
|
<br>
|
|
19
29
|
|
|
20
|
-
Should you have any inquiries, feel free to contact support@hatio.asia
|
|
30
|
+
Should you have any inquiries, feel free to contact <a href="mailto: support@hatio.asia">support@hatio.asia</a>! Stay safe and positively negative!
|
|
21
31
|
<br>
|
|
22
32
|
|
|
23
33
|
_**Team Hatio**
|
package/helps/release-note.ms.md
CHANGED
|
@@ -2,22 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 29 September Update
|
|
6
6
|
|
|
7
|
-
#### V4.3.
|
|
7
|
+
#### V4.3.327 Release Note
|
|
8
8
|
|
|
9
9
|
#### Greetings to all,
|
|
10
10
|
|
|
11
|
-
####
|
|
11
|
+
#### Celebrating the end of September with our latest updates for past two months.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
<div style="text-align: left; display: inline-block;">
|
|
14
|
+
|
|
15
|
+
- Warehouse Picking/Packing Rate
|
|
16
|
+
- Option to Print Packing Type for Route Label
|
|
17
|
+
- Inventory by Product
|
|
18
|
+
- Assign Inventory during Worksheet Activation
|
|
19
|
+
- Update Tracking Number
|
|
20
|
+
- Shortage Report
|
|
21
|
+
- Export Outbound Order Report with Picking Bin column
|
|
22
|
+
|
|
23
|
+
</div>
|
|
14
24
|
|
|
15
25
|
<br>
|
|
16
26
|
For additional information about the aspects of the release, see the following link
|
|
17
|
-
<a href="
|
|
27
|
+
<a href="http://bit.ly/20230929_Hatio_Release">V4.3.327 Release Note</a>
|
|
18
28
|
<br>
|
|
19
29
|
|
|
20
|
-
Should you have any inquiries, feel free to contact support@hatio.asia
|
|
30
|
+
Should you have any inquiries, feel free to contact <a href="mailto: support@hatio.asia">support@hatio.asia</a>! Stay safe and positively negative!
|
|
21
31
|
<br>
|
|
22
32
|
|
|
23
33
|
_**Team Hatio**
|
package/helps/release-note.zh.md
CHANGED
|
@@ -2,22 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 29 September Update
|
|
6
6
|
|
|
7
|
-
#### V4.3.
|
|
7
|
+
#### V4.3.327 Release Note
|
|
8
8
|
|
|
9
9
|
#### Greetings to all,
|
|
10
10
|
|
|
11
|
-
####
|
|
11
|
+
#### Celebrating the end of September with our latest updates for past two months.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
<div style="text-align: left; display: inline-block;">
|
|
14
|
+
|
|
15
|
+
- Warehouse Picking/Packing Rate
|
|
16
|
+
- Option to Print Packing Type for Route Label
|
|
17
|
+
- Inventory by Product
|
|
18
|
+
- Assign Inventory during Worksheet Activation
|
|
19
|
+
- Update Tracking Number
|
|
20
|
+
- Shortage Report
|
|
21
|
+
- Export Outbound Order Report with Picking Bin column
|
|
22
|
+
|
|
23
|
+
</div>
|
|
14
24
|
|
|
15
25
|
<br>
|
|
16
26
|
For additional information about the aspects of the release, see the following link
|
|
17
|
-
<a href="
|
|
27
|
+
<a href="http://bit.ly/20230929_Hatio_Release">V4.3.327 Release Note</a>
|
|
18
28
|
<br>
|
|
19
29
|
|
|
20
|
-
Should you have any inquiries, feel free to contact support@hatio.asia
|
|
30
|
+
Should you have any inquiries, feel free to contact <a href="mailto: support@hatio.asia">support@hatio.asia</a>! Stay safe and positively negative!
|
|
21
31
|
<br>
|
|
22
32
|
|
|
23
33
|
_**Team Hatio**
|
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.327",
|
|
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.281",
|
|
92
92
|
"@things-factory/product-base": "^4.3.318",
|
|
93
93
|
"@things-factory/resource-ui": "^4.3.281",
|
|
94
|
-
"@things-factory/sales-ui": "^4.3.
|
|
94
|
+
"@things-factory/sales-ui": "^4.3.327",
|
|
95
95
|
"@things-factory/scene-data-transform": "^4.3.281",
|
|
96
96
|
"@things-factory/scene-excel": "^4.3.281",
|
|
97
97
|
"@things-factory/scene-firebase": "^4.3.281",
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
"@things-factory/system-ui": "^4.3.281",
|
|
108
108
|
"@things-factory/transport-base": "^4.3.301",
|
|
109
109
|
"@things-factory/tutorial-ui": "^4.3.281",
|
|
110
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
111
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
110
|
+
"@things-factory/warehouse-base": "^4.3.327",
|
|
111
|
+
"@things-factory/worksheet-base": "^4.3.327"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@things-factory/builder": "^4.3.281",
|
|
@@ -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": "966193b943f8afd8160da603f857f9d61a917ee3"
|
|
121
121
|
}
|
|
@@ -63,64 +63,49 @@ export const inboundOrderDetailsReport = {
|
|
|
63
63
|
await tx.query(
|
|
64
64
|
`
|
|
65
65
|
create temp table temp_inbound_order_report on commit drop as (
|
|
66
|
-
select
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
inner join order_inventories oi on oi.arrival_notice_id = an.id
|
|
110
|
-
inner join inventories i on i.id = oi.inventory_id
|
|
111
|
-
left join worksheets w on w.arrival_notice_id = an.id and w."type" ='UNLOADING'
|
|
112
|
-
inner join reduced_inventory_histories ih on ih.inventory_id = oi.inventory_id and ih.transaction_type ='UNLOADING' and ih.ref_order_id = an.id::varchar
|
|
113
|
-
left join users u2 on u2.id = ih.creator_id
|
|
114
|
-
left join worksheets w2 on w2.arrival_notice_id = an.id and w2."type" ='PUTAWAY'
|
|
115
|
-
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
|
|
116
|
-
left join users u3 on u3.id = ih2.creator_id
|
|
117
|
-
inner join temp_products p on p.id = ih.product_id
|
|
118
|
-
inner join order_products op on op.arrival_notice_id = an.id and op.actual_pack_qty is not null and op.product_detail_id = ih.product_detail_id and
|
|
119
|
-
op.batch_id = ih.batch_id
|
|
120
|
-
order by an.name, p.sku, ih.batch_id
|
|
121
|
-
) src
|
|
122
|
-
where 1=1
|
|
123
|
-
${extraQueryFilters}
|
|
66
|
+
select src2.*,
|
|
67
|
+
w.started_at as "unload_start", w.ended_at as "unload_complete",
|
|
68
|
+
w2.started_at as "putaway_start", w2.ended_at as "putaway_complete",
|
|
69
|
+
cp.id as "supplier_id", cp.company_name as "supplier_name",
|
|
70
|
+
u.name as "accepted_by", u2.name as "unloaded_by", u3.name as "putaway_by"
|
|
71
|
+
from (
|
|
72
|
+
select * from (
|
|
73
|
+
select an.id, an.accepted_by_id, an.name as "gan_no", an.ref_no as "ref_no_1", an.ref_no_2 as "ref_no_2", an.ref_no_3 as "ref_no_3",
|
|
74
|
+
an.loose_item, an.import_cargo, an.container_no, an.container_size, an.own_transport,
|
|
75
|
+
an.accepted_at, an.created_at as "order_created_at", an.delivery_order_no,
|
|
76
|
+
b2.id as "bizplace_id", b2.name as "bizplace_name", b2.description as "bizplace_description",
|
|
77
|
+
grn.name as "grn_no",
|
|
78
|
+
po.id as "purchase_order_id", po.name as "purchase_order_name", po.supplier_id as "po_supplier_id",
|
|
79
|
+
row_number() over(partition by an.name order by an.name, p.sku, oi.batch_id) as "order_line_item",
|
|
80
|
+
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",
|
|
81
|
+
oi.packing_size as "pack_size", oi.packing_type as "pack_type", oi.actual_pack_qty, oi.actual_pack_uom_value, oi.uom, oi.batch_id, oi.batch_id_ref,
|
|
82
|
+
oi.unloaded_at as "unloaded_at", oi.putaway_at as "putaway_at", oi.unloaded_by_id as "oi_unloaded_by_id", oi.putaway_by_id as "oi_putaway_by_id",
|
|
83
|
+
i.pallet_id, i.carton_id, i.expiration_date, i.manufacture_date, i.unit_cost,
|
|
84
|
+
pd.volume as "unit_volume", pd.nett_weight as "unit_nett_weight", pd.gross_weight as "unit_gross_weight", pd.weight_unit as "weight_unit"
|
|
85
|
+
from (
|
|
86
|
+
select * from arrival_notices
|
|
87
|
+
where domain_id = $1 and bizplace_id = $2 and status ='DONE'
|
|
88
|
+
and created_at >= $3 and created_at <= $4
|
|
89
|
+
) an
|
|
90
|
+
left join purchase_orders po on po.id = an.purchase_order_id
|
|
91
|
+
left join goods_receival_notes grn on grn.arrival_notice_id = an.id
|
|
92
|
+
left join order_inventories oi on oi.arrival_notice_id = an.id
|
|
93
|
+
inner join bizplaces b2 on b2.id = an.bizplace_id
|
|
94
|
+
inner join inventories i on i.id = oi.inventory_id
|
|
95
|
+
inner join temp_products p on p.id = oi.product_id
|
|
96
|
+
inner join product_details pd on pd.id = oi.product_detail_id
|
|
97
|
+
inner join order_products op on op.arrival_notice_id = an.id and op.actual_pack_qty is not null and op.product_detail_id = oi.product_detail_id and op.batch_id = oi.batch_id
|
|
98
|
+
order by an.name, p.sku, oi.batch_id
|
|
99
|
+
) src
|
|
100
|
+
where 1=1
|
|
101
|
+
${extraQueryFilters}
|
|
102
|
+
) src2
|
|
103
|
+
left join contact_points cp on cp.id = src2.po_supplier_id
|
|
104
|
+
left join users u on u.id = src2.accepted_by_id
|
|
105
|
+
left join users u2 on u2.id = src2.oi_unloaded_by_id
|
|
106
|
+
left join users u3 on u3.id = src2.oi_putaway_by_id
|
|
107
|
+
left join worksheets w on w.arrival_notice_id = src2.id and w."type" ='UNLOADING'
|
|
108
|
+
left join worksheets w2 on w2.arrival_notice_id = src2.id and w2."type" ='PUTAWAY'
|
|
124
109
|
)
|
|
125
110
|
`,
|
|
126
111
|
[context.state.domain.id, bizplace.id, fromDate.value, toDate.value]
|
|
@@ -130,13 +115,13 @@ export const inboundOrderDetailsReport = {
|
|
|
130
115
|
select count(*) from temp_inbound_order_report
|
|
131
116
|
`)
|
|
132
117
|
|
|
133
|
-
const result: any = await tx.query(
|
|
134
|
-
|
|
135
|
-
select
|
|
136
|
-
round((
|
|
137
|
-
round((
|
|
138
|
-
round((
|
|
139
|
-
from temp_inbound_order_report
|
|
118
|
+
const result: any = await tx.query(
|
|
119
|
+
`
|
|
120
|
+
select src2.*,
|
|
121
|
+
round((src2.actual_pack_qty * src2.unit_volume)::numeric ,4) as total_volume,
|
|
122
|
+
round((src2.actual_pack_qty * src2.unit_nett_weight)::numeric ,4) as total_unit_nett_weight,
|
|
123
|
+
round((src2.actual_pack_qty * src2.unit_gross_weight)::numeric ,4) as total_unit_gross_weight
|
|
124
|
+
from temp_inbound_order_report src2
|
|
140
125
|
offset $1 limit $2
|
|
141
126
|
`,
|
|
142
127
|
[(params.pagination.page - 1) * params.pagination.limit, params.pagination.limit]
|
|
@@ -178,8 +163,8 @@ export const inboundOrderDetailsReport = {
|
|
|
178
163
|
purchaseOrderNo: itm.purchase_order_name,
|
|
179
164
|
packType: itm.pack_type,
|
|
180
165
|
packSize: itm.pack_size,
|
|
181
|
-
|
|
182
|
-
|
|
166
|
+
actualPackQty: itm.actual_pack_qty,
|
|
167
|
+
actualPackUomValue: itm.actual_pack_uom_value,
|
|
183
168
|
uom: itm.uom,
|
|
184
169
|
unitVolume: itm.unit_volume,
|
|
185
170
|
unitCost: itm.unit_cost,
|
|
@@ -11,7 +11,7 @@ export const InboundOrderDetailsReport = gql`
|
|
|
11
11
|
refNo3: String
|
|
12
12
|
looseItem: Boolean
|
|
13
13
|
importCargo: Boolean
|
|
14
|
-
containerNo: String
|
|
14
|
+
containerNo: String
|
|
15
15
|
containerSize: String
|
|
16
16
|
ownTransport: Boolean
|
|
17
17
|
acceptedBy: String
|
|
@@ -28,8 +28,8 @@ export const InboundOrderDetailsReport = gql`
|
|
|
28
28
|
contactPoint: ContactPoint
|
|
29
29
|
packType: String
|
|
30
30
|
packSize: Int
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
actualPackQty: Int
|
|
32
|
+
actualPackUomValue: Float
|
|
33
33
|
uom: String
|
|
34
34
|
unitCost: Float
|
|
35
35
|
unitVolume: Float
|