@things-factory/operato-wms 4.3.641 → 4.3.642
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.
- package/client/pages/adjustment/transfer-inventory.js +12 -7
- package/client/pages/bulk-operation/bulk-operation.js +23 -25
- package/client/pages/bulk-operation/validate-b2c-ro-popup.js +4 -14
- package/client/pages/bulk-operation/validate-gan-popup.js +11 -26
- package/client/pages/bulk-operation/validate-ro-popup.js +6 -16
- package/client/pages/components/list-view/product-list-view.js +1 -1
- package/client/pages/components/select-inventory-popup.js +5 -1
- package/client/pages/components/select-product-popup.js +9 -4
- package/client/pages/constants/replenishment-config.js +5 -5
- package/client/pages/inbound/putaway/putaway-product.js +70 -92
- package/client/pages/inbound/putaway/putaway-replenishment-same-product-popup.js +3 -10
- package/client/pages/inbound/putaway/putaway-same-carton-popup.js +1 -1
- package/client/pages/inbound/putaway/putaway-worksheet-generate-popup.js +1 -1
- package/client/pages/inbound/putaway/undo-putaway-popup.js +16 -19
- package/client/pages/inbound/putaway/worksheet-putaway-return.js +1 -1
- package/client/pages/inbound/putaway/worksheet-putaway.js +3 -3
- package/client/pages/inbound/undo-unload-popup.js +1 -1
- package/client/pages/inbound/unload-product.js +37 -33
- package/client/pages/inbound/unloaded-inventories-popup.js +1 -1
- package/client/pages/inbound/worksheet-unloading-return.js +1 -1
- package/client/pages/inbound/worksheet-unloading.js +2 -2
- package/client/pages/inventory/inventory-adjustment.js +20 -5
- package/client/pages/inventory/inventory-by-product.js +43 -43
- package/client/pages/inventory/onhand-inventory.js +2 -2
- package/client/pages/inventory-check/add-extra-inventory-popup.js +10 -2
- package/client/pages/inventory-check/cycle-count-recheck-popup.js +2 -2
- package/client/pages/inventory-check/cycle-count-report.js +14 -19
- package/client/pages/inventory-check/inspecting-product.js +14 -2
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +23 -27
- package/client/pages/order/arrival-notice/assign-buffer-location.js +2 -2
- package/client/pages/order/arrival-notice/check-arrived-notice.js +2 -2
- package/client/pages/order/arrival-notice/create-arrival-notice.js +42 -43
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +8 -8
- package/client/pages/order/arrival-notice/edit-product-popup.js +29 -27
- package/client/pages/order/arrival-notice/proceed-edit-product-popup.js +3 -3
- package/client/pages/order/arrival-notice/receive-arrival-notice.js +1 -1
- package/client/pages/order/arrival-notice/rejected-arrival-notice.js +1 -1
- package/client/pages/order/arrival-notice/view-product-changes-popup.js +3 -3
- package/client/pages/order/draft-release-good/draft-release-good-detail.js +2 -2
- package/client/pages/order/release-order/b2c/b2c-release-order-detail.js +92 -91
- package/client/pages/order/release-order/b2c/create-b2c-release-order.js +61 -56
- package/client/pages/order/release-order/create-release-order.js +65 -56
- package/client/pages/order/release-order/receive-release-order-request.js +1 -1
- package/client/pages/order/release-order/rejected-release-order.js +2 -2
- package/client/pages/order/release-order/release-extra-product-popup.js +11 -7
- package/client/pages/order/release-order/release-order-detail.js +158 -116
- package/client/pages/order/return-order/create-return-order.js +16 -3
- package/client/pages/order/return-order/return-order-inventory-popup.js +2 -1
- package/client/pages/outbound/inventory-assign-popup.js +2 -2
- package/client/pages/outbound/inventory-auto-assign-popup.js +1 -1
- package/client/pages/outbound/inventory-reassign-popup.js +6 -6
- package/client/pages/outbound/loading-product.js +3 -3
- package/client/pages/outbound/loading-v2/load-by-qty.js +2 -2
- package/client/pages/outbound/loading-v2/loading-execution-base.js +4 -4
- package/client/pages/outbound/packing-product.js +7 -26
- package/client/pages/outbound/picking-product.js +36 -16
- package/client/pages/outbound/picking-replacement-popup.js +4 -4
- package/client/pages/outbound/picking-v2/picking-execution-base.js +8 -4
- package/client/pages/outbound/sorting-product.js +5 -7
- package/client/pages/outbound/worksheet-batch-picking.js +30 -43
- package/client/pages/outbound/worksheet-loading.js +2 -2
- package/client/pages/outbound/worksheet-packing.js +1 -1
- package/client/pages/outbound/worksheet-picking.js +23 -19
- package/client/pages/outbound/worksheet-return.js +1 -1
- package/client/pages/outbound/worksheet-sorting.js +12 -23
- package/client/pages/outbound/worksheet-zone-picking.js +3 -3
- package/client/pages/replenishment/replenishment.js +1 -1
- package/client/pages/report/replenishment-report.js +5 -14
- package/client/pages/report/volume-summary-report.js +6 -6
- package/dist-server/graphql/resolvers/outbound/sort-item.js +1 -1
- package/dist-server/graphql/resolvers/outbound/sort-item.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/cycle-count-report.js +2 -1
- package/dist-server/graphql/resolvers/reports/cycle-count-report.js.map +1 -1
- package/dist-server/graphql/resolvers/zone-worksheet/zone-picking.js +18 -7
- package/dist-server/graphql/resolvers/zone-worksheet/zone-picking.js.map +1 -1
- package/dist-server/graphql/types/outbound/index.js +1 -1
- package/dist-server/graphql/types/reports/cycle-count-report.js +1 -1
- package/dist-server/graphql/types/reports/inbound-order-details-report.js +1 -1
- package/dist-server/graphql/types/reports/outbound-order-details-report.js +2 -2
- package/dist-server/graphql/types/zone-worksheet/index.js +1 -1
- package/package.json +16 -16
- package/server/graphql/resolvers/outbound/sort-item.ts +1 -1
- package/server/graphql/resolvers/reports/cycle-count-report.ts +2 -1
- package/server/graphql/resolvers/zone-worksheet/zone-picking.ts +20 -8
- package/server/graphql/types/outbound/index.ts +1 -1
- package/server/graphql/types/reports/cycle-count-report.ts +1 -1
- package/server/graphql/types/reports/inbound-order-details-report.ts +1 -1
- package/server/graphql/types/reports/outbound-order-details-report.ts +2 -2
- package/server/graphql/types/zone-worksheet/index.ts +1 -1
- package/translations/en.json +265 -259
- package/translations/ko.json +1 -0
- package/translations/ms.json +1580 -1463
- package/translations/zh.json +2354 -2150
|
@@ -192,11 +192,10 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
|
|
|
192
192
|
}
|
|
193
193
|
]
|
|
194
194
|
|
|
195
|
-
|
|
196
195
|
if (
|
|
197
196
|
this._status === ORDER_STATUS.PENDING.value &&
|
|
198
197
|
this.userRoles?.find(itm => itm.name.toLowerCase().includes('admin'))
|
|
199
|
-
){
|
|
198
|
+
) {
|
|
200
199
|
actions.push({
|
|
201
200
|
title: i18next.t('button.edit_product'),
|
|
202
201
|
action: this.openEditProductPopup.bind(this),
|
|
@@ -205,13 +204,11 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
|
|
|
205
204
|
}
|
|
206
205
|
|
|
207
206
|
if (this._status === ORDER_STATUS.PENDING.value) {
|
|
208
|
-
actions.push(
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}
|
|
214
|
-
)
|
|
207
|
+
actions.push({
|
|
208
|
+
title: i18next.t('button.update_order_details'),
|
|
209
|
+
action: this._updateArrivalNotice.bind(this),
|
|
210
|
+
...CommonButtonStyles.add
|
|
211
|
+
})
|
|
215
212
|
|
|
216
213
|
actions.push({
|
|
217
214
|
title: i18next.t('button.delete'),
|
|
@@ -523,7 +520,7 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
|
|
|
523
520
|
|
|
524
521
|
<label>${i18next.t('label.eta_date')}</label>
|
|
525
522
|
<input name="etaDate" type="date" disabled />
|
|
526
|
-
|
|
523
|
+
|
|
527
524
|
<label ?hidden="${!this._warehouseTransport}">${i18next.t('label.transport_vehicle')}</label>
|
|
528
525
|
<input name="transportVehicle" ?hidden="${!this._warehouseTransport}" ?readonly=${this.determineStatus()} />
|
|
529
526
|
|
|
@@ -852,13 +849,13 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
|
|
|
852
849
|
width: 80
|
|
853
850
|
},
|
|
854
851
|
{
|
|
855
|
-
type: '
|
|
852
|
+
type: 'float',
|
|
856
853
|
name: 'packQty',
|
|
857
854
|
header: i18next.t('field.pack_qty'),
|
|
858
855
|
width: 80
|
|
859
856
|
},
|
|
860
857
|
{
|
|
861
|
-
type: '
|
|
858
|
+
type: 'float',
|
|
862
859
|
name: 'totalUomValue',
|
|
863
860
|
header: i18next.t('field.total_uom_value'),
|
|
864
861
|
width: 120
|
|
@@ -993,6 +990,7 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
|
|
|
993
990
|
description
|
|
994
991
|
sku
|
|
995
992
|
brand
|
|
993
|
+
isInventoryDecimal
|
|
996
994
|
}
|
|
997
995
|
productDetail {
|
|
998
996
|
id
|
|
@@ -1145,30 +1143,28 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
|
|
|
1145
1143
|
field.checked = data[key]
|
|
1146
1144
|
|
|
1147
1145
|
if (field.name === 'ownTransport') {
|
|
1148
|
-
this._ownTransport = data[key]
|
|
1146
|
+
this._ownTransport = data[key]
|
|
1149
1147
|
if (data[key] === true) {
|
|
1150
1148
|
// If ownTransp ort is true, set warehouseTransport to false
|
|
1151
|
-
this._ownTransport = true
|
|
1152
|
-
this._ownTransportInput.checked = true
|
|
1153
|
-
this._warehouseTransport = false
|
|
1154
|
-
this._warehouseTransportInput.checked = false
|
|
1155
|
-
|
|
1149
|
+
this._ownTransport = true
|
|
1150
|
+
this._ownTransportInput.checked = true
|
|
1151
|
+
this._warehouseTransport = false
|
|
1152
|
+
this._warehouseTransportInput.checked = false
|
|
1153
|
+
}
|
|
1156
1154
|
|
|
1157
1155
|
// If ownTransport is true, warehouseTransport must be false
|
|
1158
1156
|
if (!this._ownTransport) {
|
|
1159
|
-
this._warehouseTransport = true
|
|
1160
|
-
this._warehouseTransportInput.checked = true
|
|
1157
|
+
this._warehouseTransport = true
|
|
1158
|
+
this._warehouseTransportInput.checked = true
|
|
1161
1159
|
// If ownTransport is true, set warehouseTransport to false
|
|
1162
|
-
this._ownTransport = false
|
|
1163
|
-
this._ownTransportInput.checked = false
|
|
1160
|
+
this._ownTransport = false
|
|
1161
|
+
this._ownTransportInput.checked = false
|
|
1162
|
+
}
|
|
1164
1163
|
}
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
1164
|
} else if (field.name === key) {
|
|
1169
|
-
field.value = data[key]
|
|
1165
|
+
field.value = data[key]
|
|
1170
1166
|
}
|
|
1171
|
-
})
|
|
1167
|
+
})
|
|
1172
1168
|
}
|
|
1173
1169
|
}
|
|
1174
1170
|
|
|
@@ -619,13 +619,13 @@ class AssignBufferLocation extends localize(i18next)(PageView) {
|
|
|
619
619
|
width: 80
|
|
620
620
|
},
|
|
621
621
|
{
|
|
622
|
-
type: '
|
|
622
|
+
type: 'float',
|
|
623
623
|
name: 'packQty',
|
|
624
624
|
header: i18next.t('field.pack_qty'),
|
|
625
625
|
width: 80
|
|
626
626
|
},
|
|
627
627
|
{
|
|
628
|
-
type: '
|
|
628
|
+
type: 'float',
|
|
629
629
|
name: 'totalUomValue',
|
|
630
630
|
header: i18next.t('field.total_uom_value'),
|
|
631
631
|
width: 120
|
|
@@ -360,13 +360,13 @@ class CheckArrivedNotice extends localize(i18next)(PageView) {
|
|
|
360
360
|
width: 80
|
|
361
361
|
},
|
|
362
362
|
{
|
|
363
|
-
type: '
|
|
363
|
+
type: 'float',
|
|
364
364
|
name: 'packQty',
|
|
365
365
|
header: i18next.t('field.pack_qty'),
|
|
366
366
|
width: 80
|
|
367
367
|
},
|
|
368
368
|
{
|
|
369
|
-
type: '
|
|
369
|
+
type: 'float',
|
|
370
370
|
name: 'totalUomValue',
|
|
371
371
|
header: i18next.t('field.total_uom_value'),
|
|
372
372
|
width: 120
|
|
@@ -693,7 +693,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
693
693
|
width: 100
|
|
694
694
|
},
|
|
695
695
|
{
|
|
696
|
-
type: '
|
|
696
|
+
type: 'float',
|
|
697
697
|
name: 'packQty',
|
|
698
698
|
header: i18next.t('field.pack_qty'),
|
|
699
699
|
imex: { header: i18next.t('field.pack_qty'), key: 'packQty', width: 25, type: 'float' },
|
|
@@ -715,14 +715,16 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
715
715
|
width: 80
|
|
716
716
|
},
|
|
717
717
|
...(this._enableLotIdInput
|
|
718
|
-
? [
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
718
|
+
? [
|
|
719
|
+
{
|
|
720
|
+
type: 'string',
|
|
721
|
+
name: 'palletId',
|
|
722
|
+
header: i18next.t('field.lot_id'),
|
|
723
|
+
imex: { header: i18next.t('field.lot_id'), key: 'palletId', width: 25, type: 'string' },
|
|
724
|
+
record: { editable: editable },
|
|
725
|
+
width: 150
|
|
726
|
+
}
|
|
727
|
+
]
|
|
726
728
|
: []),
|
|
727
729
|
{
|
|
728
730
|
type: 'date',
|
|
@@ -851,7 +853,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
851
853
|
item?.packQty > 0
|
|
852
854
|
? item?.totalUomValue
|
|
853
855
|
? item.totalUomValue
|
|
854
|
-
: `${parseFloat(item.packQty * e.detail.uomValue).toFixed(
|
|
856
|
+
: `${parseFloat(item.packQty * e.detail.uomValue).toFixed(3)} ${e.detail.uom}`
|
|
855
857
|
: null
|
|
856
858
|
}
|
|
857
859
|
})
|
|
@@ -993,7 +995,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
993
995
|
throw new Error(i18next.t('text.x_is_empty', { state: { x: i18next.t('label.uom') } }))
|
|
994
996
|
|
|
995
997
|
if (uomValue && uom && packQty) {
|
|
996
|
-
calcedRecord.totalUomValue = `${(uomValue * packQty).toFixed(
|
|
998
|
+
calcedRecord.totalUomValue = `${(uomValue * packQty).toFixed(3)} ${uom}`
|
|
997
999
|
} else {
|
|
998
1000
|
calcedRecord.totalUomValue = ''
|
|
999
1001
|
}
|
|
@@ -1393,6 +1395,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1393
1395
|
if (record.unitPrice) {
|
|
1394
1396
|
record.unitPrice = parseFloat(record.unitPrice)
|
|
1395
1397
|
}
|
|
1398
|
+
|
|
1396
1399
|
let orderProduct = {
|
|
1397
1400
|
batchId: record.batchId,
|
|
1398
1401
|
batchIdRef: record?.batchIdRef ? record.batchIdRef : null,
|
|
@@ -1402,7 +1405,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1402
1405
|
packingSize: record.packingSize || record.product.packingSize,
|
|
1403
1406
|
uomValue: record?.uomValue ? record.uomValue : 0,
|
|
1404
1407
|
uom: record.uom,
|
|
1405
|
-
packQty: record.packQty,
|
|
1408
|
+
packQty: Math.round(parseFloat(record.packQty) * 1000) / 1000,
|
|
1406
1409
|
totalUomValue: record?.totalUomValue ? record?.totalUomValue : 0,
|
|
1407
1410
|
unitPrice: record?.unitPrice ? record.unitPrice : 0,
|
|
1408
1411
|
remark: record?.remark ? record.remark : null,
|
|
@@ -1651,7 +1654,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1651
1654
|
width: 100
|
|
1652
1655
|
},
|
|
1653
1656
|
{
|
|
1654
|
-
type: '
|
|
1657
|
+
type: 'float',
|
|
1655
1658
|
name: 'packQty',
|
|
1656
1659
|
header: i18next.t('field.pack_qty'),
|
|
1657
1660
|
imex: { header: i18next.t('field.pack_qty'), key: 'packQty', width: 25, type: 'float' },
|
|
@@ -1665,13 +1668,15 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1665
1668
|
width: 100
|
|
1666
1669
|
},
|
|
1667
1670
|
...(this._enableLotIdInput
|
|
1668
|
-
? [
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1671
|
+
? [
|
|
1672
|
+
{
|
|
1673
|
+
type: 'string',
|
|
1674
|
+
name: 'palletId',
|
|
1675
|
+
header: i18next.t('field.lot_id'),
|
|
1676
|
+
imex: { header: i18next.t('field.lot_id'), key: 'palletId', width: 25, type: 'string' },
|
|
1677
|
+
width: 100
|
|
1678
|
+
}
|
|
1679
|
+
]
|
|
1675
1680
|
: []),
|
|
1676
1681
|
{
|
|
1677
1682
|
type: 'date',
|
|
@@ -1773,15 +1778,14 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1773
1778
|
if (this._enableLotIdInput) {
|
|
1774
1779
|
let palletIds = response.data.bulkUploadValidateOrderProducts
|
|
1775
1780
|
.map(item => item.palletId)
|
|
1776
|
-
.filter(palletId => palletId !== null)
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1781
|
+
.filter(palletId => palletId !== null)
|
|
1782
|
+
|
|
1783
|
+
let uniquePalletIds = new Set(palletIds)
|
|
1784
|
+
let isDuplicated = uniquePalletIds.size !== palletIds.length
|
|
1780
1785
|
if (isDuplicated) {
|
|
1781
1786
|
return this._showToast({ message: i18next.t('text.duplicated_lot_id') })
|
|
1782
1787
|
}
|
|
1783
1788
|
}
|
|
1784
|
-
|
|
1785
1789
|
|
|
1786
1790
|
if (!foundErrors) {
|
|
1787
1791
|
if (!response.errors) {
|
|
@@ -1797,7 +1801,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1797
1801
|
...item,
|
|
1798
1802
|
productName: item?.productName,
|
|
1799
1803
|
unitPrice: (item?.unitPrice || 0).toFixed(2),
|
|
1800
|
-
packQty: parseFloat(item.packQty) || '',
|
|
1804
|
+
packQty: parseFloat(item.packQty).toFixed(3) || '',
|
|
1801
1805
|
palletQty: parseFloat(item.palletQty) || '',
|
|
1802
1806
|
productDetail: { id: item?.productDetail?.id || null }
|
|
1803
1807
|
}
|
|
@@ -1822,27 +1826,22 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1822
1826
|
|
|
1823
1827
|
async importHandler(patches) {
|
|
1824
1828
|
try {
|
|
1825
|
-
patches.map(
|
|
1826
|
-
if (
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1829
|
+
const orderProducts = patches.map(patch => {
|
|
1830
|
+
if (patch.manufactureDate) {
|
|
1831
|
+
const mdt = new Date(patch.manufactureDate);
|
|
1832
|
+
patch.manufactureDate = mdt < new Date()
|
|
1833
|
+
? `${mdt.getFullYear()}-${mdt.getMonth() + 1}-${mdt.getDate()}`
|
|
1834
|
+
: ''
|
|
1830
1835
|
} else {
|
|
1831
|
-
delete
|
|
1836
|
+
delete patch.manufactureDate
|
|
1832
1837
|
}
|
|
1833
|
-
itm.uomValue = parseFloat(itm.uomValue) || ''
|
|
1834
|
-
itm.packQty = parseInt(itm.packQty) || ''
|
|
1835
|
-
itm.palletQty = parseInt(itm.palletQty) || ''
|
|
1836
|
-
})
|
|
1837
|
-
|
|
1838
|
-
const orderProducts = patches.map(patch => {
|
|
1839
1838
|
delete patch.cuFlag
|
|
1840
1839
|
return {
|
|
1841
1840
|
...patch,
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1841
|
+
uomValue: Math.round(parseFloat(patch.uomValue) * 1000) / 1000 || 0,
|
|
1842
|
+
packQty: Math.round(parseFloat(patch.packQty) * 1000) / 1000 || 0,
|
|
1843
|
+
palletQty: parseInt(patch.palletQty) || 0,
|
|
1844
|
+
unitPrice: patch.unitPrice ? parseFloat(patch.unitPrice) : null
|
|
1846
1845
|
}
|
|
1847
1846
|
})
|
|
1848
1847
|
// redundant as records also patched during bulkUploadValidateOrderProducts and we don't need it to write on grist before validation
|
|
@@ -1876,7 +1875,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1876
1875
|
? '0'
|
|
1877
1876
|
: record.packQty === undefined
|
|
1878
1877
|
? null
|
|
1879
|
-
:
|
|
1878
|
+
: parseFloat(record.packQty).toFixed(3),
|
|
1880
1879
|
palletQty:
|
|
1881
1880
|
record.palletQty == null && record.palletQty !== undefined
|
|
1882
1881
|
? '0'
|
|
@@ -691,7 +691,7 @@ class DuplicateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
691
691
|
width: 80
|
|
692
692
|
},
|
|
693
693
|
{
|
|
694
|
-
type: '
|
|
694
|
+
type: 'float',
|
|
695
695
|
name: 'packQty',
|
|
696
696
|
header: i18next.t('field.pack_qty'),
|
|
697
697
|
record: { editable: editable, options: { min: 0 } },
|
|
@@ -808,7 +808,7 @@ class DuplicateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
808
808
|
item?.packQty > 0
|
|
809
809
|
? item?.totalUomValue
|
|
810
810
|
? item.totalUomValue
|
|
811
|
-
: `${parseFloat(item.packQty * e.detail.uomValue).toFixed(
|
|
811
|
+
: `${parseFloat(item.packQty * e.detail.uomValue).toFixed(3)} ${e.detail.uom}`
|
|
812
812
|
: null
|
|
813
813
|
}
|
|
814
814
|
})
|
|
@@ -909,7 +909,7 @@ class DuplicateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
909
909
|
|
|
910
910
|
_calcTotalUomValue(uomValue, unit, packQty) {
|
|
911
911
|
if (uomValue && unit && packQty) {
|
|
912
|
-
return `${(uomValue * packQty).toFixed(
|
|
912
|
+
return `${(uomValue * packQty).toFixed(3)} ${unit}`
|
|
913
913
|
} else {
|
|
914
914
|
return null
|
|
915
915
|
}
|
|
@@ -1434,7 +1434,7 @@ class DuplicateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1434
1434
|
packingSize: record?.product?.packingSize ? record.product.packingSize : record.packingSize,
|
|
1435
1435
|
uomValue: record?.uomValue ? record.uomValue : 0,
|
|
1436
1436
|
uom: record.uom,
|
|
1437
|
-
packQty: record.packQty,
|
|
1437
|
+
packQty: parseFloat(record.packQty).toFixed(3),
|
|
1438
1438
|
totalUomValue: record.totalUomValue,
|
|
1439
1439
|
totalUomValue: record?.totalUomValue ? record?.totalUomValue : 0,
|
|
1440
1440
|
unitPrice: record?.unitPrice ? record.unitPrice : 0,
|
|
@@ -1666,7 +1666,7 @@ class DuplicateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1666
1666
|
width: 100
|
|
1667
1667
|
},
|
|
1668
1668
|
{
|
|
1669
|
-
type: '
|
|
1669
|
+
type: 'float',
|
|
1670
1670
|
name: 'packQty',
|
|
1671
1671
|
header: i18next.t('field.pack_qty'),
|
|
1672
1672
|
imex: { header: i18next.t('field.pack_qty'), key: 'packQty', width: 25, type: 'float' },
|
|
@@ -1770,7 +1770,7 @@ class DuplicateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1770
1770
|
...item,
|
|
1771
1771
|
productName: item?.productName,
|
|
1772
1772
|
unitPrice: parseFloat(item.unitPrice) || '',
|
|
1773
|
-
packQty: parseFloat(item.packQty) || '',
|
|
1773
|
+
packQty: parseFloat(item.packQty).toFixed(3) || '',
|
|
1774
1774
|
palletQty: parseFloat(item.palletQty) || ''
|
|
1775
1775
|
}
|
|
1776
1776
|
})
|
|
@@ -1800,7 +1800,7 @@ class DuplicateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1800
1800
|
} else {
|
|
1801
1801
|
delete itm.manufactureDate
|
|
1802
1802
|
}
|
|
1803
|
-
itm.packQty = parseFloat(itm.packQty) || ''
|
|
1803
|
+
itm.packQty = parseFloat(itm.packQty).toFixed(3) || ''
|
|
1804
1804
|
itm.palletQty = parseFloat(itm.palletQty) || ''
|
|
1805
1805
|
})
|
|
1806
1806
|
|
|
@@ -1813,7 +1813,7 @@ class DuplicateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1813
1813
|
return {
|
|
1814
1814
|
...patch,
|
|
1815
1815
|
unitPrice: parseFloat(patch.unitPrice) || 0,
|
|
1816
|
-
packQty: parseFloat(patch.packQty) || 0,
|
|
1816
|
+
packQty: parseFloat(patch.packQty).toFixed(3) || 0,
|
|
1817
1817
|
palletQty: parseFloat(patch.palletQty) || 0
|
|
1818
1818
|
}
|
|
1819
1819
|
})
|
|
@@ -132,7 +132,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
|
|
|
132
132
|
raised
|
|
133
133
|
@click="${this._addEditProducts.bind(this, true)}"
|
|
134
134
|
label="${i18next.t('button.submit')}"
|
|
135
|
-
class="${this.status !== 'PENDING'
|
|
135
|
+
class="${this.status !== 'PENDING'
|
|
136
136
|
? 'hidden'
|
|
137
137
|
: ''}"
|
|
138
138
|
></mwc-button>
|
|
@@ -225,7 +225,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
|
|
|
225
225
|
width: 80
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
|
-
type: '
|
|
228
|
+
type: 'float',
|
|
229
229
|
name: 'packQty',
|
|
230
230
|
header: i18next.t('field.pack_qty'),
|
|
231
231
|
record: { editable: true, options: { min: 0 } },
|
|
@@ -373,7 +373,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
|
|
|
373
373
|
width: 80
|
|
374
374
|
},
|
|
375
375
|
{
|
|
376
|
-
type: '
|
|
376
|
+
type: 'float',
|
|
377
377
|
name: 'packQty',
|
|
378
378
|
header: i18next.t('field.pack_qty'),
|
|
379
379
|
record: { editable: true, options: { min: 0 } },
|
|
@@ -501,7 +501,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
|
|
|
501
501
|
if (changedColumn === 'uom' && !uom)
|
|
502
502
|
throw new Error(i18next.t('text.x_is_empty', { state: { x: i18next.t('label.uom') } }))
|
|
503
503
|
if (uomValue && uom) {
|
|
504
|
-
if (packQty !== 0) calcedRecord.totalUomValue = `${(uomValue * packQty).toFixed(
|
|
504
|
+
if (packQty !== 0) calcedRecord.totalUomValue = `${(uomValue * packQty).toFixed(3)} ${uom}`
|
|
505
505
|
if (packQty === 0) calcedRecord.totalUomValue = `0 ${uom}`
|
|
506
506
|
} else {
|
|
507
507
|
calcedRecord.totalUomValue = ''
|
|
@@ -583,33 +583,33 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
|
|
|
583
583
|
if (isDuplicated) {
|
|
584
584
|
throw new Error(i18next.t('text.duplicated_lot_id'))
|
|
585
585
|
}
|
|
586
|
-
}else if (this.enableLotIdInput) {
|
|
586
|
+
} else if (this.enableLotIdInput) {
|
|
587
587
|
const addedNewRows = this.addProductGrist.dirtyData.records
|
|
588
|
-
|
|
589
|
-
|
|
588
|
+
.filter(record => record.palletId)
|
|
589
|
+
.map(record => `${record.palletId}`)
|
|
590
590
|
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
591
|
+
addedNewRows.forEach((row, idx, rows) => {
|
|
592
|
+
if (rows.lastIndexOf(row) !== idx) {
|
|
593
|
+
isDuplicated = true
|
|
594
|
+
}
|
|
595
|
+
})
|
|
596
596
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
597
|
+
const existingRows = this.editProductGrist.dirtyData.records
|
|
598
|
+
.filter(record => record.palletId)
|
|
599
|
+
.map(record => `${record.palletId}`)
|
|
600
600
|
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
601
|
+
existingRows.forEach((row, idx, rows) => {
|
|
602
|
+
if (rows.lastIndexOf(row) !== idx) {
|
|
603
|
+
isDuplicated = true
|
|
604
|
+
}
|
|
605
|
+
})
|
|
606
606
|
|
|
607
|
-
|
|
608
|
-
|
|
607
|
+
const matchingRow = addedNewRows.filter(newRow => existingRows.includes(newRow))
|
|
608
|
+
if (matchingRow?.length > 0) isDuplicated = true
|
|
609
609
|
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
610
|
+
if (isDuplicated) {
|
|
611
|
+
throw new Error(i18next.t('text.there_is_duplicated_lot_id'))
|
|
612
|
+
}
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
|
|
@@ -717,7 +717,8 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
|
|
|
717
717
|
_getNewOrderProducts() {
|
|
718
718
|
const isStatusPending = this.status === 'PENDING' ? true : false
|
|
719
719
|
return this.addProductGrist.dirtyData.records.map(record => {
|
|
720
|
-
record.unitPrice = parseFloat(record.unitPrice)
|
|
720
|
+
record.unitPrice = parseFloat(record.unitPrice) || 0
|
|
721
|
+
|
|
721
722
|
return {
|
|
722
723
|
batchId: isStatusPending ? record.batchId : `N/A`,
|
|
723
724
|
adjustedBatchId: !isStatusPending ? record.batchId : null,
|
|
@@ -733,7 +734,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
|
|
|
733
734
|
adjustedUomValue: !isStatusPending ? (record?.uomValue ? record.uomValue : 0) : null,
|
|
734
735
|
uom: isStatusPending ? record.uom : 'N/A',
|
|
735
736
|
adjustedUom: !isStatusPending ? record.uom : null,
|
|
736
|
-
packQty: isStatusPending ? (record.packQty ? record.packQty : 0) : 0,
|
|
737
|
+
packQty: isStatusPending ? (record.packQty ? parseFloat(record.packQty).toFixed(3) : 0) : 0,
|
|
737
738
|
adjustedPackQty: !isStatusPending ? record.packQty : null,
|
|
738
739
|
totalUomValue: isStatusPending ? record.totalUomValue : 'N/A',
|
|
739
740
|
adjustedTotalUomValue: record?.totalUomValue && !isStatusPending ? record.totalUomValue : 'N/A',
|
|
@@ -754,6 +755,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
|
|
|
754
755
|
if (this.editProductGrist.dirtyData.records.some(record => record.__dirty__)) {
|
|
755
756
|
this.editProductGrist.dirtyData.records.map(record => {
|
|
756
757
|
record.unitPrice = parseFloat(record.unitPrice)
|
|
758
|
+
|
|
757
759
|
editedOrderProducts.push({
|
|
758
760
|
id: record.id,
|
|
759
761
|
adjustedBatchId: !isStatusPending
|
|
@@ -236,19 +236,19 @@ export class ProceedEditProductPopup extends localize(i18next)(LitElement) {
|
|
|
236
236
|
width: 80
|
|
237
237
|
},
|
|
238
238
|
{
|
|
239
|
-
type: '
|
|
239
|
+
type: 'float',
|
|
240
240
|
name: 'packQty',
|
|
241
241
|
header: i18next.t('field.pack_qty'),
|
|
242
242
|
width: 80
|
|
243
243
|
},
|
|
244
244
|
{
|
|
245
|
-
type: '
|
|
245
|
+
type: 'float',
|
|
246
246
|
name: 'adjustedPackQty',
|
|
247
247
|
header: i18next.t('field.adjusted_pack_qty'),
|
|
248
248
|
width: 80
|
|
249
249
|
},
|
|
250
250
|
{
|
|
251
|
-
type: '
|
|
251
|
+
type: 'float',
|
|
252
252
|
name: 'totalUomValue',
|
|
253
253
|
header: i18next.t('field.total_uom_value'),
|
|
254
254
|
width: 120
|
|
@@ -211,19 +211,19 @@ export class ViewProductChangesPopup extends localize(i18next)(LitElement) {
|
|
|
211
211
|
width: 80
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
|
-
type: '
|
|
214
|
+
type: 'float',
|
|
215
215
|
name: 'packQty',
|
|
216
216
|
header: i18next.t('field.pack_qty'),
|
|
217
217
|
width: 80
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
|
-
type: '
|
|
220
|
+
type: 'float',
|
|
221
221
|
name: 'adjustedPackQty',
|
|
222
222
|
header: i18next.t('field.adjusted_pack_qty'),
|
|
223
223
|
width: 80
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
|
-
type: '
|
|
226
|
+
type: 'float',
|
|
227
227
|
name: 'totalUomValue',
|
|
228
228
|
header: i18next.t('field.total_uom_value'),
|
|
229
229
|
width: 120
|
|
@@ -678,7 +678,7 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
678
678
|
width: 100
|
|
679
679
|
},
|
|
680
680
|
{
|
|
681
|
-
type: '
|
|
681
|
+
type: 'float',
|
|
682
682
|
name: 'remainQty',
|
|
683
683
|
header: i18next.t('field.available_qty'),
|
|
684
684
|
width: 140
|
|
@@ -690,7 +690,7 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
690
690
|
width: 140
|
|
691
691
|
},
|
|
692
692
|
{
|
|
693
|
-
type: '
|
|
693
|
+
type: 'float',
|
|
694
694
|
name: 'releaseQty',
|
|
695
695
|
header: i18next.t('field.release_qty'),
|
|
696
696
|
imex: { header: i18next.t('field.release_qty'), key: 'releaseQty', width: 25, type: 'float' },
|