@things-factory/warehouse-base 4.3.76 → 4.3.79-alpha.1

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.
Files changed (26) hide show
  1. package/dist-server/service/inventory/inventory-query.js +69 -167
  2. package/dist-server/service/inventory/inventory-query.js.map +1 -1
  3. package/dist-server/service/inventory/inventory.js +39 -35
  4. package/dist-server/service/inventory/inventory.js.map +1 -1
  5. package/dist-server/service/inventory-change/inventory-change-mutation.js +209 -203
  6. package/dist-server/service/inventory-change/inventory-change-mutation.js.map +1 -1
  7. package/dist-server/service/inventory-item/inventory-item.js +8 -3
  8. package/dist-server/service/inventory-item/inventory-item.js.map +1 -1
  9. package/dist-server/service/inventory-product/inventory-product.js +8 -3
  10. package/dist-server/service/inventory-product/inventory-product.js.map +1 -1
  11. package/dist-server/service/location/location-query.js +1 -1
  12. package/dist-server/service/location/location-query.js.map +1 -1
  13. package/dist-server/service/location/location.js +10 -10
  14. package/dist-server/service/warehouse/warehouse.js +7 -7
  15. package/dist-server/utils/inventory-util.js +83 -24
  16. package/dist-server/utils/inventory-util.js.map +1 -1
  17. package/package.json +8 -8
  18. package/server/service/inventory/inventory-query.ts +76 -220
  19. package/server/service/inventory/inventory.ts +38 -35
  20. package/server/service/inventory-change/inventory-change-mutation.ts +237 -231
  21. package/server/service/inventory-item/inventory-item.ts +9 -2
  22. package/server/service/inventory-product/inventory-product.ts +5 -1
  23. package/server/service/location/location-query.ts +1 -1
  24. package/server/service/location/location.ts +10 -10
  25. package/server/service/warehouse/warehouse.ts +7 -7
  26. package/server/utils/inventory-util.ts +117 -51
@@ -11,9 +11,20 @@ import { INVENTORY_STATUS, LOCATION_TYPE } from '../../constants'
11
11
  import { InventoryChange } from '../inventory-change/inventory-change'
12
12
  import { Inventory } from './inventory'
13
13
  import { InventoryBundleGroupDetail, InventoryList } from './inventory-types'
14
+ import { logger } from '@things-factory/env'
14
15
 
15
16
  @Resolver(Inventory)
16
17
  export class InventoryQuery {
18
+ /**
19
+ * Combined single query resolver to perform extraction of data with or without pagination
20
+ * @param context
21
+ * @param filters
22
+ * @param pagination
23
+ * @param sortings
24
+ * @param locationSortingRules
25
+ * @param exportItem
26
+ * @returns
27
+ */
17
28
  @Directive('@privilege(category: "inventory", privilege: "query")')
18
29
  @Directive('@transaction')
19
30
  @Query(returns => InventoryList)
@@ -22,16 +33,23 @@ export class InventoryQuery {
22
33
  @Arg('filters', type => [Filter], { nullable: true }) filters?: Filter[],
23
34
  @Arg('pagination', type => Pagination, { nullable: true }) pagination?: Pagination,
24
35
  @Arg('sortings', type => [Sorting], { nullable: true }) sortings?: Sorting[],
25
- @Arg('locationSortingRules', type => [Sorting], { nullable: true }) locationSortingRules?: Sorting[]
36
+ @Arg('locationSortingRules', type => [Sorting], { nullable: true }) locationSortingRules?: Sorting[],
37
+ @Arg('exportItem', type => Boolean, { nullable: true }) exportItem?: Boolean
26
38
  ): Promise<InventoryList> {
27
39
  const { domain, user, tx }: { domain: Domain; user: User; tx: EntityManager } = context.state
40
+ const { page, limit }: { page: number; limit: number } = pagination || {}
28
41
 
29
42
  try {
30
- const productFilters = filters.find(x => x.name == 'product_info')
31
- filters = filters.filter(x => x.name != 'product_info')
43
+ //Define special filters
44
+ const productFilters = filters.find((filter: any) => filter.name == 'productInfo')
45
+ const remainOnlyParam = filters.find((filter: any) => filter.name == 'remainOnly')
46
+ const bizplace = filters.find((filter: any) => filter.name === 'bizplace')
47
+
48
+ filters = filters.filter(x => (['productInfo', 'remainOnly']).indexOf(x.name) < 0)
49
+
32
50
  const params = { filters, pagination }
33
51
 
34
- if (!params.filters.find((filter: any) => filter.name === 'bizplace')) {
52
+ if (!bizplace) {
35
53
  params.filters.push({
36
54
  name: 'bizplace',
37
55
  operator: 'in',
@@ -40,54 +58,44 @@ export class InventoryQuery {
40
58
  })
41
59
  }
42
60
 
43
- const remainOnlyParam: { name: string; operator: string; value: boolean } = params?.filters?.find(
44
- (f: { name: string; operator: string; value: any }) => f.name === 'remainOnly'
45
- )
46
-
47
- let remainOnly: boolean = false
48
- if (typeof remainOnlyParam?.value !== 'undefined') {
49
- remainOnly = remainOnlyParam.value
50
- params.filters = params.filters.filter(
51
- (f: { name: string; operator: string; value: any }) => f.name !== 'remainOnly'
52
- )
53
- }
61
+ const remainOnly: boolean = remainOnlyParam?.value || false
54
62
 
55
- const unlockOnlyParam: { name: string; operator: string; value: boolean } = params?.filters?.find(
56
- (f: { name: string; operator: string; value: any }) => f.name === 'unlockOnly'
57
- )
58
-
59
- let unlockOnly: boolean = false
60
- if (typeof unlockOnlyParam?.value !== 'undefined') {
61
- unlockOnly = unlockOnlyParam.value
62
- params.filters = params.filters.filter(
63
- (f: { name: string; operator: string; value: any }) => f.name !== 'unlockOnly'
64
- )
65
- }
66
-
67
- const qb: SelectQueryBuilder<Inventory> = getRepository(Inventory).createQueryBuilder('iv')
63
+ // Define Query data
64
+ const qb: SelectQueryBuilder<Inventory> = tx.getRepository(Inventory).createQueryBuilder('inventory')
68
65
  buildQuery(qb, params, context)
69
66
 
70
- qb.leftJoinAndSelect('iv.bizplace', 'bizplace')
71
- .leftJoinAndSelect('iv.product', 'product')
72
- .leftJoinAndSelect('iv.warehouse', 'warehouse')
73
- .leftJoinAndSelect('iv.location', 'location')
74
- .leftJoin('iv.inventoryItems', 'ivi')
75
- .loadRelationCountAndMap('iv.inventoryItemCount', 'iv.inventoryItems', 'ivic', qb =>
76
- qb.andWhere('ivic.status = :ivicStatus', {
77
- ivicStatus: INVENTORY_STATUS.STORED
78
- })
67
+ qb.leftJoinAndSelect('inventory.bizplace', 'bizplace')
68
+ .leftJoinAndSelect('inventory.product', 'product')
69
+ .leftJoinAndSelect('product.productDetails', 'productDetail', 'productDetail.id = inventory.product_detail_id')
70
+ .leftJoinAndSelect('inventory.warehouse', 'warehouse')
71
+ .leftJoinAndSelect('inventory.location', 'location')
72
+ .leftJoinAndSelect('inventory.creator', 'creator')
73
+ .leftJoinAndSelect('inventory.updater', 'updater')
74
+
75
+ // To get aggregated serial number in csv and total number of stored serial number
76
+ .leftJoinAndSelect(
77
+ subQuery => {
78
+ return subQuery
79
+ .select('inventoryItems.inventory_id', 'inventory_item_inventory_id')
80
+ .addSelect(`SUM(case when "inventoryItems"."status" = 'STORED' then 1 else 0 end)`, 'inventory_item_count')
81
+ .addSelect(`string_agg(inventoryItems.serial_number, ', ')`, 'serial_numbers')
82
+ .from('inventory_items', 'inventoryItems')
83
+ .where(`inventoryItems.domain_id = :domainId`, { domainId: domain.id })
84
+ .andWhere(`inventoryItems.status = :ivicStatus`, { ivicStatus: INVENTORY_STATUS.STORED })
85
+ .groupBy('inventoryItems.inventory_id')
86
+ },
87
+ 'inventoryItems',
88
+ '"inventoryItems"."inventory_item_inventory_id" = "inventory"."id"'
79
89
  )
80
90
 
91
+ // To get inventory with remaining qty
81
92
  if (remainOnly) {
82
- qb.andWhere('iv.qty > 0')
83
- .andWhere('CASE WHEN iv.lockedQty IS NULL THEN 0 ELSE iv.lockedQty END >= 0')
84
- .andWhere('iv.qty - CASE WHEN iv.lockedQty IS NULL THEN 0 ELSE iv.lockedQty END > 0')
85
- }
86
-
87
- if (unlockOnly) {
88
- qb.andWhere('CASE WHEN iv.lockedQty IS NULL THEN 0 ELSE iv.lockedQty END = 0')
93
+ qb.andWhere('inventory.qty > 0')
94
+ .andWhere('CASE WHEN inventory.lockedQty IS NULL THEN 0 ELSE inventory.lockedQty END >= 0')
95
+ .andWhere('inventory.qty - CASE WHEN inventory.lockedQty IS NULL THEN 0 ELSE inventory.lockedQty END > 0')
89
96
  }
90
97
 
98
+ // Filter based on multiple product parameters and allow to search in csv format
91
99
  if (productFilters) {
92
100
  let productFilterValue = `%${productFilters.value.toLowerCase()}%`
93
101
  qb.andWhere(qb => {
@@ -95,7 +103,7 @@ export class InventoryQuery {
95
103
  .subQuery()
96
104
  .select()
97
105
  .from(Product, `products`)
98
- .where(`products.id = iv.product_id`)
106
+ .where(`products.id = Inventory.product_id`) // @chrislim Does the uppercase I in Inventory affect? I can see the rest are in lowercase i
99
107
  .andWhere(
100
108
  new Brackets(qb => {
101
109
  qb.where('Lower(products.sku) LIKE :productInfo', { productInfo: productFilterValue })
@@ -109,12 +117,13 @@ export class InventoryQuery {
109
117
  })
110
118
  }
111
119
 
120
+ // Apply sorting based on child data
112
121
  if (sortings?.length !== 0) {
113
122
  const arrChildSortData = ['bizplace', 'product', 'location', 'warehouse', 'zone']
114
123
  const sort = (sortings || []).reduce(
115
124
  (acc, sort) => ({
116
125
  ...acc,
117
- [arrChildSortData.indexOf(sort.name) >= 0 ? sort.name + '.name' : 'iv.' + sort.name]: sort.desc
126
+ [arrChildSortData.indexOf(sort.name) >= 0 ? sort.name + '.name' : 'inventory.' + sort.name]: sort.desc
118
127
  ? 'DESC'
119
128
  : 'ASC'
120
129
  }),
@@ -124,45 +133,28 @@ export class InventoryQuery {
124
133
  }
125
134
 
126
135
  if (locationSortingRules?.length > 0) {
127
- locationSortingRules.forEach((rule: { name: string; desc: boolean }) => {
128
- qb.addOrderBy(`location.${rule.name}`, rule.desc ? 'DESC' : 'ASC')
129
- })
136
+ locationSortingRules.forEach((rule) => { qb.addOrderBy(`location.${rule.name}`, rule.desc ? 'DESC' : 'ASC') })
130
137
  }
131
138
 
132
- let [items, total] = await qb.getManyAndCount()
133
- items = await Promise.all(
134
- items.map(async (item: Inventory) => {
135
- let [productDetails, inventoryItems] = await Promise.all([
136
- getRepository(ProductDetail).find({
137
- where: {
138
- product: item.product.id,
139
- packingType: item.packingType,
140
- packingSize: item.packingSize
141
- }
142
- }),
143
- tx.query(
144
- `
145
- SELECT string_agg(ii.serial_number, ', ') AS "serialNumbers"
146
- FROM inventory_items ii
147
- WHERE ii.inventory_id = $1
148
- GROUP BY ii.inventory_id
149
- `,
150
- [item.id]
151
- )
152
- ])
139
+ // Fetch all row for exporting
140
+ if (exportItem != true && page && limit) {
141
+ qb.offset((page - 1) * limit).limit(limit)
142
+ }
153
143
 
154
- item.product['productDetails'] = productDetails
155
- return {
156
- ...item,
157
- remainQty: item.qty - (item.lockedQty ? item.lockedQty : 0),
158
- remainUomValue: item.uomValue - (item.lockedUomValue ? item.lockedUomValue : 0),
159
- serialNumbers: inventoryItems[0]?.serialNumbers
160
- }
161
- })
162
- )
144
+ let items = (await qb.getRawMany()).map(item => {
145
+ return {
146
+ ...new Inventory(item),
147
+ serialNumbers: item.serial_numbers
148
+ }
149
+ })
150
+ let total = await qb.getCount()
163
151
 
164
- return { items, total }
152
+ return {
153
+ items,
154
+ total
155
+ }
165
156
  } catch (error) {
157
+ logger.error(`inventory-query[inventories]: ${error}`)
166
158
  throw error
167
159
  }
168
160
  }
@@ -653,7 +645,7 @@ export class InventoryQuery {
653
645
 
654
646
  const productBundleSettings: ProductBundleSetting[] = await getRepository(ProductBundleSetting).find({
655
647
  where: { productBundle: productBundleId },
656
- relations: ['product', 'productBundle']
648
+ relations: ['product', 'productDetail', 'productBundle']
657
649
  })
658
650
 
659
651
  if (!productBundleSettings.length) {
@@ -664,6 +656,7 @@ export class InventoryQuery {
664
656
  buildQuery(qb, params, context)
665
657
 
666
658
  qb.select('iv.product_id', 'productId')
659
+ .addSelect('iv.product_detail_id', 'productDetailId')
667
660
  .addSelect('iv.batch_id', 'batchId')
668
661
  .addSelect('iv.batch_id_ref', 'batchIdRef')
669
662
  .addSelect('iv.packing_type', 'packingType')
@@ -692,6 +685,7 @@ export class InventoryQuery {
692
685
  productIds: productBundleSettings.map(productBundle => productBundle.product.id)
693
686
  })
694
687
  .groupBy('iv.product_id')
688
+ .addGroupBy('iv.product_detail_id')
695
689
  .addGroupBy('iv.batch_id')
696
690
  .addGroupBy('iv.batch_id_ref')
697
691
  .addGroupBy('iv.packing_type')
@@ -720,6 +714,7 @@ export class InventoryQuery {
720
714
  return {
721
715
  id: pbs.id,
722
716
  productId: pbs.product.id,
717
+ productDetailId: pbs.productDetail.id,
723
718
  bundleId: pbs.productBundle.id,
724
719
  bundleQty: pbs.bundleQty,
725
720
  releaseQty: bundleReleaseQty * pbs.bundleQty,
@@ -763,145 +758,6 @@ export class InventoryQuery {
763
758
  return { bundleGroup, bundleSetting }
764
759
  }
765
760
 
766
- @Directive('@privilege(category: "inventory", privilege: "query")')
767
- @Query(returns => InventoryList)
768
- async inventoriesForExport(
769
- @Ctx() context: any,
770
- @Arg('filters', type => [Filter], { nullable: true }) filters?: Filter[],
771
- @Arg('pagination', type => Pagination, { nullable: true }) pagination?: Pagination,
772
- @Arg('sortings', type => [Sorting], { nullable: true }) sortings?: Sorting[],
773
- @Arg('locationSortingRules', type => [Sorting], { nullable: true }) locationSortingRules?: Sorting[]
774
- ): Promise<InventoryList> {
775
- const { domain, user }: { domain: Domain; user: User } = context.state
776
- const { page, limit }: { page: number; limit: number } = pagination
777
-
778
- try {
779
- const productFilters = filters.find(x => x.name == 'product_info')
780
- filters = filters.filter(x => x.name != 'product_info')
781
- const params = { filters, pagination }
782
-
783
- if (!params.filters.find((filter: any) => filter.name === 'bizplace')) {
784
- throw new Error('Please select a customer for export.')
785
- }
786
-
787
- const remainOnlyParam: { name: string; operator: string; value: boolean } = params?.filters?.find(
788
- (f: { name: string; operator: string; value: any }) => f.name === 'remainOnly'
789
- )
790
-
791
- let remainOnly: boolean = false
792
- if (typeof remainOnlyParam?.value !== 'undefined') {
793
- remainOnly = remainOnlyParam.value
794
- params.filters = params.filters.filter(
795
- (f: { name: string; operator: string; value: any }) => f.name !== 'remainOnly'
796
- )
797
- }
798
-
799
- const unlockOnlyParam: { name: string; operator: string; value: boolean } = params?.filters?.find(
800
- (f: { name: string; operator: string; value: any }) => f.name === 'unlockOnly'
801
- )
802
-
803
- let unlockOnly: boolean = false
804
- if (typeof unlockOnlyParam?.value !== 'undefined') {
805
- unlockOnly = unlockOnlyParam.value
806
- params.filters = params.filters.filter(
807
- (f: { name: string; operator: string; value: any }) => f.name !== 'unlockOnly'
808
- )
809
- }
810
-
811
- const qb: SelectQueryBuilder<Inventory> = getRepository(Inventory).createQueryBuilder('Inventory')
812
- buildQuery(qb, params, context)
813
-
814
- qb.leftJoinAndSelect('Inventory.bizplace', 'Bizplace')
815
- .leftJoinAndSelect('Inventory.product', 'Product')
816
- .leftJoinAndSelect('Inventory.warehouse', 'Warehouse')
817
- .leftJoinAndSelect('Inventory.location', 'Location')
818
- .leftJoinAndSelect('Inventory.creator', 'Creator')
819
- .leftJoinAndSelect('Inventory.updater', 'Updater')
820
- .leftJoinAndSelect(
821
- subQuery => {
822
- return subQuery
823
- .select('ii.inventory_id', 'inventory_id')
824
- .addSelect(`string_agg(ii.serial_number, ', ')`, 'serial_numbers')
825
- .from('inventory_items', 'ii')
826
- .where(`ii.domain_id = :domainId`, { domainId: domain.id })
827
- .groupBy('ii.inventory_id')
828
- },
829
- 'ii2',
830
- 'ii2.inventory_id = Inventory.id'
831
- )
832
-
833
- if (remainOnly) {
834
- qb.andWhere('Inventory.qty > 0')
835
- .andWhere('CASE WHEN Inventory.locked_qty IS NULL THEN 0 ELSE Inventory.locked_qty END >= 0')
836
- .andWhere('Inventory.qty - CASE WHEN Inventory.locked_qty IS NULL THEN 0 ELSE Inventory.locked_qty END > 0')
837
- }
838
-
839
- if (unlockOnly) {
840
- qb.andWhere('CASE WHEN Inventory.locked_qty IS NULL THEN 0 ELSE Inventory.locked_qty END = 0')
841
- }
842
-
843
- if (productFilters) {
844
- let productFilterValue = `%${productFilters.value.toLowerCase()}%`
845
- qb.andWhere(qb => {
846
- const subQuery = qb
847
- .subQuery()
848
- .select()
849
- .from(Product, `products`)
850
- .where(`products.id = Inventory.product_id`)
851
- .andWhere(
852
- new Brackets(qb => {
853
- qb.where('Lower(products.sku) LIKE :productInfo', { productInfo: productFilterValue })
854
- .orWhere('Lower(products.name) LIKE :productInfo', { productInfo: productFilterValue })
855
- .orWhere('Lower(products.description) LIKE :productInfo', { productInfo: productFilterValue })
856
- .orWhere('Lower(products.brand) LIKE :productInfo', { productInfo: productFilterValue })
857
- })
858
- )
859
- .getQuery()
860
- return `EXISTS ${subQuery}`
861
- })
862
- }
863
-
864
- if (sortings?.length !== 0) {
865
- const arrChildSortData = ['bizplace', 'product', 'location', 'warehouse', 'zone']
866
- const sort = (sortings || []).reduce(
867
- (acc, sort) => ({
868
- ...acc,
869
- [arrChildSortData.indexOf(sort.name) >= 0 ? sort.name + '.name' : 'Inventory.' + sort.name]: sort.desc
870
- ? 'DESC'
871
- : 'ASC'
872
- }),
873
- {}
874
- )
875
- qb.orderBy(sort)
876
- }
877
-
878
- if (locationSortingRules?.length > 0) {
879
- locationSortingRules.forEach((rule: { name: string; desc: boolean }) => {
880
- qb.addOrderBy(`location.${rule.name}`, rule.desc ? 'DESC' : 'ASC')
881
- })
882
- }
883
-
884
- let items = await qb
885
- .offset((page - 1) * limit)
886
- .limit(limit)
887
- .getRawMany()
888
-
889
- let total = await qb.getCount()
890
-
891
- return {
892
- items: items.map(item => {
893
- return {
894
- ...new Inventory(item),
895
- serialNumbers: item.serial_numbers
896
- }
897
- }),
898
- total
899
- }
900
- } catch (error) {
901
- throw error
902
- }
903
- }
904
-
905
761
  @FieldResolver(type => Domain)
906
762
  async domain(@Root() inventory: Inventory): Promise<Domain> {
907
763
  return await getRepository(Domain).findOne(inventory.domainId)
@@ -210,6 +210,9 @@ export class Inventory {
210
210
  @Field({ nullable: true })
211
211
  productId: string
212
212
 
213
+ @Field({ nullable: true })
214
+ productDetailId: string
215
+
213
216
  @Field({ nullable: true })
214
217
  productName: string
215
218
 
@@ -295,46 +298,46 @@ export class Inventory {
295
298
 
296
299
  constructor(obj?) {
297
300
  if (obj) {
298
- this.id = obj.Inventory_id
301
+ this.id = obj.inventory_id
299
302
  this.bizplace = {
300
- id: obj.Bizplace_id,
301
- name: obj.Bizplace_name,
302
- description: obj.Bizplace_description
303
+ id: obj.bizplace_id,
304
+ name: obj.bizplace_name,
305
+ description: obj.bizplace_description
303
306
  }
304
307
  this.product = new Product(obj)
305
308
  this.location = new Location(obj)
306
309
  this.warehouse = new Warehouse(obj)
307
- this.name = obj.Inventory_name
308
- this.palletId = obj.Inventory_pallet_id
309
- this.batchId = obj.Inventory_batch_id
310
- this.refOrderId = obj.Inventory_ref_order_id
311
- this.orderProductId = obj.Inventory_order_product_id
312
- this.zone = obj.Inventory_zone
313
- this.costPrice = obj.Inventory_cost_price
314
- this.sellPrice = obj.Inventory_sell_price
315
- this.packingType = obj.Inventory_packing_type
316
- this.unit = obj.Inventory_unit
317
- this.uom = obj.Inventory_uom
318
- this.uomValue = obj.Inventory_uom_value
319
- this.lockedUomValue = obj.Inventory_locked_uom_value
320
- this.qty = obj.Inventory_qty
321
- this.lockedQty = obj.Inventory_locked_qty
322
- this.lastSeq = obj.Inventory_last_seq
323
- this.description = obj.Inventory_description
324
- this.status = obj.Inventory_status
325
- this.otherRef = obj.Inventory_other_ref
326
- this.remark = obj.Inventory_remark
327
- this.createdAt = obj.Inventory_created_at
328
- this.updatedAt = obj.Inventory_updated_at
329
- this.expirationDate = obj.Inventory_expiration_date
330
- this.unitCost = obj.Inventory_unit_cost
331
- this.manufactureYear = obj.Inventory_manufacture_year
332
- this.manufactureDate = obj.Inventory_manufacture_date
333
- this.batchIdRef = obj.Inventory_batch_id_ref
334
- this.cartonId = obj.Inventory_carton_id
335
- this.packingSize = obj.Inventory_packing_size
336
- this.creatorId = obj.Inventory_creator_id
337
- this.updaterId = obj.Inventory_updater_id
310
+ this.name = obj.inventory_name
311
+ this.palletId = obj.inventory_pallet_id
312
+ this.batchId = obj.inventory_batch_id
313
+ this.refOrderId = obj.inventory_ref_order_id
314
+ this.orderProductId = obj.inventory_order_product_id
315
+ this.zone = obj.inventory_zone
316
+ this.costPrice = obj.inventory_cost_price
317
+ this.sellPrice = obj.inventory_sell_price
318
+ this.packingType = obj.inventory_packing_type
319
+ this.unit = obj.inventory_unit
320
+ this.uom = obj.inventory_uom
321
+ this.uomValue = obj.inventory_uom_value
322
+ this.lockedUomValue = obj.inventory_locked_uom_value
323
+ this.qty = obj.inventory_qty
324
+ this.lockedQty = obj.inventory_locked_qty
325
+ this.lastSeq = obj.inventory_last_seq
326
+ this.description = obj.inventory_description
327
+ this.status = obj.inventory_status
328
+ this.otherRef = obj.inventory_other_ref
329
+ this.remark = obj.inventory_remark
330
+ this.createdAt = obj.inventory_created_at
331
+ this.updatedAt = obj.inventory_updated_at
332
+ this.expirationDate = obj.inventory_expiration_date
333
+ this.unitCost = obj.inventory_unit_cost
334
+ this.manufactureYear = obj.inventory_manufacture_year
335
+ this.manufactureDate = obj.inventory_manufacture_date
336
+ this.batchIdRef = obj.inventory_batch_id_ref
337
+ this.cartonId = obj.inventory_carton_id
338
+ this.packingSize = obj.inventory_packing_size
339
+ this.creatorId = obj.inventory_creator_id
340
+ this.updaterId = obj.inventory_updater_id
338
341
  }
339
342
  }
340
343
  }