@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
@@ -104,8 +104,8 @@ class LoadByQty extends localize(i18next)(LitElement) {
104
104
 
105
105
  if (result.value) {
106
106
  const updatedData = this.dirtyData.map(data => {
107
- const qty = parseFloat(data.sortedQty)
108
- if (isNaN(qty) || qty < 0) {
107
+ const qty = Number(data.sortedQty)
108
+ if (isNaN(qty) || qty <= 0) {
109
109
  throw new Error(`Invalid quantity for product ${data.productName}. Quantity must be a number greater than 0.`)
110
110
  }
111
111
  return {
@@ -141,7 +141,7 @@ export class LoadingExecutionBase extends LitElement {
141
141
 
142
142
  if (this._disableQC) {
143
143
  activeTab = 'LOADING'
144
- }
144
+ }
145
145
 
146
146
  this.state = { ...this.state, activeTab: activeTab }
147
147
 
@@ -261,7 +261,7 @@ export class LoadingExecutionBase extends LitElement {
261
261
  mutation sortItem(
262
262
  $releaseGoodNo: String!
263
263
  $productBarcode: String!
264
- $qty: Float!
264
+ $qty: Int!
265
265
  $worksheetDetails: [Object!]
266
266
  ) {
267
267
  sortItem(
@@ -275,7 +275,7 @@ export class LoadingExecutionBase extends LitElement {
275
275
  variables: {
276
276
  releaseGoodNo: this.worksheet?.releaseGood?.name,
277
277
  productBarcode: this.productBarcodeInput.value,
278
- qty: parseFloat(this.qtyInput.value),
278
+ qty: parseInt(this.qtyInput.value),
279
279
  worksheetDetails: selectedData
280
280
  }
281
281
  })
@@ -295,7 +295,7 @@ export class LoadingExecutionBase extends LitElement {
295
295
  if (!this.productBarcodeInput.value) {
296
296
  throw new Error(i18next.t('text.product_barcode_is_empty'))
297
297
  }
298
- if (!this.qtyInput.value || parseFloat(this.qtyInput.value) <= 0) {
298
+ if (!this.qtyInput.value || parseInt(this.qtyInput.value) <= 0) {
299
299
  throw new Error(i18next.t('text.invalid_qty'))
300
300
  }
301
301
  }
@@ -6,21 +6,40 @@ import './order-remark-popup'
6
6
  import './packing-serial-number-popup'
7
7
 
8
8
  import gql from 'graphql-tag'
9
- import { css, html } from 'lit-element'
9
+ import {
10
+ css,
11
+ html
12
+ } from 'lit-element'
10
13
  import { connect } from 'pwa-helpers/connect-mixin.js'
11
14
 
12
15
  import { GhostPrint } from '@operato/ghost-print'
13
16
  import { sleep } from '@operato/utils'
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
30
  import { isMobileDevice } from '@things-factory/utils'
20
31
 
21
32
  import { fetchSettingRule } from '../../fetch-setting-value'
22
- import { decodeQR, fetchPageSettings, isValidHttpUrl } from '../../util/index'
23
- import { ORDER_SOURCES, PLATFORM, WORKSHEET_STATUS } from '../constants'
33
+ import {
34
+ decodeQR,
35
+ fetchPageSettings,
36
+ isValidHttpUrl
37
+ } from '../../util/index'
38
+ import {
39
+ ORDER_SOURCES,
40
+ PLATFORM,
41
+ WORKSHEET_STATUS
42
+ } from '../constants'
24
43
 
25
44
  class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
26
45
  static get properties() {
@@ -1507,13 +1526,13 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
1507
1526
  if (!this.releaseQtyInput.checkValidity()) throw new Error(i18next.t('text.release_qty_invalid'))
1508
1527
 
1509
1528
  // Release qty existing
1510
- if (!parseFloat(this.releaseQtyInput.value)) {
1529
+ if (!parseInt(this.releaseQtyInput.value)) {
1511
1530
  this.focusOnReleaseQtyInput()
1512
1531
  throw new Error(i18next.t('text.release_qty_is_empty'))
1513
1532
  }
1514
1533
 
1515
1534
  // typed qty should be matched with release qty.
1516
- if (parseFloat(this.releaseQtyInput.value) !== this._selectedOrderInventory.releaseQty) {
1535
+ if (parseInt(this.releaseQtyInput.value) !== this._selectedOrderInventory.releaseQty) {
1517
1536
  this.focusOnReleaseQtyInput()
1518
1537
  throw new Error(i18next.t('text.wrong_release_qty'))
1519
1538
  }
@@ -462,8 +462,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
462
462
  ? html`<label>${i18next.t('label.picked_qty')}</label>
463
463
  <input
464
464
  type="number"
465
- min="0.001"
466
- step="0.001"
465
+ min="1"
467
466
  name="confirmedQty"
468
467
  @keypress="${async e => {
469
468
  if (e.keyCode === 13) {
@@ -1014,7 +1013,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1014
1013
  $worksheetDetailName: String!
1015
1014
  $worksheetType: String!
1016
1015
  $palletId: String!
1017
- $releaseQty: Float!
1016
+ $releaseQty: Int!
1018
1017
  ) {
1019
1018
  crossDockPicking(
1020
1019
  worksheetDetailName: $worksheetDetailName
@@ -1028,7 +1027,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1028
1027
  worksheetDetailName: this._selectedOrderInventory.name,
1029
1028
  worksheetType: this.refPickingType,
1030
1029
  palletId: this.palletInput.value,
1031
- releaseQty: parseFloat(this.releaseQtyInput.value)
1030
+ releaseQty: parseInt(this.releaseQtyInput.value)
1032
1031
  }
1033
1032
  })
1034
1033
  }
@@ -1037,9 +1036,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1037
1036
  if (this._isExecuting) throw new Error(i18next.t('text.previous_scan_is_executing'))
1038
1037
  this._isExecuting = true
1039
1038
 
1040
- const qty = this.releaseQtyInput?.value ? parseFloat(this.releaseQtyInput.value) : 1
1041
- if (isNaN(qty)) throw new Error(i18next.t('text.invalid_qty'))
1042
-
1043
1039
  try {
1044
1040
  switch (this.refPickingType) {
1045
1041
  case PICKING_TYPES.PICKING.value:
@@ -1050,7 +1046,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1050
1046
  $worksheetType: String!
1051
1047
  $palletId: String
1052
1048
  $locationName: String!
1053
- $releaseQty: Float!
1049
+ $releaseQty: Int!
1054
1050
  $binLocation: String
1055
1051
  $serialNumber: String
1056
1052
  $toteNo: String
@@ -1072,7 +1068,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1072
1068
  worksheetType: this.refPickingType,
1073
1069
  palletId: this.palletInput.value.trim(),
1074
1070
  locationName: this._locationName ? this._locationName : this._selectedOrderInventory?.location.name,
1075
- releaseQty: this._isRequireSerialNumberScanningOutbound ? 1 : qty,
1071
+ releaseQty: this._isRequireSerialNumberScanningOutbound ? 1 : parseInt(this.releaseQtyInput.value),
1076
1072
  binLocation:
1077
1073
  this._hasBinPicking && (!this.toteNo || this.tote == '') ? this.binLocationInput.value : null,
1078
1074
  serialNumber: this._isRequireSerialNumberScanningOutbound ? this.serialInput.value : null,
@@ -1089,7 +1085,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1089
1085
  $palletId: String!
1090
1086
  $locationName: String
1091
1087
  $binLocationName: String
1092
- $releaseQty: Float!
1088
+ $releaseQty: Int!
1093
1089
  ) {
1094
1090
  batchPicking(
1095
1091
  taskNo: $taskNo
@@ -1108,7 +1104,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1108
1104
  locationName: this._locationName ? this._locationName : this._selectedOrderInventory?.location.name,
1109
1105
  binLocationName:
1110
1106
  this._hasBinPicking && (!this.toteNo || this.tote == '') ? this.binLocationInput.value : null,
1111
- releaseQty: qty
1107
+ releaseQty: parseInt(this.releaseQtyInput.value)
1112
1108
  }
1113
1109
  })
1114
1110
  }
@@ -1123,14 +1119,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1123
1119
  if (this._isExecuting) throw new Error(i18next.t('text.previous_scan_is_executing'))
1124
1120
  this._isExecuting = true
1125
1121
 
1126
- let qty = 1
1127
- if (this._selectedOrderInventory.product?.isInventoryDecimal) {
1128
- qty = this._selectedOrderInventory?.releaseQty
1129
- }
1130
- qty = this.releaseQtyInput?.value ? parseFloat(this.releaseQtyInput.value) : qty
1131
-
1132
- if (isNaN(qty)) throw new Error(i18next.t('text.invalid_qty'))
1133
-
1134
1122
  try {
1135
1123
  switch (this.refPickingType) {
1136
1124
  case PICKING_TYPES.PICKING.value:
@@ -1144,7 +1132,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1144
1132
  $binLocation: String
1145
1133
  $serialNumber: String
1146
1134
  $toteNo: String
1147
- $pickingQty: Float
1135
+ $pickingQty: Int
1148
1136
  ) {
1149
1137
  scanProductPicking(
1150
1138
  worksheetDetailName: $worksheetDetailName
@@ -1168,7 +1156,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1168
1156
  binLocation:
1169
1157
  this._hasBinPicking && (!this.toteNo || this.tote == '') ? this.binLocationInput.value : null,
1170
1158
  toteNo: this._enableToteScanning && this.toteNo !== '' ? this.toteNo : null,
1171
- pickingQty: qty
1159
+ pickingQty: this.releaseQtyInput?.value ? parseInt(this.releaseQtyInput.value) : 1
1172
1160
  }
1173
1161
  })
1174
1162
 
@@ -1182,7 +1170,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1182
1170
  $inventory: InventoryPatch!
1183
1171
  $productBarcode: String!
1184
1172
  $binLocationName: String
1185
- $pickingQty: Float
1173
+ $pickingQty: Int
1186
1174
  ) {
1187
1175
  scanProductBatchPicking(
1188
1176
  taskNo: $taskNo
@@ -1208,7 +1196,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1208
1196
  },
1209
1197
  binLocationName:
1210
1198
  this._hasBinPicking && (!this.toteNo || this.tote == '') ? this.binLocationInput.value : null,
1211
- pickingQty: qty
1199
+ pickingQty: this.releaseQtyInput?.value ? parseInt(this.releaseQtyInput.value) : 1
1212
1200
  }
1213
1201
  })
1214
1202
  }
@@ -1223,9 +1211,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1223
1211
  if (this._isExecuting) throw new Error(i18next.t('text.previous_scan_is_executing'))
1224
1212
  this._isExecuting = true
1225
1213
 
1226
- const qty = this.releaseQtyInput?.value ? parseFloat(this.releaseQtyInput.value) : 1
1227
- if (isNaN(qty)) throw new Error(i18next.t('text.invalid_qty'))
1228
-
1229
1214
  try {
1230
1215
  return await client.mutate({
1231
1216
  mutation: gql`
@@ -1236,7 +1221,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1236
1221
  $cartonId: String!
1237
1222
  $binLocation: String
1238
1223
  $serialNumber: String
1239
- $pickingQty: Float
1224
+ $pickingQty: Int
1240
1225
  ) {
1241
1226
  replenishmentPicking(
1242
1227
  worksheetDetailName: $worksheetDetailName
@@ -1256,7 +1241,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1256
1241
  cartonId: this.cartonInput.value.trim(),
1257
1242
  serialNumber: this._isRequireSerialNumberScanningOutbound ? this.serialInput.value : null,
1258
1243
  binLocation: this._hasBinPicking && (!this.toteNo || this.tote == '') ? this.binLocationInput.value : null,
1259
- pickingQty: qty
1244
+ pickingQty: this.releaseQtyInput?.value ? parseInt(this.releaseQtyInput.value) : 1
1260
1245
  }
1261
1246
  })
1262
1247
  } catch (e) {
@@ -1350,7 +1335,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1350
1335
  if (!this._isReplacement) {
1351
1336
  if (!this._isRequireSerialNumberScanningOutbound) {
1352
1337
  if (this.releaseQtyInput) {
1353
- if (!parseFloat(this.releaseQtyInput?.value)) {
1338
+ if (!parseInt(this.releaseQtyInput?.value)) {
1354
1339
  this._focusOnReleaseQtyInput()
1355
1340
  throw new Error(i18next.t('text.release_qty_is_empty'))
1356
1341
  }
@@ -1359,7 +1344,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1359
1344
 
1360
1345
  // typed qty should be matched with release qty.
1361
1346
  if (
1362
- parseFloat(this.releaseQtyInput.value) !==
1347
+ parseInt(this.releaseQtyInput.value) !==
1363
1348
  this._selectedOrderInventory.releaseQty -
1364
1349
  (this._selectedOrderInventory.pickedQty ? this._selectedOrderInventory.pickedQty : 0) &&
1365
1350
  !this._isCartonLabel
@@ -1451,7 +1436,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1451
1436
 
1452
1437
  if (this._crossDocking) {
1453
1438
  // typed qty should be smaller than release qty.
1454
- if (parseFloat(this.releaseQtyInput.value) > this._selectedOrderInventory.releaseQty) {
1439
+ if (parseInt(this.releaseQtyInput.value) > this._selectedOrderInventory.releaseQty) {
1455
1440
  this._focusOnReleaseQtyInput()
1456
1441
  throw new Error(i18next.t('text.wrong_release_qty'))
1457
1442
  }
@@ -1600,7 +1585,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1600
1585
  sku
1601
1586
  name
1602
1587
  description
1603
- isInventoryDecimal
1604
1588
  isRequireSerialNumberScanningOutbound
1605
1589
  }
1606
1590
  qty
@@ -1769,7 +1753,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1769
1753
  name
1770
1754
  description
1771
1755
  sku
1772
- isInventoryDecimal
1773
1756
  isRequireSerialNumberScanning
1774
1757
  }
1775
1758
  qty
@@ -1793,7 +1776,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1793
1776
  name
1794
1777
  description
1795
1778
  sku
1796
- isInventoryDecimal
1797
1779
  }
1798
1780
  productDetail {
1799
1781
  id
@@ -2167,7 +2149,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
2167
2149
  sku
2168
2150
  name
2169
2151
  description
2170
- isInventoryDecimal
2171
2152
  }
2172
2153
  qty
2173
2154
  releaseQty
@@ -2190,7 +2171,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
2190
2171
  sku
2191
2172
  name
2192
2173
  description
2193
- isInventoryDecimal
2194
2174
  }
2195
2175
  productDetail {
2196
2176
  id
@@ -292,17 +292,17 @@ class PickingReplacementPopup extends localize(i18next)(LitElement) {
292
292
  throw new Error(i18next.t('text.replacement_pallet_not_match_criteria'))
293
293
  }
294
294
 
295
- if (!parseFloat(this.releaseQtyInput.value)) {
295
+ if (!parseInt(this.releaseQtyInput.value)) {
296
296
  this._focusOnInput(this.releaseQtyInput)
297
297
  throw new Error(i18next.t('text.release_qty_is_empty'))
298
298
  }
299
299
 
300
- if (parseFloat(this.releaseQtyInput.value) < 0) {
300
+ if (parseInt(this.releaseQtyInput.value) < 0) {
301
301
  this._focusOnInput(this.releaseQtyInput)
302
302
  throw new Error(i18next.t('text.release_qty_invalid'))
303
303
  }
304
304
 
305
- if (this.targetInventory.qty < parseFloat(this.releaseQtyInput.value)) {
305
+ if (this.targetInventory.qty < parseInt(this.releaseQtyInput.value)) {
306
306
  this._focusOnInput(this.releaseQtyInput)
307
307
  throw new Error(i18next.t('text.release_qty_cannot_exceed_stored_qty'))
308
308
  }
@@ -311,7 +311,7 @@ class PickingReplacementPopup extends localize(i18next)(LitElement) {
311
311
  qty += record.releaseQty
312
312
  return qty
313
313
  }, 0)
314
- qty += parseFloat(this.releaseQtyInput.value)
314
+ qty += parseInt(this.releaseQtyInput.value)
315
315
 
316
316
  if (qty > this.orderInventory.releaseQty) {
317
317
  this._focusOnInput(this.releaseQtyInput)
@@ -245,7 +245,7 @@ export class PickingExecutionBase extends LitElement {
245
245
  $cartonId: String!
246
246
  $productBarcode: String!
247
247
  $binNo: String!
248
- $pickingQty: Float
248
+ $pickingQty: Int
249
249
  ) {
250
250
  scanProductZonePicking(
251
251
  worksheetId: $worksheetId
@@ -261,7 +261,7 @@ export class PickingExecutionBase extends LitElement {
261
261
  productBarcode: this.productBarcodeInput.value.trim(),
262
262
  cartonId: this.cartonIdInput.value.trim(),
263
263
  binNo: this._executionData.binNo,
264
- pickingQty: this.qtyInput?.value ? parseFloat(this.qtyInput.value) : 1
264
+ pickingQty: this.qtyInput?.value ? parseInt(this.qtyInput.value) : 1
265
265
  }
266
266
  })
267
267
 
@@ -385,7 +385,6 @@ export class PickingExecutionBase extends LitElement {
385
385
  sku
386
386
  name
387
387
  description
388
- isInventoryDecimal
389
388
  }
390
389
  releaseQty
391
390
  pickedQty
@@ -400,7 +399,6 @@ export class PickingExecutionBase extends LitElement {
400
399
  product {
401
400
  name
402
401
  sku
403
- isInventoryDecimal
404
402
  }
405
403
  }
406
404
  palletId
@@ -439,8 +437,7 @@ async function mapWorksheetData(data) {
439
437
  product: {
440
438
  sku: orderInv.product.sku,
441
439
  name: orderInv.product.name,
442
- description: orderInv.product.description,
443
- isInventoryDecimal: orderInv.product.isInventoryDecimal
440
+ description: orderInv.product.description
444
441
  },
445
442
  qty: orderInv.pickedQty,
446
443
  releaseQty: orderInv.releaseQty,
@@ -462,8 +459,7 @@ async function mapWorksheetData(data) {
462
459
  product: {
463
460
  sku: orderInv.product.sku,
464
461
  name: orderInv.product.name,
465
- description: orderInv.product.description,
466
- isInventoryDecimal: orderInv.product.isInventoryDecimal
462
+ description: orderInv.product.description
467
463
  }
468
464
  }
469
465
  }))
@@ -618,9 +618,11 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
618
618
  if (
619
619
  this._enableProductScanning &&
620
620
  this._qrProcessing > 0 &&
621
- (isBarcode || isValidHttpUrl(this.serialInput?.value))
621
+ (isBarcode|| isValidHttpUrl(this.serialInput?.value))
622
622
  ) {
623
- let input = isBarcode ? this.productBarcodeInput.value : this.serialInput.value
623
+ let input = isBarcode
624
+ ? this.productBarcodeInput.value
625
+ : this.serialInput.value
624
626
  let config = JSON.parse(
625
627
  await fetchSettingRule('qr-data-parsing-configuration', this._worksheetInfo.partnerDomainId)
626
628
  )
@@ -730,7 +732,7 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
730
732
  toteNo: this._enableToteScanning && this.toteNo !== '' ? this.toteNo : null,
731
733
  sortingQty:
732
734
  this._enableSortingQty && !this._isRequireSerialNumberScanningOutbound
733
- ? parseFloat(this.sortingQtyInput.value)
735
+ ? parseInt(this.sortingQtyInput.value)
734
736
  : null,
735
737
  productId
736
738
  }
@@ -849,13 +851,13 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
849
851
  }
850
852
 
851
853
  if (this._enableSortingQty && !this._isRequireSerialNumberScanningOutbound) {
852
- if (!parseFloat(this.sortingQtyInput.value)) {
854
+ if (!parseInt(this.sortingQtyInput.value)) {
853
855
  this.sortingQtyInput.value = ''
854
856
  this._focusOnSortingQtyInput()
855
857
  throw new Error(i18next.t('text.release_qty_is_empty'))
856
858
  }
857
859
 
858
- if (!(parseFloat(this.sortingQtyInput.value) > 0)) {
860
+ if (!(parseInt(this.sortingQtyInput.value) > 0)) {
859
861
  this.sortingQtyInput.value = ''
860
862
  this._focusOnSortingQtyInput()
861
863
  throw new Error(i18next.t('text.qty_should_be_positive'))
@@ -7,18 +7,32 @@ import './inventory-reassign-popup'
7
7
  import './item-label-popup'
8
8
 
9
9
  import gql from 'graphql-tag'
10
- import { css, html } from 'lit-element'
10
+ import {
11
+ css,
12
+ html
13
+ } from 'lit-element'
11
14
  import orderBy from 'lodash-es/orderBy'
12
15
 
13
16
  import { MultiColumnFormStyles } from '@things-factory/form-ui'
14
- import { i18next, localize } from '@things-factory/i18n-base'
17
+ import {
18
+ i18next,
19
+ localize
20
+ } from '@things-factory/i18n-base'
15
21
  import { openPopup } from '@things-factory/layout-base'
16
- import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
22
+ import {
23
+ client,
24
+ CustomAlert,
25
+ navigate,
26
+ PageView
27
+ } from '@things-factory/shell'
17
28
  import { CommonButtonStyles } from '@things-factory/styles'
18
29
  import { isMobileDevice } from '@things-factory/utils'
19
30
 
20
31
  import { fetchSettingRule } from '../../fetch-setting-value'
21
- import { ORDER_INVENTORY_STATUS, WORKSHEET_STATUS } from '../constants'
32
+ import {
33
+ ORDER_INVENTORY_STATUS,
34
+ WORKSHEET_STATUS
35
+ } from '../constants'
22
36
 
23
37
  class WorksheetBatchPicking extends localize(i18next)(PageView) {
24
38
  static get properties() {
@@ -121,7 +135,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
121
135
  ...CommonButtonStyles.back
122
136
  }
123
137
  ]
124
-
138
+
125
139
  if (this._printItemLabel) {
126
140
  actions.push({
127
141
  title: i18next.t('button.print_label'),
@@ -378,7 +392,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
378
392
  width: 140
379
393
  },
380
394
  {
381
- type: 'float',
395
+ type: 'integer',
382
396
  name: 'releaseQty',
383
397
  header: i18next.t('field.release_qty'),
384
398
  width: 60
@@ -466,8 +480,14 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
466
480
  header: i18next.t('field.location'),
467
481
  width: 120
468
482
  },
483
+ // {
484
+ // type: 'integer',
485
+ // name: 'availableQty',
486
+ // header: i18next.t('field.available_qty'),
487
+ // width: 80
488
+ // },
469
489
  {
470
- type: 'float',
490
+ type: 'integer',
471
491
  name: 'releaseQty',
472
492
  header: i18next.t('field.release_qty'),
473
493
  width: 60
@@ -662,7 +682,8 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
662
682
  result.tempOrderInvs.push(ordInv)
663
683
  } else {
664
684
  ordInv.productSku = ordInv.product.sku
665
- ordInv.releaseUomValueWithUom = ordInv.releaseUomValue.toFixed(3) + ' ' + ordInv.inventory.uom
685
+ ordInv.releaseUomValueWithUom =
686
+ Math.round(ordInv.releaseUomValue).toFixed(2) + ' ' + ordInv.inventory.uom
666
687
  let existingCompOrderInvsIndex = result.completedOrderInvs.findIndex(
667
688
  oinv => oinv.inventory.palletId == ordInv.inventory.palletId
668
689
  )
@@ -678,11 +699,11 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
678
699
  result.completedOrderInvs[existingCompOrderInvsIndex] = {
679
700
  ...existingCompOrderInvs,
680
701
  releaseGood: [...existingCompOrderInvs.releaseGood, ordInv.releaseGood],
681
- releaseQty: parseFloat((existingCompOrderInvs.releaseQty + ordInv.releaseQty).toFixed(3)),
702
+ releaseQty: existingCompOrderInvs.releaseQty + ordInv.releaseQty,
682
703
  releaseUomValue: existingCompOrderInvs.releaseUomValue + ordInv.releaseUomValue,
683
- releaseUomValueWithUom: `${(existingCompOrderInvs.releaseUomValue + ordInv.releaseUomValue).toFixed(
684
- 3
685
- )} ${ordInv.inventory.uom}`
704
+ releaseUomValueWithUom: `${Math.round(
705
+ existingCompOrderInvs.releaseUomValue + ordInv.releaseUomValue
706
+ ).toFixed(2)} ${ordInv.inventory.uom}`
686
707
  }
687
708
  }
688
709
  }
@@ -779,11 +800,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
779
800
  { sku: item.product.sku },
780
801
  item,
781
802
  item?.inventory,
782
- {
783
- availableQty: parseFloat(
784
- (item.inventory.qty - item.inventory.lockedQty + item.releaseQty).toFixed(3)
785
- )
786
- },
803
+ { availableQty: item.inventory.qty - item.inventory.lockedQty + item.releaseQty },
787
804
  item?.inventory?.location
788
805
  )
789
806
  )
@@ -916,7 +933,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
916
933
  const { completedOrderInvs } = response.data.worksheetDetailsByProductGroup.items.reduce(
917
934
  (result, ordInv) => {
918
935
  ordInv.targetInventory.releaseUomValueWithUom =
919
- ordInv.targetInventory.releaseUomValue.toFixed(3) + ' ' + ordInv.targetInventory.inventory.uom
936
+ Math.round(ordInv.targetInventory.releaseUomValue).toFixed(2) + ' ' + ordInv.targetInventory.inventory.uom
920
937
 
921
938
  let existingCompOrderInvsIndex = result.completedOrderInvs.findIndex(
922
939
  oinv => oinv.inventory.palletId == ordInv.targetInventory.inventory.palletId
@@ -934,7 +951,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
934
951
  let existingCompOrderInvs = result.completedOrderInvs[existingCompOrderInvsIndex]
935
952
  result.completedOrderInvs[existingCompOrderInvsIndex] = {
936
953
  ...existingCompOrderInvs,
937
- releaseQty: parseFloat((existingCompOrderInvs.releaseQty + ordInv.targetInventory.releaseQty).toFixed(3)),
954
+ releaseQty: existingCompOrderInvs.releaseQty + ordInv.targetInventory.releaseQty,
938
955
  releaseUomValue: existingCompOrderInvs.releaseUomValue + ordInv.targetInventory.releaseUomValue
939
956
  }
940
957
  }
@@ -1020,17 +1037,13 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
1020
1037
  ...wsd.targetInventory.inventory.warehouse,
1021
1038
  ...wsd.targetInventory.inventory.location,
1022
1039
  name: wsd.name,
1023
- releaseQty: parseFloat(wsd.targetInventory.releaseQty.toFixed(3)),
1024
1040
  releaseUomValue: wsd.targetInventory.releaseUomValue,
1025
1041
  releaseUomValueWithUom:
1026
- wsd.targetInventory.releaseUomValue.toFixed(3) + ' ' + wsd.targetInventory.inventory.uom,
1027
- availableQty: parseFloat(
1028
- (
1029
- wsd.targetInventory.inventory.qty -
1030
- wsd.targetInventory.inventory.lockedQty +
1031
- wsd.targetInventory.releaseQty
1032
- ).toFixed(3)
1033
- )
1042
+ Math.round(wsd.targetInventory.releaseUomValue).toFixed(2) + ' ' + wsd.targetInventory.inventory.uom,
1043
+ availableQty:
1044
+ wsd.targetInventory.inventory.qty -
1045
+ wsd.targetInventory.inventory.lockedQty +
1046
+ wsd.targetInventory.releaseQty
1034
1047
  }
1035
1048
  })
1036
1049
  }
@@ -1177,8 +1190,8 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
1177
1190
  batchId: itm.targetInventory.batchId,
1178
1191
  sku: itm.targetInventory.product.sku,
1179
1192
  product: itm.targetInventory.product,
1180
- printQty: parseFloat(itm.targetInventory.releaseQty.toFixed(3)),
1181
- releaseQty: parseFloat(itm.targetInventory.releaseQty.toFixed(3)),
1193
+ printQty: itm.targetInventory.releaseQty,
1194
+ releaseQty: itm.targetInventory.releaseQty,
1182
1195
  attentionTo: itm.targetInventory.releaseGood.attentionTo?.toUpperCase() || '-',
1183
1196
  attentionCompany: itm.targetInventory.releaseGood.attentionCompany?.toUpperCase() || '-',
1184
1197
  roNo: itm.targetInventory.releaseGood.name,
@@ -255,13 +255,13 @@ class WorksheetLoading extends localize(i18next)(PageView) {
255
255
  width: 100
256
256
  },
257
257
  {
258
- type: 'float',
258
+ type: 'integer',
259
259
  name: 'releaseQty',
260
260
  header: i18next.t('field.release_qty'),
261
261
  width: 60
262
262
  },
263
263
  {
264
- type: 'float',
264
+ type: 'integer',
265
265
  name: 'pickedQty',
266
266
  header: i18next.t('field.picked_qty'),
267
267
  width: 60
@@ -275,7 +275,7 @@ class WorksheetPacking extends localize(i18next)(PageView) {
275
275
  width: 120
276
276
  },
277
277
  {
278
- type: 'float',
278
+ type: 'integer',
279
279
  name: 'releaseQty',
280
280
  header: i18next.t('field.release_qty'),
281
281
  width: 60