@things-factory/operato-wms 4.3.104 → 4.3.105-alpha.0

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 (52) hide show
  1. package/client/pages/bulk-operation/bulk-operation.js +8 -10
  2. package/client/pages/components/select-inventory-popup.js +7 -1
  3. package/client/pages/components/select-product-popup.js +31 -2
  4. package/client/pages/inbound/undo-putaway-popup.js +5 -9
  5. package/client/pages/inbound/undo-unload-popup.js +15 -2
  6. package/client/pages/inbound/unload-product.js +71 -67
  7. package/client/pages/inventory/inventory-adjustment-approval.js +4 -5
  8. package/client/pages/inventory/inventory-adjustment.js +7 -0
  9. package/client/pages/inventory-check/create-cycle-count.js +2 -3
  10. package/client/pages/inventory-check/inventory-check-list.js +94 -10
  11. package/client/pages/manifest/loading-manifest-detail.js +7 -4
  12. package/client/pages/master/generate-location-list.js +30 -22
  13. package/client/pages/master/location-list.js +114 -73
  14. package/client/pages/master/pallet-list.js +88 -58
  15. package/client/pages/master/product/product-details-popup.js +3 -3
  16. package/client/pages/master/tote-list.js +35 -27
  17. package/client/pages/master/transport-driver.js +50 -41
  18. package/client/pages/master/transport-vehicle.js +45 -41
  19. package/client/pages/master/warehouse-list.js +56 -34
  20. package/client/pages/order/arrival-notice/arrival-notice-detail.js +36 -25
  21. package/client/pages/order/arrival-notice/create-arrival-notice.js +53 -32
  22. package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +2 -0
  23. package/client/pages/order/arrival-notice/edit-product-popup.js +9 -7
  24. package/client/pages/order/draft-release-good/draft-release-good-detail.js +7 -1
  25. package/client/pages/order/release-order/create-release-order.js +24 -5
  26. package/client/pages/order/release-order/release-extra-product-popup.js +4 -1
  27. package/client/pages/order/release-order/release-order-detail.js +4 -0
  28. package/client/pages/order/return-order/create-return-order.js +1 -0
  29. package/client/pages/order/return-order/return-order-inventory-popup.js +1 -0
  30. package/client/pages/outbound/inventory-reassign-popup.js +6 -0
  31. package/client/pages/outbound/packing-product.js +8 -6
  32. package/client/pages/outbound/picking-product.js +11 -1
  33. package/config.development.js +27 -33
  34. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js +4 -5
  35. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js.map +1 -1
  36. package/dist-server/graphql/resolvers/other/add-release-good-products.js +7 -11
  37. package/dist-server/graphql/resolvers/other/add-release-good-products.js.map +1 -1
  38. package/dist-server/graphql/resolvers/reports/costing-report.js +18 -24
  39. package/dist-server/graphql/resolvers/reports/costing-report.js.map +1 -1
  40. package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +6 -6
  41. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +5 -6
  42. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
  43. package/package.json +50 -50
  44. package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.ts +4 -5
  45. package/server/graphql/resolvers/other/add-release-good-products.ts +8 -12
  46. package/server/graphql/resolvers/reports/costing-report.ts +18 -24
  47. package/server/graphql/resolvers/reports/inbound-order-details-report.ts +6 -6
  48. package/server/graphql/resolvers/reports/outbound-order-details-report.ts +5 -6
  49. package/translations/en.json +11 -10
  50. package/translations/ko.json +11 -10
  51. package/translations/ms.json +11 -10
  52. package/translations/zh.json +4 -3
@@ -872,7 +872,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
872
872
 
873
873
  if (changedColumn === 'unitPrice') {
874
874
  let unitPrice = changeRecord.unitPrice
875
- if (typeof unitPrice === undefined || unitPrice < 0) {
875
+ if (typeof unitPrice === undefined || unitPrice < 0 || isNaN(unitPrice)) {
876
876
  throw new Error(i18next.t('text.x_should_be_positive', { state: { x: i18next.t('label.unit_price') } }))
877
877
  }
878
878
  }
@@ -1210,7 +1210,12 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1210
1210
  _validateForm() {
1211
1211
  if (!this.arrivalNoticeForm.checkValidity()) throw new Error(i18next.t('text.arrival_notice_form_invalid'))
1212
1212
 
1213
- if (this._hasContainer) if (!this.containerNo.value) throw new Error(i18next.t('text.container_no_is_empty'))
1213
+ if (this._hasContainer) {
1214
+ if (!this.containerNo.value) throw new Error(i18next.t('text.container_no_is_empty'))
1215
+
1216
+ if (!this.arrivalNoticeForm?.containerSize?.value || this.arrivalNoticeForm?.containerSize?.value == '')
1217
+ throw new Error(i18next.t('text.please_select_container_size'))
1218
+ }
1214
1219
 
1215
1220
  if (this._ownTransport && this._warehouseTransport)
1216
1221
  throw new Error(i18next.t('text.you_can_only_select_one_transport_type'))
@@ -1218,9 +1223,9 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1218
1223
  throw new Error(i18next.t('text.please_select_transport_type'))
1219
1224
  }
1220
1225
 
1221
- _validateProducts() {
1226
+ _validateProducts(records = []) {
1222
1227
  // no records
1223
- const records = this.productGrist.dirtyData.records
1228
+ if (!records?.length) records = this.productGrist.dirtyData.records
1224
1229
  if (!records?.length) throw new Error(i18next.t('text.no_products'))
1225
1230
 
1226
1231
  this._checkProductDuplication()
@@ -1233,6 +1238,10 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1233
1238
  throw new Error(i18next.t('text.empty_value_in_list'))
1234
1239
  }
1235
1240
 
1241
+ if (records.some(({ unitPrice }) => unitPrice < 0)) {
1242
+ throw new Error(i18next.t('text.x_should_be_positive', { state: { x: i18next.t('label.unit_price') } }))
1243
+ }
1244
+
1236
1245
  if (records.some(({ packQty }) => packQty < 0)) {
1237
1246
  throw new Error(i18next.t('text.x_should_be_positive', { state: { x: i18next.t('label.pack_qty') } }))
1238
1247
  }
@@ -1352,6 +1361,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1352
1361
  batchId: record.batchId,
1353
1362
  batchIdRef: record?.batchIdRef ? record.batchIdRef : null,
1354
1363
  product: { id: record.product.id },
1364
+ productDetail: record?.productDetail?.id ? record.productDetail : { id: record.productDetailId },
1355
1365
  packingType: record.packingType,
1356
1366
  packingSize: record.packingSize || record.product.packingSize,
1357
1367
  uomValue: record?.uomValue ? record.uomValue : 0,
@@ -1698,6 +1708,9 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1698
1708
  primaryUnit
1699
1709
  primaryValue
1700
1710
  }
1711
+ productDetail {
1712
+ id
1713
+ }
1701
1714
  }
1702
1715
  }
1703
1716
  `,
@@ -1727,40 +1740,46 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1727
1740
  }
1728
1741
 
1729
1742
  this.productGrist.fetch()
1743
+ } else {
1744
+ throw response.errors
1730
1745
  }
1731
1746
  }
1732
1747
 
1733
1748
  async importHandler(patches) {
1734
- patches.map(itm => {
1735
- itm.unitPrice = parseFloat(itm.unitPrice) || ''
1736
- if (itm.manufactureDate) {
1737
- let mdt = new Date(itm.manufactureDate)
1738
- itm.manufactureDate =
1739
- mdt < new Date() ? `${mdt.getFullYear()}-${mdt.getMonth() + 1}-${mdt.getDate()}` || '' : ''
1740
- } else {
1741
- delete itm.manufactureDate
1742
- }
1743
- itm.uomValue = parseFloat(itm.uomValue) || ''
1744
- itm.packQty = parseFloat(itm.packQty) || ''
1745
- itm.palletQty = parseFloat(itm.palletQty) || ''
1746
- })
1747
-
1748
- this.productData = {
1749
- records: [...patches]
1750
- }
1749
+ try {
1750
+ patches.map(itm => {
1751
+ itm.unitPrice = parseFloat(itm.unitPrice) || ''
1752
+ if (itm.manufactureDate) {
1753
+ let mdt = new Date(itm.manufactureDate)
1754
+ itm.manufactureDate =
1755
+ mdt < new Date() ? `${mdt.getFullYear()}-${mdt.getMonth() + 1}-${mdt.getDate()}` || '' : ''
1756
+ } else {
1757
+ delete itm.manufactureDate
1758
+ }
1759
+ itm.uomValue = parseFloat(itm.uomValue) || ''
1760
+ itm.packQty = parseInt(itm.packQty) || ''
1761
+ itm.palletQty = parseInt(itm.palletQty) || ''
1762
+ })
1751
1763
 
1752
- const orderProducts = patches.map(patch => {
1753
- delete patch.cuFlag
1754
- return {
1755
- ...patch,
1756
- unitPrice: parseFloat(patch.unitPrice) || 0,
1757
- uomValue: parseFloat(patch.uomValue) || 0,
1758
- packQty: parseFloat(patch.packQty) || 0,
1759
- palletQty: parseFloat(patch.palletQty) || 0
1764
+ const orderProducts = patches.map(patch => {
1765
+ delete patch.cuFlag
1766
+ return {
1767
+ ...patch,
1768
+ unitPrice: parseFloat(patch.unitPrice) || 0,
1769
+ uomValue: parseFloat(patch.uomValue) || 0,
1770
+ packQty: parseInt(patch.packQty) || 0,
1771
+ palletQty: parseInt(patch.palletQty) || 0
1772
+ }
1773
+ })
1774
+ this.productData = {
1775
+ records: [...patches]
1760
1776
  }
1761
- })
1762
- await this.bulkUploadValidateOrderProducts(orderProducts)
1763
- history.back()
1777
+ await this.bulkUploadValidateOrderProducts(orderProducts)
1778
+ history.back()
1779
+ } catch (e) {
1780
+ history.back()
1781
+ return
1782
+ }
1764
1783
  }
1765
1784
 
1766
1785
  async _importableData(records) {
@@ -1774,6 +1793,8 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1774
1793
  }
1775
1794
  })
1776
1795
 
1796
+ this._validateProducts(records)
1797
+
1777
1798
  openPopup(
1778
1799
  html`
1779
1800
  <import-pop-up
@@ -1425,6 +1425,7 @@ class DuplicateArrivalNotice extends localize(i18next)(PageView) {
1425
1425
  batchId: record.batchId,
1426
1426
  batchIdRef: record?.batchIdRef ? record.batchIdRef : null,
1427
1427
  product: { id: record.product.id },
1428
+ productDetail: { id: record.productDetailId },
1428
1429
  packingType: record.packingType,
1429
1430
  packingSize: record?.product?.packingSize ? record.product.packingSize : record.packingSize,
1430
1431
  uomValue: record?.uomValue ? record.uomValue : 0,
@@ -1480,6 +1481,7 @@ class DuplicateArrivalNotice extends localize(i18next)(PageView) {
1480
1481
  } else if (record.targetType === VAS_BATCH_AND_PRODUCT_TYPE) {
1481
1482
  result.targetBatchId = record.target.batchId
1482
1483
  result.targetProduct = { id: record.target.productId }
1484
+ result.targetProductDetail = { id: record.target.productDetailId }
1483
1485
  result.packingType = record.packingType
1484
1486
  result.qty = record.qty
1485
1487
  result.uomValue = record.uomValue
@@ -406,7 +406,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
406
406
  return this.shadowRoot.querySelector('data-grist#addProduct')
407
407
  }
408
408
 
409
- _onProductChangeHandler(event) {
409
+ async _onProductChangeHandler(event) {
410
410
  try {
411
411
  this._checkProductDuplication()
412
412
  let changeRecord = event.detail.after
@@ -423,9 +423,9 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
423
423
 
424
424
  const amountRelatedColumns = ['uomValue', 'uom', 'packQty']
425
425
  if (amountRelatedColumns.indexOf(changedColumn) >= 0) {
426
- const calcedAmount = this._calcAmount(changedColumn, changeRecord)
426
+ const calcedAmount = await this._calcAmount(changedColumn, changeRecord)
427
427
  for (let key in calcedAmount) {
428
- changeRecord[key] = calcedAmount[key]
428
+ changeRecord[key] = key == 'packQty' ? Math.ceil(calcedAmount[key]) : calcedAmount[key]
429
429
  }
430
430
  }
431
431
 
@@ -596,8 +596,8 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
596
596
  let existingOrderProducts = []
597
597
  let newOrderProducts = []
598
598
 
599
- existingOrderProducts = this._getExistingOrderProducts()
600
- newOrderProducts = this._getNewOrderProducts()
599
+ existingOrderProducts = await this._getExistingOrderProducts()
600
+ newOrderProducts = await this._getNewOrderProducts()
601
601
 
602
602
  if (existingOrderProducts?.length || newOrderProducts?.length) {
603
603
  const result = await CustomAlert({
@@ -624,8 +624,8 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
624
624
  `,
625
625
  variables: {
626
626
  ganNo: this.ganNo,
627
- newOrderProducts: this._getNewOrderProducts(),
628
- existingOrderProducts: this._getExistingOrderProducts()
627
+ newOrderProducts,
628
+ existingOrderProducts
629
629
  }
630
630
  })
631
631
 
@@ -650,6 +650,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
650
650
  palletQty: 0,
651
651
  adjustedPalletQty: record?.palletQty ? record.palletQty : null,
652
652
  product: { id: record.product.id },
653
+ productDetail: { id: record.productDetailId },
653
654
  packingType: 'N/A',
654
655
  adjustedPackingType: record.packingType,
655
656
  uomValue: 0,
@@ -682,6 +683,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
682
683
  adjustedBatchIdRef: record.batchIdRef === record.__origin__.batchIdRef ? null : record.batchIdRef,
683
684
  adjustedPalletQty: record.palletQty == record.__origin__.palletQty ? null : record.palletQty,
684
685
  product: { id: record.product.id },
686
+ productDetail: { id: record.productDetail.id },
685
687
  adjustedPackingType: record.packingType === record.__origin__.packingType ? null : record.packingType,
686
688
  adjustedUomValue: record.uomValue == record.__origin__.uomValue ? null : record.uomValue,
687
689
  adjustedUom: record.uom === record.__origin__.uom ? null : record.uom,
@@ -543,7 +543,8 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
543
543
  let returnObj = {
544
544
  ...record,
545
545
  ...record.product,
546
- product: { ...record.product, id: record.product.id || record.product.productId },
546
+ product: { ...record.product, id: record.product?.id || record.product.productId },
547
+ productDetail: { id: record.productDetail?.id || record.product.productDetailId },
547
548
  name: record.name ? record.name : idx,
548
549
  releaseQty: record.releaseQty < 0 ? 0 : record.releaseQty,
549
550
  id: record.id
@@ -597,6 +598,7 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
597
598
  select: [
598
599
  { name: 'id', hidden: true },
599
600
  { name: 'productId', hidden: true },
601
+ { name: 'productDetailId', hidden: true },
600
602
  { name: 'remainUomValue', hidden: true },
601
603
  {
602
604
  name: 'groupType',
@@ -816,6 +818,9 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
816
818
  sku
817
819
  description
818
820
  }
821
+ productDetail {
822
+ id
823
+ }
819
824
  packingType
820
825
  packingSize
821
826
  uomValue
@@ -1042,6 +1047,7 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
1042
1047
  id: record.id ? record.id.toString() : null,
1043
1048
  name: record.name ? record.name.toString() : null,
1044
1049
  product: { id: record.product.id },
1050
+ productDetail: { id: record.productDetail.id },
1045
1051
  packingType: record.packingType,
1046
1052
  uomValue: record?.uomValue ? record.uomValue : 0,
1047
1053
  uom: record.uom,
@@ -1202,14 +1202,10 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1202
1202
  this.matchDeliveryAddressInput.checked = false
1203
1203
  this.quickFindContent.currentTabKey = i18next.t('label.order')
1204
1204
 
1205
- this.initProperties()
1205
+ // this.initProperties()
1206
1206
  this._clearGristConditions()
1207
1207
  this._validateTransport()
1208
1208
  this._getAllPostCode()
1209
-
1210
- if (this._exportOptionInput.checked === true && this._recallInput.checked === false) {
1211
- this._exportOption = true
1212
- }
1213
1209
  }
1214
1210
 
1215
1211
  async switchPickingType() {
@@ -1554,6 +1550,9 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1554
1550
  product: {
1555
1551
  id: record?.inventory?.productId,
1556
1552
  name: record?.inventory?.productName
1553
+ },
1554
+ productDetail: {
1555
+ id: record?.inventory?.productDetailId
1557
1556
  }
1558
1557
  }
1559
1558
  }
@@ -1786,6 +1785,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1786
1785
  bundleId
1787
1786
  bundleQty
1788
1787
  productId
1788
+ productDetailId
1789
1789
  productSku
1790
1790
  productName
1791
1791
  productDescription
@@ -2116,6 +2116,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2116
2116
  packingType: record?.inventory?.packingType,
2117
2117
  packingSize: record?.inventory?.packingSize,
2118
2118
  productId: record?.inventory?.productId,
2119
+ productDetailId: record?.inventory?.productDetailId,
2119
2120
  groupType: record?.inventory?.groupType,
2120
2121
  releaseQty: record.releaseQty || 0,
2121
2122
  releaseUomValue: record.releaseUomValue || 0
@@ -2290,6 +2291,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2290
2291
  bundleReleaseDetail = bundleReleaseDetail.records.map(item => {
2291
2292
  return {
2292
2293
  product: { id: item.productId, name: item.productName },
2294
+ productDetail: { id: item.productDetailId },
2293
2295
  batchId: item.batchId,
2294
2296
  packingType: item.packingType,
2295
2297
  packingSize: item.packingSize,
@@ -2326,11 +2328,17 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2326
2328
  id: record.inventory.productId,
2327
2329
  name: record.inventory.productName
2328
2330
  }
2331
+ newRecord.productDetail = {
2332
+ id: record.inventory.productDetailId
2333
+ }
2329
2334
  } else {
2330
2335
  newRecord.product = {
2331
2336
  id: record.inventory.productId || record.inventory.product.id,
2332
2337
  name: record.inventory.productName || record.inventory.product.name
2333
2338
  }
2339
+ newRecord.productDetail = {
2340
+ id: record.inventory.productDetailId || record.inventory.productDetail.id
2341
+ }
2334
2342
  newRecord.inventory = { id: record.id }
2335
2343
  }
2336
2344
 
@@ -2625,6 +2633,10 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2625
2633
  name
2626
2634
  description
2627
2635
  }
2636
+ productDetail {
2637
+ id
2638
+ name
2639
+ }
2628
2640
  }
2629
2641
  }
2630
2642
  }
@@ -2644,6 +2656,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2644
2656
  op.inventory = {
2645
2657
  batchId: op.batchId,
2646
2658
  productId: op.product.id,
2659
+ productDetailId: op.productDetail.id,
2647
2660
  product: op.product,
2648
2661
  productName: op.product.name,
2649
2662
  palletId: i18next.t('label.cross_docking'),
@@ -2728,6 +2741,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2728
2741
  batchId
2729
2742
  batchIdRef
2730
2743
  productId
2744
+ productDetailId
2731
2745
  productSKU
2732
2746
  productName
2733
2747
  remainQty
@@ -2744,6 +2758,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2744
2758
  batchId
2745
2759
  batchIdRef
2746
2760
  productId
2761
+ productDetailId
2747
2762
  productSKU
2748
2763
  productName
2749
2764
  remainQty
@@ -2758,6 +2773,10 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2758
2773
  name
2759
2774
  sku
2760
2775
  }
2776
+ productDetail {
2777
+ id
2778
+ name
2779
+ }
2761
2780
  }
2762
2781
  }
2763
2782
  `,
@@ -356,6 +356,7 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
356
356
  { name: 'palletId', header: i18next.t('field.lot_id') },
357
357
  { name: 'cartonId', header: i18next.t('field.carton_id') },
358
358
  { name: 'product', type: 'object', queryName: 'products' },
359
+ { name: 'productDetail', type: 'object', queryName: 'products', hidden: true },
359
360
  { name: 'batchId', header: i18next.t('field.batch_id') },
360
361
  {
361
362
  name: 'location',
@@ -846,6 +847,7 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
846
847
  } else {
847
848
  newRecord.product = { id: record.inventory.product.id, name: record.inventory.product.name }
848
849
  newRecord.inventory = { id: record.id }
850
+ newRecord.productDetail = { id: record.inventory.productDetail.id }
849
851
  }
850
852
 
851
853
  return newRecord
@@ -865,13 +867,14 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
865
867
  status: ORDER_INVENTORY_STATUS.PENDING.value
866
868
  }
867
869
 
868
- if (record.isCrossDocking) newRecord.crossDocking = true
870
+ if (record.isCrossDocking) existRecord.crossDocking = true
869
871
 
870
872
  if (this._pickingStd === PICKING_STANDARD.SELECT_BY_PRODUCT.value) {
871
873
  existRecord.product = { id: record.inventory.productId, name: record.inventory.productName }
872
874
  } else {
873
875
  existRecord.product = { id: record.inventory.product.id, name: record.inventory.product.name }
874
876
  existRecord.inventory = { id: record.id }
877
+ existRecord.productDetail = { id: record.inventory.productDetail.id }
875
878
  }
876
879
 
877
880
  return existRecord
@@ -1270,6 +1270,9 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1270
1270
  name
1271
1271
  description
1272
1272
  }
1273
+ productDetail {
1274
+ id
1275
+ }
1273
1276
  productName
1274
1277
  packingType
1275
1278
  packingSize
@@ -1356,6 +1359,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1356
1359
  name: inventoryInfo.name,
1357
1360
  palletId: inventoryInfo.palletId,
1358
1361
  product: inventoryInfo.product,
1362
+ productDetail: inventoryInfo.productDetail,
1359
1363
  batchId: inventoryInfo.batchId,
1360
1364
  batchIdRef: inventoryInfo.batchIdRef,
1361
1365
  location: inventoryInfo.location,
@@ -792,6 +792,7 @@ class CreateReturnOrder extends localize(i18next)(PageView) {
792
792
  status: ORDER_INVENTORY_STATUS.PENDING.value
793
793
  }
794
794
  newRecord.product = { id: record?.productId, name: record?.productName }
795
+ newRecord.productDetail = { id: record?.productDetailId }
795
796
  newRecord.inventory = { id: record.id }
796
797
  return newRecord
797
798
  })
@@ -247,6 +247,7 @@ class ReturnOrderInventoryPopup extends localize(i18next)(LitElement) {
247
247
  releaseUomValue
248
248
  palletId
249
249
  productId
250
+ productDetailId
250
251
  releaseGoodName
251
252
  }
252
253
  total
@@ -502,6 +502,9 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
502
502
  description
503
503
  sku
504
504
  }
505
+ productDetail {
506
+ id
507
+ }
505
508
  releaseGood {
506
509
  id
507
510
  name
@@ -1025,6 +1028,7 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
1025
1028
  $worksheetNo: String!
1026
1029
  $batchId: String!
1027
1030
  $productId: String!
1031
+ $productDetailId: String!
1028
1032
  $packingType: String!
1029
1033
  $packingSize: Float!
1030
1034
  $orderProductId: String!
@@ -1034,6 +1038,7 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
1034
1038
  worksheetNo: $worksheetNo
1035
1039
  batchId: $batchId
1036
1040
  productId: $productId
1041
+ productDetailId: $productDetailId
1037
1042
  packingType: $packingType
1038
1043
  packingSize: $packingSize
1039
1044
  orderProductId: $orderProductId
@@ -1045,6 +1050,7 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
1045
1050
  worksheetNo: this.worksheetNo,
1046
1051
  batchId: this._selectedOrderProduct?.batchId,
1047
1052
  productId: this._selectedOrderProduct?.product?.id,
1053
+ productDetailId: this._selectedOrderProduct?.productDetail?.id,
1048
1054
  packingType: this._selectedOrderProduct?.packingType,
1049
1055
  packingSize: this._selectedOrderProduct?.packingSize,
1050
1056
  orderProductId: this._selectedOrderProduct?.id,
@@ -485,14 +485,14 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
485
485
  })
486
486
 
487
487
  if (!response.errors) {
488
- // @oscar a more efficient writing of this line of code would be defining a const for the response of accessing releaseGood, kindly improve this.
489
- if (response.data.packingWorksheet.worksheetInfo.releaseGood.isOrderInventoryBin) {
490
- this.totalBinRO = response.data.packingWorksheet.worksheetInfo.releaseGood.totalInventoriesByBin
488
+ let releaseGood = response.data.packingWorksheet.worksheetInfo?.releaseGood
489
+ if (releaseGood?.isOrderInventoryBin) {
490
+ this.totalBinRO = releaseGood?.totalInventoriesByBin
491
491
  this.binRo = releaseGoodNo
492
492
  }
493
493
 
494
- this.releaseGoodNo = response.data.packingWorksheet.worksheetInfo.releaseGood.name
495
- this.releaseGoodId = response.data.packingWorksheet.worksheetInfo.releaseGood.id
494
+ this.releaseGoodNo = releaseGood?.name
495
+ this.releaseGoodId = releaseGood?.id
496
496
  if (!response.data?.packingWorksheet) return
497
497
 
498
498
  const { worksheetInfo, worksheetDetailInfos } = response.data.packingWorksheet
@@ -770,7 +770,9 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
770
770
  this.serialInput.value = ''
771
771
  }
772
772
 
773
- // this.fetchInventories(this.releaseGoodNo)
773
+ if (!this._enableProductScanning) {
774
+ this.fetchInventories(this.releaseGoodNo)
775
+ }
774
776
  }
775
777
  } catch (e) {
776
778
  if (this._isRequireSerialNumberScanningOutbound && this._isBatchPicking) this.serialInput.value = ''
@@ -637,6 +637,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
637
637
  }
638
638
  record.locationName = record?.location?.name
639
639
  record.product = record?.relatedOrderInv && record?.relatedOrderInv?.product
640
+ record.productDetail = record?.relatedOrderInv.productDetail
640
641
 
641
642
  if (this._crossDocking) {
642
643
  record.batchId = record.relatedOrderInv.batchId
@@ -1030,7 +1031,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1030
1031
  batchId: this._selectedOrderInventory.batchId,
1031
1032
  packingType: this._selectedOrderInventory.packingType,
1032
1033
  packingSize: this._selectedOrderInventory.packingSize,
1033
- product: { id: this._selectedOrderInventory.product.id }
1034
+ productDetail: { id: this._selectedOrderInventory.productDetail.id }
1034
1035
  },
1035
1036
  binLocationName:
1036
1037
  this._hasBinPicking && (!this.toteNo || this.tote == '') ? this.binLocationInput.value : null,
@@ -1391,6 +1392,9 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1391
1392
  description
1392
1393
  isRequireSerialNumberScanningOutbound
1393
1394
  }
1395
+ productDetail {
1396
+ id
1397
+ }
1394
1398
  }
1395
1399
  }
1396
1400
  }
@@ -1540,6 +1544,9 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1540
1544
  description
1541
1545
  sku
1542
1546
  }
1547
+ productDetail {
1548
+ id
1549
+ }
1543
1550
  }
1544
1551
  }
1545
1552
  }
@@ -1855,6 +1862,9 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1855
1862
  name
1856
1863
  description
1857
1864
  }
1865
+ productDetail {
1866
+ id
1867
+ }
1858
1868
  }
1859
1869
  }
1860
1870
  }
@@ -4,45 +4,33 @@ module.exports = {
4
4
  useVirtualHostBasedDomain: false,
5
5
  fallbackRoute: '/',
6
6
  subdomainOffset: 2,
7
- port: 4000,
8
- inspect: '9330',
7
+ port: 1100,
8
+ inspect: '9430',
9
+ ormconfig: {
10
+ name: 'default',
11
+ type: 'postgres',
12
+ database: 'dev3',
13
+ username: 'postgres',
14
+ password: 'hatio',
15
+ host: '192.168.0.153',
16
+ port: 15432,
17
+ synchronize: true,
18
+ logging: true
19
+ },
9
20
  // ormconfig: {
10
21
  // name: 'default',
11
22
  // type: 'postgres',
12
- // database: 'dev2',
23
+ // database: 'dev',
13
24
  // username: 'postgres',
14
- // password: 'hatio',
15
- // host: '192.168.0.153',
16
- // port: 15432,
17
- // synchronize: true,
25
+ // password: 'abcd1234',
26
+ // host: 'operatov3.cluster-cijhm4n1hbst.ap-southeast-1.rds.amazonaws.com',
27
+ // port: 55432,
28
+ // synchronize: false,
18
29
  // logging: true
19
30
  // },
20
- ormconfig: {
21
- name: 'default',
22
- type: 'postgres',
23
- host: 'operatov3.cluster-cijhm4n1hbst.ap-southeast-1.rds.amazonaws.com',
24
- port: 55432,
25
- database: 'dev',
26
- username: 'postgres',
27
- password: 'abcd1234',
28
- synchronize: false,
29
- logging: true,
30
- connectTimeoutMS: 30000,
31
- extra: { poolSize: 30 }
31
+ sellercraftIntegrationConfig: {
32
+ apiKey: 'Et0KqtLvA6e92bDvOywy9eCCud4hpAal8akpqI90'
32
33
  },
33
- //ormconfig: {
34
- // name: 'default',
35
- // type: 'postgres',
36
- // database: 'dev2',
37
- // username: 'postgres',
38
- // password: 'hatio',
39
- // host: 'localhost',
40
- // port: 15432,
41
- // synchronize: false,
42
- // logging: true,
43
- // connectTimeoutMS: 30000,
44
- // extra: { poolSize: 30 }
45
- //},
46
34
  SECRET: '0xD58F835B69D207A76CC5F84a70a1D0d4C79dfC95',
47
35
  password: {
48
36
  lowerCase: true,
@@ -56,6 +44,13 @@ module.exports = {
56
44
  looseCharacterLength: 4,
57
45
  history: 2
58
46
  },
47
+ // storage: {
48
+ // type: 's3',
49
+ // accessKeyId: 'AKIAUQEOPWEJCDH6AR5H',
50
+ // secretAccessKey: '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',
51
+ // bucketName: 'opa-one',
52
+ // region: 'ap-southeast-1'
53
+ // },
59
54
  uploads: 'uploads',
60
55
  attachmentsPath: 'attachments',
61
56
  logger: {
@@ -105,6 +100,5 @@ module.exports = {
105
100
  // privateKey: '4pmlt3Wk019u7nqU3Q_oGZE6LbUDjjf8DpmAcn9-iss'
106
101
  // }
107
102
  },
108
- // reportApiUrl: 'http://localhost:8888/rest/report/show_html'
109
103
  reportApiUrl: 'http://192.168.0.153:8888/rest/report/show_html'
110
104
  }
@@ -49,7 +49,7 @@ exports.elcclInventoryHistoryReport = {
49
49
  create temp table temp_data_src AS
50
50
  (
51
51
  SELECT prd.sku AS product_sku, prd.name AS product_name, prd.description AS product_description, trim(invh.batch_id) as batch_id, invh.product_id,
52
- invh.packing_type, invh.bizplace_id, invh.domain_id,
52
+ invh.product_detail_id, invh.packing_type, invh.bizplace_id, invh.domain_id,
53
53
  invh.ref_order_id, invh.order_no, invh.order_ref_no, invh.transaction_type, invh.created_at,
54
54
  invh.qty, invh.opening_qty, invh.uom_value, invh.opening_uom_value
55
55
  FROM reduced_inventory_histories invh
@@ -74,15 +74,14 @@ exports.elcclInventoryHistoryReport = {
74
74
  0 AS rn,
75
75
  $1 AS created_at
76
76
  FROM (
77
- SELECT src.product_sku, src.product_name, src.product_description, src.batch_id, src.product_id, src.packing_type, src.bizplace_id,
77
+ SELECT src.product_sku, src.product_name, src.product_description, src.batch_id, src.product_id, src.product_detail_id, src.packing_type, src.bizplace_id,
78
78
  src.domain_id
79
79
  FROM temp_data_src src
80
- GROUP BY src.product_sku, src.product_name, src.product_description, src.batch_id, src.product_id, src.packing_type, src.bizplace_id,
80
+ GROUP BY src.product_sku, src.product_name, src.product_description, src.batch_id, src.product_id, src.product_detail_id, src.packing_type, src.bizplace_id,
81
81
  src.domain_id
82
82
  ) AS src
83
83
  LEFT JOIN inventory_histories invh ON src.batch_id = trim(invh.batch_id) AND
84
- src.product_id = invh.product_id AND
85
- src.packing_type = invh.packing_type AND
84
+ src.product_detail_id = invh.product_detail_id AND
86
85
  src.bizplace_id = invh.bizplace_id AND
87
86
  src.domain_id = invh.domain_id AND
88
87
  invh.created_at < $1::timestamp AND