@things-factory/operato-wms 3.8.1 → 3.8.2

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.
@@ -280,7 +280,13 @@ class TransferInventory extends connect(store)(localize(i18next)(PageView)) {
280
280
  <label class="content">${this?._selectedInventory?.packingType || '-'}</label>
281
281
 
282
282
  <label class="content-title">${i18next.t('label.qty')}</label>
283
- <label class="content">${this?._selectedInventory?.qty || '-'}</label>
283
+ <label class="content">${(this?._selectedInventory?.qty || 0).toString()}</label>
284
+
285
+ <label class="content-title">${i18next.t('label.reserve_qty')}</label>
286
+ <label class="content">${(this?._selectedInventory?.lockedQty || 0).toString()}</label>
287
+
288
+ <label class="content-title">${i18next.t('label.available_qty')}</label>
289
+ <label class="content">${(this?._selectedInventory?.availableQty || 0).toString()}</label>
284
290
 
285
291
  <!-- <input name="fromLocationName" readonly /> -->
286
292
  </fieldset>
@@ -299,11 +305,11 @@ class TransferInventory extends connect(store)(localize(i18next)(PageView)) {
299
305
  this.qtyInput.value = 0
300
306
  }
301
307
  if (this._selectedInventory) {
302
- if (this._selectedInventory.qty > parseInt(this.qtyInput.value)) {
308
+ if (this._selectedInventory.availableQty > parseInt(this.qtyInput.value)) {
303
309
  this._requireNewId = true
304
310
  } else {
305
- if (parseInt(this.qtyInput.value) > this._selectedInventory.qty) {
306
- this.qtyInput.value = this._selectedInventory.qty
311
+ if (parseInt(this.qtyInput.value) > this._selectedInventory.availableQty) {
312
+ this.qtyInput.value = this._selectedInventory.availableQty
307
313
  }
308
314
  this._requireNewId = false
309
315
  }
@@ -396,6 +402,8 @@ class TransferInventory extends connect(store)(localize(i18next)(PageView)) {
396
402
  'packingType',
397
403
  'packingSize',
398
404
  'qty',
405
+ 'lockedQty',
406
+ 'availableQty',
399
407
  'expirationDate'
400
408
  ]
401
409
  },
@@ -480,6 +488,20 @@ class TransferInventory extends connect(store)(localize(i18next)(PageView)) {
480
488
  header: i18next.t('field.qty'),
481
489
  width: 60
482
490
  },
491
+ {
492
+ type: 'integer',
493
+ name: 'lockedQty',
494
+ label: true,
495
+ header: i18next.t('field.reserve_qty'),
496
+ width: 60
497
+ },
498
+ {
499
+ type: 'integer',
500
+ name: 'availableQty',
501
+ label: true,
502
+ header: i18next.t('field.available_qty'),
503
+ width: 60
504
+ },
483
505
  {
484
506
  type: 'date',
485
507
  name: 'expirationDate',
@@ -568,7 +590,7 @@ class TransferInventory extends connect(store)(localize(i18next)(PageView)) {
568
590
  return {
569
591
  ...record,
570
592
  sku: record.product.sku,
571
- qty: record.qty - record.lockedQty > 0 ? record.qty - record.lockedQty : 0
593
+ availableQty: record.qty - (record.lockedQty > 0 ? record.lockedQty : 0)
572
594
  }
573
595
  })
574
596
  }
@@ -654,7 +676,11 @@ class TransferInventory extends connect(store)(localize(i18next)(PageView)) {
654
676
  throw new Error(i18next.t('text.please_select_an_inventory'))
655
677
  }
656
678
 
657
- if (!this.qtyInput.value > 0) {
679
+ if (!(this._selectedInventory.availableQty > 0)) {
680
+ throw new Error(i18next.t('text.not_enough_available_qty'))
681
+ }
682
+
683
+ if (!parseInt(this.qtyInput?.value || 0) > 0) {
658
684
  throw new Error(i18next.t('text.please_enter_transfer_qty'))
659
685
  }
660
686
 
@@ -571,7 +571,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
571
571
  const filters = await this.searchForm.getQueryFilters()
572
572
  const response = await client.query({
573
573
  query: gql`
574
- query inventories($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
574
+ query inventories($filters: [Filter!]!, $pagination: Pagination, $sortings: [Sorting!]!) {
575
575
  inventories(filters: $filters, pagination: $pagination, sortings: $sortings) {
576
576
  items {
577
577
  id
@@ -828,13 +828,12 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
828
828
  data = await this.fetchInventoriesForExport()
829
829
  }
830
830
 
831
- let [product, bizplace] = await Promise.all([
831
+ let [product, bizplace, location] = await Promise.all([
832
832
  this.fetchProduct(bizplaceFilters),
833
- this.fetchBizplaces([{ ...bizplaceFilters[0], name: 'bizplace' }])
833
+ this.fetchBizplaces([{ ...bizplaceFilters[0], name: 'bizplace' }]),
834
+ this.fetchLocation()
834
835
  ])
835
836
 
836
- let location = this.fetchLocation()
837
-
838
837
  headerSetting = headerSetting.map(column => {
839
838
  switch (column.key) {
840
839
  case 'bizplace.name':
@@ -845,7 +844,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
845
844
  return { ...itm, name: `(${itm.sku}) ${itm.name} - ${itm.description}` }
846
845
  })
847
846
  break
848
- case 'location':
847
+ case 'location.name':
849
848
  column.arrData = location
850
849
  break
851
850
  default:
@@ -891,7 +890,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
891
890
  async fetchBizplaces(bizplace = []) {
892
891
  const response = await client.query({
893
892
  query: gql`
894
- query bizplaces($filters: [Filter!]) {
893
+ query bizplaces($filters: [Filter!]!) {
895
894
  bizplaces(filters: $filters) {
896
895
  items {
897
896
  id
@@ -911,7 +910,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
911
910
  bizplace[0].name = 'bizplace'
912
911
  const response = await client.query({
913
912
  query: gql`
914
- query productsByBizplace($filters: [Filter!]) {
913
+ query productsByBizplace($filters: [Filter!]!) {
915
914
  productsByBizplace(filters: $filters) {
916
915
  items {
917
916
  id
@@ -933,7 +932,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
933
932
  async fetchLocation() {
934
933
  const response = await client.query({
935
934
  query: gql`
936
- query locations($filters: [Filter!]) {
935
+ query locations($filters: [Filter!]!) {
937
936
  locations(filters: $filters) {
938
937
  items {
939
938
  id
@@ -475,6 +475,7 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
475
475
  id
476
476
  batchId
477
477
  packingType
478
+ releaseQty
478
479
  product {
479
480
  name
480
481
  sku
@@ -549,7 +550,8 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
549
550
  auxValue1: product.auxValue1 || '',
550
551
  auxUnit2: product.auxUnit2 || '',
551
552
  auxValue2: product.auxValue2 || '',
552
- bizplaceId: releaseGood.bizplace.id
553
+ bizplaceId: releaseGood.bizplace.id,
554
+ printQty: oi.releaseQty || 0
553
555
  }
554
556
 
555
557
  if (product.productDetails && product.productDetails.length) {
@@ -28,6 +28,7 @@ exports.productLabelReport = {
28
28
  WHERE "bizplace_id" = '${bizplaceId}'
29
29
  ${type ? `AND "type" ilike '%${type}%'` : ''}
30
30
  AND "date"::date BETWEEN '${fromDate}' AND '${toDate}'
31
+ ORDER BY type ASC, date ASC
31
32
  `);
32
33
  // @farishelmi any usage for this function? If no please remove.
33
34
  /*
@@ -1 +1 @@
1
- {"version":3,"file":"product-label-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/product-label-report.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AAEvC,+DAAsE;AAGzD,QAAA,kBAAkB,GAAG;IAChC,KAAK,CAAC,kBAAkB,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;;QAC9D,IAAI;YACF,MAAM,EAAE,MAAM,EAAE,GAAuB,OAAO,CAAC,KAAK,CAAA;YACpD,uDAAuD;YACvD,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,KAAK,CAAA;YAC9E,MAAM,IAAI,GAAG,MAAA,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,0CAAE,KAAK,CAAA;YACrE,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,KAAK,CAAA;YAC5E,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,KAAK,CAAA;YAExE,IAAI,CAAC,UAAU,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM;gBAAE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAA;YAEzE,MAAM,KAAK,GAAG,MAAM,IAAA,uBAAa,EAAC,uBAAQ,CAAC,CAAC,KAAK,CAAC;;;;;;;uDAOD,4BAAa,CAAC,qBAAqB;oCACtD,MAAM,CAAC,EAAE;;iCAEZ,UAAU;UACjC,IAAI,CAAC,CAAC,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE;oCAChB,QAAQ,UAAU,MAAM;OACrD,CAAC,CAAA;YAEF,gEAAgE;YAChE;;;;;;;;;;;;cAYE;YAEF,OAAO;gBACL,KAAK;gBACL,KAAK,EAAE,CAAC;aACT,CAAA;SACF;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"product-label-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/product-label-report.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AAEvC,+DAAsE;AAGzD,QAAA,kBAAkB,GAAG;IAChC,KAAK,CAAC,kBAAkB,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;;QAC9D,IAAI;YACF,MAAM,EAAE,MAAM,EAAE,GAAuB,OAAO,CAAC,KAAK,CAAA;YACpD,uDAAuD;YACvD,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,KAAK,CAAA;YAC9E,MAAM,IAAI,GAAG,MAAA,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,0CAAE,KAAK,CAAA;YACrE,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,KAAK,CAAA;YAC5E,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,KAAK,CAAA;YAExE,IAAI,CAAC,UAAU,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM;gBAAE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAA;YAEzE,MAAM,KAAK,GAAG,MAAM,IAAA,uBAAa,EAAC,uBAAQ,CAAC,CAAC,KAAK,CAAC;;;;;;;uDAOD,4BAAa,CAAC,qBAAqB;oCACtD,MAAM,CAAC,EAAE;;iCAEZ,UAAU;UACjC,IAAI,CAAC,CAAC,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE;oCAChB,QAAQ,UAAU,MAAM;;OAErD,CAAC,CAAA;YAEF,gEAAgE;YAChE;;;;;;;;;;;;cAYE;YAEF,OAAO;gBACL,KAAK;gBACL,KAAK,EAAE,CAAC;aACT,CAAA;SACF;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "3.8.1",
3
+ "version": "3.8.2",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -71,7 +71,7 @@
71
71
  "@things-factory/print-ui": "^3.8.0",
72
72
  "@things-factory/product-base": "^3.8.1",
73
73
  "@things-factory/resource-ui": "^3.8.0",
74
- "@things-factory/sales-ui": "^3.8.1",
74
+ "@things-factory/sales-ui": "^3.8.2",
75
75
  "@things-factory/scene-chartjs": "^3.7.5",
76
76
  "@things-factory/scene-clock": "^3.7.5",
77
77
  "@things-factory/scene-clone": "^3.7.5",
@@ -102,11 +102,11 @@
102
102
  "@things-factory/system-ui": "^3.8.0",
103
103
  "@things-factory/transport-base": "^3.8.0",
104
104
  "@things-factory/tutorial-ui": "^3.8.0",
105
- "@things-factory/warehouse-base": "^3.8.1",
106
- "@things-factory/worksheet-base": "^3.8.1"
105
+ "@things-factory/warehouse-base": "^3.8.2",
106
+ "@things-factory/worksheet-base": "^3.8.2"
107
107
  },
108
108
  "devDependencies": {
109
109
  "@things-factory/builder": "^3.7.5"
110
110
  },
111
- "gitHead": "2f2534de2c0866a693f6ec9949b35a5a0e65065f"
111
+ "gitHead": "d2f935bdad2321ef93780978e593157ef0c1eb52"
112
112
  }
@@ -28,6 +28,7 @@ export const productLabelReport = {
28
28
  WHERE "bizplace_id" = '${bizplaceId}'
29
29
  ${type ? `AND "type" ilike '%${type}%'` : ''}
30
30
  AND "date"::date BETWEEN '${fromDate}' AND '${toDate}'
31
+ ORDER BY type ASC, date ASC
31
32
  `)
32
33
 
33
34
  // @farishelmi any usage for this function? If no please remove.
@@ -545,6 +545,7 @@
545
545
  "label.attention_to": "attention to",
546
546
  "label.availabel_pallet_qty": "available pallet qty",
547
547
  "label.available_qty": "available qty",
548
+ "label.reserve_qty": "reserve qty",
548
549
  "label.bag": "bag",
549
550
  "label.balance": "balance",
550
551
  "label.batch_and_product": "batch and product",
@@ -583,6 +583,7 @@
583
583
  "label.attention_to": "[ko] attention to",
584
584
  "label.availabel_pallet_qty": "사용 가능 파레트 수량",
585
585
  "label.available_qty": "사용가능 수량",
586
+ "label.reserve_qty": "[ko] reserve qty",
586
587
  "label.bag_crates_carton_ibc_drums_pails": "bag/crates/carton/ibc/drums/pails",
587
588
  "label.bag": "백",
588
589
  "label.balance": "잔고",
@@ -560,6 +560,7 @@
560
560
  "label.attention_to": "[ms] attention to",
561
561
  "label.availabel_pallet_qty": "baki kuantiti palet",
562
562
  "label.available_qty": "baki kuantiti",
563
+ "label.reserve_qty": "[ms] reserve qty",
563
564
  "label.bag": "beg",
564
565
  "label.balance": "baki",
565
566
  "label.batch_and_product": "batch and product",
@@ -540,6 +540,7 @@
540
540
  "label.attention_to": "[zh] attention to",
541
541
  "label.availabel_pallet_qty": "available pallet qty",
542
542
  "label.available_qty": "available qty",
543
+ "label.reserve_qty": "[zh] reserve qty",
543
544
  "label.bag": "bag",
544
545
  "label.balance": "balance",
545
546
  "label.batch_and_product": "batch and product",