repzo-sap-absjo 1.0.51 → 1.0.52
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Repzo from "repzo";
|
|
2
2
|
import DataSet from "data-set-query";
|
|
3
3
|
import { _create, update_bench_time, set_error } from "../util.js";
|
|
4
|
+
import _ from "lodash";
|
|
4
5
|
export const sync_measureunit = async (commandEvent) => {
|
|
5
6
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
6
7
|
const repzo = new Repzo(
|
|
@@ -92,7 +93,7 @@ export const sync_measureunit = async (commandEvent) => {
|
|
|
92
93
|
value: null,
|
|
93
94
|
default_unit: null,
|
|
94
95
|
};
|
|
95
|
-
units.forEach((unit) => {
|
|
96
|
+
_.reverse(_.sortBy(units, "BASEQTY")).forEach((unit) => {
|
|
96
97
|
if (max_unit.value == null || unit.BASEQTY > max_unit.value) {
|
|
97
98
|
max_unit.value = unit.BASEQTY;
|
|
98
99
|
max_unit.sap_product_UoMs.push(unit);
|
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
date_formatting,
|
|
12
12
|
set_error,
|
|
13
13
|
} from "../util.js";
|
|
14
|
+
import _ from "lodash";
|
|
14
15
|
|
|
15
16
|
export interface SAPUoM {
|
|
16
17
|
ITEMCODE: string; // "010-BIC-RA0001",
|
|
@@ -104,7 +105,7 @@ export const sync_measureunit = async (commandEvent: CommandEvent) => {
|
|
|
104
105
|
value: null,
|
|
105
106
|
default_unit: null,
|
|
106
107
|
};
|
|
107
|
-
units.forEach((unit) => {
|
|
108
|
+
_.reverse(_.sortBy(units, "BASEQTY")).forEach((unit) => {
|
|
108
109
|
if (max_unit.value == null || unit.BASEQTY > max_unit.value) {
|
|
109
110
|
max_unit.value = unit.BASEQTY;
|
|
110
111
|
max_unit.sap_product_UoMs.push(unit);
|