@things-factory/warehouse-base 5.0.14 → 6.0.0-alpha.0
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/controllers/ecommerce/ecommerce-controller.js +1 -1
- package/dist-server/controllers/ecommerce/ecommerce-controller.js.map +1 -1
- package/dist-server/controllers/ecommerce/sellercraft-controller.js +64 -60
- package/dist-server/controllers/ecommerce/sellercraft-controller.js.map +1 -1
- package/dist-server/controllers/warehouse-controller.js +7 -5
- package/dist-server/controllers/warehouse-controller.js.map +1 -1
- package/dist-server/service/inventory/inventory-mutation.js +6 -6
- package/dist-server/service/inventory/inventory-mutation.js.map +1 -1
- package/dist-server/service/inventory/inventory-query.js +217 -195
- package/dist-server/service/inventory/inventory-query.js.map +1 -1
- package/dist-server/service/inventory/inventory-types.js +14 -15
- package/dist-server/service/inventory/inventory-types.js.map +1 -1
- package/dist-server/service/inventory/inventory.js +62 -42
- package/dist-server/service/inventory/inventory.js.map +1 -1
- package/dist-server/service/inventory-change/inventory-change-mutation.js +252 -216
- package/dist-server/service/inventory-change/inventory-change-mutation.js.map +1 -1
- package/dist-server/service/inventory-change/inventory-change-query.js +6 -7
- package/dist-server/service/inventory-change/inventory-change-query.js.map +1 -1
- package/dist-server/service/inventory-change/inventory-change.js +7 -7
- package/dist-server/service/inventory-change/inventory-change.js.map +1 -1
- package/dist-server/service/inventory-history/inventory-history-mutation.js +1 -1
- package/dist-server/service/inventory-history/inventory-history-mutation.js.map +1 -1
- package/dist-server/service/inventory-history/inventory-history-query.js +89 -99
- package/dist-server/service/inventory-history/inventory-history-query.js.map +1 -1
- package/dist-server/service/inventory-history/inventory-history-types.js +3 -3
- package/dist-server/service/inventory-history/inventory-history-types.js.map +1 -1
- package/dist-server/service/inventory-history/inventory-history.js +7 -7
- package/dist-server/service/inventory-history/inventory-history.js.map +1 -1
- package/dist-server/service/inventory-item/inventory-item-mutation.js +10 -10
- package/dist-server/service/inventory-item/inventory-item-mutation.js.map +1 -1
- package/dist-server/service/inventory-item/inventory-item-query.js +18 -17
- package/dist-server/service/inventory-item/inventory-item-query.js.map +1 -1
- package/dist-server/service/inventory-item/inventory-item-type.js +4 -5
- package/dist-server/service/inventory-item/inventory-item-type.js.map +1 -1
- package/dist-server/service/inventory-item/inventory-item.js +5 -5
- package/dist-server/service/inventory-item/inventory-item.js.map +1 -1
- package/dist-server/service/inventory-item-change/inventory-item-change-mutation.js +4 -4
- package/dist-server/service/inventory-item-change/inventory-item-change-mutation.js.map +1 -1
- package/dist-server/service/inventory-item-change/inventory-item-change-query.js +7 -9
- package/dist-server/service/inventory-item-change/inventory-item-change-query.js.map +1 -1
- package/dist-server/service/inventory-item-change/inventory-item-change-type.js +6 -7
- package/dist-server/service/inventory-item-change/inventory-item-change-type.js.map +1 -1
- package/dist-server/service/inventory-item-change/inventory-item-change.js +3 -4
- package/dist-server/service/inventory-item-change/inventory-item-change.js.map +1 -1
- package/dist-server/service/inventory-product/inventory-product-mutation.js +4 -4
- package/dist-server/service/inventory-product/inventory-product-mutation.js.map +1 -1
- package/dist-server/service/inventory-product/inventory-product-query.js +7 -9
- package/dist-server/service/inventory-product/inventory-product-query.js.map +1 -1
- package/dist-server/service/inventory-product/inventory-product-type.js +1 -2
- package/dist-server/service/inventory-product/inventory-product-type.js.map +1 -1
- package/dist-server/service/inventory-product/inventory-product.js +5 -5
- package/dist-server/service/inventory-product/inventory-product.js.map +1 -1
- package/dist-server/service/location/location-mutation.js +5 -5
- package/dist-server/service/location/location-mutation.js.map +1 -1
- package/dist-server/service/location/location-query.js +17 -19
- package/dist-server/service/location/location-query.js.map +1 -1
- package/dist-server/service/location/location-types.js +3 -3
- package/dist-server/service/location/location-types.js.map +1 -1
- package/dist-server/service/location/location.js +14 -14
- package/dist-server/service/location/location.js.map +1 -1
- package/dist-server/service/movement/movement-mutation.js +6 -5
- package/dist-server/service/movement/movement-mutation.js.map +1 -1
- package/dist-server/service/movement/movement-query.js +15 -15
- package/dist-server/service/movement/movement-query.js.map +1 -1
- package/dist-server/service/movement/movement-types.js +4 -5
- package/dist-server/service/movement/movement-types.js.map +1 -1
- package/dist-server/service/movement/movement.js +5 -5
- package/dist-server/service/movement/movement.js.map +1 -1
- package/dist-server/service/pallet/pallet-mutation.js +5 -5
- package/dist-server/service/pallet/pallet-mutation.js.map +1 -1
- package/dist-server/service/pallet/pallet-query.js +9 -11
- package/dist-server/service/pallet/pallet-query.js.map +1 -1
- package/dist-server/service/pallet/pallet-types.js +5 -6
- package/dist-server/service/pallet/pallet-types.js.map +1 -1
- package/dist-server/service/pallet/pallet.js +6 -6
- package/dist-server/service/pallet/pallet.js.map +1 -1
- package/dist-server/service/pallet-count/pallet-count-mutation.js +1 -1
- package/dist-server/service/pallet-count/pallet-count-mutation.js.map +1 -1
- package/dist-server/service/pallet-count/pallet-count-query.js +6 -8
- package/dist-server/service/pallet-count/pallet-count-query.js.map +1 -1
- package/dist-server/service/pallet-count/pallet-count.js +3 -4
- package/dist-server/service/pallet-count/pallet-count.js.map +1 -1
- package/dist-server/service/pallet-history/pallet-history-mutation.js +1 -1
- package/dist-server/service/pallet-history/pallet-history-mutation.js.map +1 -1
- package/dist-server/service/pallet-history/pallet-history-query.js +6 -8
- package/dist-server/service/pallet-history/pallet-history-query.js.map +1 -1
- package/dist-server/service/pallet-history/pallet-history.js +6 -6
- package/dist-server/service/pallet-history/pallet-history.js.map +1 -1
- package/dist-server/service/reduced-inventory-history/reduced-inventory-history.js +1 -1
- package/dist-server/service/reduced-inventory-history/reduced-inventory-history.js.map +1 -1
- package/dist-server/service/tote/tote-mutation.js +4 -4
- package/dist-server/service/tote/tote-mutation.js.map +1 -1
- package/dist-server/service/tote/tote-query.js +12 -13
- package/dist-server/service/tote/tote-query.js.map +1 -1
- package/dist-server/service/tote/tote-types.js +2 -3
- package/dist-server/service/tote/tote-types.js.map +1 -1
- package/dist-server/service/tote/tote.js +5 -5
- package/dist-server/service/tote/tote.js.map +1 -1
- package/dist-server/service/warehouse/warehouse-mutation.js +1 -1
- package/dist-server/service/warehouse/warehouse-mutation.js.map +1 -1
- package/dist-server/service/warehouse/warehouse-query.js +9 -10
- package/dist-server/service/warehouse/warehouse-query.js.map +1 -1
- package/dist-server/service/warehouse/warehouse.js +12 -12
- package/dist-server/service/warehouse/warehouse.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/dist-server/utils/inventory-util.js +16 -16
- package/dist-server/utils/inventory-util.js.map +1 -1
- package/package.json +8 -8
- package/server/controllers/ecommerce/ecommerce-controller.ts +1 -1
- package/server/controllers/ecommerce/sellercraft-controller.ts +75 -65
- package/server/controllers/warehouse-controller.ts +9 -4
- package/server/service/inventory/inventory-mutation.ts +28 -24
- package/server/service/inventory/inventory-query.ts +269 -304
- package/server/service/inventory/inventory.ts +50 -35
- package/server/service/inventory-change/inventory-change-mutation.ts +305 -256
- package/server/service/inventory-change/inventory-change-query.ts +9 -9
- package/server/service/inventory-history/inventory-history-mutation.ts +12 -15
- package/server/service/inventory-history/inventory-history-query.ts +158 -133
- package/server/service/inventory-item/inventory-item-mutation.ts +20 -17
- package/server/service/inventory-item/inventory-item-query.ts +28 -18
- package/server/service/inventory-item-change/inventory-item-change-mutation.ts +12 -9
- package/server/service/inventory-item-change/inventory-item-change-query.ts +10 -8
- package/server/service/inventory-product/inventory-product-mutation.ts +16 -12
- package/server/service/inventory-product/inventory-product-query.ts +7 -8
- package/server/service/location/location-mutation.ts +24 -24
- package/server/service/location/location-query.ts +27 -23
- package/server/service/location/location.ts +11 -10
- package/server/service/movement/movement-mutation.ts +7 -8
- package/server/service/movement/movement-query.ts +18 -16
- package/server/service/pallet/pallet-mutation.ts +18 -20
- package/server/service/pallet/pallet-query.ts +13 -14
- package/server/service/pallet-count/pallet-count-mutation.ts +20 -17
- package/server/service/pallet-count/pallet-count-query.ts +6 -7
- package/server/service/pallet-history/pallet-history-mutation.ts +15 -15
- package/server/service/pallet-history/pallet-history-query.ts +7 -8
- package/server/service/reduced-inventory-history/reduced-inventory-history.ts +1 -1
- package/server/service/tote/tote-mutation.ts +23 -22
- package/server/service/tote/tote-query.ts +18 -14
- package/server/service/warehouse/warehouse-mutation.ts +21 -18
- package/server/service/warehouse/warehouse-query.ts +11 -11
- package/server/service/warehouse/warehouse.ts +7 -7
- package/server/utils/inventory-util.ts +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inventory-types.js","sourceRoot":"","sources":["../../../server/service/inventory/inventory-types.ts"],"names":[],"mappings":";;;;;AAAA,+CAMqB;AAErB,yDAAgD;AAChD,+DAAmE;AACnE,iDAI8B;AAE9B,2CAAuC;AAGvC,IAAa,aAAa,GAA1B,MAAa,aAAa;CAMzB,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,qBAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAC5B;AAGnB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACZ;AALH,aAAa;IADzB,IAAA,yBAAU,GAAE;GACA,aAAa,CAMzB;AANY,sCAAa;AAS1B,IAAa,cAAc,GAA3B,MAAa,cAAc;CAwH1B,CAAA;AAtHC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACf;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACb;AAGb;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DAClC,iBAAS,oBAAT,iBAAS;gDAAA;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DAC9B,iBAAS,oBAAT,iBAAS;oDAAA;AAGxB;IADC,IAAA,oBAAK,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AAC,EAAE,CAAC,CAAC,oBAAoB,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+DACtB;AAGpC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,mCAAoB,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iEACpB;AAL3B,0BAA0B;IADtC,IAAA,yBAAU,GAAE;GACA,0BAA0B,CAMtC;AANY,gEAA0B","sourcesContent":["import {\n Field,\n Float,\n InputType,\n Int,\n ObjectType\n} from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\nimport { ProductBundleSetting } from '@things-factory/product-base'\nimport {\n Domain,\n ObjectRef,\n ScalarDate\n} from '@things-factory/shell'\n\nimport { Inventory } from './inventory'\n\n@ObjectType()\nexport class InventoryList {\n @Field(type => [Inventory], { nullable: true })\n items?: Inventory[]\n\n @Field({ nullable: true })\n total?: number\n}\n\n@InputType()\nexport class InventoryPatch {\n @Field({ nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field(type => ObjectRef, { nullable: true })\n bizplace?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n refInventory?: ObjectRef\n\n @Field({ nullable: true })\n bizplaceName?: string\n\n @Field({ nullable: true })\n palletId?: string\n\n @Field({ nullable: true })\n cartonId?: string\n\n @Field({ nullable: true })\n batchId?: string\n\n @Field({ nullable: true })\n batchIdRef?: string\n\n @Field(type => ObjectRef, { nullable: true })\n product?: ObjectRef\n\n @Field({ nullable: true })\n sku?: string\n\n @Field({ nullable: true })\n brand?: string\n\n @Field({ nullable: true })\n productName?: string\n\n @Field({ nullable: true })\n productDetailId?: string\n\n @Field(type => ObjectRef, { nullable: true })\n reusablePallet?: ObjectRef\n\n @Field({ nullable: true })\n reusablePalletId?: string\n\n @Field(type => ObjectRef, { nullable: true })\n location?: ObjectRef\n\n @Field({ nullable: true })\n locationName?: string\n\n @Field(type => ObjectRef, { nullable: true })\n warehouse?: ObjectRef\n\n @Field({ nullable: true })\n warehouseName?: string\n\n @Field({ nullable: true })\n packingType?: string\n\n @Field(type => Float, { nullable: true })\n packingSize?: number\n\n @Field({ nullable: true })\n otherRef?: string\n\n @Field({ nullable: true })\n transactionType?: string\n\n @Field({ nullable: true })\n zone?: string\n\n @Field(type => Float, { nullable: true })\n weight?: number\n\n @Field({ nullable: true })\n uom?: string\n\n @Field(type => Float, { nullable: true })\n uomValue?: number\n\n @Field(type => Int, { nullable: true })\n qty?: number\n\n @Field({ nullable: true })\n status?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n remark?: string\n\n @Field({ nullable: true })\n expirationDate?: string\n\n @Field(type => ScalarDate, { nullable: true })\n manufactureDate: Date\n\n @Field(type => Float, { nullable: true })\n unitCost?: number\n\n @Field({ nullable: true })\n inventoryItemChangesJson?: string\n\n @Field({ nullable: true })\n serialNumbers?: string\n\n @Field({ nullable: true })\n updatedAt?: string\n\n @Field({ nullable: true })\n updater?: string\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@InputType()\nexport class NewInventory {\n @Field({ nullable: true })\n name?: string\n\n @Field(type => ObjectRef, { nullable: true })\n refInventory?: ObjectRef\n\n @Field({ nullable: true })\n palletId?: string\n\n @Field({ nullable: true })\n cartonId?: string\n\n @Field({ nullable: true })\n batchId?: string\n\n @Field({ nullable: true })\n batchIdRef?: string\n\n @Field(type => ObjectRef, { nullable: true })\n product?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n reusablePallet?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n location?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n warehouse?: ObjectRef\n\n @Field({ nullable: true })\n packingType?: string\n\n @Field(type => Float, { nullable: true })\n packingSize?: number\n\n @Field({ nullable: true })\n otherRef?: string\n\n @Field(type => Int, { nullable: true })\n qty?: number\n\n @Field(type => Float, { nullable: true })\n weight?: number\n\n @Field({ nullable: true })\n uom?: string\n\n @Field(type => Float, { nullable: true })\n uomValue?: number\n\n @Field(type => Float, { nullable: true })\n unitCost?: number\n\n @Field({ nullable: true })\n status?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n remark?: string\n\n @Field({ nullable: true })\n expirationDate?: string\n\n @Field(type => ScalarDate, { nullable: true })\n manufactureDate: Date\n\n @Field({ nullable: true })\n serialNumbers?: string\n}\n\n@ObjectType()\nexport class InventoryBundleGroup {\n @Field({ nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n productId?: string\n\n @Field({ nullable: true })\n productSku?: string\n\n @Field({ nullable: true })\n productName?: string\n\n @Field({ nullable: true })\n productDescription?: string\n\n @Field({ nullable: true })\n productType?: string\n\n @Field({ nullable: true })\n bundleId?: string\n\n @Field({ nullable: true })\n bundleSku?: string\n\n @Field({ nullable: true })\n bundleName?: string\n\n @Field({ nullable: true })\n bundleDescription?: string\n\n @Field(type => Int, { nullable: true })\n bundleQty?: number\n\n @Field({ nullable: true })\n batchId?: string\n\n @Field(type => Float, { nullable: true })\n remainQty?: number\n\n @Field(type => Float, { nullable: true })\n lockedQty?: number\n\n @Field(type => Float, { nullable: true })\n releaseQty?: number\n\n @Field(type => Float, { nullable: true })\n remainUomValue?: number\n\n @Field(type => Float, { nullable: true })\n lockedUomValue?: number\n\n @Field(type => Float, { nullable: true })\n releaseUomValue?: number\n\n @Field({ nullable: true })\n releaseUomValueWithUom?: string\n\n @Field({ nullable: true })\n uom?: string\n\n @Field({ nullable: true })\n packingType?: string\n\n @Field(type => Domain, { nullable: true })\n domain?: Domain\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => User, { nullable: true })\n updater?: User\n\n @Field(type => User, { nullable: true })\n creator?: User\n\n @Field({ nullable: true })\n updatedAt?: string\n\n @Field({ nullable: true })\n createdAt?: string\n}\n\n@ObjectType()\nexport class InventoryBundleGroupDetail {\n @Field(type => [InventoryBundleGroup], { nullable: true })\n bundleGroup?: InventoryBundleGroup[]\n\n @Field(type => [ProductBundleSetting], { nullable: true })\n bundleSetting?: ProductBundleSetting[]\n}\n"]}
|
|
1
|
+
{"version":3,"file":"inventory-types.js","sourceRoot":"","sources":["../../../server/service/inventory/inventory-types.ts"],"names":[],"mappings":";;;;AAAA,+CAMqB;AAErB,yDAAgD;AAChD,+DAAmE;AACnE,iDAI8B;AAE9B,2CAAuC;AAGvC,IAAa,aAAa,GAA1B,MAAa,aAAa;CAMzB,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,qBAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAC5B;AAGnB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACZ;AALH,aAAa;IADzB,IAAA,yBAAU,GAAE;GACA,aAAa,CAMzB;AANY,sCAAa;AAS1B,IAAa,cAAc,GAA3B,MAAa,cAAc;CAwH1B,CAAA;AAtHC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACf;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACb;AAGb;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAClC,iBAAS;gDAAA;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,iBAAS;oDAAA;AAGxB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACL;AAGrB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACT;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,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'@things-factory/auth-base'\nimport { ProductBundleSetting } from '@things-factory/product-base'\nimport {\n Domain,\n ObjectRef,\n ScalarDate\n} from '@things-factory/shell'\n\nimport { Inventory } from './inventory'\n\n@ObjectType()\nexport class InventoryList {\n @Field(type => [Inventory], { nullable: true })\n items?: Inventory[]\n\n @Field({ nullable: true })\n total?: number\n}\n\n@InputType()\nexport class InventoryPatch {\n @Field({ nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field(type => ObjectRef, { nullable: true })\n bizplace?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n refInventory?: ObjectRef\n\n @Field({ nullable: true })\n bizplaceName?: string\n\n @Field({ nullable: true })\n palletId?: string\n\n @Field({ nullable: true })\n cartonId?: string\n\n @Field({ nullable: true })\n batchId?: string\n\n @Field({ nullable: true })\n batchIdRef?: string\n\n @Field(type => ObjectRef, { nullable: true })\n product?: ObjectRef\n\n @Field({ nullable: true })\n sku?: string\n\n @Field({ nullable: true })\n brand?: string\n\n @Field({ nullable: true })\n productName?: string\n\n @Field({ nullable: true })\n productDetailId?: string\n\n @Field(type => ObjectRef, { nullable: true })\n reusablePallet?: ObjectRef\n\n @Field({ nullable: true })\n reusablePalletId?: string\n\n @Field(type => ObjectRef, { nullable: true })\n location?: ObjectRef\n\n @Field({ nullable: true })\n locationName?: string\n\n @Field(type => ObjectRef, { nullable: true })\n warehouse?: ObjectRef\n\n @Field({ nullable: true })\n warehouseName?: string\n\n @Field({ nullable: true })\n packingType?: string\n\n @Field(type => Float, { nullable: true })\n packingSize?: number\n\n @Field({ nullable: true })\n otherRef?: string\n\n @Field({ nullable: true })\n transactionType?: string\n\n @Field({ nullable: true })\n zone?: string\n\n @Field(type => Float, { nullable: true })\n weight?: number\n\n @Field({ nullable: true })\n uom?: string\n\n @Field(type => Float, { nullable: true })\n uomValue?: number\n\n @Field(type => Int, { nullable: true })\n qty?: number\n\n @Field({ nullable: true })\n status?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n remark?: string\n\n @Field({ nullable: true })\n expirationDate?: string\n\n @Field(type => ScalarDate, { nullable: true })\n manufactureDate: Date\n\n @Field(type => Float, { nullable: true })\n unitCost?: number\n\n @Field({ nullable: true })\n inventoryItemChangesJson?: string\n\n @Field({ nullable: true })\n serialNumbers?: string\n\n @Field({ nullable: true })\n updatedAt?: string\n\n @Field({ nullable: true })\n updater?: string\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@InputType()\nexport class NewInventory {\n @Field({ nullable: true })\n name?: string\n\n @Field(type => ObjectRef, { nullable: true })\n refInventory?: ObjectRef\n\n @Field({ nullable: true })\n palletId?: string\n\n @Field({ nullable: true })\n cartonId?: string\n\n @Field({ nullable: true })\n batchId?: string\n\n @Field({ nullable: true })\n batchIdRef?: string\n\n @Field(type => ObjectRef, { nullable: true })\n product?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n reusablePallet?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n location?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n warehouse?: ObjectRef\n\n @Field({ nullable: true })\n packingType?: string\n\n @Field(type => Float, { nullable: true })\n packingSize?: number\n\n @Field({ nullable: true })\n otherRef?: string\n\n @Field(type => Int, { nullable: true })\n qty?: number\n\n @Field(type => Float, { nullable: true })\n weight?: number\n\n @Field({ nullable: true })\n uom?: string\n\n @Field(type => Float, { nullable: true })\n uomValue?: number\n\n @Field(type => Float, { nullable: true })\n unitCost?: number\n\n @Field({ nullable: true })\n status?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n remark?: string\n\n @Field({ nullable: true })\n expirationDate?: string\n\n @Field(type => ScalarDate, { nullable: true })\n manufactureDate: Date\n\n @Field({ nullable: true })\n serialNumbers?: string\n}\n\n@ObjectType()\nexport class InventoryBundleGroup {\n @Field({ nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n productId?: string\n\n @Field({ nullable: true })\n productSku?: string\n\n @Field({ nullable: true })\n productName?: string\n\n @Field({ nullable: true })\n productDescription?: string\n\n @Field({ nullable: true })\n productType?: string\n\n @Field({ nullable: true })\n bundleId?: string\n\n @Field({ nullable: true })\n bundleSku?: string\n\n @Field({ nullable: true })\n bundleName?: string\n\n @Field({ nullable: true })\n bundleDescription?: string\n\n @Field(type => Int, { nullable: true })\n bundleQty?: number\n\n @Field({ nullable: true })\n batchId?: string\n\n @Field(type => Float, { nullable: true })\n remainQty?: number\n\n @Field(type => Float, { nullable: true })\n lockedQty?: number\n\n @Field(type => Float, { nullable: true })\n releaseQty?: number\n\n @Field(type => Float, { nullable: true })\n remainUomValue?: number\n\n @Field(type => Float, { nullable: true })\n lockedUomValue?: number\n\n @Field(type => Float, { nullable: true })\n releaseUomValue?: number\n\n @Field({ nullable: true })\n releaseUomValueWithUom?: string\n\n @Field({ nullable: true })\n uom?: string\n\n @Field({ nullable: true })\n packingType?: string\n\n @Field(type => Domain, { nullable: true })\n domain?: Domain\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => User, { nullable: true })\n updater?: User\n\n @Field(type => User, { nullable: true })\n creator?: User\n\n @Field({ nullable: true })\n updatedAt?: string\n\n @Field({ nullable: true })\n createdAt?: string\n}\n\n@ObjectType()\nexport class InventoryBundleGroupDetail {\n @Field(type => [InventoryBundleGroup], { nullable: true })\n bundleGroup?: InventoryBundleGroup[]\n\n @Field(type => [ProductBundleSetting], { nullable: true })\n bundleSetting?: ProductBundleSetting[]\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var Inventory_1, _a, _b, _c
|
|
2
|
+
var Inventory_1, _a, _b, _c;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Inventory = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
@@ -17,46 +17,46 @@ const warehouse_1 = require("../warehouse/warehouse");
|
|
|
17
17
|
let Inventory = Inventory_1 = class Inventory {
|
|
18
18
|
constructor(obj) {
|
|
19
19
|
if (obj) {
|
|
20
|
-
this.id = obj.
|
|
20
|
+
this.id = obj.inventory_id;
|
|
21
21
|
this.bizplace = {
|
|
22
|
-
id: obj.
|
|
23
|
-
name: obj.
|
|
24
|
-
description: obj.
|
|
22
|
+
id: obj.bizplace_id,
|
|
23
|
+
name: obj.bizplace_name,
|
|
24
|
+
description: obj.bizplace_description
|
|
25
25
|
};
|
|
26
26
|
this.product = new product_base_1.Product(obj);
|
|
27
27
|
this.location = new location_1.Location(obj);
|
|
28
28
|
this.warehouse = new warehouse_1.Warehouse(obj);
|
|
29
|
-
this.name = obj.
|
|
30
|
-
this.palletId = obj.
|
|
31
|
-
this.batchId = obj.
|
|
32
|
-
this.refOrderId = obj.
|
|
33
|
-
this.orderProductId = obj.
|
|
34
|
-
this.zone = obj.
|
|
35
|
-
this.costPrice = obj.
|
|
36
|
-
this.sellPrice = obj.
|
|
37
|
-
this.packingType = obj.
|
|
38
|
-
this.unit = obj.
|
|
39
|
-
this.uom = obj.
|
|
40
|
-
this.uomValue = obj.
|
|
41
|
-
this.lockedUomValue = obj.
|
|
42
|
-
this.qty = obj.
|
|
43
|
-
this.lockedQty = obj.
|
|
44
|
-
this.lastSeq = obj.
|
|
45
|
-
this.description = obj.
|
|
46
|
-
this.status = obj.
|
|
47
|
-
this.otherRef = obj.
|
|
48
|
-
this.remark = obj.
|
|
49
|
-
this.createdAt = obj.
|
|
50
|
-
this.updatedAt = obj.
|
|
51
|
-
this.expirationDate = obj.
|
|
52
|
-
this.unitCost = obj.
|
|
53
|
-
this.manufactureYear = obj.
|
|
54
|
-
this.manufactureDate = obj.
|
|
55
|
-
this.batchIdRef = obj.
|
|
56
|
-
this.cartonId = obj.
|
|
57
|
-
this.packingSize = obj.
|
|
58
|
-
this.creatorId = obj.
|
|
59
|
-
this.updaterId = obj.
|
|
29
|
+
this.name = obj.inventory_name;
|
|
30
|
+
this.palletId = obj.inventory_pallet_id;
|
|
31
|
+
this.batchId = obj.inventory_batch_id;
|
|
32
|
+
this.refOrderId = obj.inventory_ref_order_id;
|
|
33
|
+
this.orderProductId = obj.inventory_order_product_id;
|
|
34
|
+
this.zone = obj.inventory_zone;
|
|
35
|
+
this.costPrice = obj.inventory_cost_price;
|
|
36
|
+
this.sellPrice = obj.inventory_sell_price;
|
|
37
|
+
this.packingType = obj.inventory_packing_type;
|
|
38
|
+
this.unit = obj.inventory_unit;
|
|
39
|
+
this.uom = obj.inventory_uom;
|
|
40
|
+
this.uomValue = obj.inventory_uom_value;
|
|
41
|
+
this.lockedUomValue = obj.inventory_locked_uom_value;
|
|
42
|
+
this.qty = obj.inventory_qty;
|
|
43
|
+
this.lockedQty = obj.inventory_locked_qty;
|
|
44
|
+
this.lastSeq = obj.inventory_last_seq;
|
|
45
|
+
this.description = obj.inventory_description;
|
|
46
|
+
this.status = obj.inventory_status;
|
|
47
|
+
this.otherRef = obj.inventory_other_ref;
|
|
48
|
+
this.remark = obj.inventory_remark;
|
|
49
|
+
this.createdAt = obj.inventory_created_at;
|
|
50
|
+
this.updatedAt = obj.inventory_updated_at;
|
|
51
|
+
this.expirationDate = obj.inventory_expiration_date;
|
|
52
|
+
this.unitCost = obj.inventory_unit_cost;
|
|
53
|
+
this.manufactureYear = obj.inventory_manufacture_year;
|
|
54
|
+
this.manufactureDate = obj.inventory_manufacture_date;
|
|
55
|
+
this.batchIdRef = obj.inventory_batch_id_ref;
|
|
56
|
+
this.cartonId = obj.inventory_carton_id;
|
|
57
|
+
this.packingSize = obj.inventory_packing_size;
|
|
58
|
+
this.creatorId = obj.inventory_creator_id;
|
|
59
|
+
this.updaterId = obj.inventory_updater_id;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
};
|
|
@@ -68,7 +68,7 @@ tslib_1.__decorate([
|
|
|
68
68
|
tslib_1.__decorate([
|
|
69
69
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
70
70
|
(0, type_graphql_1.Field)(type => shell_1.Domain),
|
|
71
|
-
tslib_1.__metadata("design:type",
|
|
71
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
72
72
|
], Inventory.prototype, "domain", void 0);
|
|
73
73
|
tslib_1.__decorate([
|
|
74
74
|
(0, typeorm_1.RelationId)((inventory) => inventory.domain),
|
|
@@ -77,7 +77,7 @@ tslib_1.__decorate([
|
|
|
77
77
|
tslib_1.__decorate([
|
|
78
78
|
(0, typeorm_1.ManyToOne)(type => biz_base_1.Bizplace, { nullable: true }),
|
|
79
79
|
(0, type_graphql_1.Field)(type => biz_base_1.Bizplace, { nullable: true }),
|
|
80
|
-
tslib_1.__metadata("design:type", typeof (
|
|
80
|
+
tslib_1.__metadata("design:type", typeof (_a = typeof biz_base_1.Bizplace !== "undefined" && biz_base_1.Bizplace) === "function" ? _a : Object)
|
|
81
81
|
], Inventory.prototype, "bizplace", void 0);
|
|
82
82
|
tslib_1.__decorate([
|
|
83
83
|
(0, typeorm_1.ManyToOne)(type => Inventory_1),
|
|
@@ -137,12 +137,12 @@ tslib_1.__decorate([
|
|
|
137
137
|
tslib_1.__decorate([
|
|
138
138
|
(0, typeorm_1.ManyToOne)(type => product_base_1.Product, { nullable: true }),
|
|
139
139
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
140
|
-
tslib_1.__metadata("design:type", typeof (
|
|
140
|
+
tslib_1.__metadata("design:type", typeof (_b = typeof product_base_1.Product !== "undefined" && product_base_1.Product) === "function" ? _b : Object)
|
|
141
141
|
], Inventory.prototype, "product", void 0);
|
|
142
142
|
tslib_1.__decorate([
|
|
143
143
|
(0, typeorm_1.ManyToOne)(type => product_base_1.ProductDetail, { nullable: true }),
|
|
144
144
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
145
|
-
tslib_1.__metadata("design:type", typeof (
|
|
145
|
+
tslib_1.__metadata("design:type", typeof (_c = typeof product_base_1.ProductDetail !== "undefined" && product_base_1.ProductDetail) === "function" ? _c : Object)
|
|
146
146
|
], Inventory.prototype, "productDetail", void 0);
|
|
147
147
|
tslib_1.__decorate([
|
|
148
148
|
(0, typeorm_1.ManyToOne)(type => warehouse_1.Warehouse, { nullable: true }),
|
|
@@ -309,7 +309,7 @@ tslib_1.__decorate([
|
|
|
309
309
|
nullable: true
|
|
310
310
|
}),
|
|
311
311
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
312
|
-
tslib_1.__metadata("design:type",
|
|
312
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
313
313
|
], Inventory.prototype, "creator", void 0);
|
|
314
314
|
tslib_1.__decorate([
|
|
315
315
|
(0, typeorm_1.RelationId)((inventory) => inventory.creator),
|
|
@@ -320,7 +320,7 @@ tslib_1.__decorate([
|
|
|
320
320
|
nullable: true
|
|
321
321
|
}),
|
|
322
322
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
323
|
-
tslib_1.__metadata("design:type",
|
|
323
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
324
324
|
], Inventory.prototype, "updater", void 0);
|
|
325
325
|
tslib_1.__decorate([
|
|
326
326
|
(0, typeorm_1.RelationId)((inventory) => inventory.updater),
|
|
@@ -360,6 +360,26 @@ tslib_1.__decorate([
|
|
|
360
360
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
361
361
|
tslib_1.__metadata("design:type", Number)
|
|
362
362
|
], Inventory.prototype, "inventoryItemCount", void 0);
|
|
363
|
+
tslib_1.__decorate([
|
|
364
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
365
|
+
tslib_1.__metadata("design:type", Number)
|
|
366
|
+
], Inventory.prototype, "availableQty", void 0);
|
|
367
|
+
tslib_1.__decorate([
|
|
368
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
369
|
+
tslib_1.__metadata("design:type", Number)
|
|
370
|
+
], Inventory.prototype, "releaseQty", void 0);
|
|
371
|
+
tslib_1.__decorate([
|
|
372
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
373
|
+
tslib_1.__metadata("design:type", Number)
|
|
374
|
+
], Inventory.prototype, "quarantineQty", void 0);
|
|
375
|
+
tslib_1.__decorate([
|
|
376
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
377
|
+
tslib_1.__metadata("design:type", Number)
|
|
378
|
+
], Inventory.prototype, "reserveQty", void 0);
|
|
379
|
+
tslib_1.__decorate([
|
|
380
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
381
|
+
tslib_1.__metadata("design:type", Number)
|
|
382
|
+
], Inventory.prototype, "warehouseQty", void 0);
|
|
363
383
|
Inventory = Inventory_1 = tslib_1.__decorate([
|
|
364
384
|
(0, typeorm_1.Entity)(),
|
|
365
385
|
(0, typeorm_1.Index)('ix_inventory_0', (inventory) => [inventory.domain, inventory.palletId], {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inventory.js","sourceRoot":"","sources":["../../../server/service/inventory/inventory.ts"],"names":[],"mappings":";;;;;AAAA,+CAAgE;AAChE,qCAUgB;AAEhB,yDAAgD;AAChD,uDAAmD;AACnD,+DAAqE;AACrE,iDAA0D;AAE1D,2EAAsE;AACtE,qEAAgE;AAChE,mDAA+C;AAC/C,6CAAyC;AACzC,sDAAkD;AAOlD,IAAa,SAAS,iBAAtB,MAAa,SAAS;IA2PpB,YAAY,GAAI;QACd,IAAI,GAAG,EAAE;YACP,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,YAAY,CAAA;YAC1B,IAAI,CAAC,QAAQ,GAAG;gBACd,EAAE,EAAE,GAAG,CAAC,WAAW;gBACnB,IAAI,EAAE,GAAG,CAAC,aAAa;gBACvB,WAAW,EAAE,GAAG,CAAC,oBAAoB;aAC/B,CAAA;YACR,IAAI,CAAC,OAAO,GAAG,IAAI,sBAAO,CAAC,GAAG,CAAC,CAAA;YAC/B,IAAI,CAAC,QAAQ,GAAG,IAAI,mBAAQ,CAAC,GAAG,CAAC,CAAA;YACjC,IAAI,CAAC,SAAS,GAAG,IAAI,qBAAS,CAAC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,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACf,IAAI;4CAAA;AAIf;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACf,IAAI;4CAAA;AAGf;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACI;AAG9B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACH;AAGvB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACV;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACA;AAzPf,SAAS;IALrB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,gBAAgB,EAAE,CAAC,SAAoB,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,EAAE;QACzF,MAAM,EAAE,IAAI;KACb,CAAC;IACD,IAAA,yBAAU,GAAE;;GACA,SAAS,CAuSrB;AAvSY,8BAAS","sourcesContent":["import { Field, Float, ID, Int, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n OneToMany,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Bizplace } from '@things-factory/biz-base'\nimport { Product, ProductDetail } from '@things-factory/product-base'\nimport { Domain, ScalarDate } from '@things-factory/shell'\n\nimport { InventoryChange } from '../inventory-change/inventory-change'\nimport { InventoryItem } from '../inventory-item/inventory-item'\nimport { Location } from '../location/location'\nimport { Pallet } from '../pallet/pallet'\nimport { Warehouse } from '../warehouse/warehouse'\n\n@Entity()\n@Index('ix_inventory_0', (inventory: Inventory) => [inventory.domain, inventory.palletId], {\n unique: true\n})\n@ObjectType()\nexport class Inventory {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain: Domain\n\n @RelationId((inventory: Inventory) => inventory.domain)\n domainId: string\n\n @ManyToOne(type => Bizplace, { nullable: true })\n @Field(type => Bizplace, { nullable: true })\n bizplace: Bizplace\n\n @ManyToOne(type => Inventory)\n @Field(type => Inventory)\n refInventory: Inventory\n\n @Column()\n @Field()\n name: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n palletId: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n cartonId: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n batchId: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n batchIdRef: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n refOrderId: string\n\n /**\n * Expected: Putting ManyToOne relation with OrderProduct to find out unloaded inventories within unloading process\n * Because if there's inventory which has same batch id with others but different product id\n * then can't find out exact same inventory by batch id as a condition to find\n *\n * Problem: Because of circular dependency problem.\n * OrderProduct entity comes from sales-base module and the module is looking for warehouse-base module\n *\n * Solution: Putting plain orderProductId field instead of ManyToOne relation for this release (2.2.0-beta)\n */\n @Column({ nullable: true })\n @Field({ nullable: true })\n orderProductId: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n orderInventoryId: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n orderVasId: string\n\n @ManyToOne(type => Pallet, { nullable: true })\n @Field(type => Pallet, { nullable: true })\n reusablePallet: Pallet\n\n @ManyToOne(type => Product, { nullable: true })\n @Field({ nullable: true })\n product: Product\n\n /**\n * To be updated to remove nullable. once all process that links to inventory has been updated to use product detail instead of product\n */\n @ManyToOne(type => ProductDetail, { nullable: true })\n @Field({ nullable: true })\n productDetail: ProductDetail\n\n @ManyToOne(type => Warehouse, { nullable: true })\n @Field(type => Warehouse, { nullable: true })\n warehouse: Warehouse\n\n @ManyToOne(type => Location)\n @Field(type => Location, { nullable: true })\n location: Location\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n zone: string\n\n @Column('int', { nullable: true })\n @Field({ nullable: true })\n manufactureYear: number\n\n @Column('date', { nullable: true })\n @Field(type => ScalarDate, { nullable: true })\n manufactureDate: Date\n\n @Column('float', { nullable: true })\n @Field({ nullable: true })\n costPrice: number\n\n @Column('float', { nullable: true })\n @Field({ nullable: true })\n sellPrice: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n packingType: string\n\n @Column('float', { nullable: true, default: 1 })\n @Field({ nullable: true })\n packingSize: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n unit: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n uom: string\n\n @Column('float', { nullable: true })\n @Field({ nullable: true })\n uomValue: number\n\n @Column('float', { nullable: true })\n @Field({ nullable: true })\n lockedUomValue: number\n\n @Column('float')\n @Field({ nullable: true })\n qty: number\n\n @Column('float', { nullable: true })\n @Field({ nullable: true })\n lockedQty: number\n\n @Column('float', { nullable: true })\n @Field({ nullable: true })\n unitCost: number\n\n @Column({ default: 0 })\n @Field()\n lastSeq: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n status: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n otherRef: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n remark: string\n\n @OneToMany(type => InventoryChange, inventoryChanges => inventoryChanges.inventory)\n @Field(type => [InventoryChange], { nullable: true })\n inventoryChanges: InventoryChange[]\n\n @OneToMany(type => InventoryItem, inventoryItems => inventoryItems.inventory)\n @Field(type => [InventoryItem], { nullable: true })\n inventoryItems: InventoryItem[]\n\n @Field({ nullable: true })\n serialNumbers?: string\n\n @Column('date', { nullable: true })\n @Field(type => ScalarDate, { nullable: true })\n expirationDate: Date\n\n @Field({ nullable: true })\n productId: string\n\n @Field({ nullable: true })\n productName: string\n\n @Field({ nullable: true })\n productSKU: string\n\n @Field({ nullable: true })\n productBrand: string\n\n @Field(type => Float, { nullable: true })\n averageUnitCost: number\n\n @Field(type => Float, { nullable: true })\n remainQty: number\n\n @Field(type => Int, { nullable: true })\n nonLoadedQty: number\n\n @Field(type => Float, { nullable: true })\n nonLoadedUomValue: number\n\n @Field({ nullable: true })\n initialInboundAt: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n creator: User\n\n @RelationId((inventory: Inventory) => inventory.creator)\n creatorId: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater: User\n\n @RelationId((inventory: Inventory) => inventory.updater)\n updaterId: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt: Date\n\n @Field({ nullable: true })\n remainUomValueWithUom?: string\n\n @Field({ nullable: true })\n remainUomValue?: number\n\n @Field({ nullable: true })\n changeCount?: number\n\n @Field({ nullable: true })\n binLocation?: string\n\n @Field({ nullable: true })\n orderNo?: string\n\n @Field({ nullable: true })\n inventoryItemCount: number\n\n constructor(obj?) {\n if (obj) {\n this.id = obj.Inventory_id\n this.bizplace = {\n id: obj.Bizplace_id,\n name: obj.Bizplace_name,\n description: obj.Bizplace_description\n } as any\n this.product = new Product(obj)\n this.location = new Location(obj)\n this.warehouse = new Warehouse(obj)\n this.name = obj.Inventory_name\n this.palletId = obj.Inventory_pallet_id\n this.batchId = obj.Inventory_batch_id\n this.refOrderId = obj.Inventory_ref_order_id\n this.orderProductId = obj.Inventory_order_product_id\n this.zone = obj.Inventory_zone\n this.costPrice = obj.Inventory_cost_price\n this.sellPrice = obj.Inventory_sell_price\n this.packingType = obj.Inventory_packing_type\n this.unit = obj.Inventory_unit\n this.uom = obj.Inventory_uom\n this.uomValue = obj.Inventory_uom_value\n this.lockedUomValue = obj.Inventory_locked_uom_value\n this.qty = obj.Inventory_qty\n this.lockedQty = obj.Inventory_locked_qty\n this.lastSeq = obj.Inventory_last_seq\n this.description = obj.Inventory_description\n this.status = obj.Inventory_status\n this.otherRef = obj.Inventory_other_ref\n this.remark = obj.Inventory_remark\n this.createdAt = obj.Inventory_created_at\n this.updatedAt = obj.Inventory_updated_at\n this.expirationDate = obj.Inventory_expiration_date\n this.unitCost = obj.Inventory_unit_cost\n this.manufactureYear = obj.Inventory_manufacture_year\n this.manufactureDate = obj.Inventory_manufacture_date\n this.batchIdRef = obj.Inventory_batch_id_ref\n this.cartonId = obj.Inventory_carton_id\n this.packingSize = obj.Inventory_packing_size\n this.creatorId = obj.Inventory_creator_id\n this.updaterId = obj.Inventory_updater_id\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"inventory.js","sourceRoot":"","sources":["../../../server/service/inventory/inventory.ts"],"names":[],"mappings":";;;;;AAAA,+CAAgE;AAChE,qCAUgB;AAEhB,yDAAgD;AAChD,uDAAmD;AACnD,+DAAqE;AACrE,iDAA0D;AAE1D,2EAAsE;AACtE,qEAAgE;AAChE,mDAA+C;AAC/C,6CAAyC;AACzC,sDAAkD;AAOlD,IAAa,SAAS,iBAAtB,MAAa,SAAS;IA0QpB,YAAY,GAAI;QACd,IAAI,GAAG,EAAE;YACP,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,YAAY,CAAA;YAC1B,IAAI,CAAC,QAAQ,GAAG;gBACd,EAAE,EAAE,GAAG,CAAC,WAAW;gBACnB,IAAI,EAAE,GAAG,CAAC,aAAa;gBACvB,WAAW,EAAE,GAAG,CAAC,oBAAoB;aAC/B,CAAA;YACR,IAAI,CAAC,OAAO,GAAG,IAAI,sBAAO,CAAC,GAAG,CAAC,CAAA;YAC/B,IAAI,CAAC,QAAQ,GAAG,IAAI,mBAAQ,CAAC,GAAG,CAAC,CAAA;YACjC,IAAI,CA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TrB;AAtTY,8BAAS","sourcesContent":["import { Field, Float, ID, Int, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n OneToMany,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Bizplace } from '@things-factory/biz-base'\nimport { Product, ProductDetail } from '@things-factory/product-base'\nimport { Domain, ScalarDate } from '@things-factory/shell'\n\nimport { InventoryChange } from '../inventory-change/inventory-change'\nimport { InventoryItem } from '../inventory-item/inventory-item'\nimport { Location } from '../location/location'\nimport { Pallet } from '../pallet/pallet'\nimport { Warehouse } from '../warehouse/warehouse'\n\n@Entity()\n@Index('ix_inventory_0', (inventory: Inventory) => [inventory.domain, inventory.palletId], {\n unique: true\n})\n@ObjectType()\nexport class Inventory {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain: Domain\n\n @RelationId((inventory: Inventory) => inventory.domain)\n domainId: string\n\n @ManyToOne(type => Bizplace, { nullable: true })\n @Field(type => Bizplace, { nullable: true })\n bizplace: Bizplace\n\n @ManyToOne(type => Inventory)\n @Field(type => Inventory)\n refInventory: Inventory\n\n @Column()\n @Field()\n name: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n palletId: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n cartonId: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n batchId: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n batchIdRef: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n refOrderId: string\n\n /**\n * Expected: Putting ManyToOne relation with OrderProduct to find out unloaded inventories within unloading process\n * Because if there's inventory which has same batch id with others but different product id\n * then can't find out exact same inventory by batch id as a condition to find\n *\n * Problem: Because of circular dependency problem.\n * OrderProduct entity comes from sales-base module and the module is looking for warehouse-base module\n *\n * Solution: Putting plain orderProductId field instead of ManyToOne relation for this release (2.2.0-beta)\n */\n @Column({ nullable: true })\n @Field({ nullable: true })\n orderProductId: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n orderInventoryId: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n orderVasId: string\n\n @ManyToOne(type => Pallet, { nullable: true })\n @Field(type => Pallet, { nullable: true })\n reusablePallet: Pallet\n\n @ManyToOne(type => Product, { nullable: true })\n @Field({ nullable: true })\n product: Product\n\n /**\n * To be updated to remove nullable. once all process that links to inventory has been updated to use product detail instead of product\n */\n @ManyToOne(type => ProductDetail, { nullable: true })\n @Field({ nullable: true })\n productDetail: ProductDetail\n\n @ManyToOne(type => Warehouse, { nullable: true })\n @Field(type => Warehouse, { nullable: true })\n warehouse: Warehouse\n\n @ManyToOne(type => Location)\n @Field(type => Location, { nullable: true })\n location: Location\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n zone: string\n\n @Column('int', { nullable: true })\n @Field({ nullable: true })\n manufactureYear: number\n\n @Column('date', { nullable: true })\n @Field(type => ScalarDate, { nullable: true })\n manufactureDate: Date\n\n @Column('float', { nullable: true })\n @Field({ nullable: true })\n costPrice: number\n\n @Column('float', { nullable: true })\n @Field({ nullable: true })\n sellPrice: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n packingType: string\n\n @Column('float', { nullable: true, default: 1 })\n @Field({ nullable: true })\n packingSize: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n unit: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n uom: string\n\n @Column('float', { nullable: true })\n @Field({ nullable: true })\n uomValue: number\n\n @Column('float', { nullable: true })\n @Field({ nullable: true })\n lockedUomValue: number\n\n @Column('float')\n @Field({ nullable: true })\n qty: number\n\n @Column('float', { nullable: true })\n @Field({ nullable: true })\n lockedQty: number\n\n @Column('float', { nullable: true })\n @Field({ nullable: true })\n unitCost: number\n\n @Column({ default: 0 })\n @Field()\n lastSeq: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n status: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n otherRef: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n remark: string\n\n @OneToMany(type => InventoryChange, inventoryChanges => inventoryChanges.inventory)\n @Field(type => [InventoryChange], { nullable: true })\n inventoryChanges: InventoryChange[]\n\n @OneToMany(type => InventoryItem, inventoryItems => inventoryItems.inventory)\n @Field(type => [InventoryItem], { nullable: true })\n inventoryItems: InventoryItem[]\n\n @Field({ nullable: true })\n serialNumbers?: string\n\n @Column('date', { nullable: true })\n @Field(type => ScalarDate, { nullable: true })\n expirationDate: Date\n\n @Field({ nullable: true })\n productId: string\n\n @Field({ nullable: true })\n productName: string\n\n @Field({ nullable: true })\n productSKU: string\n\n @Field({ nullable: true })\n productBrand: string\n\n @Field(type => Float, { nullable: true })\n averageUnitCost: number\n\n @Field(type => Float, { nullable: true })\n remainQty: number\n\n @Field(type => Int, { nullable: true })\n nonLoadedQty: number\n\n @Field(type => Float, { nullable: true })\n nonLoadedUomValue: number\n\n @Field({ nullable: true })\n initialInboundAt: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n creator: User\n\n @RelationId((inventory: Inventory) => inventory.creator)\n creatorId: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater: User\n\n @RelationId((inventory: Inventory) => inventory.updater)\n updaterId: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt: Date\n\n @Field({ nullable: true })\n remainUomValueWithUom?: string\n\n @Field({ nullable: true })\n remainUomValue?: number\n\n @Field({ nullable: true })\n changeCount?: number\n\n @Field({ nullable: true })\n binLocation?: string\n\n @Field({ nullable: true })\n orderNo?: string\n\n @Field({ nullable: true })\n inventoryItemCount: number\n\n @Field({ nullable: true })\n availableQty: number\n\n @Field({ nullable: true })\n releaseQty: number\n\n @Field({ nullable: true })\n quarantineQty: number\n\n @Field({ nullable: true })\n reserveQty: number\n\n @Field({ nullable: true })\n warehouseQty: number\n\n constructor(obj?) {\n if (obj) {\n this.id = obj.inventory_id\n this.bizplace = {\n id: obj.bizplace_id,\n name: obj.bizplace_name,\n description: obj.bizplace_description\n } as any\n this.product = new Product(obj)\n this.location = new Location(obj)\n this.warehouse = new Warehouse(obj)\n this.name = obj.inventory_name\n this.palletId = obj.inventory_pallet_id\n this.batchId = obj.inventory_batch_id\n this.refOrderId = obj.inventory_ref_order_id\n this.orderProductId = obj.inventory_order_product_id\n this.zone = obj.inventory_zone\n this.costPrice = obj.inventory_cost_price\n this.sellPrice = obj.inventory_sell_price\n this.packingType = obj.inventory_packing_type\n this.unit = obj.inventory_unit\n this.uom = obj.inventory_uom\n this.uomValue = obj.inventory_uom_value\n this.lockedUomValue = obj.inventory_locked_uom_value\n this.qty = obj.inventory_qty\n this.lockedQty = obj.inventory_locked_qty\n this.lastSeq = obj.inventory_last_seq\n this.description = obj.inventory_description\n this.status = obj.inventory_status\n this.otherRef = obj.inventory_other_ref\n this.remark = obj.inventory_remark\n this.createdAt = obj.inventory_created_at\n this.updatedAt = obj.inventory_updated_at\n this.expirationDate = obj.inventory_expiration_date\n this.unitCost = obj.inventory_unit_cost\n this.manufactureYear = obj.inventory_manufacture_year\n this.manufactureDate = obj.inventory_manufacture_date\n this.batchIdRef = obj.inventory_batch_id_ref\n this.cartonId = obj.inventory_carton_id\n this.packingSize = obj.inventory_packing_size\n this.creatorId = obj.inventory_creator_id\n this.updaterId = obj.inventory_updater_id\n }\n }\n}\n"]}
|