repzo-sap-absjo 1.0.33 → 1.0.35

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/changelog.md CHANGED
@@ -27,6 +27,7 @@
27
27
  - [actions/**] don't update integration_meta.sync_to_sap_succeeded if it is already true @maramalshen
28
28
  - [actions/create_invoice] include item.get_promotion in MEO_Serial & Promotion_Name @maramalshen
29
29
  - fix bug in is_matched in client & product @maramalshen
30
+ - fix: update date formatting to use 'YYYYMMDD:000000' for UpdateAt field @maramalshen
30
31
 
31
32
  ### Removed
32
33
 
@@ -194,7 +194,7 @@ const get_sap_clients = async (serviceEndPoint, query) => {
194
194
  Frozen: "N",
195
195
  UpdateAt: date_formatting(
196
196
  query === null || query === void 0 ? void 0 : query.updateAt,
197
- "YYYYMMDD:HHmmss"
197
+ "YYYYMMDD:000000"
198
198
  ),
199
199
  GroupCode:
200
200
  (query === null || query === void 0 ? void 0 : query.GroupCode) || "",
@@ -311,7 +311,7 @@ const get_sap_clients = async (serviceEndPoint, query) => {
311
311
  Frozen: "N",
312
312
  UpdateAt: date_formatting(
313
313
  query === null || query === void 0 ? void 0 : query.updateAt,
314
- "YYYYMMDD:HHmmss"
314
+ "YYYYMMDD:000000"
315
315
  ),
316
316
  GroupCode:
317
317
  (query === null || query === void 0 ? void 0 : query.GroupCode) || "",
@@ -158,7 +158,7 @@ const get_sap_clients = async (serviceEndPoint, query) => {
158
158
  Frozen: "N",
159
159
  UpdateAt: date_formatting(
160
160
  query === null || query === void 0 ? void 0 : query.updateAt,
161
- "YYYYMMDD:HHmmss"
161
+ "YYYYMMDD:000000"
162
162
  ),
163
163
  GroupCode:
164
164
  (query === null || query === void 0 ? void 0 : query.GroupCode) || "",
@@ -108,7 +108,8 @@ export const sync_measureunit = async (commandEvent) => {
108
108
  const CARD = max_unit.sap_product_UoMs.find(
109
109
  (u) => u.ALTUOMCODE == "CARD"
110
110
  );
111
- max_unit.default_unit = PC || POUCH || CARD;
111
+ const KG = max_unit.sap_product_UoMs.find((u) => u.ALTUOMCODE == "Kg");
112
+ max_unit.default_unit = PC || POUCH || CARD || KG;
112
113
  if (!max_unit.default_unit) {
113
114
  // console.log(
114
115
  // "Create/Update Measure Unit Failed >> ",
@@ -198,7 +198,7 @@ const get_sap_clients = async (serviceEndPoint, query) => {
198
198
  Frozen: "N",
199
199
  UpdateAt: date_formatting(
200
200
  query === null || query === void 0 ? void 0 : query.updateAt,
201
- "YYYYMMDD:HHmmss"
201
+ "YYYYMMDD:000000"
202
202
  ),
203
203
  GroupCode:
204
204
  (query === null || query === void 0 ? void 0 : query.GroupCode) || "",
@@ -431,7 +431,7 @@ const get_sap_products = async (serviceEndPoint, query) => {
431
431
  Active: "Y",
432
432
  UpdateAt: date_formatting(
433
433
  query === null || query === void 0 ? void 0 : query.updateAt,
434
- "YYYYMMDD:HHmmss"
434
+ "YYYYMMDD:000000"
435
435
  ),
436
436
  });
437
437
  return sap_products.Items;
@@ -157,7 +157,7 @@ const get_sap_disabled_products = async (serviceEndPoint, query) => {
157
157
  Active: "N",
158
158
  UpdateAt: date_formatting(
159
159
  query === null || query === void 0 ? void 0 : query.updateAt,
160
- "YYYYMMDD:HHmmss"
160
+ "YYYYMMDD:000000"
161
161
  ),
162
162
  });
163
163
  return sap_products.Items;
package/lib/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import jwt from "jsonwebtoken";
1
+ import type * as jwt from "jsonwebtoken";
2
2
  import { Service } from "repzo/src/types";
3
3
  export interface Config {
4
4
  app_id: string;
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.33",
4
+ "version": "1.0.35",
5
5
  "homepage": "",
6
6
  "keywords": [],
7
7
  "author": {
@@ -208,7 +208,7 @@ const get_sap_clients = async (
208
208
  {
209
209
  Active: "Y",
210
210
  Frozen: "N",
211
- UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:HHmmss"),
211
+ UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:000000"),
212
212
  GroupCode: query?.GroupCode || "",
213
213
  }
214
214
  );
@@ -298,7 +298,7 @@ const get_sap_clients = async (
298
298
  {
299
299
  Active: "Y",
300
300
  Frozen: "N",
301
- UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:HHmmss"),
301
+ UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:000000"),
302
302
  GroupCode: query?.GroupCode || "",
303
303
  }
304
304
  );
@@ -148,7 +148,7 @@ const get_sap_clients = async (
148
148
  {
149
149
  Active: "N",
150
150
  Frozen: "N",
151
- UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:HHmmss"),
151
+ UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:000000"),
152
152
  GroupCode: query?.GroupCode || "",
153
153
  }
154
154
  );
@@ -121,7 +121,8 @@ export const sync_measureunit = async (commandEvent: CommandEvent) => {
121
121
  const CARD = max_unit.sap_product_UoMs.find(
122
122
  (u) => u.ALTUOMCODE == "CARD"
123
123
  );
124
- max_unit.default_unit = PC || POUCH || CARD;
124
+ const KG = max_unit.sap_product_UoMs.find((u) => u.ALTUOMCODE == "Kg");
125
+ max_unit.default_unit = PC || POUCH || CARD || KG;
125
126
 
126
127
  if (!max_unit.default_unit) {
127
128
  // console.log(
@@ -213,7 +213,7 @@ const get_sap_clients = async (
213
213
  {
214
214
  Active: "Y",
215
215
  Frozen: "N",
216
- UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:HHmmss"),
216
+ UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:000000"),
217
217
  GroupCode: query?.GroupCode || "",
218
218
  }
219
219
  );
@@ -328,7 +328,7 @@ const get_sap_products = async (
328
328
  try {
329
329
  const sap_products: SAPProducts = await _create(serviceEndPoint, "/Items", {
330
330
  Active: "Y",
331
- UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:HHmmss"),
331
+ UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:000000"),
332
332
  });
333
333
  return sap_products.Items;
334
334
  } catch (e: any) {
@@ -146,7 +146,7 @@ const get_sap_disabled_products = async (
146
146
  try {
147
147
  const sap_products: SAPProducts = await _create(serviceEndPoint, "/Items", {
148
148
  Active: "N",
149
- UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:HHmmss"),
149
+ UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:000000"),
150
150
  });
151
151
  return sap_products.Items;
152
152
  } catch (e: any) {
package/src/types.ts CHANGED
@@ -1,4 +1,4 @@
1
- import jwt from "jsonwebtoken";
1
+ import type * as jwt from "jsonwebtoken";
2
2
  import { Service } from "repzo/src/types";
3
3
  export interface Config {
4
4
  app_id: string;