@things-factory/sales-base 4.3.636 → 4.3.637
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 +34 -3
- package/dist-server/service/arrival-notice/arrival-notice-mutation.js.map +1 -1
- package/dist-server/service/arrival-notice/arrival-notice-query.js +10 -3
- 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 +48 -12
- 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 +56 -4
- package/dist-server/service/inventory-check-item/inventory-check-item.js.map +1 -1
- package/dist-server/service/order-inventory/order-inventory-query.js +5 -1
- 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 +189 -13
- package/dist-server/service/order-inventory/order-inventory.js.map +1 -1
- package/dist-server/service/order-package-item/order-package-item-types.js +14 -2
- 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 +28 -2
- 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 +104 -13
- 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 +13 -1
- package/dist-server/service/order-tote-item/order-tote-item.js.map +1 -1
- package/dist-server/service/others/other-types.js +4 -0
- package/dist-server/service/others/other-types.js.map +1 -1
- package/dist-server/service/release-good/release-good-mutation.js +35 -6
- package/dist-server/service/release-good/release-good-mutation.js.map +1 -1
- package/dist-server/service/release-good/release-good-query.js +24 -19
- 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 +12 -8
- package/dist-server/utils/inventory-util.js.map +1 -1
- package/package.json +7 -7
- package/server/service/arrival-notice/arrival-notice-mutation.ts +40 -3
- package/server/service/arrival-notice/arrival-notice-query.ts +40 -68
- package/server/service/arrival-notice/arrival-notice-types.ts +4 -4
- package/server/service/inventory-check-item/inventory-check-item-types.ts +37 -10
- package/server/service/inventory-check-item/inventory-check-item.ts +52 -4
- package/server/service/order-inventory/order-inventory-query.ts +5 -0
- package/server/service/order-inventory/order-inventory-types.ts +12 -12
- package/server/service/order-inventory/order-inventory.ts +171 -13
- package/server/service/order-package-item/order-package-item-types.ts +12 -3
- package/server/service/order-package-item/order-package-item.ts +26 -2
- package/server/service/order-product/order-product-types.ts +18 -18
- package/server/service/order-product/order-product.ts +96 -12
- package/server/service/order-tote-item/order-tote-item-types.ts +3 -3
- package/server/service/order-tote-item/order-tote-item.ts +12 -1
- package/server/service/others/other-types.ts +3 -0
- package/server/service/release-good/release-good-mutation.ts +51 -9
- package/server/service/release-good/release-good-query.ts +89 -124
- package/server/service/release-good/release-good-types.ts +1 -1
- package/server/utils/inventory-util.ts +44 -54
|
@@ -1,50 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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'
|
|
1
|
+
import { Arg, Args, Ctx, Directive, FieldResolver, Query, Resolver, Root } from 'type-graphql'
|
|
2
|
+
import { EntityManager, getRepository, In, SelectQueryBuilder } from 'typeorm'
|
|
17
3
|
|
|
18
4
|
import { Attachment } from '@things-factory/attachment-base'
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
User
|
|
22
|
-
} from '@things-factory/auth-base'
|
|
23
|
-
import {
|
|
24
|
-
Bizplace,
|
|
25
|
-
getCompanyBizplace,
|
|
26
|
-
getPermittedBizplaceIds
|
|
27
|
-
} from '@things-factory/biz-base'
|
|
5
|
+
import { checkUserBelongsDomain, User } from '@things-factory/auth-base'
|
|
6
|
+
import { Bizplace, getCompanyBizplace, getPermittedBizplaceIds } from '@things-factory/biz-base'
|
|
28
7
|
import { Setting } from '@things-factory/setting-base'
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} from '
|
|
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'
|
|
8
|
+
import { buildQuery, Domain, ListParam } from '@things-factory/shell'
|
|
9
|
+
|
|
10
|
+
import { ArrivalNoticeList, NewArrivalNotice, RawArrivalNotice } from '../'
|
|
11
|
+
import { ATTACHMENT_TYPE, ORDER_STATUS } from '../../constants'
|
|
12
|
+
import { OrderInventory, OrderProduct } from '../../service'
|
|
48
13
|
import { convertExcelDateToISO } from '../../utils/datetime-util'
|
|
49
14
|
import { ArrivalNotice } from './arrival-notice'
|
|
50
15
|
|
|
@@ -344,8 +309,8 @@ export class ArrivalNoticeQuery {
|
|
|
344
309
|
@Arg('rawArrivalNotices', type => [NewArrivalNotice], { nullable: true }) rawArrivalNotices: NewArrivalNotice[],
|
|
345
310
|
@Arg('bizplaceId', type => String) bizplaceId: string
|
|
346
311
|
): Promise<RawArrivalNotice[]> {
|
|
347
|
-
const {domain
|
|
348
|
-
return await validateBulkArrivalNoticesFunction(rawArrivalNotices, bizplaceId, domain,tx)
|
|
312
|
+
const { domain, tx }: { domain: Domain; tx: EntityManager } = context.state
|
|
313
|
+
return await validateBulkArrivalNoticesFunction(rawArrivalNotices, bizplaceId, domain, tx)
|
|
349
314
|
}
|
|
350
315
|
|
|
351
316
|
@FieldResolver(type => Domain)
|
|
@@ -402,7 +367,7 @@ export async function validateBulkArrivalNoticesFunction(
|
|
|
402
367
|
}
|
|
403
368
|
})
|
|
404
369
|
)
|
|
405
|
-
|
|
370
|
+
|
|
406
371
|
const enableLotIdInput: Setting = await trxMgr.getRepository(Setting).findOne({
|
|
407
372
|
where: { domain, category: 'id-rule', name: 'enable-lot-id-input' }
|
|
408
373
|
})
|
|
@@ -410,25 +375,25 @@ export async function validateBulkArrivalNoticesFunction(
|
|
|
410
375
|
//check if palletId is entered but enablelotidinput setting is false
|
|
411
376
|
let lotIdInputSettingChecker = ''
|
|
412
377
|
if (rawArrivalNotices.some(record => record.palletId) && enableLotIdInput.value == 'false') {
|
|
413
|
-
lotIdInputSettingChecker = 'Please enable the setting to create orders with a custom Lot ID'
|
|
378
|
+
lotIdInputSettingChecker = 'Please enable the setting to create orders with a custom Lot ID'
|
|
414
379
|
}
|
|
415
380
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
381
|
+
// uncomment this to show error message as popup
|
|
382
|
+
|
|
383
|
+
// for (let item of rawArrivalNotices) {
|
|
384
|
+
// if (item.palletId) {
|
|
385
|
+
// const foundOrderProductsPallet = await trxMgr.getRepository(OrderProduct).findOne({
|
|
386
|
+
// where: {
|
|
387
|
+
// domain,
|
|
388
|
+
// palletId: item.palletId
|
|
389
|
+
// }
|
|
390
|
+
// })
|
|
391
|
+
|
|
392
|
+
// if (foundOrderProductsPallet) {
|
|
393
|
+
// throw new Error(('Lot ID is already in used. Please enter new Lot ID.'))
|
|
394
|
+
// }
|
|
395
|
+
// }
|
|
396
|
+
// }
|
|
432
397
|
|
|
433
398
|
await trxMgr.query(
|
|
434
399
|
`
|
|
@@ -450,7 +415,7 @@ export async function validateBulkArrivalNoticesFunction(
|
|
|
450
415
|
packing_type VARCHAR(50),
|
|
451
416
|
packing_size INT,
|
|
452
417
|
uom VARCHAR(10),
|
|
453
|
-
pack_qty
|
|
418
|
+
pack_qty NUMERIC(19,3),
|
|
454
419
|
pallet_qty INT,
|
|
455
420
|
pallet_id VARCHAR(50),
|
|
456
421
|
unit_price VARCHAR(50),
|
|
@@ -482,7 +447,7 @@ export async function validateBulkArrivalNoticesFunction(
|
|
|
482
447
|
)
|
|
483
448
|
)
|
|
484
449
|
`,
|
|
485
|
-
[json_oi,domain.id]
|
|
450
|
+
[json_oi, domain.id]
|
|
486
451
|
)
|
|
487
452
|
|
|
488
453
|
await trxMgr.query(
|
|
@@ -612,6 +577,10 @@ export async function validateBulkArrivalNoticesFunction(
|
|
|
612
577
|
WHEN f.pack_qty IS NULL OR f.pack_qty <= 0 THEN 'invalid pack qty,'
|
|
613
578
|
ELSE ''
|
|
614
579
|
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 ||
|
|
615
584
|
CASE
|
|
616
585
|
WHEN f.batch_id IS NULL THEN 'batch no. is required,'
|
|
617
586
|
ELSE ''
|
|
@@ -659,12 +628,13 @@ export async function validateBulkArrivalNoticesFunction(
|
|
|
659
628
|
FROM
|
|
660
629
|
temp_foo f
|
|
661
630
|
LEFT JOIN temp_foo_duplicates d ON f.pallet_id = d.pallet_id
|
|
631
|
+
LEFT JOIN products pr ON pr.id = f.product_id
|
|
662
632
|
ORDER BY f.ref_no, f.ref_no_2, f.ref_no_3, f.sku;
|
|
663
633
|
`
|
|
664
634
|
)
|
|
665
635
|
|
|
666
636
|
await trxMgr.query('DROP TABLE raw_arrival_notices, temp_gan, temp_foo, temp_foo_duplicates, temp_used_pallet_ids')
|
|
667
|
-
|
|
637
|
+
|
|
668
638
|
return validatedItems.map(item => {
|
|
669
639
|
return {
|
|
670
640
|
refNo: item.ref_no,
|
|
@@ -694,7 +664,9 @@ export async function validateBulkArrivalNoticesFunction(
|
|
|
694
664
|
palletId: item.pallet_id,
|
|
695
665
|
unitPrice: item.unit_price,
|
|
696
666
|
manufactureDate: item.manufacture_date,
|
|
697
|
-
errorMsg: lotIdInputSettingChecker
|
|
667
|
+
errorMsg: lotIdInputSettingChecker
|
|
668
|
+
? lotIdInputSettingChecker + (item.error_msg ? ',' + item.error_msg : '')
|
|
669
|
+
: item.error_msg
|
|
698
670
|
}
|
|
699
671
|
})
|
|
700
672
|
}
|
|
@@ -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 => Float, { 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 => Float, { nullable: true })
|
|
296
296
|
packQty?: number
|
|
297
297
|
|
|
298
298
|
@Field(type => Float, { nullable: true })
|
|
@@ -19,7 +19,22 @@ export class NewInventoryCheckItem {
|
|
|
19
19
|
name: string
|
|
20
20
|
|
|
21
21
|
@Field({ nullable: true })
|
|
22
|
-
|
|
22
|
+
countNo?: number
|
|
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
|
|
23
38
|
|
|
24
39
|
@Field(type => InventoryPatch, { nullable: true })
|
|
25
40
|
inventory: InventoryPatch
|
|
@@ -42,6 +57,27 @@ export class InventoryCheckItemPatch {
|
|
|
42
57
|
@Field({ nullable: true })
|
|
43
58
|
name: string
|
|
44
59
|
|
|
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
|
+
|
|
45
81
|
@Field(type => ObjectRef, { nullable: true })
|
|
46
82
|
inventory: ObjectRef
|
|
47
83
|
|
|
@@ -51,12 +87,6 @@ export class InventoryCheckItemPatch {
|
|
|
51
87
|
@Field({ nullable: true })
|
|
52
88
|
batchIdRef: string
|
|
53
89
|
|
|
54
|
-
@Field(type => Int, { nullable: true })
|
|
55
|
-
inspectedQty: number
|
|
56
|
-
|
|
57
|
-
@Field(type => Float, { nullable: true })
|
|
58
|
-
inspectedUomValue: number
|
|
59
|
-
|
|
60
90
|
@Field(type => ObjectRef, { nullable: true })
|
|
61
91
|
inspectedLocation: ObjectRef
|
|
62
92
|
|
|
@@ -71,7 +101,4 @@ export class InventoryCheckItemPatch {
|
|
|
71
101
|
|
|
72
102
|
@Field({ nullable: true })
|
|
73
103
|
productDetailId: string
|
|
74
|
-
|
|
75
|
-
@Field({ nullable: true })
|
|
76
|
-
status: string
|
|
77
104
|
}
|
|
@@ -64,19 +64,67 @@ export class InventoryCheckItem {
|
|
|
64
64
|
@Field({ nullable: true })
|
|
65
65
|
countNo: number
|
|
66
66
|
|
|
67
|
-
@Column({
|
|
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
|
+
})
|
|
68
80
|
@Field({ nullable: true })
|
|
69
81
|
originQty: number
|
|
70
82
|
|
|
71
|
-
@Column({
|
|
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
|
+
})
|
|
72
96
|
@Field({ nullable: true })
|
|
73
97
|
inspectedQty: number
|
|
74
98
|
|
|
75
|
-
@Column({
|
|
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
|
+
})
|
|
76
112
|
@Field({ nullable: true })
|
|
77
113
|
originUomValue: number
|
|
78
114
|
|
|
79
|
-
@Column({
|
|
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
|
+
})
|
|
80
128
|
@Field({ nullable: true })
|
|
81
129
|
inspectedUomValue: number
|
|
82
130
|
|
|
@@ -294,8 +294,12 @@ 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 }
|
|
297
300
|
}
|
|
298
301
|
}
|
|
302
|
+
|
|
299
303
|
const qb: SelectQueryBuilder<OrderInventory> = getRepository(OrderInventory).createQueryBuilder('oi')
|
|
300
304
|
buildQuery(qb, params, context)
|
|
301
305
|
|
|
@@ -327,6 +331,7 @@ export class OrderInventoryQuery {
|
|
|
327
331
|
productName: item.inventory.product.name,
|
|
328
332
|
productSKU: item.inventory.product.sku,
|
|
329
333
|
productBrand: item.inventory.product.brand,
|
|
334
|
+
isInventoryDecimal: item.inventory.product.isInventoryDecimal,
|
|
330
335
|
packingSize: item.inventory.packingSize
|
|
331
336
|
}
|
|
332
337
|
})
|
|
@@ -68,16 +68,16 @@ export class NewOrderInventory {
|
|
|
68
68
|
@Field({ nullable: true })
|
|
69
69
|
releaseOrderId: string
|
|
70
70
|
|
|
71
|
-
@Field(type =>
|
|
71
|
+
@Field(type => Float, { nullable: true })
|
|
72
72
|
releaseQty: number
|
|
73
73
|
|
|
74
|
-
@Field(type =>
|
|
74
|
+
@Field(type => Float, { nullable: true })
|
|
75
75
|
pickedQty: number
|
|
76
76
|
|
|
77
|
-
@Field(type =>
|
|
77
|
+
@Field(type => Float, { nullable: true })
|
|
78
78
|
sortedQty: number
|
|
79
79
|
|
|
80
|
-
@Field(type =>
|
|
80
|
+
@Field(type => Float, { 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 => Float, { 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 => Float, { 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 => Float, { 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 => Float, { 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 => Float, { nullable: true })
|
|
198
198
|
sortedQty: number
|
|
199
199
|
|
|
200
|
-
@Field(type =>
|
|
200
|
+
@Field(type => Float, { nullable: true })
|
|
201
201
|
pickedQty: number
|
|
202
202
|
|
|
203
|
-
@Field(type =>
|
|
203
|
+
@Field(type => Float, { 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 => Float, { nullable: true })
|
|
225
225
|
actualPackQty: number
|
|
226
226
|
|
|
227
227
|
@Field(type => Int, { nullable: true })
|
|
@@ -153,7 +153,18 @@ export class OrderInventory {
|
|
|
153
153
|
@Field(type => User, { nullable: true })
|
|
154
154
|
putawayBy: User
|
|
155
155
|
|
|
156
|
-
@Column({
|
|
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
|
+
} })
|
|
157
168
|
@Field({ nullable: true })
|
|
158
169
|
actualPackUomValue: number
|
|
159
170
|
|
|
@@ -229,7 +240,18 @@ export class OrderInventory {
|
|
|
229
240
|
@Field({ nullable: true })
|
|
230
241
|
originQty: number
|
|
231
242
|
|
|
232
|
-
@Column({
|
|
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
|
+
} })
|
|
233
255
|
@Field({ nullable: true })
|
|
234
256
|
inspectedQty: number
|
|
235
257
|
|
|
@@ -237,7 +259,18 @@ export class OrderInventory {
|
|
|
237
259
|
@Field({ nullable: true })
|
|
238
260
|
originUomValue: number
|
|
239
261
|
|
|
240
|
-
@Column({
|
|
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
|
+
} })
|
|
241
274
|
@Field({ nullable: true })
|
|
242
275
|
inspectedUomValue: number
|
|
243
276
|
|
|
@@ -270,23 +303,86 @@ export class OrderInventory {
|
|
|
270
303
|
@RelationId((orderInventory: OrderInventory) => orderInventory.binLocation)
|
|
271
304
|
binLocationId: string
|
|
272
305
|
|
|
273
|
-
@Column({
|
|
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
|
+
})
|
|
274
319
|
@Field({ nullable: true })
|
|
275
320
|
releaseQty: number
|
|
276
321
|
|
|
277
|
-
@Column({
|
|
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
|
+
})
|
|
278
336
|
@Field({ nullable: true })
|
|
279
337
|
pickedQty: number
|
|
280
338
|
|
|
281
|
-
@Column({
|
|
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
|
+
})
|
|
282
353
|
@Field({ nullable: true })
|
|
283
354
|
packedQty: number
|
|
284
355
|
|
|
285
|
-
@Column({
|
|
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
|
+
})
|
|
286
370
|
@Field({ nullable: true })
|
|
287
371
|
sortedQty: number
|
|
288
372
|
|
|
289
|
-
@Column({
|
|
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
|
+
})
|
|
290
386
|
@Field({ nullable: true })
|
|
291
387
|
releaseUomValue: number
|
|
292
388
|
|
|
@@ -294,23 +390,82 @@ export class OrderInventory {
|
|
|
294
390
|
@Field({ nullable: true })
|
|
295
391
|
uom: string
|
|
296
392
|
|
|
297
|
-
@Column({
|
|
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
|
+
})
|
|
298
406
|
@Field({ nullable: true })
|
|
299
407
|
returnQty: number
|
|
300
408
|
|
|
301
|
-
@Column({
|
|
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
|
+
})
|
|
302
422
|
@Field({ nullable: true })
|
|
303
423
|
returnUomValue: number
|
|
304
424
|
|
|
305
|
-
@Column({
|
|
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
|
+
})
|
|
306
438
|
@Field({ nullable: true })
|
|
307
439
|
returnToLocationQty: number
|
|
308
440
|
|
|
309
|
-
@Column({
|
|
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
|
+
})
|
|
310
454
|
@Field({ nullable: true })
|
|
311
455
|
returnToLocationUomValue: number
|
|
312
456
|
|
|
313
|
-
@Column({
|
|
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
|
+
} })
|
|
314
469
|
@Field({ nullable: true })
|
|
315
470
|
actualPackQty: number
|
|
316
471
|
|
|
@@ -490,6 +645,9 @@ export class OrderInventory {
|
|
|
490
645
|
@Field({ nullable: true })
|
|
491
646
|
pickingBin: string
|
|
492
647
|
|
|
648
|
+
@Field({ nullable: true })
|
|
649
|
+
isInventoryDecimal: boolean
|
|
650
|
+
|
|
493
651
|
@Field(type => [ProductDetail], { nullable: true })
|
|
494
652
|
productDetails: ProductDetail[]
|
|
495
653
|
}
|