@things-factory/operato-wms 4.3.620 → 4.3.622

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.
@@ -2,20 +2,34 @@ import '@things-factory/biz-ui'
2
2
  import '@things-factory/form-ui'
3
3
  import '@things-factory/grist-ui'
4
4
  import '@things-factory/import-ui'
5
+ import './select-cc-location-popup'
5
6
 
6
7
  import gql from 'graphql-tag'
7
- import { css, html } from 'lit-element'
8
+ import {
9
+ css,
10
+ html
11
+ } from 'lit-element'
8
12
 
9
13
  import { MultiColumnFormStyles } from '@things-factory/form-ui'
10
- import { i18next, localize } from '@things-factory/i18n-base'
14
+ import {
15
+ i18next,
16
+ localize
17
+ } from '@things-factory/i18n-base'
11
18
  import { openPopup } from '@things-factory/layout-base'
12
- import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
13
- import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
19
+ import {
20
+ client,
21
+ CustomAlert,
22
+ navigate,
23
+ PageView
24
+ } from '@things-factory/shell'
25
+ import {
26
+ CommonButtonStyles,
27
+ ScrollbarStyles
28
+ } from '@things-factory/styles'
14
29
  import { isMobileDevice } from '@things-factory/utils'
15
30
 
16
31
  import { fetchLocationSortingRule } from '../../fetch-location-sorting-rule'
17
32
  import { LOCATION_SORTING_RULE } from '../constants'
18
- import './select-cc-location-popup'
19
33
 
20
34
  class CreateCycleCount extends localize(i18next)(PageView) {
21
35
  static get properties() {
@@ -165,7 +179,8 @@ class CreateCycleCount extends localize(i18next)(PageView) {
165
179
  filters: [
166
180
  { name: 'bizplace_id', operator: 'eq', value: this._bizplaceId },
167
181
  { name: 'hideBundle', operator: 'eq', value: true },
168
- { name: 'showAllInventory', operator: 'eq', value: true }
182
+ { name: 'showAllInventory', operator: 'eq', value: true },
183
+ { name: 'cycleCount', operator: 'notin', value: true }
169
184
  ]
170
185
  },
171
186
  nameField: 'batchId',
@@ -572,6 +587,7 @@ class CreateCycleCount extends localize(i18next)(PageView) {
572
587
  <select-cc-location-popup
573
588
  .bizplaceId="${this._bizplaceId}"
574
589
  .selectMultipleLocations="${true}"
590
+ .selectedLocation="${this.dataGrist.dirtyData.records}"
575
591
  @location-selected="${e => {
576
592
  let newRecords = e.detail.multipleLocations.map(itm => ({
577
593
  locationId: itm.location.id,
@@ -653,6 +669,7 @@ class CreateCycleCount extends localize(i18next)(PageView) {
653
669
  productDetailId: item.productDetailId
654
670
  }
655
671
  }) || []
672
+ selectedLocation = []
656
673
  } else if (this._ccStrat === 'location') {
657
674
  selectedLocation = this?.locationData?.records.map(location => location.locationId) || []
658
675
  }
@@ -312,6 +312,31 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
312
312
  ></barcode-scanable-input>
313
313
  `
314
314
  }
315
+ <label style="color: #ffffff">${i18next.t('label.product_info')}</label>
316
+ <barcode-scanable-input
317
+ name="productInfo"
318
+ custom-input
319
+ ?scan-only=${this._pageSettings?.cameraScanOnly}
320
+ @keypress="${async e => {
321
+ if (e.keyCode === 13) {
322
+ e.preventDefault()
323
+ if (this.productInfoInput?.value) {
324
+ this.clearView()
325
+ this.updateContext()
326
+ this.productInfo = this.productInfoInput.value || null
327
+ this.cycleCountNo = this.cycleCountNoInput.value
328
+ this.fetchCycleCountWorksheet()
329
+ } else if (!e.target.value) {
330
+ this.updateContext({
331
+ productInfo: null
332
+ })
333
+ this.productInfo = null
334
+ this.cycleCountNo = this.cycleCountNoInput.value
335
+ this.fetchCycleCountWorksheet()
336
+ }
337
+ }
338
+ }}"
339
+ ></barcode-scanable-input>
315
340
  <label style="color: #ffffff">${i18next.t('label.status')}</label>
316
341
  <select
317
342
  name="inventoryCheckItemStatus"
@@ -329,6 +354,8 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
329
354
  <option value="MISSING" ?selected="${this.inventoryCheckItemStatus === 'MISSING'}">Missing</option>
330
355
  <option value="NOT_TALLY" ?selected="${this.inventoryCheckItemStatus === 'NOT_TALLY'}">Not Tally</option>
331
356
  </select>
357
+
358
+
332
359
  </form>
333
360
  </div>
334
361
 
@@ -614,6 +641,10 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
614
641
  return this.renderRoot.querySelector('barcode-scanable-input[name=palletId]')?.renderRoot.querySelector('input')
615
642
  }
616
643
 
644
+ get productInfoInput() {
645
+ return this.renderRoot.querySelector('barcode-scanable-input[name=productInfo]')?.renderRoot.querySelector('input')
646
+ }
647
+
617
648
  get inspectedBatchNoInput() {
618
649
  return this.renderRoot.querySelector('input[name=inspectedBatchNo]')
619
650
  }
@@ -692,13 +723,14 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
692
723
 
693
724
  const response = await client.query({
694
725
  query: gql`
695
- query ${worksheetQuery}($inventoryCheckNo: String!, $locationSortingRules: [Sorting], $locationName: String, $cartonId: String, $palletId: String, $inventoryCheckItemStatus: String, $locationFilter : LocationFilter) {
726
+ query ${worksheetQuery}($inventoryCheckNo: String!, $locationSortingRules: [Sorting], $locationName: String, $cartonId: String, $palletId: String, $productInfo: String,$inventoryCheckItemStatus: String, $locationFilter : LocationFilter) {
696
727
  ${worksheetQuery}(
697
728
  inventoryCheckNo: $inventoryCheckNo
698
729
  locationSortingRules: $locationSortingRules
699
730
  locationName: $locationName
700
731
  cartonId: $cartonId
701
732
  palletId: $palletId
733
+ productInfo: $productInfo
702
734
  inventoryCheckItemStatus: $inventoryCheckItemStatus
703
735
  locationFilter : $locationFilter
704
736
  ) {
@@ -785,6 +817,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
785
817
  locationName: this.locationName,
786
818
  cartonId: this.cartonId,
787
819
  palletId: this.palletId,
820
+ productInfo: this.productInfo,
788
821
  inventoryCheckItemStatus: this.inventoryCheckItemStatus,
789
822
  locationFilter: this.locationFilter
790
823
  }
@@ -1531,6 +1564,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
1531
1564
  this.locationName = null
1532
1565
  this.cartonId = null
1533
1566
  this.palletId = null
1567
+ this.productInfo = null
1534
1568
  this.locationFilter = {}
1535
1569
  this.inventoryCheckItemStatus = null
1536
1570
  this._currentCard = {
@@ -1,11 +1,23 @@
1
1
  import '@things-factory/grist-ui'
2
+
2
3
  import gql from 'graphql-tag'
3
- import { i18next, localize } from '@things-factory/i18n-base'
4
- import { store } from '@things-factory/shell'
5
- import { isMobileDevice } from '@things-factory/utils'
6
- import { css, html, LitElement } from 'lit-element'
7
- import { client } from '@things-factory/shell'
4
+ import {
5
+ css,
6
+ html,
7
+ LitElement
8
+ } from 'lit-element'
8
9
  import { connect } from 'pwa-helpers/connect-mixin'
10
+
11
+ import {
12
+ i18next,
13
+ localize
14
+ } from '@things-factory/i18n-base'
15
+ import {
16
+ client,
17
+ store
18
+ } from '@things-factory/shell'
19
+ import { isMobileDevice } from '@things-factory/utils'
20
+
9
21
  import { LOCATION_TYPE } from '../constants'
10
22
 
11
23
  class SelectCcLocationPopup extends connect(store)(localize(i18next)(LitElement)) {
@@ -16,7 +28,8 @@ class SelectCcLocationPopup extends connect(store)(localize(i18next)(LitElement)
16
28
  data: Object,
17
29
  locations: Array,
18
30
  selectMultipleLocations: Boolean,
19
- _searchFields: Array
31
+ _searchFields: Array,
32
+ selectedLocation: Array
20
33
  }
21
34
  }
22
35
 
@@ -55,26 +68,26 @@ class SelectCcLocationPopup extends connect(store)(localize(i18next)(LitElement)
55
68
  render() {
56
69
  return html`
57
70
  <search-form
58
- id="search-form"
59
- .fields=${this._searchFields}
60
- @submit=${() => this.locationGrist.fetch()}
71
+ id="search-form"
72
+ .fields=${this._searchFields}
73
+ @submit=${() => this.locationGrist.fetch(this.selectedLocation)}
61
74
  ></search-form>
62
75
 
63
76
  <div class="grist">
64
- <data-grist
65
- id="location"
66
- .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
67
- .config=${this.config}
68
- .fetchHandler=${this.fetchLocations.bind(this)}
69
- ></data-grist>
77
+ <data-grist
78
+ id="location"
79
+ .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
80
+ .config=${this.config}
81
+ .fetchHandler=${(params) => this.fetchLocations(this.selectedLocation, params)}
82
+ ></data-grist>
70
83
  </div>
71
84
 
72
85
  <div class="button-container">
73
- <mwc-button
74
- raised
75
- @click="${this._selectLocation.bind(this)}"
76
- label="${i18next.t('button.select')}"
77
- ></mwc-button>
86
+ <mwc-button
87
+ raised
88
+ @click="${this._selectLocation.bind(this)}"
89
+ label="${i18next.t('button.select')}"
90
+ ></mwc-button>
78
91
  </div>
79
92
  `
80
93
  }
@@ -154,9 +167,17 @@ class SelectCcLocationPopup extends connect(store)(localize(i18next)(LitElement)
154
167
  }
155
168
  }
156
169
 
157
- async fetchLocations() {
170
+ async fetchLocations(selectedLocation) {
158
171
  try {
159
- const filters = this.searchForm.queryFilters || []
172
+ let filters = this.searchForm.queryFilters || []
173
+ if(selectedLocation.length > 0) {
174
+ filters.push({
175
+ name: 'locationId',
176
+ operator: 'notin',
177
+ value: selectedLocation.map(selectedLocation => selectedLocation.locationId)
178
+ })
179
+ }
180
+
160
181
  const { data, errors } = await client.query({
161
182
  query: gql`
162
183
  query locationByInventories($filters: [Filter!], $bizplaceId: String!) {
@@ -3,26 +3,12 @@ import '@things-factory/grist-ui'
3
3
  import '../inventory/inventory-by-product-detail'
4
4
 
5
5
  import gql from 'graphql-tag'
6
- import {
7
- css,
8
- html
9
- } from 'lit-element'
6
+ import { css, html } from 'lit-element'
10
7
  import { connect } from 'pwa-helpers/connect-mixin'
11
8
 
12
- import {
13
- i18next,
14
- localize
15
- } from '@things-factory/i18n-base'
16
- import {
17
- client,
18
- gqlContext,
19
- PageView,
20
- store
21
- } from '@things-factory/shell'
22
- import {
23
- flattenObject,
24
- isMobileDevice
25
- } from '@things-factory/utils'
9
+ import { i18next, localize } from '@things-factory/i18n-base'
10
+ import { client, gqlContext, PageView, store } from '@things-factory/shell'
11
+ import { flattenObject, isMobileDevice } from '@things-factory/utils'
26
12
 
27
13
  class InboundOrderDetailsReport extends connect(store)(localize(i18next)(PageView)) {
28
14
  static get styles() {
@@ -297,6 +283,12 @@ class InboundOrderDetailsReport extends connect(store)(localize(i18next)(PageVie
297
283
  record: { align: 'center' },
298
284
  width: 120
299
285
  },
286
+ {
287
+ type: 'string',
288
+ name: 'orderCreatedBy',
289
+ header: i18next.t('field.order_created_by'),
290
+ width: 170
291
+ },
300
292
  {
301
293
  type: 'datetime',
302
294
  name: 'orderCreatedAt',
@@ -446,7 +438,7 @@ class InboundOrderDetailsReport extends connect(store)(localize(i18next)(PageVie
446
438
  name: 'weightUnit',
447
439
  header: i18next.t('field.weight_unit'),
448
440
  width: 100
449
- },
441
+ },
450
442
  {
451
443
  type: 'string',
452
444
  name: 'palletId',
@@ -523,6 +515,7 @@ class InboundOrderDetailsReport extends connect(store)(localize(i18next)(PageVie
523
515
  'containerNo',
524
516
  'containerSize',
525
517
  'ownTransport',
518
+ 'orderCreatedBy',
526
519
  'orderCreatedAt',
527
520
  'unloadStart',
528
521
  'unloadComplete',
@@ -573,7 +566,6 @@ class InboundOrderDetailsReport extends connect(store)(localize(i18next)(PageVie
573
566
  this._gristData = { total: 0, totalWithOpeningBalance: 0, records: [] }
574
567
  this._products = []
575
568
  this._partners = [...(await this._fetchPartners())]
576
-
577
569
  this._searchFields = this.searchFields
578
570
  this._config = this.reportConfig
579
571
  }
@@ -630,6 +622,7 @@ class InboundOrderDetailsReport extends connect(store)(localize(i18next)(PageVie
630
622
  ownTransport
631
623
  acceptedBy
632
624
  acceptedAt
625
+ orderCreatedBy
633
626
  orderCreatedAt
634
627
  unloadStart
635
628
  unloadComplete
@@ -787,6 +780,7 @@ class InboundOrderDetailsReport extends connect(store)(localize(i18next)(PageVie
787
780
  { header: i18next.t('field.container_no'), key: 'containerNo', width: 30, type: 'string' },
788
781
  { header: i18next.t('field.container_size'), key: 'containerSize', width: 30, type: 'string' },
789
782
  { header: i18next.t('field.own_transport'), key: 'ownTransport', width: 20, type: 'string' },
783
+ { header: i18next.t('field.order_created_by'), key: 'orderCreatedBy', width: 30, type: 'string' },
790
784
  { header: i18next.t('field.order_created_at'), key: 'orderCreatedAt', width: 30, type: 'string' },
791
785
  { header: i18next.t('field.unload_start'), key: 'unloadStart', width: 30, type: 'string' },
792
786
  { header: i18next.t('field.unload_complete'), key: 'unloadComplete', width: 30, type: 'string' },
@@ -68,7 +68,7 @@ exports.inboundOrderDetailsReport = {
68
68
  select * from (
69
69
  select an.id, an.accepted_by_id, an.name as "gan_no", an.ref_no as "ref_no_1", an.ref_no_2 as "ref_no_2", an.ref_no_3 as "ref_no_3",
70
70
  an.loose_item, an.import_cargo, an.container_no, an.container_size, an.own_transport,
71
- an.accepted_at, an.created_at as "order_created_at", an.delivery_order_no,
71
+ an.accepted_at, u1.name as "order_created_by", an.created_at as "order_created_at", an.delivery_order_no,
72
72
  b2.id as "bizplace_id", b2.name as "bizplace_name", b2.description as "bizplace_description",
73
73
  grn.name as "grn_no",
74
74
  po.id as "purchase_order_id", po.name as "purchase_order_name", po.supplier_id as "po_supplier_id",
@@ -82,7 +82,8 @@ exports.inboundOrderDetailsReport = {
82
82
  select * from arrival_notices
83
83
  where domain_id = $1 and bizplace_id = $2 and status ='DONE'
84
84
  ${!byUnloadComplete.value ? `and created_at >= $3 and created_at <= $4` : ``}
85
- ) an
85
+ ) an
86
+ left join users u1 on u1.id = an.creator_id
86
87
  left join purchase_orders po on po.id = an.purchase_order_id
87
88
  left join goods_receival_notes grn on grn.arrival_notice_id = an.id
88
89
  left join order_inventories oi on oi.arrival_notice_id = an.id
@@ -101,7 +102,9 @@ exports.inboundOrderDetailsReport = {
101
102
  left join users u3 on u3.id = src2.oi_putaway_by_id
102
103
  left join worksheets w on w.arrival_notice_id = src2.id and w."type" ='UNLOADING'
103
104
  left join worksheets w2 on w2.arrival_notice_id = src2.id and w2."type" ='PUTAWAY'
104
- ${byUnloadComplete.value ? `where w.ended_at >= $3 and w.ended_at <= $4 and w."type" ='UNLOADING' ORDER BY w.ended_at DESC` : `ORDER BY order_created_at DESC`}
105
+ ${byUnloadComplete.value
106
+ ? `where w.ended_at >= $3 and w.ended_at <= $4 and w."type" ='UNLOADING' ORDER BY w.ended_at DESC`
107
+ : `ORDER BY order_created_at DESC`}
105
108
  )
106
109
  `, [context.state.domain.id, bizplace.id, fromDate.value, toDate.value]);
107
110
  const total = await tx.query(`
@@ -134,6 +137,7 @@ exports.inboundOrderDetailsReport = {
134
137
  ownTransport: itm.own_transport,
135
138
  acceptedBy: itm.accepted_by,
136
139
  acceptedAt: itm.accepted_at,
140
+ orderCreatedBy: itm.order_created_by,
137
141
  orderCreatedAt: itm.order_created_at,
138
142
  unloadStart: itm.unload_start,
139
143
  unloadComplete: itm.unload_complete,
@@ -1 +1 @@
1
- {"version":3,"file":"inbound-order-details-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/inbound-order-details-report.ts"],"names":[],"mappings":";;;AAEA,yDAAgD;AAChD,uDAAmD;AAGnD,0CAAiD;AAEpC,QAAA,yBAAyB,GAAG;IACvC,KAAK,CAAC,yBAAyB,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACrE,IAAI;YACF,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;YACnD,IAAI,cAAc,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;YAC1D,IAAI,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAA;YAClE,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,C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BAC3B,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,OAAO,EAAE,GAAG,CAAC,QAAQ;oBACrB,UAAU,EAAE,GAAG,CAAC,YAAY;oBAC5B,cAAc,EAAE,GAAG,CAAC,eAAe;oBACnC,eAAe,EAAE,GAAG,CAAC,gBAAgB;oBACrC,UAAU,EAAE,GAAG,CAAC,WAAW;oBAC3B,UAAU,EAAE,GAAG,CAAC,WAAW;oBAC3B,SAAS,EAAE,GAAG,CAAC,UAAU;oBACzB,SAAS,EAAE,GAAG,CAAC,UAAU;iBAC1B,CAAA;gBAED,IAAI,GAAG,CAAC,WAAW,EAAE;oBACnB,IAAI,CAAC,UAAU,CAAC,GAAG;wBACjB,EAAE,EAAE,GAAG,CAAC,WAAW;wBACnB,IAAI,EAAE,GAAG,CAAC,aAAa;qBACxB,CAAA;iBACF;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CAAC,CAAA;YAEF,OAAO;gBACL,KAAK;gBACL,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK;aACtB,CAAA;SACF;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"inbound-order-details-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/inbound-order-details-report.ts"],"names":[],"mappings":";;;AACA,yDAAgD;AAChD,uDAAmD;AAEnD,0CAAiD;AAEpC,QAAA,yBAAyB,GAAG;IACvC,KAAK,CAAC,yBAAyB,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACrE,IAAI;YACF,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;YACnD,IAAI,cAAc,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;YAC1D,IAAI,UAAU,GAAG,MAAM,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String
17
17
  looseItem: Boolean
18
18
  importCargo: Boolean
19
- containerNo: String
19
+ containerNo: String
20
20
  containerSize: String
21
21
  ownTransport: Boolean
22
22
  acceptedBy: String
23
23
  acceptedAt: String
24
+ orderCreatedBy: String
24
25
  orderCreatedAt: String
25
26
  unloadStart: String
26
27
  unloadComplete: String
@@ -1 +1 @@
1
- {"version":3,"file":"inbound-order-details-report.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/inbound-order-details-report.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,yBAAyB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkD3C,CAAA"}
1
+ {"version":3,"file":"inbound-order-details-report.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/inbound-order-details-report.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,yBAAyB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmD3C,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.3.620",
3
+ "version": "4.3.622",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -91,7 +91,7 @@
91
91
  "@things-factory/print-ui": "^4.3.591",
92
92
  "@things-factory/product-base": "^4.3.595",
93
93
  "@things-factory/resource-ui": "^4.3.591",
94
- "@things-factory/sales-ui": "^4.3.617",
94
+ "@things-factory/sales-ui": "^4.3.622",
95
95
  "@things-factory/scene-data-transform": "^4.3.591",
96
96
  "@things-factory/scene-excel": "^4.3.591",
97
97
  "@things-factory/scene-firebase": "^4.3.591",
@@ -107,8 +107,8 @@
107
107
  "@things-factory/system-ui": "^4.3.591",
108
108
  "@things-factory/transport-base": "^4.3.595",
109
109
  "@things-factory/tutorial-ui": "^4.3.591",
110
- "@things-factory/warehouse-base": "^4.3.617",
111
- "@things-factory/worksheet-base": "^4.3.620"
110
+ "@things-factory/warehouse-base": "^4.3.621",
111
+ "@things-factory/worksheet-base": "^4.3.622"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@things-factory/builder": "^4.3.591",
@@ -117,5 +117,5 @@
117
117
  "cypress-localstorage-commands": "^1.6.1",
118
118
  "eslint-plugin-cypress": "^2.12.1"
119
119
  },
120
- "gitHead": "da168c3cc4df11af9784ab3024a6db5de429c514"
120
+ "gitHead": "6d197fa7ec67ed6051bd11c9f6fd595cb1db7088"
121
121
  }
@@ -1,9 +1,7 @@
1
1
  import { EntityManager } from 'typeorm'
2
-
3
2
  import { User } from '@things-factory/auth-base'
4
3
  import { Bizplace } from '@things-factory/biz-base'
5
4
  import { ListParam } from '@things-factory/shell'
6
-
7
5
  import { rawProductsQuery } from '../../../utils'
8
6
 
9
7
  export const inboundOrderDetailsReport = {
@@ -58,10 +56,10 @@ export const inboundOrderDetailsReport = {
58
56
  if (doNo) {
59
57
  extraQueryFilters = `${extraQueryFilters} and delivery_order_no like '%${doNo.value}%' `
60
58
  }
61
- if(lotId) {
59
+ if (lotId) {
62
60
  extraQueryFilters = `${extraQueryFilters} and pallet_id like '%${lotId.value}%' `
63
61
  }
64
- if(cartonId) {
62
+ if (cartonId) {
65
63
  extraQueryFilters = `${extraQueryFilters} and carton_id like '%${cartonId.value}%' `
66
64
  }
67
65
 
@@ -77,7 +75,7 @@ export const inboundOrderDetailsReport = {
77
75
  select * from (
78
76
  select an.id, an.accepted_by_id, an.name as "gan_no", an.ref_no as "ref_no_1", an.ref_no_2 as "ref_no_2", an.ref_no_3 as "ref_no_3",
79
77
  an.loose_item, an.import_cargo, an.container_no, an.container_size, an.own_transport,
80
- an.accepted_at, an.created_at as "order_created_at", an.delivery_order_no,
78
+ an.accepted_at, u1.name as "order_created_by", an.created_at as "order_created_at", an.delivery_order_no,
81
79
  b2.id as "bizplace_id", b2.name as "bizplace_name", b2.description as "bizplace_description",
82
80
  grn.name as "grn_no",
83
81
  po.id as "purchase_order_id", po.name as "purchase_order_name", po.supplier_id as "po_supplier_id",
@@ -91,7 +89,8 @@ export const inboundOrderDetailsReport = {
91
89
  select * from arrival_notices
92
90
  where domain_id = $1 and bizplace_id = $2 and status ='DONE'
93
91
  ${!byUnloadComplete.value ? `and created_at >= $3 and created_at <= $4` : ``}
94
- ) an
92
+ ) an
93
+ left join users u1 on u1.id = an.creator_id
95
94
  left join purchase_orders po on po.id = an.purchase_order_id
96
95
  left join goods_receival_notes grn on grn.arrival_notice_id = an.id
97
96
  left join order_inventories oi on oi.arrival_notice_id = an.id
@@ -110,7 +109,11 @@ export const inboundOrderDetailsReport = {
110
109
  left join users u3 on u3.id = src2.oi_putaway_by_id
111
110
  left join worksheets w on w.arrival_notice_id = src2.id and w."type" ='UNLOADING'
112
111
  left join worksheets w2 on w2.arrival_notice_id = src2.id and w2."type" ='PUTAWAY'
113
- ${byUnloadComplete.value ? `where w.ended_at >= $3 and w.ended_at <= $4 and w."type" ='UNLOADING' ORDER BY w.ended_at DESC` : `ORDER BY order_created_at DESC`}
112
+ ${
113
+ byUnloadComplete.value
114
+ ? `where w.ended_at >= $3 and w.ended_at <= $4 and w."type" ='UNLOADING' ORDER BY w.ended_at DESC`
115
+ : `ORDER BY order_created_at DESC`
116
+ }
114
117
  )
115
118
  `,
116
119
  [context.state.domain.id, bizplace.id, fromDate.value, toDate.value]
@@ -120,8 +123,8 @@ export const inboundOrderDetailsReport = {
120
123
  select count(*) from temp_inbound_order_report
121
124
  `)
122
125
 
123
- const result: any = await tx.query(
124
- `
126
+ const result: any = await tx.query(
127
+ `
125
128
  select src2.*,
126
129
  round((src2.actual_pack_qty * src2.unit_volume)::numeric ,4) as total_volume,
127
130
  round((src2.actual_pack_qty * src2.unit_nett_weight)::numeric ,4) as total_unit_nett_weight,
@@ -151,6 +154,7 @@ export const inboundOrderDetailsReport = {
151
154
  ownTransport: itm.own_transport,
152
155
  acceptedBy: itm.accepted_by,
153
156
  acceptedAt: itm.accepted_at,
157
+ orderCreatedBy: itm.order_created_by,
154
158
  orderCreatedAt: itm.order_created_at,
155
159
  unloadStart: itm.unload_start,
156
160
  unloadComplete: itm.unload_complete,
@@ -11,11 +11,12 @@ export const InboundOrderDetailsReport = gql`
11
11
  refNo3: String
12
12
  looseItem: Boolean
13
13
  importCargo: Boolean
14
- containerNo: String
14
+ containerNo: String
15
15
  containerSize: String
16
16
  ownTransport: Boolean
17
17
  acceptedBy: String
18
18
  acceptedAt: String
19
+ orderCreatedBy: String
19
20
  orderCreatedAt: String
20
21
  unloadStart: String
21
22
  unloadComplete: String