@things-factory/operato-wms 4.3.113-alpha.0 → 4.3.115

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 (68) hide show
  1. package/client/pages/bulk-operation/bulk-operation.js +3 -23
  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 +24 -19
  6. package/client/pages/inbound/unload-product.js +67 -72
  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/check-inventory-popup.js +1 -4
  10. package/client/pages/inventory-check/create-cycle-count.js +3 -2
  11. package/client/pages/inventory-check/cycle-count-report.js +32 -19
  12. package/client/pages/inventory-check/inspecting-product.js +14 -30
  13. package/client/pages/inventory-check/inventory-check-list.js +0 -2
  14. package/client/pages/manifest/loading-manifest-detail.js +4 -7
  15. package/client/pages/master/generate-location-list.js +22 -30
  16. package/client/pages/master/location-list.js +71 -134
  17. package/client/pages/master/pallet-list.js +58 -137
  18. package/client/pages/master/product/product-details-popup.js +3 -3
  19. package/client/pages/master/tote-list.js +27 -40
  20. package/client/pages/master/transport-driver.js +41 -50
  21. package/client/pages/master/transport-vehicle.js +41 -45
  22. package/client/pages/master/warehouse-list.js +34 -56
  23. package/client/pages/order/arrival-notice/arrival-notice-detail.js +25 -36
  24. package/client/pages/order/arrival-notice/create-arrival-notice.js +32 -53
  25. package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +0 -2
  26. package/client/pages/order/arrival-notice/edit-product-popup.js +7 -9
  27. package/client/pages/order/draft-release-good/draft-release-good-detail.js +2 -39
  28. package/client/pages/order/goods-received-note/received-note-list.js +32 -9
  29. package/client/pages/order/release-order/create-release-order.js +5 -22
  30. package/client/pages/order/release-order/release-extra-product-popup.js +1 -4
  31. package/client/pages/order/release-order/release-order-detail.js +0 -24
  32. package/client/pages/order/return-order/create-return-order.js +0 -5
  33. package/client/pages/order/return-order/return-order-inventory-popup.js +0 -1
  34. package/client/pages/order/transport-order/delivery-order-list.js +0 -26
  35. package/client/pages/outbound/inventory-reassign-popup.js +0 -6
  36. package/client/pages/outbound/packing-product.js +5 -5
  37. package/client/pages/outbound/packing-worksheet-list.js +1 -3
  38. package/client/pages/outbound/picking-product.js +7 -22
  39. package/client/pages/outbound/show-my-worksheet-list-popup.js +3 -12
  40. package/client/pages/outbound/show-ro-list-popup.js +0 -2
  41. package/client/pages/outbound/sorting-product.js +0 -6
  42. package/client/pages/report/custom-elccl/elccl-daily-collection-report.js +2 -5
  43. package/client/pages/report/custom-elccl/elccl-daily-order-inventory-report.js +2 -2
  44. package/client/pages/report/custom-elccl/elccl-delivery-order-summary.js +8 -48
  45. package/client/pages/vas/print-product-label.js +11 -13
  46. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js +5 -4
  47. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js.map +1 -1
  48. package/dist-server/graphql/resolvers/other/add-release-good-products.js +11 -7
  49. package/dist-server/graphql/resolvers/other/add-release-good-products.js.map +1 -1
  50. package/dist-server/graphql/resolvers/reports/costing-report.js +24 -18
  51. package/dist-server/graphql/resolvers/reports/costing-report.js.map +1 -1
  52. package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +6 -6
  53. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +6 -5
  54. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
  55. package/dist-server/graphql/resolvers/reports/release-inventory-report.js +3 -3
  56. package/dist-server/graphql/resolvers/reports/release-inventory-report.js.map +1 -1
  57. package/package.json +50 -50
  58. package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.ts +5 -4
  59. package/server/graphql/resolvers/other/add-release-good-products.ts +12 -8
  60. package/server/graphql/resolvers/reports/costing-report.ts +24 -18
  61. package/server/graphql/resolvers/reports/inbound-order-details-report.ts +6 -6
  62. package/server/graphql/resolvers/reports/outbound-order-details-report.ts +6 -5
  63. package/server/graphql/resolvers/reports/release-inventory-report.ts +4 -6
  64. package/translations/en.json +5 -18
  65. package/translations/ko.json +4 -17
  66. package/translations/ms.json +4 -17
  67. package/translations/zh.json +4 -17
  68. package/config.development.js +0 -110
@@ -325,7 +325,6 @@ class DeliveryOrderList extends localize(i18next)(PageView) {
325
325
  async fetchHandler({ page, limit, sorters = [] }) {
326
326
  let filters = this.searchForm.queryFilters
327
327
  var tzoffset = new Date().getTimezoneOffset() * 60
328
- if (!this._validateDateRange()) return
329
328
 
330
329
  const response = await client.query({
331
330
  query: gql`
@@ -414,20 +413,6 @@ class DeliveryOrderList extends localize(i18next)(PageView) {
414
413
  }
415
414
  }
416
415
 
417
- _validateDateRange() {
418
- if (this._fromDateInput.value === '') {
419
- this._showToast({ message: i18next.t('text.from_date_cannot_be_empty') })
420
- return false
421
- } else if (this._toDateInput.value === '') {
422
- this._showToast({ message: i18next.t('text.to_date_cannot_be_empty') })
423
- return false
424
- } else if (this._fromDateInput.value > this._toDateInput.value) {
425
- this._showToast({ message: i18next.t('text.to_date_cannot_be_before_from_date') })
426
- return false
427
- }
428
- return true
429
- }
430
-
431
416
  _compareValues(key, order = 'asc') {
432
417
  return function innerSort(a, b) {
433
418
  if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {
@@ -496,17 +481,6 @@ class DeliveryOrderList extends localize(i18next)(PageView) {
496
481
 
497
482
  this._toDateInput.min = min
498
483
  }
499
-
500
- _showToast({ type, message }) {
501
- document.dispatchEvent(
502
- new CustomEvent('notify', {
503
- detail: {
504
- type,
505
- message
506
- }
507
- })
508
- )
509
- }
510
484
  }
511
485
 
512
486
  window.customElements.define('delivery-order-list', DeliveryOrderList)
@@ -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
@@ -370,9 +370,7 @@ class PackingWorksheetList extends localize(i18next)(PageView) {
370
370
  async _activateWorksheet() {
371
371
  try {
372
372
  let selectedItem = this.dataGrist.selected.filter(i => i.status == 'DEACTIVATED')
373
- if (selectedItem.length <= 0) {
374
- this._showToast({ message: 'No orders have been selected' })
375
- } else {
373
+ if (selectedItem.length > 0) {
376
374
  const result = await CustomAlert({
377
375
  title: i18next.t('title.are_you_sure'),
378
376
  text: i18next.t('text.activate_packing_worksheet'),
@@ -145,9 +145,9 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
145
145
 
146
146
  if (
147
147
  (this.releaseGoodId || this.taskNo) &&
148
- (this._selectedOrderInventory?.status && this._selectedOrderInventory?.status !== 'MISSING') &&
148
+ this._selectedOrderInventory?.status !== 'MISSING' &&
149
149
  this._selectedOrderInventory?.hasMissingInventoryChanges !== true &&
150
- (this._selectedOrderInventory?.status && this._selectedOrderInventory?.status !== 'DONE')
150
+ this._selectedOrderInventory?.status !== 'DONE'
151
151
  ) {
152
152
  actions.push({
153
153
  title: i18next.t('button.missing_stock'),
@@ -314,7 +314,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
314
314
  `
315
315
  )}
316
316
  </select>
317
-
318
317
  <label>
319
318
  ${this.refPickingType === PICKING_TYPES.PICKING.value
320
319
  ? i18next.t('label.release_good_no')
@@ -355,7 +354,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
355
354
  this._enableProductScanning = enableProductScanning
356
355
  this._enableToteScanning = enableToteScanning
357
356
  this._enableInputQty = enableInputQty
358
-
359
357
  this.focusOnInput()
360
358
  }
361
359
  } catch (e) {}
@@ -364,7 +362,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
364
362
  </barcode-scanable-input>
365
363
  </fieldset>
366
364
  </form>
367
-
368
365
  <form id="input-form" class="multi-column-form" @keypress="${this.picking.bind(this)}">
369
366
  ${this.scannable
370
367
  ? html`
@@ -449,7 +446,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
449
446
  `
450
447
  : ''}
451
448
  </form>
452
-
453
449
  <data-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.config} .data=${this.data}
454
450
  ><div slot="headroom" id="form-section">
455
451
  <form id="info-form" class="multi-column-form">
@@ -504,19 +500,19 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
504
500
  if (this.palletInput) this.palletInput.value = ''
505
501
  if (this.serialInput) this.serialInput.value = ''
506
502
 
503
+ this._selectedOrderInventory = record
504
+
507
505
  await this.fetchInventories(
508
506
  this.refPickingType === PICKING_TYPES.PICKING.value ? this.releaseGoodNo : this.taskNo
509
507
  )
510
508
 
511
- this.focusOnInput()
509
+ this.focusOnInput
512
510
  let updatedRecords = this._selectedOrderInventory
513
511
  if (updatedRecords.releaseQty === updatedRecords.pickedQty) {
514
512
  updatedRecords.status = 'DONE'
515
513
  } else {
516
514
  updatedRecords.status = 'PICKING'
517
515
  }
518
- this._selectedOrderInventory = record
519
- this.updateContext()
520
516
  }
521
517
  } catch (ex) {
522
518
  console.log(ex)
@@ -637,7 +633,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
637
633
  }
638
634
  record.locationName = record?.location?.name
639
635
  record.product = record?.relatedOrderInv && record?.relatedOrderInv?.product
640
- record.productDetail = record?.relatedOrderInv.productDetail
641
636
 
642
637
  if (this._crossDocking) {
643
638
  record.batchId = record.relatedOrderInv.batchId
@@ -1031,7 +1026,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1031
1026
  batchId: this._selectedOrderInventory.batchId,
1032
1027
  packingType: this._selectedOrderInventory.packingType,
1033
1028
  packingSize: this._selectedOrderInventory.packingSize,
1034
- productDetail: { id: this._selectedOrderInventory.productDetail.id }
1029
+ product: { id: this._selectedOrderInventory.product.id }
1035
1030
  },
1036
1031
  binLocationName:
1037
1032
  this._hasBinPicking && (!this.toteNo || this.tote == '') ? this.binLocationInput.value : null,
@@ -1392,9 +1387,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1392
1387
  description
1393
1388
  isRequireSerialNumberScanningOutbound
1394
1389
  }
1395
- productDetail {
1396
- id
1397
- }
1398
1390
  }
1399
1391
  }
1400
1392
  }
@@ -1544,9 +1536,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1544
1536
  description
1545
1537
  sku
1546
1538
  }
1547
- productDetail {
1548
- id
1549
- }
1550
1539
  }
1551
1540
  }
1552
1541
  }
@@ -1637,7 +1626,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1637
1626
  }
1638
1627
 
1639
1628
  this.updateContext()
1640
- // if (this.data.records.every(record => record.completed))
1641
1629
  }
1642
1630
 
1643
1631
  async fetchPalletsHandler(releaseGoodNo) {
@@ -1863,9 +1851,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1863
1851
  name
1864
1852
  description
1865
1853
  }
1866
- productDetail {
1867
- id
1868
- }
1869
1854
  }
1870
1855
  }
1871
1856
  }
@@ -1919,7 +1904,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1919
1904
 
1920
1905
  async showWorksheetList() {
1921
1906
  await sleep(1010)
1922
- openPopup(html` <show-my-worksheet-list-popup .type=${this.refPickingType}></show-my-worksheet-list-popup> `, {
1907
+ openPopup(html` <show-my-worksheet-list-popup></show-my-worksheet-list-popup> `, {
1923
1908
  backdrop: true,
1924
1909
  size: 'small',
1925
1910
  title: i18next.t('title.my_worksheet_list')
@@ -10,8 +10,7 @@ class ShowMyWorksheetListPopup extends localize(i18next)(LitElement) {
10
10
  return {
11
11
  pendingNum: Number,
12
12
  pickingNum: Number,
13
- userId: String,
14
- type: String
13
+ userId: String
15
14
  }
16
15
  }
17
16
 
@@ -56,19 +55,11 @@ class ShowMyWorksheetListPopup extends localize(i18next)(LitElement) {
56
55
  }
57
56
 
58
57
  goToPendingList() {
59
- if (this.type == 'PICKING') {
60
- navigate(`single_outbound_worksheets?status=${WORKSHEET_STATUS.DEACTIVATED.value}&assigneeId=${this.userId}`)
61
- } else {
62
- navigate(`merged_outbound_worksheets?status=${WORKSHEET_STATUS.DEACTIVATED.value}&assigneeId=${this.userId}`)
63
- }
58
+ navigate(`single_outbound_worksheets?status=${WORKSHEET_STATUS.DEACTIVATED.value}&assigneeId=${this.userId}`)
64
59
  }
65
60
 
66
61
  goToPickingList() {
67
- if (this.type == 'PICKING') {
68
- navigate(`single_outbound_worksheets?status=${WORKSHEET_STATUS.EXECUTING.value}&assigneeId=${this.userId}`)
69
- } else {
70
- navigate(`merged_outbound_worksheets?status=${WORKSHEET_STATUS.EXECUTING.value}&assigneeId=${this.userId}`)
71
- }
62
+ navigate(`single_outbound_worksheets?status=${WORKSHEET_STATUS.EXECUTING.value}&assigneeId=${this.userId}`)
72
63
  }
73
64
 
74
65
  async getPickingAssignmentStatus() {
@@ -61,7 +61,6 @@ class ShowRoListPopup extends localize(i18next)(LitElement) {
61
61
  height: var(--button-container-button-height);
62
62
  border: var(--button-container-button-border);
63
63
  margin: var(--button-container-button-margin);
64
-
65
64
  padding: var(--button-padding);
66
65
  color: var(--theme-white-color);
67
66
  font: var(--button-font);
@@ -90,7 +89,6 @@ class ShowRoListPopup extends localize(i18next)(LitElement) {
90
89
  ></data-grist>
91
90
  </div>
92
91
  </div>
93
-
94
92
  <div class="button-container">
95
93
  <mwc-button raised @click=${this._selectReleaseOrder.bind(this)}>${i18next.t('button.confirm')}</mwc-button>
96
94
  </div>
@@ -46,23 +46,19 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
46
46
  flex-direction: column;
47
47
  overflow: hidden;
48
48
  }
49
-
50
49
  data-grist {
51
50
  overflow: auto;
52
51
  flex: 1;
53
52
  }
54
-
55
53
  #form-section {
56
54
  background-color: white;
57
55
  }
58
-
59
56
  h2 {
60
57
  padding: var(--subtitle-padding);
61
58
  font: var(--subtitle-font);
62
59
  color: var(--subtitle-text-color);
63
60
  border-bottom: var(--subtitle-border-bottom);
64
61
  }
65
-
66
62
  legend mwc-icon {
67
63
  vertical-align: middle;
68
64
  margin: var(--grist-title-icon-margin);
@@ -189,7 +185,6 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
189
185
  ></barcode-scanable-input>
190
186
  </fieldset>
191
187
  </form>
192
-
193
188
  <form id="input-form" class="multi-column-form" @keypress="${this._sorting.bind(this)}">
194
189
  <fieldset>
195
190
  ${this._enableProductScanning
@@ -213,7 +208,6 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
213
208
  : ``}
214
209
  </fieldset>
215
210
  </form>
216
-
217
211
  <data-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.config} .data=${this.data}>
218
212
  <div slot="headroom" id="form-section">
219
213
  <form id="info-form" class="multi-column-form">
@@ -7,7 +7,6 @@ import { connect } from 'pwa-helpers/connect-mixin'
7
7
 
8
8
  import { i18next, localize } from '@things-factory/i18n-base'
9
9
  import { client, PageView, store } from '@things-factory/shell'
10
- import { showToast } from '../../../util'
11
10
  class ElcclDailyCollectionReport extends connect(store)(localize(i18next)(PageView)) {
12
11
  static get styles() {
13
12
  return css`
@@ -268,7 +267,7 @@ class ElcclDailyCollectionReport extends connect(store)(localize(i18next)(PageVi
268
267
  records: this.data.records
269
268
  }
270
269
  } catch (e) {
271
- showToast(e)
270
+ console.log(e)
272
271
  }
273
272
  }
274
273
 
@@ -300,8 +299,6 @@ class ElcclDailyCollectionReport extends connect(store)(localize(i18next)(PageVi
300
299
  // if (!this._bizplaceSelector.value) throw new Error(i18next.t('text.company_does_not_selected'))
301
300
  if (!this._fromDateInput.value) throw new Error(i18next.t('text.from_date_is_empty'))
302
301
  if (!this._toDateInput.value) throw new Error(i18next.t('text.to_date_is_empty'))
303
- if (this._fromDateInput.value > this._toDateInput.value)
304
- throw new Error(i18next.t('text.to_date_cannot_be_before_from_date'))
305
302
  }
306
303
 
307
304
  _modifyDateRange(e) {
@@ -334,7 +331,7 @@ class ElcclDailyCollectionReport extends connect(store)(localize(i18next)(PageVi
334
331
  totals: []
335
332
  }
336
333
  } catch (e) {
337
- showToast(e)
334
+ this._showToast(e)
338
335
  }
339
336
  }
340
337
  }
@@ -295,7 +295,7 @@ class ElcclDailyOrderInventoryReport extends connect(store)(localize(i18next)(Pa
295
295
  records: response.data.elcclDailyOrderInventoryReport.items.map(item => flattenObject(item)) || []
296
296
  }
297
297
  } catch (e) {
298
- this._showToast(e)
298
+ console.log(e)
299
299
  }
300
300
  }
301
301
 
@@ -324,7 +324,7 @@ class ElcclDailyOrderInventoryReport extends connect(store)(localize(i18next)(Pa
324
324
  _validate() {
325
325
  if (!this.searchForm.shadowRoot.querySelector('form').checkValidity())
326
326
  throw new Error(i18next.t('text.invalid_form_value'))
327
- if (!this._bizplaceSelector.value) throw new Error(i18next.t('text.no_company_selected'))
327
+ if (!this._bizplaceSelector.value) throw new Error(i18next.t('text.customer_does_not_selected'))
328
328
  if (!this._monthInput.value) throw new Error(i18next.t('text.month_is_empty'))
329
329
  }
330
330
 
@@ -103,7 +103,7 @@ class ElcclDeliveryOrderSummary extends connect(store)(localize(i18next)(PageVie
103
103
  },
104
104
  value: (() => {
105
105
  let date = new Date()
106
- date.setMonth(date.getMonth() - 3)
106
+ date.setTime(date.getTime() - 86400000 * 7)
107
107
  return date.toISOString().split('T')[0]
108
108
  })(),
109
109
  handlers: { change: this._modifyDateRange.bind(this) }
@@ -116,14 +116,10 @@ class ElcclDeliveryOrderSummary extends connect(store)(localize(i18next)(PageVie
116
116
  searchOper: 'lte',
117
117
  min: (() => {
118
118
  let date = new Date()
119
- date.setMonth(date.getMonth() - 3)
119
+ date.setTime(date.getTime() - 86400000 * 7)
120
120
  return date.toISOString().split('T')[0]
121
121
  })(),
122
- max: (() => {
123
- var max = new Date()
124
- max.setMonth(max.getMonth())
125
- return max.toISOString().split('T')[0]
126
- })()
122
+ max: new Date().toISOString().split('T')[0]
127
123
  },
128
124
  value: new Date().toISOString().split('T')[0]
129
125
  }
@@ -206,7 +202,6 @@ class ElcclDeliveryOrderSummary extends connect(store)(localize(i18next)(PageVie
206
202
  }
207
203
 
208
204
  async fetchHandler({ page, limit, sorters = [{ name: 'createdAt' }] }) {
209
- if (!this._validateDateRange()) return
210
205
  let filters = this.searchForm.queryFilters
211
206
  let dates = filters
212
207
  .filter(x => x.name == 'fromDate' || x.name == 'toDate')
@@ -297,13 +292,13 @@ class ElcclDeliveryOrderSummary extends connect(store)(localize(i18next)(PageVie
297
292
  response.data.deliveryOrderReport.items.map(itm => {
298
293
  let remarks = (itm.orderInventories || []).reduce((acc, itm) => {
299
294
  let dt = {
300
- product_name: `${itm.inventory?.product?.name} (${itm.inventory?.product?.description})`,
301
- product_batch: itm.inventory?.batchId,
302
- remark: itm?.remark,
303
- inventory_remark: itm.inventory?.remark,
295
+ product_name: `${itm.inventory.product.name} (${itm.inventory.product.description})`,
296
+ product_batch: itm.inventory.batchId,
297
+ remark: itm.remark,
298
+ inventory_remark: itm.inventory.remark,
304
299
  pallet:
305
300
  itm.inventory?.reusablePallet && itm.inventory?.reusablePallet?.name
306
- ? itm.inventory?.reusablePallet?.name
301
+ ? itm.inventory.reusablePallet.name
307
302
  : ''
308
303
  }
309
304
 
@@ -383,39 +378,18 @@ class ElcclDeliveryOrderSummary extends connect(store)(localize(i18next)(PageVie
383
378
  if (!this._toDateInput.value) throw new Error(i18next.t('text.to_date_is_empty'))
384
379
  }
385
380
 
386
- // _modifyDateRange(e) {
387
- // const fromDate = e.currentTarget.value
388
-
389
- // if (this._toDateInput.value < fromDate) this._toDateInput.value = fromDate
390
-
391
- // let min = new Date(fromDate)
392
- // let today = new Date()
393
- // today.setHours(0, 0, 0, 0)
394
-
395
- // min = min.toISOString().split('T')[0]
396
-
397
- // this._toDateInput.min = min
398
- // }
399
-
400
381
  _modifyDateRange(e) {
401
382
  const fromDate = e.currentTarget.value
402
383
 
403
384
  if (this._toDateInput.value < fromDate) this._toDateInput.value = fromDate
404
385
 
405
386
  let min = new Date(fromDate)
406
- let max = new Date(fromDate)
407
- max.setMonth(max.getMonth() + 3)
408
-
409
387
  let today = new Date()
410
388
  today.setHours(0, 0, 0, 0)
411
389
 
412
390
  min = min.toISOString().split('T')[0]
413
- max = max.toISOString().split('T')[0]
414
-
415
- if (this._toDateInput.value > max) this._toDateInput.value = max
416
391
 
417
392
  this._toDateInput.min = min
418
- this._toDateInput.max = max
419
393
  }
420
394
 
421
395
  async _exportableData() {
@@ -436,20 +410,6 @@ class ElcclDeliveryOrderSummary extends connect(store)(localize(i18next)(PageVie
436
410
  }
437
411
  }
438
412
 
439
- _validateDateRange() {
440
- if (this._fromDateInput.value === '') {
441
- this._showToast({ message: i18next.t('text.from_date_cannot_be_empty') })
442
- return false
443
- } else if (this._toDateInput.value === '') {
444
- this._showToast({ message: i18next.t('text.to_date_cannot_be_empty') })
445
- return false
446
- } else if (this._fromDateInput.value > this._toDateInput.value) {
447
- this._showToast({ message: i18next.t('text.to_date_cannot_be_before_from_date') })
448
- return false
449
- }
450
- return true
451
- }
452
-
453
413
  _showToast({ type, message }) {
454
414
  document.dispatchEvent(
455
415
  new CustomEvent('notify', {
@@ -298,7 +298,7 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
298
298
  const filters = [{ name: 'status', operator: 'notin', value: ['INTRANSIT', 'TERMINATED', 'DELETED'] }]
299
299
 
300
300
  if (searchInfo.productInfo !== '')
301
- filters.push({ name: 'product_info', operator: 'eq', value: searchInfo.productInfo })
301
+ filters.push({ name: 'productInfo', operator: 'eq', value: searchInfo.productInfo })
302
302
 
303
303
  if (searchInfo.batchId !== '')
304
304
  filters.push({ name: 'batch_id', operator: 'i_like', value: `%${searchInfo.batchId}%` })
@@ -646,10 +646,10 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
646
646
  auxValue1
647
647
  auxUnit2
648
648
  auxValue2
649
- productDetails {
650
- name
651
- gtin
652
- }
649
+ }
650
+ productDetail {
651
+ name
652
+ gtin
653
653
  }
654
654
  bizplace {
655
655
  id
@@ -693,14 +693,12 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
693
693
  bizplaceName: inventory.bizplace.name
694
694
  }
695
695
 
696
- if (product.productDetails && product.productDetails.length) {
697
- return product.productDetails.map(productDetail => {
698
- return {
699
- ...record,
700
- gtin: productDetail.gtin,
701
- productName: product.name
702
- }
703
- })
696
+ if (inventory?.productDetail) {
697
+ return {
698
+ ...record,
699
+ gtin: inventory.productDetail.gtin,
700
+ productName: inventory.productDetail.name
701
+ }
704
702
  } else {
705
703
  return {
706
704
  ...record,
@@ -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
@@ -1 +1 @@
1
- {"version":3,"file":"elccl-inventory-history-report.js","sourceRoot":"","sources":["../../../../../server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.ts"],"names":[],"mappings":";;;AAEA,uDAAmD;AAGtC,QAAA,2BAA2B,GAAG;IACzC,KAAK,CAAC,2BAA2B,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACvE,IAAI;YACF,oDAAoD;YACpD,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;YAEnD,IAAI,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA;YAE1E,IAAI,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA;YACpE,IAAI,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAA;YAChE,IAAI,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA;YACnE,IAAI,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAA;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AA;YAED,MAAM,EAAE,CAAC,KAAK,CACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAoDI,EACJ,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAC/B,CAAA;YAED,MAAM,MAAM,GAAQ,MAAM,EAAE,CAAC,KAAK,CAChC;;;;;;;;;;SAUC,CACF,CAAA;YAED,EAAE,CAAC,KAAK,CACN;;SAEC,CACF,CAAA;YAED,IAAI,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBAC3B,OAAO;oBACL,OAAO,EAAE,GAAG,CAAC,QAAQ;oBACrB,WAAW,EAAE,GAAG,CAAC,YAAY;oBAC7B,OAAO,EAAE;wBACP,EAAE,EAAE,GAAG,CAAC,UAAU;wBAClB,GAAG,EAAE,GAAG,CAAC,WAAW;wBACpB,IAAI,EAAE,GAAG,CAAC,YAAY;wBACtB,WAAW,EAAE,GAAG,CAAC,mBAAmB;qBACrC;oBACD,KAAK,EAAE,GAAG,CAAC,MAAM;oBACjB,GAAG,EAAE,GAAG,CAAC,GAAG;oBACZ,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,UAAU,EAAE,GAAG,CAAC,WAAW;oBAC3B,eAAe,EAAE,GAAG,CAAC,iBAAiB;oBACtC,OAAO,EAAE,GAAG,CAAC,UAAU;oBACvB,SAAS,EAAE,GAAG,CAAC,UAAU;iBAC1B,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,OAAO,KAAK,CAAA;SACb;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"elccl-inventory-history-report.js","sourceRoot":"","sources":["../../../../../server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.ts"],"names":[],"mappings":";;;AAEA,uDAAmD;AAGtC,QAAA,2BAA2B,GAAG;IACzC,KAAK,CAAC,2BAA2B,CA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AAO,EAAE;wBACP,EAAE,EAAE,GAAG,CAAC,UAAU;wBAClB,GAAG,EAAE,GAAG,CAAC,WAAW;wBACpB,IAAI,EAAE,GAAG,CAAC,YAAY;wBACtB,WAAW,EAAE,GAAG,CAAC,mBAAmB;qBACrC;oBACD,KAAK,EAAE,GAAG,CAAC,MAAM;oBACjB,GAAG,EAAE,GAAG,CAAC,GAAG;oBACZ,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,UAAU,EAAE,GAAG,CAAC,WAAW;oBAC3B,eAAe,EAAE,GAAG,CAAC,iBAAiB;oBACtC,OAAO,EAAE,GAAG,CAAC,UAAU;oBACvB,SAAS,EAAE,GAAG,CAAC,UAAU;iBAC1B,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,OAAO,KAAK,CAAA;SACb;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
@@ -29,7 +29,7 @@ exports.addReleaseGoodProducts = {
29
29
  curOrderInv.domain = domain;
30
30
  curOrderInv.bizplace = bizplace;
31
31
  curOrderInv.releaseGood = releaseGood;
32
- curOrderInv.productDetail = await tx.getRepository(product_base_1.ProductDetail).findOne(oi.productDetail.id);
32
+ curOrderInv.product = await tx.getRepository(product_base_1.Product).findOne(oi.product.id);
33
33
  let existingOrderInv;
34
34
  if ((_a = curOrderInv === null || curOrderInv === void 0 ? void 0 : curOrderInv.inventory) === null || _a === void 0 ? void 0 : _a.id) {
35
35
  const foundInv = await tx.getRepository(warehouse_base_1.Inventory).findOne(curOrderInv.inventory.id);
@@ -37,8 +37,9 @@ exports.addReleaseGoodProducts = {
37
37
  existingOrderInv = await tx.getRepository(sales_base_1.OrderInventory).findOne({
38
38
  where: {
39
39
  releaseGood,
40
- productDetail: curOrderInv.productDetail,
40
+ product: curOrderInv.product,
41
41
  batchId: curOrderInv.batchId,
42
+ packingType: curOrderInv.packingType,
42
43
  inventory: foundInv
43
44
  }
44
45
  });
@@ -131,6 +132,7 @@ exports.addReleaseGoodProducts = {
131
132
  newOrderInv.status = pickingWorksheet ? sales_base_1.ORDER_INVENTORY_STATUS.PICKING : sales_base_1.ORDER_INVENTORY_STATUS.PENDING;
132
133
  newOrderInv.name = sales_base_1.OrderNoGenerator.orderInventory();
133
134
  newOrderInv.releaseGood = releaseGood;
135
+ newOrderInv.product = await tx.getRepository(product_base_1.Product).findOne(oi.product.id);
134
136
  newOrderInv.creator = user;
135
137
  newOrderInv.updater = user;
136
138
  let existingOrderInv;
@@ -139,7 +141,8 @@ exports.addReleaseGoodProducts = {
139
141
  domain,
140
142
  releaseGood,
141
143
  batchId: oi.batchId,
142
- productDetail: newOrderInv.productDetail
144
+ packingType: oi.packingType,
145
+ product: newOrderInv.product
143
146
  }
144
147
  });
145
148
  // check if it is release by inventory (has inventory value) or product
@@ -153,8 +156,9 @@ exports.addReleaseGoodProducts = {
153
156
  existingOrderInv = await tx.getRepository(sales_base_1.OrderInventory).findOne({
154
157
  where: {
155
158
  releaseGood,
156
- productDetail: newOrderInv.productDetail,
159
+ product: newOrderInv.product,
157
160
  batchId: newOrderInv.batchId,
161
+ packingType: newOrderInv.packingType,
158
162
  inventory: foundInv
159
163
  }
160
164
  });
@@ -173,8 +177,9 @@ exports.addReleaseGoodProducts = {
173
177
  existingOrderInv = await tx.getRepository(sales_base_1.OrderInventory).findOne({
174
178
  where: {
175
179
  releaseGood,
176
- productDetail: newOrderInv.productDetail,
177
- batchId: newOrderInv.batchId
180
+ product: newOrderInv.product,
181
+ batchId: newOrderInv.batchId,
182
+ packingType: newOrderInv.packingType
178
183
  }
179
184
  });
180
185
  }
@@ -214,7 +219,6 @@ exports.addReleaseGoodProducts = {
214
219
  savedOrderInv.packingType = newOrderInv.packingType;
215
220
  savedOrderInv.uom = newOrderInv.uom;
216
221
  savedOrderInv.product = newOrderInv.product;
217
- savedOrderInv.productDetail = newOrderInv.productDetail;
218
222
  savedOrderInv.inventory = newOrderInv.inventory;
219
223
  savedOrderInv.status = newOrderInv.status;
220
224
  savedOrderInv.releaseGood = newOrderInv.releaseGood;