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.
@@ -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 > max_unit.value) {
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "repzo-sap-absjo",
3
3
  "description": "repzo SAP ABS jo integration",
4
- "version": "1.0.48",
4
+ "version": "1.0.50",
5
5
  "homepage": "",
6
6
  "keywords": [],
7
7
  "author": {
@@ -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 > max_unit.value) {
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])