@things-factory/operato-wms 4.3.495 → 4.3.497

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.
@@ -55,7 +55,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
55
55
  orderVasData: Object,
56
56
  refOrderType: String,
57
57
  _pageSettings: Object,
58
- _productBarcode: String
58
+ _productBarcode: String,
59
+ _productBarcodeScanned: String
59
60
  }
60
61
  }
61
62
 
@@ -299,8 +300,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
299
300
  ?scan-only=${this._pageSettings?.cameraScanOnly}
300
301
  @keypress="${async e => {
301
302
  if (e.keyCode === 13) {
302
- e.preventDefault()
303
- this._productBarcode = this.productBarcodeInput.value
303
+ e.preventDefault()
304
304
  await this._transactionHandler(e)
305
305
  }
306
306
  }}"
@@ -1028,6 +1028,9 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1028
1028
  if (e.keyCode !== 13) return
1029
1029
  e.preventDefault()
1030
1030
  try {
1031
+ if (this._enableProductScanning){
1032
+ this._productBarcode = this.productBarcodeInput.value
1033
+ }
1031
1034
  if (!this._enableCartonLabel) return this._unloadSelected()
1032
1035
  let orderProducts = await this._validateUnloading()
1033
1036
 
@@ -1076,7 +1079,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1076
1079
  `,
1077
1080
  variables: {
1078
1081
  worksheetDetailName: this._selectedOrderProduct.name,
1079
- productBarcode: this._productBarcode,
1082
+ productBarcode: this._productBarcodeScanned,
1080
1083
  inventory: {
1081
1084
  palletId: this._enableCartonLabel ? null : this.lotInput.value.trim(),
1082
1085
  cartonId: this._enableCartonLabel ? this.cartonInput.value.trim() : null,
@@ -1222,7 +1225,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1222
1225
  expirationDate: this._isRequiredCheckExpiry ? this.expDateInput.value : null,
1223
1226
  reusablePallet: this._usingReusablePallet ? this._reusablePallet : null
1224
1227
  },
1225
- productBarcode: this._enableProductScanning ? this._productBarcode : null
1228
+ productBarcode: this._enableProductScanning ? this._productBarcodeScanned ? this._productBarcodeScanned : this._productBarcode : null
1226
1229
  }
1227
1230
  })
1228
1231
  if (!response.errors) {
@@ -1304,12 +1307,13 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1304
1307
 
1305
1308
  async _checkedScannedProduct() {
1306
1309
  //fetch any product details that has entered gtin
1307
- const response = await this.fetchProductDetails(this._productBarcode || '')
1310
+ const response = await this.fetchProductDetails(this._productBarcodeScanned ? this._productBarcodeScanned : this._productBarcode.trim() || '')
1308
1311
 
1309
1312
  if (!response.errors) {
1310
1313
  let orderProductData = this.orderProductData.records
1311
1314
  let checkedProductDetails = response.data.checkGtin.items
1312
1315
  this.productBarcodeInput.value = `${checkedProductDetails[0].gtin} (${checkedProductDetails[0].packingType})`
1316
+ this._productBarcodeScanned = checkedProductDetails[0].gtin
1313
1317
 
1314
1318
  //check from grist if any is matched
1315
1319
  const foundOrderProducts = orderProductData.filter(op => {
@@ -1323,20 +1327,18 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1323
1327
  return checkedProductDetails.some(itm => itm.product.id == op.product.id)
1324
1328
  })
1325
1329
 
1326
- if (!foundOrderProducts?.length) {
1327
- if (!foundParentProducts?.length) {
1328
- if (this._enableInputQty >= 0 && this._enableInputQty < 4 && !this._isRequireSerialNumberScanningInbound) {
1329
- if (this.actualQtyInput?.value) this.actualQtyInput.value = ''
1330
- }
1331
-
1332
- if (this._isRequireSerialNumberScanningInbound) {
1333
- if (this.serialNumberInput?.value) this.serialNumberInput.value = ''
1334
- }
1330
+ if (!foundOrderProducts?.length && !foundParentProducts?.length) {
1331
+ if (this._enableInputQty >= 0 && this._enableInputQty < 4 && !this._isRequireSerialNumberScanningInbound) {
1332
+ if (this.actualQtyInput?.value) this.actualQtyInput.value = ''
1333
+ }
1335
1334
 
1336
- this.productBarcodeInput.value = ''
1337
- this._focusOnProductBarcodeInput()
1338
- throw new Error(i18next.t('text.no_matching_product_found'))
1335
+ if (this._isRequireSerialNumberScanningInbound) {
1336
+ if (this.serialNumberInput?.value) this.serialNumberInput.value = ''
1339
1337
  }
1338
+
1339
+ this.productBarcodeInput.value = ''
1340
+ this._focusOnProductBarcodeInput()
1341
+ throw new Error(i18next.t('text.no_matching_product_found'))
1340
1342
  }
1341
1343
 
1342
1344
  const product =
@@ -921,6 +921,11 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
921
921
  this.showToast({ level: 'error', message: i18next.t('text.invalid_unit_cost') })
922
922
  }
923
923
  break
924
+ case 'expirationDate':
925
+ if (new Date(e.detail.after) < new Date()) {
926
+ this.showToast({ message: i18next.t('text.expiration_date_will_be_earlier_than_today') })
927
+ }
928
+ break
924
929
  case 'manufactureDate':
925
930
  if (new Date(e.detail.after) > new Date()) {
926
931
  this.showToast({ message: i18next.t('text.invalid_manufacture_date') })
@@ -1029,7 +1034,9 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
1029
1034
  delete row.inventoryItemCount
1030
1035
 
1031
1036
  if (new Date(row.expirationDate) < new Date()) {
1032
- throw new Error(i18next.t('text.invalid_expiration_date'))
1037
+ this.showToast({
1038
+ message: `${i18next.t('text.expiration_date_will_be_earlier_than_today')}`
1039
+ })
1033
1040
  }
1034
1041
 
1035
1042
  if (row.cuFlag == '+') {
@@ -1146,7 +1153,9 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
1146
1153
  }
1147
1154
  if (itm.expirationDate != null) {
1148
1155
  if (new Date(itm.expirationDate) < new Date()) {
1149
- throw new Error(i18next.t('text.invalid_expiration_date'))
1156
+ this.showToast({
1157
+ message: `${i18next.t('text.expiration_date_will_be_earlier_than_today')}`
1158
+ })
1150
1159
  }
1151
1160
  }
1152
1161
  if (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.3.495",
3
+ "version": "4.3.497",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -117,5 +117,5 @@
117
117
  "cypress-localstorage-commands": "^1.6.1",
118
118
  "eslint-plugin-cypress": "^2.12.1"
119
119
  },
120
- "gitHead": "51557571939012370cbd8127739730509a17fc5a"
120
+ "gitHead": "308a920b305edf33b80a699ce70496c3b854caa9"
121
121
  }
@@ -1395,6 +1395,7 @@
1395
1395
  "text.executed": "executed",
1396
1396
  "text.executing_release_order": "executing release order",
1397
1397
  "text.expiration_date_updated": "expiration date updated",
1398
+ "text.expiration_date_will_be_earlier_than_today": "expiration date will be earlier than today",
1398
1399
  "text.expiry_date_is_empty": "expiry date is empty",
1399
1400
  "text.export_form_is_invalid": "export form is invalid",
1400
1401
  "text.extra_products_approved": "extra product approved",
@@ -1374,6 +1374,7 @@
1374
1374
  "text.eta_date_is_required": "[ko]eta date is required",
1375
1375
  "text.executing_release_order": "출고주문 실행",
1376
1376
  "text.expiration_date_updated": "[ko]expiration date updated",
1377
+ "text.expiration_date_will_be_earlier_than_today": "[ko]expiration date will be earlier than today",
1377
1378
  "text.expiry_date_is_empty": "[ko]expiry date is empty",
1378
1379
  "text.export_form_is_invalid": "export form is invalid",
1379
1380
  "text.extra_products_approved": "추가 상품이 승인되 었습니다",
@@ -1344,6 +1344,7 @@
1344
1344
  "text.eta_date_is_required": "[ms]eta date is required",
1345
1345
  "text.executing_release_order": "laksana pesanan keluar",
1346
1346
  "text.expiration_date_updated": "[ms]expiration date updated",
1347
+ "text.expiration_date_will_be_earlier_than_today": "[ms]expiration date will be earlier than today",
1347
1348
  "text.expiry_date_is_empty": "[ms]expiry date is empty",
1348
1349
  "text.export_form_is_invalid": "export form is invalid",
1349
1350
  "text.extra_products_approved": "produk tambahan diterima",
@@ -1311,6 +1311,7 @@
1311
1311
  "text.eta_date_is_required": "[zh]eta date is required",
1312
1312
  "text.executing_release_order": "executing release order",
1313
1313
  "text.expiration_date_updated": "[zh]expiration date updated",
1314
+ "text.expiration_date_will_be_earlier_than_today": "[zh]expiration date will be earlier than today",
1314
1315
  "text.expiry_date_is_empty": "[zh]expiry date is empty",
1315
1316
  "text.export_form_is_invalid": "export form is invalid",
1316
1317
  "text.extra_products_approved": "extra product approved",