@things-factory/operato-wms 4.3.257 → 4.3.258

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.
@@ -1976,7 +1976,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1976
1976
  changedColumn === 'newUomValue' ||
1977
1977
  changedColumn === 'outputQty' ||
1978
1978
  changedColumn === 'remark'
1979
- )
1979
+ ) {
1980
1980
  if (!changeRecord.productId && !changeRecord.productDetailId && !changeRecord.batchId) {
1981
1981
  delete event.detail.after[event.detail.column.name]
1982
1982
  const index = this.vasGrist.dirtyData.records.findIndex(
@@ -1990,12 +1990,13 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1990
1990
  })
1991
1991
  )
1992
1992
  }
1993
- if (changeRecord.qty <= 0 || changeRecord.vasQty <= 0 || changeRecord.outputQty <= 0) {
1994
- throw new Error(i18next.t('text.invalid_quantity_input'))
1995
1993
  }
1996
1994
  if (changedColumn === 'qty') {
1997
1995
  if (changeRecord.qty === undefined) throw new Error(i18next.t('text.there_is_no_selected_items'))
1998
1996
  // total up the qty
1997
+ if (changeRecord.qty <= 0 || isNaN(changeRecord.qty)) {
1998
+ throw new Error(i18next.t('text.invalid_quantity_input'))
1999
+ }
1999
2000
  if (this._selectBy === 'pallet') {
2000
2001
  if (
2001
2002
  ///
@@ -2049,13 +2050,11 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2049
2050
  changeRecord.vasQty = changeRecord.qty
2050
2051
  changeRecord.outputQty = initialRecord.outputQty ? initialRecord.outputQty : null
2051
2052
  //
2052
- } else if (changedColumn === 'outputQty' || changedColumn === 'vasQty' || changedColumn === 'newUomValue') {
2053
- if (changeRecord.outputQty === undefined || changeRecord.vasQty === undefined)
2054
- throw new Error(i18next.t('text.there_is_no_selected_items'))
2053
+ } else if (changedColumn === 'outputQty' || changedColumn === 'newUomValue') {
2054
+ if (changeRecord.outputQty === undefined) throw new Error(i18next.t('text.there_is_no_selected_items'))
2055
2055
  else if (
2056
2056
  changeRecord.outputQty <= 0 ||
2057
2057
  isNaN(changeRecord.outputQty) ||
2058
- changeRecord.vasQty <= 0 ||
2059
2058
  (initialRecord.newProductId && initialRecord.productId && changeRecord.newUomValue <= 0)
2060
2059
  ) {
2061
2060
  throw new Error(i18next.t('text.invalid_quantity_input'))
@@ -2068,6 +2067,14 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2068
2067
  changeRecord.newUomValue = totalUomValue
2069
2068
  }
2070
2069
  }
2070
+ } else if (changedColumn === 'vasQty') {
2071
+ if (changeRecord.vasQty <= 0 || isNaN(changeRecord.vasQty)) {
2072
+ throw new Error(i18next.t('text.invalid_quantity_input'))
2073
+ }
2074
+ } else if (changedColumn === 'outputQty') {
2075
+ if (changeRecord.outputQty <= 0 || isNaN(changeRecord.outputQty)) {
2076
+ throw new Error(i18next.t('text.invalid_quantity_input'))
2077
+ }
2071
2078
  }
2072
2079
  this._updateVasTargets()
2073
2080
  } catch (e) {
@@ -340,29 +340,31 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
340
340
  width: 140
341
341
  })
342
342
 
343
- fields = this._hasVas ? [
344
- 'hasVas',
345
- 'palletId',
346
- 'productSku',
347
- 'product',
348
- 'packingType',
349
- 'packingSize',
350
- 'batchId',
351
- 'batchIdRef',
352
- 'releaseQty',
353
- 'pickedQty',
354
- 'loadedQty'
355
- ] : [
356
- 'palletId',
357
- 'productSku',
358
- 'product',
359
- 'packingType',
360
- 'packingSize',
361
- 'batchId',
362
- 'batchIdRef',
363
- 'pickedQty',
364
- 'loadedQty'
365
- ]
343
+ fields = this._hasVas
344
+ ? [
345
+ 'hasVas',
346
+ 'palletId',
347
+ 'productSku',
348
+ 'product',
349
+ 'packingType',
350
+ 'packingSize',
351
+ 'batchId',
352
+ 'batchIdRef',
353
+ 'releaseQty',
354
+ 'pickedQty',
355
+ 'loadedQty'
356
+ ]
357
+ : [
358
+ 'palletId',
359
+ 'productSku',
360
+ 'product',
361
+ 'packingType',
362
+ 'packingSize',
363
+ 'batchId',
364
+ 'batchIdRef',
365
+ 'pickedQty',
366
+ 'loadedQty'
367
+ ]
366
368
  }
367
369
 
368
370
  if (this._hasVas) {
@@ -681,6 +683,9 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
681
683
  this.pickedProductData = { records: this.sortByNameField(this.pickedProductData) }
682
684
  //this.updateContext()
683
685
  // causes grist unable to display data
686
+ // needed to page initialized in order to display data regarding vas
687
+ this.pageInitialized()
688
+ // causes grist unable to display data
684
689
  } else {
685
690
  throw new Error(response.errors[0])
686
691
  }
@@ -928,7 +933,10 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
928
933
  ...orderInventory.inventory,
929
934
  ...orderInventory,
930
935
  pickedQty:
931
- orderInventory.type === 'VAS_ORDER' || orderInventory.releaseQty != orderInventory.pickedQty
936
+ this._hasVas &&
937
+ (orderInventory.type === 'VAS_ORDER' ||
938
+ orderInventory.pickedQty === 0 ||
939
+ orderInventory.pickedQty > orderInventory.releaseQty)
932
940
  ? orderInventory.releaseQty
933
941
  : orderInventory.pickedQty,
934
942
  product: {
@@ -445,13 +445,13 @@ class VasExecution extends connect(store)(localize(i18next)(PageView)) {
445
445
  this._showToast({ message: i18next.t('text.vas_is_completed') })
446
446
  this.clearview()
447
447
  this.updateContext()
448
- this.pageInitialized()
449
448
  navigate('vas_worksheets')
450
449
  }
451
450
  } catch (e) {
452
451
  this._showToast(e)
453
452
  }
454
453
  }
454
+
455
455
  get vasGrist() {
456
456
  return this.shadowRoot.querySelector('data-grist#vas')
457
457
  }
@@ -463,7 +463,9 @@ class VasExecution extends connect(store)(localize(i18next)(PageView)) {
463
463
  ? parseFloat(this.data?.records.map(data => data.targetVas.orderVasItems.executedAt === null).indexOf(true)) + 1
464
464
  : ''
465
465
  this.orderNoInput.value = ''
466
- this.data = {}
466
+ this.data = { records: [] }
467
+ this.incompleteVas = true
468
+ this.orderNo = ''
467
469
  }
468
470
 
469
471
  _showToast({ type, message }) {
@@ -47,7 +47,7 @@ exports.vasReport = {
47
47
  create temp table temp_vas_order_report on commit drop as (
48
48
  select * from (
49
49
  select distinct b.name as "company", rg.name as "order_no", rg.ref_no as "ref_no", p1.sku as "sku", ov.batch_id as "batch_no", ov.packing_type as "packing_type", ov.uom as "uom", ov.uom_value as "uom_value", op.release_qty as "release_qty",
50
- v.name as "vas", ovi.vas_qty as "vas_qty", p2.sku as "new_sku", ov.new_packing_type as "new_packing_type", ov.new_uom as "new_uom", ov.output_qty as "output_qty", ov.new_uom_value as "new_uom_value", w.ended_at as "completion_date",
50
+ v.id as "vas_id", v.name as "vas_name", ovi.vas_qty as "vas_qty", p2.sku as "new_sku", ov.new_packing_type as "new_packing_type", ov.new_uom as "new_uom", ov.output_qty as "output_qty", ov.new_uom_value as "new_uom_value", w.ended_at as "completion_date",
51
51
  p1.name as "old_product_name", p1.description as "old_p_description", p1.brand as "old_p_brand", p1.brand_sku as "old_p_brand_sku",
52
52
  p2.name as "new_product_name", p2.description as "new_p_description", p2.brand as "new_p_brand", p2.brand_sku as "new_p_brand_sku"
53
53
  from order_vass ov
@@ -94,7 +94,7 @@ exports.vasReport = {
94
94
  newProduct: { sku: item.new_sku }
95
95
  },
96
96
  orderVasItem: {
97
- vas: { name: item.vas },
97
+ vas: { id: item.vas_id, name: item.vas_name },
98
98
  vasQty: item.vas_qty
99
99
  },
100
100
  orderInventory: {
@@ -1 +1 @@
1
- {"version":3,"file":"vas-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/vas-report.ts"],"names":[],"mappings":";;;AAEA,uDAAmD;AAGnD,0CAAiD;AAEpC,QAAA,SAAS,GAAG;IACvB,KAAK,CAAC,SAAS,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACrD,IAAI;YACF,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;YACnD,IAAI,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,I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E,IAAI,CAAC,GAAG,EAAE;wBAC1B,UAAU,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,EAAE;qBAClC;oBACD,YAAY,EAAE;wBACZ,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE;wBACvB,MAAM,EAAE,IAAI,CAAC,OAAO;qBACrB;oBACD,cAAc,EAAE;wBACd,UAAU,EAAE,IAAI,CAAC,WAAW;qBAC7B;oBACD,SAAS,EAAE;wBACT,OAAO,EAAE,IAAI,CAAC,eAAe;qBAC9B;iBACF,CAAA;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CAAC,CAAA;YAEF,OAAO;gBACL,KAAK;gBACL,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK;aACtB,CAAA;SACF;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"vas-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/vas-report.ts"],"names":[],"mappings":";;;AAEA,uDAAmD;AAGnD,0CAAiD;AAEpC,QAAA,SAAS,GAAG;IACvB,KAAK,CAAC,SAAS,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACrD,IAAI;YACF,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;YACnD,IAAI,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA;YAC1E,IAAI,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,aAAa,CAAC,CAAA;YAC1E,IAAI,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CA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B;oBACD,SAAS,EAAE;wBACT,OAAO,EAAE,IAAI,CAAC,eAAe;qBAC9B;iBACF,CAAA;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CAAC,CAAA;YAEF,OAAO;gBACL,KAAK;gBACL,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK;aACtB,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": "4.3.257",
3
+ "version": "4.3.258",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -108,7 +108,7 @@
108
108
  "@things-factory/transport-base": "^4.3.253",
109
109
  "@things-factory/tutorial-ui": "^4.3.253",
110
110
  "@things-factory/warehouse-base": "^4.3.256",
111
- "@things-factory/worksheet-base": "^4.3.257"
111
+ "@things-factory/worksheet-base": "^4.3.258"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@things-factory/builder": "^4.3.253",
@@ -117,5 +117,5 @@
117
117
  "cypress-localstorage-commands": "^1.6.1",
118
118
  "eslint-plugin-cypress": "^2.12.1"
119
119
  },
120
- "gitHead": "c1e0f8f18b88e3d9baca5edfb6214b5f97d63a8a"
120
+ "gitHead": "db6fb3b3758ceda90678999a76c281c9ca46ccc4"
121
121
  }
@@ -15,7 +15,9 @@ export const vasReport = {
15
15
  let fromDate = params.filters.find(data => data.name === 'fromDate')
16
16
  let toDate = params.filters.find(data => data.name === 'toDate')
17
17
 
18
- if (!bizplaceFilter) { throw 'Invalid input' }
18
+ if (!bizplaceFilter) {
19
+ throw 'Invalid input'
20
+ }
19
21
 
20
22
  const bizplace: Bizplace = await tx.getRepository(Bizplace).findOne({
21
23
  id: bizplaceFilter.value
@@ -42,7 +44,7 @@ export const vasReport = {
42
44
  if (orderNo) {
43
45
  extraQueryFilter = `${extraQueryFilter} and order_no ilike '%${orderNo.value}%' `
44
46
  }
45
-
47
+
46
48
  if (fromDate) {
47
49
  extraQueryFilter = `${extraQueryFilter} and completion_date >= '%${fromDate.value}%' `
48
50
  }
@@ -56,7 +58,7 @@ export const vasReport = {
56
58
  create temp table temp_vas_order_report on commit drop as (
57
59
  select * from (
58
60
  select distinct b.name as "company", rg.name as "order_no", rg.ref_no as "ref_no", p1.sku as "sku", ov.batch_id as "batch_no", ov.packing_type as "packing_type", ov.uom as "uom", ov.uom_value as "uom_value", op.release_qty as "release_qty",
59
- v.name as "vas", ovi.vas_qty as "vas_qty", p2.sku as "new_sku", ov.new_packing_type as "new_packing_type", ov.new_uom as "new_uom", ov.output_qty as "output_qty", ov.new_uom_value as "new_uom_value", w.ended_at as "completion_date",
61
+ v.id as "vas_id", v.name as "vas_name", ovi.vas_qty as "vas_qty", p2.sku as "new_sku", ov.new_packing_type as "new_packing_type", ov.new_uom as "new_uom", ov.output_qty as "output_qty", ov.new_uom_value as "new_uom_value", w.ended_at as "completion_date",
60
62
  p1.name as "old_product_name", p1.description as "old_p_description", p1.brand as "old_p_brand", p1.brand_sku as "old_p_brand_sku",
61
63
  p2.name as "new_product_name", p2.description as "new_p_description", p2.brand as "new_p_brand", p2.brand_sku as "new_p_brand_sku"
62
64
  from order_vass ov
@@ -110,7 +112,7 @@ export const vasReport = {
110
112
  newProduct: { sku: item.new_sku }
111
113
  },
112
114
  orderVasItem: {
113
- vas: { name: item.vas },
115
+ vas: { id: item.vas_id, name: item.vas_name },
114
116
  vasQty: item.vas_qty
115
117
  },
116
118
  orderInventory: {