@things-factory/operato-wms 4.3.637 → 4.3.638

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 (91) hide show
  1. package/client/pages/adjustment/transfer-inventory.js +7 -12
  2. package/client/pages/bulk-operation/bulk-operation.js +24 -22
  3. package/client/pages/bulk-operation/validate-b2c-ro-popup.js +14 -4
  4. package/client/pages/bulk-operation/validate-gan-popup.js +26 -11
  5. package/client/pages/bulk-operation/validate-ro-popup.js +16 -6
  6. package/client/pages/components/list-view/product-list-view.js +1 -1
  7. package/client/pages/components/select-inventory-popup.js +1 -5
  8. package/client/pages/components/select-product-popup.js +4 -9
  9. package/client/pages/inbound/putaway/putaway-product.js +92 -70
  10. package/client/pages/inbound/putaway/putaway-replenishment-same-product-popup.js +10 -3
  11. package/client/pages/inbound/putaway/putaway-same-carton-popup.js +1 -1
  12. package/client/pages/inbound/putaway/putaway-worksheet-generate-popup.js +1 -1
  13. package/client/pages/inbound/putaway/undo-putaway-popup.js +19 -16
  14. package/client/pages/inbound/putaway/worksheet-putaway-return.js +1 -1
  15. package/client/pages/inbound/putaway/worksheet-putaway.js +3 -3
  16. package/client/pages/inbound/undo-unload-popup.js +1 -1
  17. package/client/pages/inbound/unload-product.js +33 -37
  18. package/client/pages/inbound/unloaded-inventories-popup.js +1 -1
  19. package/client/pages/inbound/worksheet-unloading-return.js +1 -1
  20. package/client/pages/inbound/worksheet-unloading.js +2 -2
  21. package/client/pages/inventory/inventory-adjustment.js +5 -20
  22. package/client/pages/inventory/inventory-by-product.js +43 -43
  23. package/client/pages/inventory/onhand-inventory.js +2 -2
  24. package/client/pages/inventory-check/add-extra-inventory-popup.js +2 -10
  25. package/client/pages/inventory-check/cycle-count-recheck-popup.js +2 -2
  26. package/client/pages/inventory-check/cycle-count-report.js +19 -14
  27. package/client/pages/inventory-check/inspecting-product.js +2 -14
  28. package/client/pages/order/arrival-notice/arrival-notice-detail.js +27 -23
  29. package/client/pages/order/arrival-notice/assign-buffer-location.js +2 -2
  30. package/client/pages/order/arrival-notice/check-arrived-notice.js +2 -2
  31. package/client/pages/order/arrival-notice/create-arrival-notice.js +29 -33
  32. package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +8 -8
  33. package/client/pages/order/arrival-notice/edit-product-popup.js +27 -29
  34. package/client/pages/order/arrival-notice/proceed-edit-product-popup.js +3 -3
  35. package/client/pages/order/arrival-notice/receive-arrival-notice.js +1 -1
  36. package/client/pages/order/arrival-notice/rejected-arrival-notice.js +1 -1
  37. package/client/pages/order/arrival-notice/view-product-changes-popup.js +3 -3
  38. package/client/pages/order/draft-release-good/draft-release-good-detail.js +2 -2
  39. package/client/pages/order/release-order/b2c/b2c-release-order-detail.js +91 -92
  40. package/client/pages/order/release-order/b2c/create-b2c-release-order.js +56 -61
  41. package/client/pages/order/release-order/create-release-order.js +55 -64
  42. package/client/pages/order/release-order/receive-release-order-request.js +1 -1
  43. package/client/pages/order/release-order/rejected-release-order.js +2 -2
  44. package/client/pages/order/release-order/release-extra-product-popup.js +7 -11
  45. package/client/pages/order/release-order/release-order-detail.js +116 -158
  46. package/client/pages/order/return-order/create-return-order.js +3 -16
  47. package/client/pages/order/return-order/return-order-inventory-popup.js +1 -2
  48. package/client/pages/outbound/inventory-assign-popup.js +2 -2
  49. package/client/pages/outbound/inventory-auto-assign-popup.js +1 -1
  50. package/client/pages/outbound/inventory-reassign-popup.js +6 -6
  51. package/client/pages/outbound/loading-product.js +3 -3
  52. package/client/pages/outbound/loading-v2/load-by-qty.js +2 -2
  53. package/client/pages/outbound/loading-v2/loading-execution-base.js +4 -4
  54. package/client/pages/outbound/packing-product.js +26 -7
  55. package/client/pages/outbound/picking-product.js +16 -36
  56. package/client/pages/outbound/picking-replacement-popup.js +4 -4
  57. package/client/pages/outbound/picking-v2/picking-execution-base.js +4 -8
  58. package/client/pages/outbound/sorting-product.js +7 -5
  59. package/client/pages/outbound/worksheet-batch-picking.js +43 -30
  60. package/client/pages/outbound/worksheet-loading.js +2 -2
  61. package/client/pages/outbound/worksheet-packing.js +1 -1
  62. package/client/pages/outbound/worksheet-picking.js +19 -23
  63. package/client/pages/outbound/worksheet-return.js +1 -1
  64. package/client/pages/outbound/worksheet-sorting.js +23 -12
  65. package/client/pages/outbound/worksheet-zone-picking.js +3 -3
  66. package/client/pages/report/replenishment-report.js +14 -5
  67. package/client/pages/report/volume-summary-report.js +6 -6
  68. package/dist-server/graphql/resolvers/outbound/sort-item.js +1 -1
  69. package/dist-server/graphql/resolvers/outbound/sort-item.js.map +1 -1
  70. package/dist-server/graphql/resolvers/reports/cycle-count-report.js +1 -2
  71. package/dist-server/graphql/resolvers/reports/cycle-count-report.js.map +1 -1
  72. package/dist-server/graphql/resolvers/zone-worksheet/zone-picking.js +7 -18
  73. package/dist-server/graphql/resolvers/zone-worksheet/zone-picking.js.map +1 -1
  74. package/dist-server/graphql/types/outbound/index.js +1 -1
  75. package/dist-server/graphql/types/reports/cycle-count-report.js +1 -1
  76. package/dist-server/graphql/types/reports/inbound-order-details-report.js +1 -1
  77. package/dist-server/graphql/types/reports/outbound-order-details-report.js +2 -2
  78. package/dist-server/graphql/types/zone-worksheet/index.js +1 -1
  79. package/package.json +16 -16
  80. package/server/graphql/resolvers/outbound/sort-item.ts +1 -1
  81. package/server/graphql/resolvers/reports/cycle-count-report.ts +1 -2
  82. package/server/graphql/resolvers/zone-worksheet/zone-picking.ts +8 -20
  83. package/server/graphql/types/outbound/index.ts +1 -1
  84. package/server/graphql/types/reports/cycle-count-report.ts +1 -1
  85. package/server/graphql/types/reports/inbound-order-details-report.ts +1 -1
  86. package/server/graphql/types/reports/outbound-order-details-report.ts +2 -2
  87. package/server/graphql/types/zone-worksheet/index.ts +1 -1
  88. package/translations/en.json +259 -265
  89. package/translations/ko.json +0 -1
  90. package/translations/ms.json +1463 -1580
  91. package/translations/zh.json +2150 -2354
@@ -8,18 +8,38 @@ import './putaway-replenishment-inventory-popup'
8
8
  import './putaway-replenishment-same-product-popup'
9
9
 
10
10
  import gql from 'graphql-tag'
11
- import { css, html } from 'lit-element'
11
+ import {
12
+ css,
13
+ html
14
+ } from 'lit-element'
12
15
  import { connect } from 'pwa-helpers/connect-mixin.js'
13
16
 
14
17
  import { MultiColumnFormStyles } from '@things-factory/form-ui'
15
- import { i18next, localize } from '@things-factory/i18n-base'
18
+ import {
19
+ i18next,
20
+ localize
21
+ } from '@things-factory/i18n-base'
16
22
  import { openPopup } from '@things-factory/layout-base'
17
- import { client, CustomAlert, PageView, store } from '@things-factory/shell'
23
+ import {
24
+ client,
25
+ CustomAlert,
26
+ PageView,
27
+ store
28
+ } from '@things-factory/shell'
18
29
  import { CommonButtonStyles } from '@things-factory/styles'
19
- import { isMobileDevice, sleep } from '@things-factory/utils'
30
+ import {
31
+ isMobileDevice,
32
+ sleep
33
+ } from '@things-factory/utils'
20
34
 
21
35
  import { fetchSettingRule } from '../../../fetch-setting-value'
22
- import { ARRIVAL_NOTICE, CUSTOMER_RETURN, REPLENISHMENT, WAREHOUSE_RETURN, WORKSHEET_STATUS } from '../../constants'
36
+ import {
37
+ ARRIVAL_NOTICE,
38
+ CUSTOMER_RETURN,
39
+ REPLENISHMENT,
40
+ WAREHOUSE_RETURN,
41
+ WORKSHEET_STATUS
42
+ } from '../../constants'
23
43
 
24
44
  const OPERATION_TYPE = {
25
45
  PUTAWAY: 'putaway',
@@ -194,7 +214,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
194
214
  width: 140
195
215
  },
196
216
  {
197
- type: 'float',
217
+ type: 'integer',
198
218
  name: 'qty',
199
219
  header: i18next.t('field.qty'),
200
220
  width: 80
@@ -351,48 +371,52 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
351
371
  ? html` <label>${i18next.t('label.recommend_location')}</label>
352
372
  <input name="recommendLocation" type="text" value=${this.recommendLocationName} readonly />`
353
373
  : html``}
354
- ${this._enableCartonLabel
355
- ? html` ${this.refOrderType === AVAIL_ORDER_TYPES.REPLENISHMENT.value && this._enableProductScanning
356
- ? html` <label>${i18next.t('label.product_barcode')}</label>
357
- <barcode-scanable-input
358
- name="productBarcode"
359
- without-enter
360
- custom-input
361
- ?scan-only=${this._pageSettings?.cameraScanOnly}
362
- @keypress="${async e => {
363
- if (e.keyCode === 13) {
364
- e.preventDefault()
365
- await this._putaway(e)
366
- }
367
- }}"
368
- ></barcode-scanable-input>`
369
- : html` <label>${i18next.t('label.carton_id')}</label>
370
- <barcode-scanable-input
371
- name="cartonId"
372
- custom-input
373
- ?scan-only=${this._pageSettings?.cameraScanOnly}
374
- @keypress="${async e => {
375
- if (e.keyCode === 13) {
376
- e.preventDefault()
377
- await this._putaway(e)
378
- }
379
- }}"
380
- ></barcode-scanable-input>`}`
374
+ ${this._enableCartonLabel
375
+ ? html`
376
+ ${this.refOrderType === AVAIL_ORDER_TYPES.REPLENISHMENT.value && this._enableProductScanning
377
+ ? html`
378
+ <label>${i18next.t('label.product_barcode')}</label>
379
+ <barcode-scanable-input
380
+ name="productBarcode"
381
+ without-enter
382
+ custom-input
383
+ ?scan-only=${this._pageSettings?.cameraScanOnly}
384
+ @keypress="${async e => {
385
+ if (e.keyCode === 13) {
386
+ e.preventDefault()
387
+ await this._putaway(e)
388
+ }
389
+ }}"
390
+ ></barcode-scanable-input>`
391
+ : html`
392
+ <label>${i18next.t('label.carton_id')}</label>
393
+ <barcode-scanable-input
394
+ name="cartonId"
395
+ custom-input
396
+ ?scan-only=${this._pageSettings?.cameraScanOnly}
397
+ @keypress="${async e => {
398
+ if (e.keyCode === 13) {
399
+ e.preventDefault()
400
+ await this._putaway(e)
401
+ }
402
+ }}"
403
+ ></barcode-scanable-input>`
404
+ }`
381
405
  : html`
382
- <label>${i18next.t('label.lot_id')}</label>
383
- <barcode-scanable-input
384
- name="palletId"
385
- .value=${this._pallet}
386
- custom-input
387
- ?scan-only=${this._pageSettings?.cameraScanOnly}
388
- @keypress="${async e => {
389
- if (e.keyCode === 13) {
390
- e.preventDefault()
391
- await this._putaway(e)
392
- }
393
- }}"
394
- ></barcode-scanable-input>
395
- `}
406
+ <label>${i18next.t('label.lot_id')}</label>
407
+ <barcode-scanable-input
408
+ name="palletId"
409
+ .value=${this._pallet}
410
+ custom-input
411
+ ?scan-only=${this._pageSettings?.cameraScanOnly}
412
+ @keypress="${async e => {
413
+ if (e.keyCode === 13) {
414
+ e.preventDefault()
415
+ await this._putaway(e)
416
+ }
417
+ }}"
418
+ ></barcode-scanable-input>
419
+ `}
396
420
  ${this._operationType === OPERATION_TYPE.PUTAWAY
397
421
  ? html`
398
422
  ${!this.incompleteLocationName
@@ -472,7 +496,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
472
496
  : html``}
473
497
  </fieldset>
474
498
  </form>
475
-
499
+
476
500
  <data-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.config} .data=${this.data}>
477
501
  <div slot="headroom" id="form-section">
478
502
  <form id="info-form" class="multi-column-form">
@@ -1215,9 +1239,9 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
1215
1239
 
1216
1240
  if (this._enableCartonLabel && this._enableProductScanning) {
1217
1241
  this._records.forEach(record => {
1218
- worksheetDetailNames.push(record.name)
1219
- })
1220
- } else {
1242
+ worksheetDetailNames.push(record.name);
1243
+ })
1244
+ } else {
1221
1245
  worksheetDetailNames = await this._getWorksheetDetailNames(locationDetails)
1222
1246
  }
1223
1247
 
@@ -1395,21 +1419,21 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
1395
1419
  }
1396
1420
  })
1397
1421
  } else if (this.refOrderType === AVAIL_ORDER_TYPES.REPLENISHMENT.value) {
1398
- if (this._enableProductScanning) {
1422
+ if(this._enableProductScanning) {
1399
1423
  await this._checkedScannedProduct(e)
1400
1424
  return
1401
1425
  } else {
1402
1426
  records = this.data.records
1403
- .filter(record => record.cartonId === this.getInput(this.cartonInput).value && record.status !== 'DONE')
1404
- .map(record => {
1405
- return {
1406
- name: record.name,
1407
- expirationDate: record.expirationDate,
1408
- minInboundShelfLife: record.product.minInboundShelfLife,
1409
- palletId: record.palletId,
1410
- cartonId: record.cartonId
1411
- }
1412
- })
1427
+ .filter(record => record.cartonId === this.getInput(this.cartonInput).value && record.status !== 'DONE')
1428
+ .map(record => {
1429
+ return {
1430
+ name: record.name,
1431
+ expirationDate: record.expirationDate,
1432
+ minInboundShelfLife: record.product.minInboundShelfLife,
1433
+ palletId: record.palletId,
1434
+ cartonId: record.cartonId
1435
+ }
1436
+ })
1413
1437
  }
1414
1438
  }
1415
1439
  if (records.length > 1) {
@@ -1452,7 +1476,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
1452
1476
  html`
1453
1477
  <putaway-replenishment-same-product-popup
1454
1478
  .putawayInventories="${this.data.records.filter(
1455
- record => orderProduct.some(op => op.sku === record.sku) && record.completed === false
1479
+ record => (orderProduct.some(op => op.sku === record.sku)) && record.completed === false
1456
1480
  )}"
1457
1481
  @selections="${async e => {
1458
1482
  this._selectedOrderProduct = e.detail
@@ -1509,7 +1533,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
1509
1533
  this._focusOnCartonInput()
1510
1534
  throw new Error(i18next.t('text.carton_id_is_empty'))
1511
1535
  }
1512
-
1536
+
1513
1537
  if (!this.data.records.map(record => record.cartonId).includes(cartonInputValue)) {
1514
1538
  this.getInput(this.cartonInput).value = ''
1515
1539
  this._focusOnCartonInput()
@@ -1521,7 +1545,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
1521
1545
  }
1522
1546
  }
1523
1547
 
1524
- if (!this.actualQtyInput || isNaN(parseInt(this.actualQtyInput.value))) {
1548
+ if(!this.actualQtyInput || isNaN(parseInt(this.actualQtyInput.value))) {
1525
1549
  this._focusOnActualQtyInput()
1526
1550
  throw new Error(i18next.t('text.actual_qty_is_invalid'))
1527
1551
  }
@@ -1729,9 +1753,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
1729
1753
  <undo-putaway-popup
1730
1754
  .enableCartonLabel="${this._enableCartonLabel}"
1731
1755
  .enableProductScanning="${this._enableProductScanning}"
1732
- .replenishmentId="${this.refOrderType === AVAIL_ORDER_TYPES.REPLENISHMENT.value
1733
- ? this._replenishmentId
1734
- : null}"
1756
+ .replenishmentId= "${this.refOrderType === AVAIL_ORDER_TYPES.REPLENISHMENT.value ? this._replenishmentId : null}"
1735
1757
  .orderType="${this.refOrderType}"
1736
1758
  .orderNo="${this._orderNo}"
1737
1759
  .putawayInventories="${this.data.records.filter(itm => itm.status == 'DONE')}"
@@ -1924,7 +1946,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
1924
1946
  } else if (foundOrderProducts?.length == 0 && foundParentProducts?.length > 0) {
1925
1947
  this._records.push(foundParentProducts[0])
1926
1948
  }
1927
-
1949
+
1928
1950
  if (this._records.some(record => record.expirationDate) && locationDetails) {
1929
1951
  let answer = await this._checkExpiry([this._records], locationDetails.type)
1930
1952
  if (answer) {
@@ -1933,7 +1955,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
1933
1955
  }
1934
1956
  this._transactionHandler(e)
1935
1957
  } else {
1936
- return this._showToast({ message: i18next.t('text.no_matching_product_found') })
1958
+ return this._showToast({ message: i18next.t('text.no_matching_product_found')})
1937
1959
  }
1938
1960
  }
1939
1961
 
@@ -1,10 +1,17 @@
1
1
  import '@things-factory/grist-ui'
2
2
 
3
- import { css, html, LitElement } from 'lit-element'
3
+ import {
4
+ css,
5
+ html,
6
+ LitElement
7
+ } from 'lit-element'
4
8
  import { connect } from 'pwa-helpers/connect-mixin'
5
9
 
6
10
  import { SingleColumnFormStyles } from '@things-factory/form-ui'
7
- import { i18next, localize } from '@things-factory/i18n-base'
11
+ import {
12
+ i18next,
13
+ localize
14
+ } from '@things-factory/i18n-base'
8
15
  import { store } from '@things-factory/shell'
9
16
  import { isMobileDevice } from '@things-factory/utils'
10
17
 
@@ -148,7 +155,7 @@ class PutawaySameCartonPopup extends connect(store)(localize(i18next)(LitElement
148
155
  width: 100
149
156
  },
150
157
  {
151
- type: 'float',
158
+ type: 'integer',
152
159
  name: 'qty',
153
160
  label: true,
154
161
  header: i18next.t('field.qty'),
@@ -148,7 +148,7 @@ class PutawaySameCartonPopup extends connect(store)(localize(i18next)(LitElement
148
148
  width: 100
149
149
  },
150
150
  {
151
- type: 'float',
151
+ type: 'integer',
152
152
  name: 'qty',
153
153
  label: true,
154
154
  header: i18next.t('field.qty'),
@@ -156,7 +156,7 @@ class PutawayWorksheetGeneratePopup extends localize(i18next)(LitElement) {
156
156
  width: 200
157
157
  },
158
158
  {
159
- type: 'float',
159
+ type: 'integer',
160
160
  name: 'releaseQty',
161
161
  header: i18next.t('field.release_qty'),
162
162
  width: 80
@@ -190,7 +190,7 @@ class UndoPutawayPopup extends connect(store)(localize(i18next)(LitElement)) {
190
190
  width: 100
191
191
  },
192
192
  {
193
- type: 'float',
193
+ type: 'integer',
194
194
  name: 'qty',
195
195
  label: true,
196
196
  header: i18next.t('field.qty'),
@@ -249,20 +249,25 @@ class UndoPutawayPopup extends connect(store)(localize(i18next)(LitElement)) {
249
249
  if (this.enableCartonLabel) {
250
250
  if (this.enableProductScanning && this.orderType === AVAIL_ORDER_TYPES.REPLENISHMENT.value) {
251
251
  let inventories = await this._getReplenishedInventories()
252
- const matchedInventories = inventories.filter(inventory => inventory.cartonId === this.cartonInput?.value)
253
-
252
+ const matchedInventories = inventories.filter(
253
+ inventory => inventory.cartonId === this.cartonInput?.value
254
+ )
255
+
254
256
  if (matchedInventories.length > 0) {
255
257
  targetedUndoInventories = this.putawayInventories
256
- .filter(inventory => matchedInventories.some(inv => inventory.cartonId === inv.refInventory?.cartonId))
257
- .map(inventory => {
258
- return {
259
- ...inventory,
260
- newCartonId: matchedInventories[0].cartonId
261
- }
262
- })
258
+ .filter(
259
+ inventory => matchedInventories.some(inv => inventory.cartonId === inv.refInventory?.cartonId)
260
+ )
261
+ .map( inventory => {
262
+ return {
263
+ ...inventory,
264
+ newCartonId: matchedInventories[0].cartonId
265
+ }}
266
+ )
263
267
  } else {
264
268
  targetedUndoInventories = []
265
269
  }
270
+
266
271
  } else {
267
272
  targetedUndoInventories = this.putawayInventories.filter(
268
273
  inventory => inventory.cartonId === this.cartonInput?.value
@@ -301,7 +306,7 @@ class UndoPutawayPopup extends connect(store)(localize(i18next)(LitElement)) {
301
306
  items {
302
307
  cartonId
303
308
  refInventory {
304
- cartonId
309
+ cartonId
305
310
  }
306
311
  }
307
312
  }
@@ -405,11 +410,9 @@ class UndoPutawayPopup extends connect(store)(localize(i18next)(LitElement)) {
405
410
  }
406
411
  }
407
412
 
408
- const cartonId = this.enableCartonLabel
409
- ? this.enableProductScanning
410
- ? selectedInventories[0].newCartonId
411
- : selectedInventories[0].cartonId
412
- : null
413
+ const cartonId = this.enableCartonLabel
414
+ ? (this.enableProductScanning ? selectedInventories[0].newCartonId : selectedInventories[0].cartonId)
415
+ : null
413
416
 
414
417
  const response = await client.mutate({
415
418
  mutation: gql`
@@ -214,7 +214,7 @@ class WorksheetPutawayReturn extends localize(i18next)(PageView) {
214
214
  width: 100
215
215
  },
216
216
  {
217
- type: 'float',
217
+ type: 'integer',
218
218
  name: 'qty',
219
219
  header: i18next.t('field.qty'),
220
220
  width: 80
@@ -254,7 +254,7 @@ class WorksheetPutaway extends localize(i18next)(PageView) {
254
254
  width: 100
255
255
  },
256
256
  {
257
- type: 'float',
257
+ type: 'integer',
258
258
  name: 'qty',
259
259
  header: i18next.t('field.qty'),
260
260
  width: 80
@@ -312,13 +312,13 @@ class WorksheetPutaway extends localize(i18next)(PageView) {
312
312
  width: 120
313
313
  },
314
314
  {
315
- type: 'float',
315
+ type: 'integer',
316
316
  name: 'qty',
317
317
  header: i18next.t('field.qty'),
318
318
  width: 80
319
319
  },
320
320
  {
321
- type: 'float',
321
+ type: 'integer',
322
322
  name: 'uomValue',
323
323
  header: i18next.t('field.uom_value'),
324
324
  width: 80
@@ -196,7 +196,7 @@ class UndoUnloadPopup extends connect(store)(localize(i18next)(LitElement)) {
196
196
  width: 100
197
197
  },
198
198
  {
199
- type: 'float',
199
+ type: 'integer',
200
200
  name: 'qty',
201
201
  label: true,
202
202
  header: i18next.t('field.qty'),
@@ -10,19 +10,37 @@ import './select-product-batch'
10
10
  import './serial-number-list-popup'
11
11
 
12
12
  import gql from 'graphql-tag'
13
- import { css, html } from 'lit-element'
13
+ import {
14
+ css,
15
+ html
16
+ } from 'lit-element'
14
17
  import orderBy from 'lodash-es/orderBy'
15
18
  import { connect } from 'pwa-helpers/connect-mixin.js'
16
19
 
17
20
  import { MultiColumnFormStyles } from '@things-factory/form-ui'
18
- import { i18next, localize } from '@things-factory/i18n-base'
21
+ import {
22
+ i18next,
23
+ localize
24
+ } from '@things-factory/i18n-base'
19
25
  import { openPopup } from '@things-factory/layout-base'
20
- import { client, CustomAlert, PageView, store } from '@things-factory/shell'
26
+ import {
27
+ client,
28
+ CustomAlert,
29
+ PageView,
30
+ store
31
+ } from '@things-factory/shell'
21
32
  import { CommonButtonStyles } from '@things-factory/styles'
22
- import { isMobileDevice, sleep } from '@things-factory/utils'
33
+ import {
34
+ isMobileDevice,
35
+ sleep
36
+ } from '@things-factory/utils'
23
37
 
24
38
  import { fetchSettingRule } from '../../fetch-setting-value'
25
- import { ARRIVAL_NOTICE, RETURN_ORDER, VAS_TYPE } from '../constants'
39
+ import {
40
+ ARRIVAL_NOTICE,
41
+ RETURN_ORDER,
42
+ VAS_TYPE
43
+ } from '../constants'
26
44
 
27
45
  const AVAIL_ORDER_TYPES = { ARRIVAL_NOTICE, RETURN_ORDER }
28
46
  class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
@@ -650,26 +668,26 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
650
668
  }
651
669
  },
652
670
  {
653
- type: 'float',
671
+ type: 'integer',
654
672
  name: 'packQty',
655
673
  label: true,
656
674
  header: i18next.t('field.total_pack_qty'),
657
675
  width: 90,
658
676
  imex: {
659
- type: 'float',
677
+ type: 'integer',
660
678
  key: 'packQty',
661
679
  header: i18next.t('field.total_pack_qty'),
662
680
  width: 20
663
681
  }
664
682
  },
665
683
  {
666
- type: 'float',
684
+ type: 'integer',
667
685
  name: 'actualPackQty',
668
686
  label: true,
669
687
  header: i18next.t('field.actual_pack_qty'),
670
688
  width: 100,
671
689
  imex: {
672
- type: 'float',
690
+ type: 'integer',
673
691
  key: 'actualPackQty',
674
692
  header: i18next.t('field.actual_pack_qty'),
675
693
  width: 25
@@ -752,7 +770,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
752
770
  description
753
771
  isRequiredCheckExpiry
754
772
  isRequireSerialNumberScanningInbound
755
- isInventoryDecimal
756
773
  minInboundShelfLife
757
774
  }
758
775
  name
@@ -846,7 +863,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
846
863
  if (this.expDateInput?.value) {
847
864
  this.expDateInput.value = null
848
865
  }
849
-
866
+
850
867
  if (this._enableCartonLabel) {
851
868
  this.cartonInput.value = ''
852
869
  this.productBarcodeInput.value = ''
@@ -895,7 +912,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
895
912
  sku
896
913
  isRequiredCheckExpiry
897
914
  isRequireSerialNumberScanningInbound
898
- isInventoryDecimal
899
915
  minInboundShelfLife
900
916
  }
901
917
  inventory {
@@ -1246,12 +1262,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1246
1262
  }
1247
1263
 
1248
1264
  try {
1249
- // Add validation for qty
1250
- const qty = parseFloat(this.actualQtyInput.value)
1251
- if (isNaN(qty)) {
1252
- throw new Error(i18next.t('text.invalid_quantity'))
1253
- }
1254
-
1255
1265
  const response = await client.mutate({
1256
1266
  mutation: gql`
1257
1267
  mutation unload(
@@ -1281,7 +1291,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1281
1291
  inventory: {
1282
1292
  palletId: this._enableCartonLabel ? null : this.lotInput.value.trim(),
1283
1293
  cartonId: this._enableCartonLabel ? this.cartonInput.value.trim() : null,
1284
- qty: qty, // Use the validated qty
1294
+ qty: parseInt(this.actualQtyInput.value),
1285
1295
  expirationDate: this._isRequiredCheckExpiry ? this.expDateInput.value : null,
1286
1296
  reusablePallet: this._usingReusablePallet ? this._reusablePallet : null
1287
1297
  },
@@ -1317,7 +1327,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1317
1327
  sku
1318
1328
  isRequiredCheckExpiry
1319
1329
  isRequireSerialNumberScanningInbound
1320
- isInventoryDecimal
1321
1330
  minInboundShelfLife
1322
1331
  }
1323
1332
  }
@@ -1348,7 +1357,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1348
1357
  sku
1349
1358
  isRequiredCheckExpiry
1350
1359
  isRequireSerialNumberScanningInbound
1351
- isInventoryDecimal
1352
1360
  minInboundShelfLife
1353
1361
  }
1354
1362
  }
@@ -1506,22 +1514,16 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1506
1514
  }
1507
1515
  } else {
1508
1516
  // 4. qty value existing
1509
- if (!parseFloat(this.actualQtyInput.value)) {
1517
+ if (!parseInt(this.actualQtyInput.value)) {
1510
1518
  this._focusOnActualQtyInput()
1511
1519
  throw new Error(i18next.t('text.qty_is_empty'))
1512
1520
  }
1513
1521
 
1514
1522
  // 5. qty value has to be positive
1515
- if (!(parseFloat(this.actualQtyInput.value) > 0)) {
1523
+ if (!(parseInt(this.actualQtyInput.value) > 0)) {
1516
1524
  setTimeout(() => this.actualQtyInput.select(), 100)
1517
1525
  throw new Error(i18next.t('text.qty_should_be_positive'))
1518
1526
  }
1519
-
1520
- // Check if quantity has decimals and validate against product settings
1521
- const qty = parseFloat(this.actualQtyInput.value)
1522
- if (qty % 1 !== 0 && !this._selectedOrderProduct.product.isInventoryDecimal) {
1523
- throw new Error(i18next.t('text.decimal_quantities_not_allowed'))
1524
- }
1525
1527
  }
1526
1528
 
1527
1529
  if (this._isRequiredCheckExpiry) {
@@ -1547,21 +1549,15 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1547
1549
  let orderProducts = await this._checkedScannedProduct()
1548
1550
 
1549
1551
  if (this._enableInputQty >= 0 && this._enableInputQty < 4 && !this._isRequireSerialNumberScanningInbound) {
1550
- if (!parseFloat(this.actualQtyInput.value)) {
1552
+ if (!parseInt(this.actualQtyInput.value)) {
1551
1553
  this._focusOnActualQtyInput()
1552
1554
  throw new Error(i18next.t('text.enter_qty'))
1553
1555
  }
1554
1556
 
1555
- if (!(parseFloat(this.actualQtyInput.value) > 0)) {
1557
+ if (!(parseInt(this.actualQtyInput.value) > 0)) {
1556
1558
  setTimeout(() => this.actualQtyInput.select(), 100)
1557
1559
  throw new Error(i18next.t('text.qty_should_be_positive'))
1558
1560
  }
1559
-
1560
- // Check if quantity has decimals and validate against product settings
1561
- const qty = parseFloat(this.actualQtyInput.value)
1562
- if (qty % 1 !== 0 && !this._selectedOrderProduct.product.isInventoryDecimal) {
1563
- throw new Error(i18next.t('text.decimal_quantities_not_allowed'))
1564
- }
1565
1561
  } else if (this._isRequireSerialNumberScanningInbound) {
1566
1562
  if (!this.serialNumberInput?.value) {
1567
1563
  this._focusOnSerialNumberInput()
@@ -90,7 +90,7 @@ class UnloadedInventoriesPopup extends connect(store)(localize(i18next)(LitEleme
90
90
  width: 120
91
91
  },
92
92
  {
93
- type: 'float',
93
+ type: 'integer',
94
94
  name: 'qty',
95
95
  header: i18next.t('field.actual_pack_qty'),
96
96
  label: true,
@@ -258,7 +258,7 @@ class WorksheetUnloadingReturn extends localize(i18next)(PageView) {
258
258
  width: 100
259
259
  },
260
260
  {
261
- type: 'float',
261
+ type: 'integer',
262
262
  name: 'returnQty',
263
263
  header: i18next.t('field.return_qty'),
264
264
  width: 80
@@ -314,13 +314,13 @@ class WorksheetUnloading extends localize(i18next)(PageView) {
314
314
  width: 80
315
315
  },
316
316
  {
317
- type: 'float',
317
+ type: 'integer',
318
318
  name: 'packQty',
319
319
  header: i18next.t('field.pack_qty'),
320
320
  width: 80
321
321
  },
322
322
  {
323
- type: 'float',
323
+ type: 'integer',
324
324
  name: 'totalUomValue',
325
325
  header: i18next.t('field.total_uom'),
326
326
  width: 120