@things-factory/operato-wms 4.3.429 → 4.3.430
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.
|
@@ -970,6 +970,11 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
970
970
|
_resetInput() {
|
|
971
971
|
if (this._selectedOrderProduct?.isRequiredCheckExpiry) this.expDateInput.value = null
|
|
972
972
|
|
|
973
|
+
if (this._isRequiredCheckExpiry) {
|
|
974
|
+
this.expDateInput.value = null
|
|
975
|
+
this._focusOnExpiryDateInput()
|
|
976
|
+
}
|
|
977
|
+
|
|
973
978
|
if (this._enableCartonLabel) {
|
|
974
979
|
if (this._isRequireSerialNumberScanningInbound) {
|
|
975
980
|
if (this.cartonInput.value == '') {
|
|
@@ -7,28 +7,14 @@ import '../inventory/serial-number-list-popup'
|
|
|
7
7
|
import '../components/select-product-popup'
|
|
8
8
|
|
|
9
9
|
import gql from 'graphql-tag'
|
|
10
|
-
import {
|
|
11
|
-
css,
|
|
12
|
-
html
|
|
13
|
-
} from 'lit-element'
|
|
10
|
+
import { css, html } from 'lit-element'
|
|
14
11
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
15
12
|
|
|
16
13
|
import { DirectPrinter } from '@things-factory/barcode-base'
|
|
17
|
-
import {
|
|
18
|
-
i18next,
|
|
19
|
-
localize
|
|
20
|
-
} from '@things-factory/i18n-base'
|
|
14
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
21
15
|
import { openPopup } from '@things-factory/layout-base'
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
CustomAlert,
|
|
25
|
-
PageView,
|
|
26
|
-
store
|
|
27
|
-
} from '@things-factory/shell'
|
|
28
|
-
import {
|
|
29
|
-
CommonButtonStyles,
|
|
30
|
-
ScrollbarStyles
|
|
31
|
-
} from '@things-factory/styles'
|
|
16
|
+
import { client, CustomAlert, PageView, store } from '@things-factory/shell'
|
|
17
|
+
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
32
18
|
import { isMobileDevice } from '@things-factory/utils'
|
|
33
19
|
|
|
34
20
|
import { fetchSettingRule } from '../../fetch-setting-value'
|
|
@@ -1354,11 +1340,11 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1354
1340
|
|
|
1355
1341
|
data = data.map(item => {
|
|
1356
1342
|
if (item?.expirationDate !== null && item?.expirationDate !== '') {
|
|
1357
|
-
item.expirationDate =
|
|
1343
|
+
item.expirationDate = this.toUtcTimestamp(item.expirationDate)
|
|
1358
1344
|
}
|
|
1359
1345
|
|
|
1360
1346
|
if (item?.manufactureDate !== null && item?.manufactureDate !== '') {
|
|
1361
|
-
item.manufactureDate =
|
|
1347
|
+
item.manufactureDate = this.toUtcTimestamp(item.manufactureDate)
|
|
1362
1348
|
}
|
|
1363
1349
|
|
|
1364
1350
|
return {
|
|
@@ -1740,6 +1726,12 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1740
1726
|
throw new Error(i18next.t('text.adjustment_note_is_required_kindly_fill_in_the_adjustment_note_to_continue'))
|
|
1741
1727
|
}
|
|
1742
1728
|
}
|
|
1729
|
+
|
|
1730
|
+
toUtcTimestamp(dateInput) {
|
|
1731
|
+
const date = new Date(dateInput)
|
|
1732
|
+
const utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0))
|
|
1733
|
+
return utcDate.getTime()
|
|
1734
|
+
}
|
|
1743
1735
|
}
|
|
1744
1736
|
|
|
1745
1737
|
window.customElements.define('inventory-adjustment', InventoryAdjustment)
|
|
@@ -1229,10 +1229,10 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1229
1229
|
width: 150
|
|
1230
1230
|
},
|
|
1231
1231
|
{
|
|
1232
|
-
type: '
|
|
1232
|
+
type: 'float',
|
|
1233
1233
|
name: 'newUomValue',
|
|
1234
1234
|
header: i18next.t('field.uom_value_sku', { sku: 'NEW SKU' }),
|
|
1235
|
-
record: { editable:
|
|
1235
|
+
record: { editable: !this._strictProductSelection },
|
|
1236
1236
|
width: 150
|
|
1237
1237
|
},
|
|
1238
1238
|
{
|
|
@@ -1518,7 +1518,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1518
1518
|
name: 'releaseUomValue',
|
|
1519
1519
|
header: i18next.t('field.release_uom_value'),
|
|
1520
1520
|
imex: { header: i18next.t('field.release_uom_value'), key: 'releaseUomValue', width: 25, type: 'float' },
|
|
1521
|
-
record: { editable:
|
|
1521
|
+
record: { editable: !this._strictProductSelection, options: { min: 0 } },
|
|
1522
1522
|
width: 140
|
|
1523
1523
|
}
|
|
1524
1524
|
]
|
|
@@ -1682,7 +1682,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1682
1682
|
type: 'float',
|
|
1683
1683
|
name: 'releaseUomValue',
|
|
1684
1684
|
header: i18next.t('field.release_uom_value'),
|
|
1685
|
-
record: { editable:
|
|
1685
|
+
record: { editable: !this._strictProductSelection, options: { min: 0 } },
|
|
1686
1686
|
width: 100
|
|
1687
1687
|
}
|
|
1688
1688
|
]
|
|
@@ -2056,23 +2056,28 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
2056
2056
|
// changeRecord.vasQty = changeRecord.qty
|
|
2057
2057
|
changeRecord.outputQty = initialRecord.outputQty ? initialRecord.outputQty : null
|
|
2058
2058
|
//
|
|
2059
|
-
} else if (changedColumn === 'outputQty'
|
|
2059
|
+
} else if (changedColumn === 'outputQty') {
|
|
2060
2060
|
if (changeRecord.outputQty <= 0 || isNaN(changeRecord.outputQty)) {
|
|
2061
2061
|
throw new Error(i18next.t('text.invalid_quantity_input'))
|
|
2062
|
-
} else if (initialRecord.outputQty == null) {
|
|
2063
|
-
const totalUomValue = changeRecord.outputQty * (changeRecord.newUomValue / changeRecord.qty)
|
|
2064
|
-
changeRecord.newUomValue = totalUomValue
|
|
2065
2062
|
} else {
|
|
2066
|
-
const totalUomValue = changeRecord.outputQty * (initialRecord.newUomValue /
|
|
2067
|
-
changeRecord.newUomValue = totalUomValue
|
|
2063
|
+
const totalUomValue = changeRecord.outputQty * (initialRecord.newUomValue / changeRecord.qty)
|
|
2064
|
+
changeRecord.newUomValue = totalUomValue.toFixed(2)
|
|
2068
2065
|
}
|
|
2069
2066
|
if (isNaN(changeRecord.newUomValue)) {
|
|
2070
2067
|
changeRecord.newUomValue = null
|
|
2071
2068
|
}
|
|
2072
|
-
} else if (changedColumn === 'newUomValue') {
|
|
2069
|
+
} else if (changedColumn === 'newUomValue' && !this._strictProductSelection) {
|
|
2073
2070
|
if (changeRecord.newUomValue <= 0 || isNaN(changeRecord.newUomValue)) {
|
|
2074
2071
|
throw new Error(i18next.t('text.invalid_quantity_input'))
|
|
2075
2072
|
}
|
|
2073
|
+
const decimalPlaces = (changeRecord.newUomValue.toString().split('.')[1] || '').length
|
|
2074
|
+
|
|
2075
|
+
if (decimalPlaces > 2) {
|
|
2076
|
+
throw new Error(i18next.t('text.cannot_add_more_than_2_decimal_places'))
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
const totalOutputQty = changeRecord.newUomValue / initialRecord.newOrgUomValue
|
|
2080
|
+
changeRecord.outputQty = Math.trunc(totalOutputQty) //return only the whole number
|
|
2076
2081
|
} else if (changedColumn === 'vasQty') {
|
|
2077
2082
|
if (changeRecord.vasQty <= 0 || isNaN(changeRecord.vasQty)) {
|
|
2078
2083
|
throw new Error(i18next.t('text.invalid_quantity_input'))
|
|
@@ -2419,7 +2424,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
2419
2424
|
newProductDetail: ov.newProductDetailId,
|
|
2420
2425
|
newPackingType: ov.newPackingType,
|
|
2421
2426
|
newUom: ov.newUom,
|
|
2422
|
-
newUomValue: ov.newUomValue,
|
|
2427
|
+
newUomValue: parseFloat(ov.newUomValue),
|
|
2423
2428
|
outputQty: ov.outputQty ? ov.outputQty : ov.qty,
|
|
2424
2429
|
remark: ov.remark,
|
|
2425
2430
|
orderVasItemsPatch: this.vasGrist.dirtyData.records.reduce((acc, cur) => {
|
|
@@ -2563,9 +2568,11 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
2563
2568
|
if ((record.newPackingType || record.newUomValue || record.newUom) && !record.newSKU)
|
|
2564
2569
|
throw new Error(i18next.t('text.empty_field_field', { field: i18next.t('field.new_sku') }))
|
|
2565
2570
|
if (!record.vasQty) throw new Error(i18next.t('text.empty_field_field', { field: i18next.t('field.vas_qty') }))
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2571
|
+
|
|
2572
|
+
if (record.outputQty === 0) throw new Error(i18next.t('text.output_qty_must_be_more_than_0'))
|
|
2573
|
+
if (!record.outputQty)
|
|
2574
|
+
throw new Error(i18next.t('text.empty_field_field', { field: i18next.t('field.output_qty') }))
|
|
2575
|
+
|
|
2569
2576
|
if (!record.vas) throw new Error(i18next.t('text.empty_field_field', { field: i18next.t('field.vas') }))
|
|
2570
2577
|
// allowing repacking to same SKU
|
|
2571
2578
|
// if (record.productSKU == record.newSKU)
|
|
@@ -2720,9 +2727,9 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
2720
2727
|
|
|
2721
2728
|
this.vasGrist.dirtyData.records.map((record, index) => {
|
|
2722
2729
|
if (index === rowIndex && record.newSKU) {
|
|
2723
|
-
if (record.
|
|
2724
|
-
record.
|
|
2725
|
-
|
|
2730
|
+
if (record.qty) {
|
|
2731
|
+
record.outputQty = null //clear outputQty if selecting new Sku
|
|
2732
|
+
record.newOrgUomValue = record.newUomValue
|
|
2726
2733
|
record.newUomValue = record.qty * record.newUomValue
|
|
2727
2734
|
} else {
|
|
2728
2735
|
record.newUomValue = null
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-wms",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.430",
|
|
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.381",
|
|
92
92
|
"@things-factory/product-base": "^4.3.425",
|
|
93
93
|
"@things-factory/resource-ui": "^4.3.425",
|
|
94
|
-
"@things-factory/sales-ui": "^4.3.
|
|
94
|
+
"@things-factory/sales-ui": "^4.3.430",
|
|
95
95
|
"@things-factory/scene-data-transform": "^4.3.381",
|
|
96
96
|
"@things-factory/scene-excel": "^4.3.381",
|
|
97
97
|
"@things-factory/scene-firebase": "^4.3.381",
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
"@things-factory/system-ui": "^4.3.381",
|
|
108
108
|
"@things-factory/transport-base": "^4.3.425",
|
|
109
109
|
"@things-factory/tutorial-ui": "^4.3.425",
|
|
110
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
111
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
110
|
+
"@things-factory/warehouse-base": "^4.3.430",
|
|
111
|
+
"@things-factory/worksheet-base": "^4.3.430"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@things-factory/builder": "^4.3.381",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"cypress-localstorage-commands": "^1.6.1",
|
|
118
118
|
"eslint-plugin-cypress": "^2.12.1"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "b62b950285aa5cb36af746fa9fe77b7476e4538c"
|
|
121
121
|
}
|