@things-factory/operato-wms 4.3.636 → 4.3.637

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