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

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