repzo-sap-absjo 1.0.48 → 1.0.50
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/lib/commands/measureunit.js +1 -1
- package/lib/util.js +3 -0
- package/package.json +1 -1
- package/src/commands/measureunit.ts +1 -1
- package/src/util.ts +3 -0
|
@@ -93,7 +93,7 @@ export const sync_measureunit = async (commandEvent) => {
|
|
|
93
93
|
default_unit: null,
|
|
94
94
|
};
|
|
95
95
|
units.forEach((unit) => {
|
|
96
|
-
if (max_unit.value == null || unit.BASEQTY
|
|
96
|
+
if (max_unit.value == null || unit.BASEQTY < max_unit.value) {
|
|
97
97
|
max_unit.value = unit.BASEQTY;
|
|
98
98
|
max_unit.sap_product_UoMs.push(unit);
|
|
99
99
|
} else if (unit.BASEQTY == max_unit.value) {
|
package/lib/util.js
CHANGED
|
@@ -202,6 +202,9 @@ export const getUniqueConcatenatedValues = function (
|
|
|
202
202
|
item.general_promotions = item.general_promotions || [];
|
|
203
203
|
item.used_promotions = item.used_promotions || [];
|
|
204
204
|
const allPromotions = [...item.general_promotions, ...item.used_promotions];
|
|
205
|
+
allPromotions.forEach((promo) => {
|
|
206
|
+
promo._id = promo._id || promo.id;
|
|
207
|
+
});
|
|
205
208
|
if ((_a = item.promotions) === null || _a === void 0 ? void 0 : _a.isGet) {
|
|
206
209
|
const promo_id =
|
|
207
210
|
(_c =
|
package/package.json
CHANGED
|
@@ -105,7 +105,7 @@ export const sync_measureunit = async (commandEvent: CommandEvent) => {
|
|
|
105
105
|
default_unit: null,
|
|
106
106
|
};
|
|
107
107
|
units.forEach((unit) => {
|
|
108
|
-
if (max_unit.value == null || unit.BASEQTY
|
|
108
|
+
if (max_unit.value == null || unit.BASEQTY < max_unit.value) {
|
|
109
109
|
max_unit.value = unit.BASEQTY;
|
|
110
110
|
max_unit.sap_product_UoMs.push(unit);
|
|
111
111
|
} else if (unit.BASEQTY == max_unit.value) {
|
package/src/util.ts
CHANGED
|
@@ -256,6 +256,9 @@ export const getUniqueConcatenatedValues = function (
|
|
|
256
256
|
...item.general_promotions,
|
|
257
257
|
...item.used_promotions,
|
|
258
258
|
];
|
|
259
|
+
allPromotions.forEach((promo) => {
|
|
260
|
+
promo._id = promo._id || promo.id;
|
|
261
|
+
});
|
|
259
262
|
if (item.promotions?.isGet) {
|
|
260
263
|
const promo_id = item.promotions.bookings?.[0]?.promotion;
|
|
261
264
|
if (promo_id && all_promos[promo_id])
|