@things-factory/sales-base 4.3.637 → 4.3.638
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-server/service/arrival-notice/arrival-notice-mutation.js +3 -34
- package/dist-server/service/arrival-notice/arrival-notice-mutation.js.map +1 -1
- package/dist-server/service/arrival-notice/arrival-notice-query.js +3 -10
- package/dist-server/service/arrival-notice/arrival-notice-query.js.map +1 -1
- package/dist-server/service/arrival-notice/arrival-notice-types.js +2 -2
- package/dist-server/service/arrival-notice/arrival-notice-types.js.map +1 -1
- package/dist-server/service/inventory-check-item/inventory-check-item-types.js +12 -48
- package/dist-server/service/inventory-check-item/inventory-check-item-types.js.map +1 -1
- package/dist-server/service/inventory-check-item/inventory-check-item.js +4 -56
- package/dist-server/service/inventory-check-item/inventory-check-item.js.map +1 -1
- package/dist-server/service/order-inventory/order-inventory-query.js +1 -5
- package/dist-server/service/order-inventory/order-inventory-query.js.map +1 -1
- package/dist-server/service/order-inventory/order-inventory-types.js +12 -12
- package/dist-server/service/order-inventory/order-inventory-types.js.map +1 -1
- package/dist-server/service/order-inventory/order-inventory.js +13 -189
- package/dist-server/service/order-inventory/order-inventory.js.map +1 -1
- package/dist-server/service/order-package-item/order-package-item-types.js +2 -14
- package/dist-server/service/order-package-item/order-package-item-types.js.map +1 -1
- package/dist-server/service/order-package-item/order-package-item.js +2 -28
- package/dist-server/service/order-package-item/order-package-item.js.map +1 -1
- package/dist-server/service/order-product/order-product-types.js +18 -18
- package/dist-server/service/order-product/order-product-types.js.map +1 -1
- package/dist-server/service/order-product/order-product.js +13 -104
- package/dist-server/service/order-product/order-product.js.map +1 -1
- package/dist-server/service/order-tote-item/order-tote-item-types.js +2 -2
- package/dist-server/service/order-tote-item/order-tote-item-types.js.map +1 -1
- package/dist-server/service/order-tote-item/order-tote-item.js +1 -13
- package/dist-server/service/order-tote-item/order-tote-item.js.map +1 -1
- package/dist-server/service/others/other-types.js +0 -4
- package/dist-server/service/others/other-types.js.map +1 -1
- package/dist-server/service/release-good/release-good-mutation.js +6 -35
- package/dist-server/service/release-good/release-good-mutation.js.map +1 -1
- package/dist-server/service/release-good/release-good-query.js +19 -24
- package/dist-server/service/release-good/release-good-query.js.map +1 -1
- package/dist-server/service/release-good/release-good-types.js +1 -1
- package/dist-server/service/release-good/release-good-types.js.map +1 -1
- package/dist-server/utils/inventory-util.js +8 -12
- package/dist-server/utils/inventory-util.js.map +1 -1
- package/package.json +7 -7
- package/server/service/arrival-notice/arrival-notice-mutation.ts +3 -40
- package/server/service/arrival-notice/arrival-notice-query.ts +68 -40
- package/server/service/arrival-notice/arrival-notice-types.ts +4 -4
- package/server/service/inventory-check-item/inventory-check-item-types.ts +10 -37
- package/server/service/inventory-check-item/inventory-check-item.ts +4 -52
- package/server/service/order-inventory/order-inventory-query.ts +0 -5
- package/server/service/order-inventory/order-inventory-types.ts +12 -12
- package/server/service/order-inventory/order-inventory.ts +13 -171
- package/server/service/order-package-item/order-package-item-types.ts +3 -12
- package/server/service/order-package-item/order-package-item.ts +2 -26
- package/server/service/order-product/order-product-types.ts +18 -18
- package/server/service/order-product/order-product.ts +12 -96
- package/server/service/order-tote-item/order-tote-item-types.ts +3 -3
- package/server/service/order-tote-item/order-tote-item.ts +1 -12
- package/server/service/others/other-types.ts +0 -3
- package/server/service/release-good/release-good-mutation.ts +9 -51
- package/server/service/release-good/release-good-query.ts +124 -89
- package/server/service/release-good/release-good-types.ts +1 -1
- package/server/utils/inventory-util.ts +54 -44
|
@@ -1,15 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
Arg,
|
|
3
|
+
Args,
|
|
4
|
+
Ctx,
|
|
5
|
+
Directive,
|
|
6
|
+
FieldResolver,
|
|
7
|
+
Query,
|
|
8
|
+
Resolver,
|
|
9
|
+
Root
|
|
10
|
+
} from 'type-graphql'
|
|
11
|
+
import {
|
|
12
|
+
EntityManager,
|
|
13
|
+
getRepository,
|
|
14
|
+
In,
|
|
15
|
+
SelectQueryBuilder
|
|
16
|
+
} from 'typeorm'
|
|
3
17
|
|
|
4
18
|
import { Attachment } from '@things-factory/attachment-base'
|
|
5
|
-
import {
|
|
6
|
-
|
|
19
|
+
import {
|
|
20
|
+
checkUserBelongsDomain,
|
|
21
|
+
User
|
|
22
|
+
} from '@things-factory/auth-base'
|
|
23
|
+
import {
|
|
24
|
+
Bizplace,
|
|
25
|
+
getCompanyBizplace,
|
|
26
|
+
getPermittedBizplaceIds
|
|
27
|
+
} from '@things-factory/biz-base'
|
|
7
28
|
import { Setting } from '@things-factory/setting-base'
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
29
|
+
import {
|
|
30
|
+
buildQuery,
|
|
31
|
+
Domain,
|
|
32
|
+
ListParam
|
|
33
|
+
} from '@things-factory/shell'
|
|
34
|
+
|
|
35
|
+
import {
|
|
36
|
+
ArrivalNoticeList,
|
|
37
|
+
NewArrivalNotice,
|
|
38
|
+
RawArrivalNotice
|
|
39
|
+
} from '../'
|
|
40
|
+
import {
|
|
41
|
+
ATTACHMENT_TYPE,
|
|
42
|
+
ORDER_STATUS
|
|
43
|
+
} from '../../constants'
|
|
44
|
+
import {
|
|
45
|
+
OrderInventory,
|
|
46
|
+
OrderProduct
|
|
47
|
+
} from '../../service'
|
|
13
48
|
import { convertExcelDateToISO } from '../../utils/datetime-util'
|
|
14
49
|
import { ArrivalNotice } from './arrival-notice'
|
|
15
50
|
|
|
@@ -309,8 +344,8 @@ export class ArrivalNoticeQuery {
|
|
|
309
344
|
@Arg('rawArrivalNotices', type => [NewArrivalNotice], { nullable: true }) rawArrivalNotices: NewArrivalNotice[],
|
|
310
345
|
@Arg('bizplaceId', type => String) bizplaceId: string
|
|
311
346
|
): Promise<RawArrivalNotice[]> {
|
|
312
|
-
const {
|
|
313
|
-
return await validateBulkArrivalNoticesFunction(rawArrivalNotices, bizplaceId, domain,
|
|
347
|
+
const {domain , tx}: {domain: Domain, tx: EntityManager} = context.state
|
|
348
|
+
return await validateBulkArrivalNoticesFunction(rawArrivalNotices, bizplaceId, domain,tx)
|
|
314
349
|
}
|
|
315
350
|
|
|
316
351
|
@FieldResolver(type => Domain)
|
|
@@ -367,7 +402,7 @@ export async function validateBulkArrivalNoticesFunction(
|
|
|
367
402
|
}
|
|
368
403
|
})
|
|
369
404
|
)
|
|
370
|
-
|
|
405
|
+
|
|
371
406
|
const enableLotIdInput: Setting = await trxMgr.getRepository(Setting).findOne({
|
|
372
407
|
where: { domain, category: 'id-rule', name: 'enable-lot-id-input' }
|
|
373
408
|
})
|
|
@@ -375,25 +410,25 @@ export async function validateBulkArrivalNoticesFunction(
|
|
|
375
410
|
//check if palletId is entered but enablelotidinput setting is false
|
|
376
411
|
let lotIdInputSettingChecker = ''
|
|
377
412
|
if (rawArrivalNotices.some(record => record.palletId) && enableLotIdInput.value == 'false') {
|
|
378
|
-
lotIdInputSettingChecker = 'Please enable the setting to create orders with a custom Lot ID'
|
|
413
|
+
lotIdInputSettingChecker = 'Please enable the setting to create orders with a custom Lot ID';
|
|
379
414
|
}
|
|
380
415
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
416
|
+
// uncomment this to show error message as popup
|
|
417
|
+
|
|
418
|
+
// for (let item of rawArrivalNotices) {
|
|
419
|
+
// if (item.palletId) {
|
|
420
|
+
// const foundOrderProductsPallet = await trxMgr.getRepository(OrderProduct).findOne({
|
|
421
|
+
// where: {
|
|
422
|
+
// domain,
|
|
423
|
+
// palletId: item.palletId
|
|
424
|
+
// }
|
|
425
|
+
// })
|
|
426
|
+
|
|
427
|
+
// if (foundOrderProductsPallet) {
|
|
428
|
+
// throw new Error(('Lot ID is already in used. Please enter new Lot ID.'))
|
|
429
|
+
// }
|
|
430
|
+
// }
|
|
431
|
+
// }
|
|
397
432
|
|
|
398
433
|
await trxMgr.query(
|
|
399
434
|
`
|
|
@@ -415,7 +450,7 @@ export async function validateBulkArrivalNoticesFunction(
|
|
|
415
450
|
packing_type VARCHAR(50),
|
|
416
451
|
packing_size INT,
|
|
417
452
|
uom VARCHAR(10),
|
|
418
|
-
pack_qty
|
|
453
|
+
pack_qty INT,
|
|
419
454
|
pallet_qty INT,
|
|
420
455
|
pallet_id VARCHAR(50),
|
|
421
456
|
unit_price VARCHAR(50),
|
|
@@ -447,7 +482,7 @@ export async function validateBulkArrivalNoticesFunction(
|
|
|
447
482
|
)
|
|
448
483
|
)
|
|
449
484
|
`,
|
|
450
|
-
[json_oi,
|
|
485
|
+
[json_oi,domain.id]
|
|
451
486
|
)
|
|
452
487
|
|
|
453
488
|
await trxMgr.query(
|
|
@@ -577,10 +612,6 @@ export async function validateBulkArrivalNoticesFunction(
|
|
|
577
612
|
WHEN f.pack_qty IS NULL OR f.pack_qty <= 0 THEN 'invalid pack qty,'
|
|
578
613
|
ELSE ''
|
|
579
614
|
END ||
|
|
580
|
-
CASE
|
|
581
|
-
WHEN f.pack_qty % 1 != 0 AND NOT pr.is_inventory_decimal THEN 'decimal quantities are not allowed for this product,'
|
|
582
|
-
ELSE ''
|
|
583
|
-
END ||
|
|
584
615
|
CASE
|
|
585
616
|
WHEN f.batch_id IS NULL THEN 'batch no. is required,'
|
|
586
617
|
ELSE ''
|
|
@@ -628,13 +659,12 @@ export async function validateBulkArrivalNoticesFunction(
|
|
|
628
659
|
FROM
|
|
629
660
|
temp_foo f
|
|
630
661
|
LEFT JOIN temp_foo_duplicates d ON f.pallet_id = d.pallet_id
|
|
631
|
-
LEFT JOIN products pr ON pr.id = f.product_id
|
|
632
662
|
ORDER BY f.ref_no, f.ref_no_2, f.ref_no_3, f.sku;
|
|
633
663
|
`
|
|
634
664
|
)
|
|
635
665
|
|
|
636
666
|
await trxMgr.query('DROP TABLE raw_arrival_notices, temp_gan, temp_foo, temp_foo_duplicates, temp_used_pallet_ids')
|
|
637
|
-
|
|
667
|
+
|
|
638
668
|
return validatedItems.map(item => {
|
|
639
669
|
return {
|
|
640
670
|
refNo: item.ref_no,
|
|
@@ -664,9 +694,7 @@ export async function validateBulkArrivalNoticesFunction(
|
|
|
664
694
|
palletId: item.pallet_id,
|
|
665
695
|
unitPrice: item.unit_price,
|
|
666
696
|
manufactureDate: item.manufacture_date,
|
|
667
|
-
errorMsg: lotIdInputSettingChecker
|
|
668
|
-
? lotIdInputSettingChecker + (item.error_msg ? ',' + item.error_msg : '')
|
|
669
|
-
: item.error_msg
|
|
697
|
+
errorMsg: lotIdInputSettingChecker ? lotIdInputSettingChecker + (item.error_msg ? ',' + item.error_msg : '') : item.error_msg
|
|
670
698
|
}
|
|
671
699
|
})
|
|
672
700
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Field, Float, InputType, Int, ObjectType } from 'type-graphql'
|
|
2
|
-
import {
|
|
2
|
+
import { OneToMany } from 'typeorm'
|
|
3
3
|
|
|
4
4
|
import { ObjectRef } from '@things-factory/shell'
|
|
5
5
|
|
|
@@ -112,7 +112,7 @@ export class NewArrivalNotice {
|
|
|
112
112
|
@Field(type => Float, { nullable: true })
|
|
113
113
|
packingSize?: number
|
|
114
114
|
|
|
115
|
-
@Field(type =>
|
|
115
|
+
@Field(type => Int, { nullable: true })
|
|
116
116
|
packQty?: number
|
|
117
117
|
|
|
118
118
|
@Field(type => Float, { nullable: true })
|
|
@@ -159,7 +159,7 @@ export class ArrivalNoticePatch {
|
|
|
159
159
|
|
|
160
160
|
@Field({ nullable: true })
|
|
161
161
|
ownTransport: boolean
|
|
162
|
-
|
|
162
|
+
|
|
163
163
|
@Field({ nullable: true })
|
|
164
164
|
transportVehicle: string
|
|
165
165
|
|
|
@@ -292,7 +292,7 @@ export class RawArrivalNotice {
|
|
|
292
292
|
@Field(type => Float, { nullable: true })
|
|
293
293
|
packingSize?: number
|
|
294
294
|
|
|
295
|
-
@Field(type =>
|
|
295
|
+
@Field(type => Int, { nullable: true })
|
|
296
296
|
packQty?: number
|
|
297
297
|
|
|
298
298
|
@Field(type => Float, { nullable: true })
|
|
@@ -19,22 +19,7 @@ export class NewInventoryCheckItem {
|
|
|
19
19
|
name: string
|
|
20
20
|
|
|
21
21
|
@Field({ nullable: true })
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
@Field(type => Float, { nullable: true })
|
|
25
|
-
originQty?: number
|
|
26
|
-
|
|
27
|
-
@Field(type => Float, { nullable: true })
|
|
28
|
-
inspectedQty?: number
|
|
29
|
-
|
|
30
|
-
@Field(type => Float, { nullable: true })
|
|
31
|
-
originUomValue?: number
|
|
32
|
-
|
|
33
|
-
@Field(type => Float, { nullable: true })
|
|
34
|
-
inspectedUomValue?: number
|
|
35
|
-
|
|
36
|
-
@Field({ nullable: true })
|
|
37
|
-
status?: string
|
|
22
|
+
status: string
|
|
38
23
|
|
|
39
24
|
@Field(type => InventoryPatch, { nullable: true })
|
|
40
25
|
inventory: InventoryPatch
|
|
@@ -57,27 +42,6 @@ export class InventoryCheckItemPatch {
|
|
|
57
42
|
@Field({ nullable: true })
|
|
58
43
|
name: string
|
|
59
44
|
|
|
60
|
-
@Field({ nullable: true })
|
|
61
|
-
countNo?: number
|
|
62
|
-
|
|
63
|
-
@Field(type => Float, { nullable: true })
|
|
64
|
-
originQty?: number
|
|
65
|
-
|
|
66
|
-
@Field(type => Float, { nullable: true })
|
|
67
|
-
inspectedQty?: number
|
|
68
|
-
|
|
69
|
-
@Field(type => Float, { nullable: true })
|
|
70
|
-
originUomValue?: number
|
|
71
|
-
|
|
72
|
-
@Field(type => Float, { nullable: true })
|
|
73
|
-
inspectedUomValue?: number
|
|
74
|
-
|
|
75
|
-
@Field({ nullable: true })
|
|
76
|
-
status: string
|
|
77
|
-
|
|
78
|
-
@Field({ nullable: true })
|
|
79
|
-
cuFlag: string
|
|
80
|
-
|
|
81
45
|
@Field(type => ObjectRef, { nullable: true })
|
|
82
46
|
inventory: ObjectRef
|
|
83
47
|
|
|
@@ -87,6 +51,12 @@ export class InventoryCheckItemPatch {
|
|
|
87
51
|
@Field({ nullable: true })
|
|
88
52
|
batchIdRef: string
|
|
89
53
|
|
|
54
|
+
@Field(type => Int, { nullable: true })
|
|
55
|
+
inspectedQty: number
|
|
56
|
+
|
|
57
|
+
@Field(type => Float, { nullable: true })
|
|
58
|
+
inspectedUomValue: number
|
|
59
|
+
|
|
90
60
|
@Field(type => ObjectRef, { nullable: true })
|
|
91
61
|
inspectedLocation: ObjectRef
|
|
92
62
|
|
|
@@ -101,4 +71,7 @@ export class InventoryCheckItemPatch {
|
|
|
101
71
|
|
|
102
72
|
@Field({ nullable: true })
|
|
103
73
|
productDetailId: string
|
|
74
|
+
|
|
75
|
+
@Field({ nullable: true })
|
|
76
|
+
status: string
|
|
104
77
|
}
|
|
@@ -64,67 +64,19 @@ export class InventoryCheckItem {
|
|
|
64
64
|
@Field({ nullable: true })
|
|
65
65
|
countNo: number
|
|
66
66
|
|
|
67
|
-
@Column({
|
|
68
|
-
type: 'decimal',
|
|
69
|
-
scale: 3,
|
|
70
|
-
nullable: true,
|
|
71
|
-
transformer: {
|
|
72
|
-
to: (value: string | null) => value,
|
|
73
|
-
from: (value: string | null) => {
|
|
74
|
-
if (value === null || value === undefined) return null
|
|
75
|
-
const parsed = parseFloat(value)
|
|
76
|
-
return isNaN(parsed) ? null : parsed
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
})
|
|
67
|
+
@Column({ nullable: true })
|
|
80
68
|
@Field({ nullable: true })
|
|
81
69
|
originQty: number
|
|
82
70
|
|
|
83
|
-
@Column({
|
|
84
|
-
type: 'decimal',
|
|
85
|
-
scale: 3,
|
|
86
|
-
nullable: true,
|
|
87
|
-
transformer: {
|
|
88
|
-
to: (value: string | null) => value,
|
|
89
|
-
from: (value: string | null) => {
|
|
90
|
-
if (value === null || value === undefined) return null
|
|
91
|
-
const parsed = parseFloat(value)
|
|
92
|
-
return isNaN(parsed) ? null : parsed
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
})
|
|
71
|
+
@Column({ nullable: true })
|
|
96
72
|
@Field({ nullable: true })
|
|
97
73
|
inspectedQty: number
|
|
98
74
|
|
|
99
|
-
@Column({
|
|
100
|
-
type: 'decimal',
|
|
101
|
-
scale: 3,
|
|
102
|
-
nullable: true,
|
|
103
|
-
transformer: {
|
|
104
|
-
to: (value: string | null) => value,
|
|
105
|
-
from: (value: string | null) => {
|
|
106
|
-
if (value === null || value === undefined) return null
|
|
107
|
-
const parsed = parseFloat(value)
|
|
108
|
-
return isNaN(parsed) ? null : parsed
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
})
|
|
75
|
+
@Column({ nullable: true, type: 'float' })
|
|
112
76
|
@Field({ nullable: true })
|
|
113
77
|
originUomValue: number
|
|
114
78
|
|
|
115
|
-
@Column({
|
|
116
|
-
type: 'decimal',
|
|
117
|
-
scale: 3,
|
|
118
|
-
nullable: true,
|
|
119
|
-
transformer: {
|
|
120
|
-
to: (value: string | null) => value,
|
|
121
|
-
from: (value: string | null) => {
|
|
122
|
-
if (value === null || value === undefined) return null
|
|
123
|
-
const parsed = parseFloat(value)
|
|
124
|
-
return isNaN(parsed) ? null : parsed
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
})
|
|
79
|
+
@Column({ nullable: true, type: 'float' })
|
|
128
80
|
@Field({ nullable: true })
|
|
129
81
|
inspectedUomValue: number
|
|
130
82
|
|
|
@@ -294,12 +294,8 @@ export class OrderInventoryQuery {
|
|
|
294
294
|
value: releaseGood.id,
|
|
295
295
|
relation: true
|
|
296
296
|
})
|
|
297
|
-
} else {
|
|
298
|
-
// If no matching release good is found, return empty result
|
|
299
|
-
return { items: [], total: 0 }
|
|
300
297
|
}
|
|
301
298
|
}
|
|
302
|
-
|
|
303
299
|
const qb: SelectQueryBuilder<OrderInventory> = getRepository(OrderInventory).createQueryBuilder('oi')
|
|
304
300
|
buildQuery(qb, params, context)
|
|
305
301
|
|
|
@@ -331,7 +327,6 @@ export class OrderInventoryQuery {
|
|
|
331
327
|
productName: item.inventory.product.name,
|
|
332
328
|
productSKU: item.inventory.product.sku,
|
|
333
329
|
productBrand: item.inventory.product.brand,
|
|
334
|
-
isInventoryDecimal: item.inventory.product.isInventoryDecimal,
|
|
335
330
|
packingSize: item.inventory.packingSize
|
|
336
331
|
}
|
|
337
332
|
})
|
|
@@ -68,16 +68,16 @@ export class NewOrderInventory {
|
|
|
68
68
|
@Field({ nullable: true })
|
|
69
69
|
releaseOrderId: string
|
|
70
70
|
|
|
71
|
-
@Field(type =>
|
|
71
|
+
@Field(type => Int, { nullable: true })
|
|
72
72
|
releaseQty: number
|
|
73
73
|
|
|
74
|
-
@Field(type =>
|
|
74
|
+
@Field(type => Int, { nullable: true })
|
|
75
75
|
pickedQty: number
|
|
76
76
|
|
|
77
|
-
@Field(type =>
|
|
77
|
+
@Field(type => Int, { nullable: true })
|
|
78
78
|
sortedQty: number
|
|
79
79
|
|
|
80
|
-
@Field(type =>
|
|
80
|
+
@Field(type => Int, { nullable: true })
|
|
81
81
|
packedQty: number
|
|
82
82
|
|
|
83
83
|
@Field(type => Float, { nullable: true })
|
|
@@ -104,13 +104,13 @@ export class NewOrderInventory {
|
|
|
104
104
|
@Field({ nullable: true })
|
|
105
105
|
existingRow: boolean
|
|
106
106
|
|
|
107
|
-
@Field(type =>
|
|
107
|
+
@Field(type => Int, { nullable: true })
|
|
108
108
|
returnQty: number
|
|
109
109
|
|
|
110
110
|
@Field(type => Float, { nullable: true })
|
|
111
111
|
returnUomValue: number
|
|
112
112
|
|
|
113
|
-
@Field(type =>
|
|
113
|
+
@Field(type => Int, { nullable: true })
|
|
114
114
|
returnToLocationQty: number
|
|
115
115
|
|
|
116
116
|
@Field(type => Float, { nullable: true })
|
|
@@ -146,7 +146,7 @@ export class OrderInventoryPatch {
|
|
|
146
146
|
@Field(type => ObjectRef, { nullable: true })
|
|
147
147
|
inventory: ObjectRef
|
|
148
148
|
|
|
149
|
-
@Field(type =>
|
|
149
|
+
@Field(type => Int, { nullable: true })
|
|
150
150
|
inspectedQty: number
|
|
151
151
|
|
|
152
152
|
@Field(type => Float, { nullable: true })
|
|
@@ -188,19 +188,19 @@ export class OrderInventoryPatch {
|
|
|
188
188
|
@Field({ nullable: true })
|
|
189
189
|
extraJsonData: string
|
|
190
190
|
|
|
191
|
-
@Field(type =>
|
|
191
|
+
@Field(type => Int, { nullable: true })
|
|
192
192
|
releaseQty: number
|
|
193
193
|
|
|
194
194
|
@Field({ nullable: true })
|
|
195
195
|
serialNumber: string
|
|
196
196
|
|
|
197
|
-
@Field(type =>
|
|
197
|
+
@Field(type => Int, { nullable: true })
|
|
198
198
|
sortedQty: number
|
|
199
199
|
|
|
200
|
-
@Field(type =>
|
|
200
|
+
@Field(type => Int, { nullable: true })
|
|
201
201
|
pickedQty: number
|
|
202
202
|
|
|
203
|
-
@Field(type =>
|
|
203
|
+
@Field(type => Int, { nullable: true })
|
|
204
204
|
packedQty: number
|
|
205
205
|
|
|
206
206
|
@Field({ nullable: true })
|
|
@@ -221,7 +221,7 @@ export class OrderInventoryPatch {
|
|
|
221
221
|
@Field(type => Float, { nullable: true })
|
|
222
222
|
returnUomValue: number
|
|
223
223
|
|
|
224
|
-
@Field(type =>
|
|
224
|
+
@Field(type => Int, { nullable: true })
|
|
225
225
|
actualPackQty: number
|
|
226
226
|
|
|
227
227
|
@Field(type => Int, { nullable: true })
|
|
@@ -153,18 +153,7 @@ export class OrderInventory {
|
|
|
153
153
|
@Field(type => User, { nullable: true })
|
|
154
154
|
putawayBy: User
|
|
155
155
|
|
|
156
|
-
@Column({
|
|
157
|
-
nullable: true,
|
|
158
|
-
type: 'decimal',
|
|
159
|
-
scale: 3,
|
|
160
|
-
transformer: {
|
|
161
|
-
to: (value: string | null) => value,
|
|
162
|
-
from: (value: string | null) => {
|
|
163
|
-
if (value === null || value === undefined) return null
|
|
164
|
-
const parsed = parseFloat(value)
|
|
165
|
-
return isNaN(parsed) ? null : parsed
|
|
166
|
-
}
|
|
167
|
-
} })
|
|
156
|
+
@Column({ nullable: true, type: 'float' })
|
|
168
157
|
@Field({ nullable: true })
|
|
169
158
|
actualPackUomValue: number
|
|
170
159
|
|
|
@@ -240,18 +229,7 @@ export class OrderInventory {
|
|
|
240
229
|
@Field({ nullable: true })
|
|
241
230
|
originQty: number
|
|
242
231
|
|
|
243
|
-
@Column({
|
|
244
|
-
nullable: true,
|
|
245
|
-
type: 'decimal',
|
|
246
|
-
scale: 3,
|
|
247
|
-
transformer: {
|
|
248
|
-
to: (value: string | null) => value,
|
|
249
|
-
from: (value: string | null) => {
|
|
250
|
-
if (value === null || value === undefined) return null
|
|
251
|
-
const parsed = parseFloat(value)
|
|
252
|
-
return isNaN(parsed) ? null : parsed
|
|
253
|
-
}
|
|
254
|
-
} })
|
|
232
|
+
@Column({ nullable: true })
|
|
255
233
|
@Field({ nullable: true })
|
|
256
234
|
inspectedQty: number
|
|
257
235
|
|
|
@@ -259,18 +237,7 @@ export class OrderInventory {
|
|
|
259
237
|
@Field({ nullable: true })
|
|
260
238
|
originUomValue: number
|
|
261
239
|
|
|
262
|
-
@Column({
|
|
263
|
-
nullable: true,
|
|
264
|
-
type: 'decimal',
|
|
265
|
-
scale: 3,
|
|
266
|
-
transformer: {
|
|
267
|
-
to: (value: string | null) => value,
|
|
268
|
-
from: (value: string | null) => {
|
|
269
|
-
if (value === null || value === undefined) return null
|
|
270
|
-
const parsed = parseFloat(value)
|
|
271
|
-
return isNaN(parsed) ? null : parsed
|
|
272
|
-
}
|
|
273
|
-
} })
|
|
240
|
+
@Column({ nullable: true, type: 'float' })
|
|
274
241
|
@Field({ nullable: true })
|
|
275
242
|
inspectedUomValue: number
|
|
276
243
|
|
|
@@ -303,86 +270,23 @@ export class OrderInventory {
|
|
|
303
270
|
@RelationId((orderInventory: OrderInventory) => orderInventory.binLocation)
|
|
304
271
|
binLocationId: string
|
|
305
272
|
|
|
306
|
-
@Column({
|
|
307
|
-
nullable: true,
|
|
308
|
-
type: 'decimal',
|
|
309
|
-
scale: 3,
|
|
310
|
-
transformer: {
|
|
311
|
-
to: (value: string | null) => value,
|
|
312
|
-
from: (value: string | null) => {
|
|
313
|
-
if (value === null || value === undefined) return null
|
|
314
|
-
const parsed = parseFloat(value)
|
|
315
|
-
return isNaN(parsed) ? null : parsed
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
})
|
|
273
|
+
@Column({ nullable: true, type: 'float' })
|
|
319
274
|
@Field({ nullable: true })
|
|
320
275
|
releaseQty: number
|
|
321
276
|
|
|
322
|
-
@Column({
|
|
323
|
-
nullable: true,
|
|
324
|
-
type: 'decimal',
|
|
325
|
-
scale: 3,
|
|
326
|
-
default: 0,
|
|
327
|
-
transformer: {
|
|
328
|
-
to: (value: string | null) => value,
|
|
329
|
-
from: (value: string | null) => {
|
|
330
|
-
if (value === null || value === undefined) return null
|
|
331
|
-
const parsed = parseFloat(value)
|
|
332
|
-
return isNaN(parsed) ? null : parsed
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
})
|
|
277
|
+
@Column({ nullable: true, type: 'float', default: 0 })
|
|
336
278
|
@Field({ nullable: true })
|
|
337
279
|
pickedQty: number
|
|
338
280
|
|
|
339
|
-
@Column({
|
|
340
|
-
nullable: true,
|
|
341
|
-
type: 'decimal',
|
|
342
|
-
scale: 3,
|
|
343
|
-
default: 0,
|
|
344
|
-
transformer: {
|
|
345
|
-
to: (value: string | null) => value,
|
|
346
|
-
from: (value: string | null) => {
|
|
347
|
-
if (value === null || value === undefined) return null
|
|
348
|
-
const parsed = parseFloat(value)
|
|
349
|
-
return isNaN(parsed) ? null : parsed
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
})
|
|
281
|
+
@Column({ nullable: true, type: 'float', default: 0 })
|
|
353
282
|
@Field({ nullable: true })
|
|
354
283
|
packedQty: number
|
|
355
284
|
|
|
356
|
-
@Column({
|
|
357
|
-
nullable: true,
|
|
358
|
-
type: 'decimal',
|
|
359
|
-
scale: 3,
|
|
360
|
-
default: 0,
|
|
361
|
-
transformer: {
|
|
362
|
-
to: (value: string | null) => value,
|
|
363
|
-
from: (value: string | null) => {
|
|
364
|
-
if (value === null || value === undefined) return null
|
|
365
|
-
const parsed = parseFloat(value)
|
|
366
|
-
return isNaN(parsed) ? null : parsed
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
})
|
|
285
|
+
@Column({ nullable: true, type: 'float', default: 0 })
|
|
370
286
|
@Field({ nullable: true })
|
|
371
287
|
sortedQty: number
|
|
372
288
|
|
|
373
|
-
@Column({
|
|
374
|
-
nullable: true,
|
|
375
|
-
type: 'decimal',
|
|
376
|
-
scale: 3,
|
|
377
|
-
transformer: {
|
|
378
|
-
to: (value: string | null) => value,
|
|
379
|
-
from: (value: string | null) => {
|
|
380
|
-
if (value === null || value === undefined) return null
|
|
381
|
-
const parsed = parseFloat(value)
|
|
382
|
-
return isNaN(parsed) ? null : parsed
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
})
|
|
289
|
+
@Column({ nullable: true, type: 'float' })
|
|
386
290
|
@Field({ nullable: true })
|
|
387
291
|
releaseUomValue: number
|
|
388
292
|
|
|
@@ -390,82 +294,23 @@ export class OrderInventory {
|
|
|
390
294
|
@Field({ nullable: true })
|
|
391
295
|
uom: string
|
|
392
296
|
|
|
393
|
-
@Column({
|
|
394
|
-
nullable: true,
|
|
395
|
-
type: 'decimal',
|
|
396
|
-
scale: 3,
|
|
397
|
-
transformer: {
|
|
398
|
-
to: (value: string | null) => value,
|
|
399
|
-
from: (value: string | null) => {
|
|
400
|
-
if (value === null || value === undefined) return null
|
|
401
|
-
const parsed = parseFloat(value)
|
|
402
|
-
return isNaN(parsed) ? null : parsed
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
})
|
|
297
|
+
@Column({ nullable: true, type: 'float' })
|
|
406
298
|
@Field({ nullable: true })
|
|
407
299
|
returnQty: number
|
|
408
300
|
|
|
409
|
-
@Column({
|
|
410
|
-
nullable: true,
|
|
411
|
-
type: 'decimal',
|
|
412
|
-
scale: 3,
|
|
413
|
-
transformer: {
|
|
414
|
-
to: (value: string | null) => value,
|
|
415
|
-
from: (value: string | null) => {
|
|
416
|
-
if (value === null || value === undefined) return null
|
|
417
|
-
const parsed = parseFloat(value)
|
|
418
|
-
return isNaN(parsed) ? null : parsed
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
})
|
|
301
|
+
@Column({ nullable: true, type: 'float' })
|
|
422
302
|
@Field({ nullable: true })
|
|
423
303
|
returnUomValue: number
|
|
424
304
|
|
|
425
|
-
@Column({
|
|
426
|
-
nullable: true,
|
|
427
|
-
type: 'decimal',
|
|
428
|
-
scale: 3,
|
|
429
|
-
transformer: {
|
|
430
|
-
to: (value: string | null) => value,
|
|
431
|
-
from: (value: string | null) => {
|
|
432
|
-
if (value === null || value === undefined) return null
|
|
433
|
-
const parsed = parseFloat(value)
|
|
434
|
-
return isNaN(parsed) ? null : parsed
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
})
|
|
305
|
+
@Column({ nullable: true, type: 'float' })
|
|
438
306
|
@Field({ nullable: true })
|
|
439
307
|
returnToLocationQty: number
|
|
440
308
|
|
|
441
|
-
@Column({
|
|
442
|
-
nullable: true,
|
|
443
|
-
type: 'decimal',
|
|
444
|
-
scale: 3,
|
|
445
|
-
transformer: {
|
|
446
|
-
to: (value: string | null) => value,
|
|
447
|
-
from: (value: string | null) => {
|
|
448
|
-
if (value === null || value === undefined) return null
|
|
449
|
-
const parsed = parseFloat(value)
|
|
450
|
-
return isNaN(parsed) ? null : parsed
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
})
|
|
309
|
+
@Column({ nullable: true, type: 'float' })
|
|
454
310
|
@Field({ nullable: true })
|
|
455
311
|
returnToLocationUomValue: number
|
|
456
312
|
|
|
457
|
-
@Column({
|
|
458
|
-
nullable: true,
|
|
459
|
-
type: 'decimal',
|
|
460
|
-
scale: 3,
|
|
461
|
-
transformer: {
|
|
462
|
-
to: (value: string | null) => value,
|
|
463
|
-
from: (value: string | null) => {
|
|
464
|
-
if (value === null || value === undefined) return null
|
|
465
|
-
const parsed = parseFloat(value)
|
|
466
|
-
return isNaN(parsed) ? null : parsed
|
|
467
|
-
}
|
|
468
|
-
} })
|
|
313
|
+
@Column({ nullable: true })
|
|
469
314
|
@Field({ nullable: true })
|
|
470
315
|
actualPackQty: number
|
|
471
316
|
|
|
@@ -645,9 +490,6 @@ export class OrderInventory {
|
|
|
645
490
|
@Field({ nullable: true })
|
|
646
491
|
pickingBin: string
|
|
647
492
|
|
|
648
|
-
@Field({ nullable: true })
|
|
649
|
-
isInventoryDecimal: boolean
|
|
650
|
-
|
|
651
493
|
@Field(type => [ProductDetail], { nullable: true })
|
|
652
494
|
productDetails: ProductDetail[]
|
|
653
495
|
}
|