repzo-sap-absjo 1.0.12 → 1.0.13

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
@@ -6,6 +6,7 @@
6
6
 
7
7
  - [actions/***] add 2 keys in integration_meta: sync_to_sap_started & sync_to_sap_succeeded @maramalshen
8
8
  - [commands/product] assign Foreign Name (ITEMDESCF) in SAP to local_name in Repzo @maramalshen
9
+ - [actions/payment] add the field UserId where it equals USERID of the SAP API REP @maramalshen
9
10
 
10
11
  ### Changed
11
12
 
@@ -77,6 +77,10 @@ export const create_payment = async (event, options) => {
77
77
  if (!repzo_client)
78
78
  throw `Client with _id: ${repzo_payment.client_id} not found in Repzo`;
79
79
  const sap_payment = {
80
+ UserId:
81
+ repzo_rep === null || repzo_rep === void 0
82
+ ? void 0
83
+ : repzo_rep.integration_id,
80
84
  PaymentID: repzo_serial_number,
81
85
  ClientCode:
82
86
  repzo_client === null || repzo_client === void 0
@@ -386,6 +386,7 @@ const is_matched = (body_1, body_2) => {
386
386
  const keys = [
387
387
  "active",
388
388
  "name",
389
+ "local_name",
389
390
  "barcode",
390
391
  "sku",
391
392
  "sv_tax",
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.12",
4
+ "version": "1.0.13",
5
5
  "homepage": "",
6
6
  "keywords": [],
7
7
  "author": {
@@ -20,6 +20,7 @@ interface SAPPayment {
20
20
  ChequeNumber?: string | number;
21
21
  BankCode?: string;
22
22
  CountryCode?: string; // "JO";
23
+ UserId?: string;
23
24
  }
24
25
 
25
26
  export const create_payment = async (event: EVENT, options: Config) => {
@@ -76,6 +77,7 @@ export const create_payment = async (event: EVENT, options: Config) => {
76
77
  throw `Client with _id: ${repzo_payment.client_id} not found in Repzo`;
77
78
 
78
79
  const sap_payment: SAPPayment = {
80
+ UserId: repzo_rep?.integration_id,
79
81
  PaymentID: repzo_serial_number,
80
82
  ClientCode: repzo_client?.client_code,
81
83
  PaymentDate: moment(repzo_payment.paytime, "YYYY-MM-DD").format(
@@ -322,6 +322,7 @@ const is_matched = (
322
322
  const keys = [
323
323
  "active",
324
324
  "name",
325
+ "local_name",
325
326
  "barcode",
326
327
  "sku",
327
328
  "sv_tax",