repzo-sap-absjo 1.0.6 → 1.0.8

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.
Files changed (80) hide show
  1. package/changelog.md +4 -0
  2. package/lib/actions/create_invoice.d.ts +13 -19
  3. package/lib/actions/create_invoice.js +216 -336
  4. package/lib/actions/create_payment.d.ts +1 -4
  5. package/lib/actions/create_payment.js +125 -171
  6. package/lib/actions/create_proforma.d.ts +1 -4
  7. package/lib/actions/create_proforma.js +165 -268
  8. package/lib/actions/create_return_invoice.d.ts +1 -4
  9. package/lib/actions/create_return_invoice.js +177 -295
  10. package/lib/actions/create_transfer.d.ts +1 -4
  11. package/lib/actions/create_transfer.js +143 -198
  12. package/lib/actions/index.js +15 -23
  13. package/lib/commands/adjust_inventory.d.ts +2 -4
  14. package/lib/commands/adjust_inventory.js +160 -290
  15. package/lib/commands/bank.d.ts +2 -4
  16. package/lib/commands/bank.js +157 -279
  17. package/lib/commands/basic.js +47 -66
  18. package/lib/commands/category.d.ts +1 -3
  19. package/lib/commands/category.js +104 -178
  20. package/lib/commands/channel.d.ts +1 -3
  21. package/lib/commands/channel.js +117 -198
  22. package/lib/commands/client.d.ts +32 -34
  23. package/lib/commands/client.js +244 -404
  24. package/lib/commands/client_disabled.d.ts +1 -3
  25. package/lib/commands/client_disabled.js +94 -163
  26. package/lib/commands/index.d.ts +11 -15
  27. package/lib/commands/index.js +60 -60
  28. package/lib/commands/join.js +66 -192
  29. package/lib/commands/measureunit.d.ts +14 -19
  30. package/lib/commands/measureunit.js +191 -289
  31. package/lib/commands/measureunit_family.d.ts +8 -10
  32. package/lib/commands/measureunit_family.js +138 -250
  33. package/lib/commands/payment_term.d.ts +1 -3
  34. package/lib/commands/payment_term.js +123 -202
  35. package/lib/commands/price_list.d.ts +15 -15
  36. package/lib/commands/price_list.js +327 -571
  37. package/lib/commands/product.d.ts +30 -32
  38. package/lib/commands/product.js +243 -425
  39. package/lib/commands/product_disabled.d.ts +1 -3
  40. package/lib/commands/product_disabled.js +94 -164
  41. package/lib/commands/rep.js +141 -221
  42. package/lib/commands/tag.js +109 -174
  43. package/lib/commands/tax.js +112 -177
  44. package/lib/commands/warehouse.d.ts +1 -3
  45. package/lib/commands/warehouse.js +119 -207
  46. package/lib/index.d.ts +12 -21
  47. package/lib/test/actions/create_invoice.js +188 -193
  48. package/lib/test/actions/create_payment.js +107 -112
  49. package/lib/test/actions/create_proforma.js +216 -220
  50. package/lib/test/actions/create_return_invoice.js +200 -205
  51. package/lib/test/actions/create_transfer.js +115 -120
  52. package/lib/test/commands/adjust_inventory.js +90 -90
  53. package/lib/test/commands/bank.js +90 -90
  54. package/lib/test/commands/basic.js +327 -328
  55. package/lib/test/commands/category.js +90 -90
  56. package/lib/test/commands/channel.js +90 -90
  57. package/lib/test/commands/client.js +353 -355
  58. package/lib/test/commands/client_disabled.js +90 -90
  59. package/lib/test/commands/join.js +327 -328
  60. package/lib/test/commands/measureunit.js +90 -90
  61. package/lib/test/commands/measureunit_family.js +90 -90
  62. package/lib/test/commands/payment_term.js +90 -90
  63. package/lib/test/commands/price_list.js +337 -90
  64. package/lib/test/commands/product.js +90 -90
  65. package/lib/test/commands/product_disabled.js +90 -90
  66. package/lib/test/commands/rep.js +344 -346
  67. package/lib/test/commands/tag.js +90 -90
  68. package/lib/test/commands/tax.js +90 -90
  69. package/lib/test/commands/warehouse.js +90 -90
  70. package/lib/types.d.ts +60 -83
  71. package/lib/util.d.ts +19 -70
  72. package/lib/util.js +144 -170
  73. package/package.json +1 -1
  74. package/src/actions/create_invoice.ts +35 -0
  75. package/src/actions/create_payment.ts +35 -0
  76. package/src/actions/create_proforma.ts +35 -0
  77. package/src/actions/create_return_invoice.ts +35 -0
  78. package/src/actions/create_transfer.ts +34 -0
  79. package/src/commands/price_list.ts +40 -4
  80. package/src/test/commands/price_list.ts +263 -13
@@ -37,6 +37,24 @@ export const create_payment = async (event: EVENT, options: Config) => {
37
37
  } catch (e) {}
38
38
 
39
39
  const repzo_serial_number = body?.serial_number?.formatted;
40
+ try {
41
+ if (body?._id) {
42
+ body.integration_meta = body?.integration_meta || {};
43
+ body.integration_meta.sync_to_sap_started = true;
44
+ body.integration_meta.sync_to_sap_succeeded =
45
+ body.integration_meta.sync_to_sap_succeeded || false;
46
+ await repzo.payment.update(body._id, {
47
+ integration_meta: body.integration_meta,
48
+ });
49
+ }
50
+ } catch (e) {
51
+ console.error(e);
52
+ await actionLog
53
+ .addDetail(
54
+ `Failed updating integration_meta of Payment: ${repzo_serial_number}`
55
+ )
56
+ .commit();
57
+ }
40
58
 
41
59
  await actionLog
42
60
  .addDetail(`Payment - ${repzo_serial_number} => ${body?.sync_id}`)
@@ -123,6 +141,23 @@ export const create_payment = async (event: EVENT, options: Config) => {
123
141
 
124
142
  // console.log(result);
125
143
 
144
+ try {
145
+ if (body?._id) {
146
+ body.integration_meta = body?.integration_meta || {};
147
+ body.integration_meta.sync_to_sap_succeeded = true;
148
+ await repzo.payment.update(body._id, {
149
+ integration_meta: body.integration_meta,
150
+ });
151
+ }
152
+ } catch (e) {
153
+ console.error(e);
154
+ await actionLog
155
+ .addDetail(
156
+ `Failed updating integration_meta of Payment: ${repzo_serial_number}`
157
+ )
158
+ .commit();
159
+ }
160
+
126
161
  await actionLog
127
162
  .addDetail(`SAP Responded with `, result)
128
163
  .addDetail(`Repzo => SAP: Payment - ${repzo_serial_number}`)
@@ -44,6 +44,24 @@ export const create_proforma = async (event: EVENT, options: Config) => {
44
44
  } catch (e) {}
45
45
 
46
46
  const repzo_serial_number = body?.serial_number?.formatted;
47
+ try {
48
+ if (body?._id) {
49
+ body.integration_meta = body?.integration_meta || {};
50
+ body.integration_meta.sync_to_sap_started = true;
51
+ body.integration_meta.sync_to_sap_succeeded =
52
+ body.integration_meta.sync_to_sap_succeeded || false;
53
+ await repzo.proforma.update(body._id, {
54
+ integration_meta: body.integration_meta,
55
+ });
56
+ }
57
+ } catch (e) {
58
+ console.error(e);
59
+ await actionLog
60
+ .addDetail(
61
+ `Failed updating integration_meta of SalesOrder: ${repzo_serial_number}`
62
+ )
63
+ .commit();
64
+ }
47
65
 
48
66
  await actionLog
49
67
  .addDetail(`SalesOrder - ${repzo_serial_number} => ${body?.sync_id}`)
@@ -197,6 +215,23 @@ export const create_proforma = async (event: EVENT, options: Config) => {
197
215
 
198
216
  // console.log(result);
199
217
 
218
+ try {
219
+ if (body?._id) {
220
+ body.integration_meta = body?.integration_meta || {};
221
+ body.integration_meta.sync_to_sap_succeeded = true;
222
+ await repzo.proforma.update(body._id, {
223
+ integration_meta: body.integration_meta,
224
+ });
225
+ }
226
+ } catch (e) {
227
+ console.error(e);
228
+ await actionLog
229
+ .addDetail(
230
+ `Failed updating integration_meta of SalesOrder: ${repzo_serial_number}`
231
+ )
232
+ .commit();
233
+ }
234
+
200
235
  await actionLog
201
236
  .addDetail(`SAP Responded with `, result)
202
237
  .addDetail(`Repzo => SAP: SalesOrder - ${repzo_serial_number}`)
@@ -52,6 +52,24 @@ export const create_return_invoice = async (event: EVENT, options: Config) => {
52
52
  } catch (e) {}
53
53
 
54
54
  const repzo_serial_number = body?.serial_number?.formatted;
55
+ try {
56
+ if (body?._id) {
57
+ body.integration_meta = body?.integration_meta || {};
58
+ body.integration_meta.sync_to_sap_started = true;
59
+ body.integration_meta.sync_to_sap_succeeded =
60
+ body.integration_meta.sync_to_sap_succeeded || false;
61
+ await repzo.invoice.update(body._id, {
62
+ integration_meta: body.integration_meta,
63
+ });
64
+ }
65
+ } catch (e) {
66
+ console.error(e);
67
+ await actionLog
68
+ .addDetail(
69
+ `Failed updating integration_meta of Return Invoice: ${repzo_serial_number}`
70
+ )
71
+ .commit();
72
+ }
55
73
 
56
74
  await actionLog
57
75
  .addDetail(`Return Invoice - ${repzo_serial_number} => ${body?.sync_id}`)
@@ -228,6 +246,23 @@ export const create_return_invoice = async (event: EVENT, options: Config) => {
228
246
 
229
247
  // console.log(result);
230
248
 
249
+ try {
250
+ if (body?._id) {
251
+ body.integration_meta = body?.integration_meta || {};
252
+ body.integration_meta.sync_to_sap_succeeded = true;
253
+ await repzo.invoice.update(body._id, {
254
+ integration_meta: body.integration_meta,
255
+ });
256
+ }
257
+ } catch (e) {
258
+ console.error(e);
259
+ await actionLog
260
+ .addDetail(
261
+ `Failed updating integration_meta of Return Invoice: ${repzo_serial_number}`
262
+ )
263
+ .commit();
264
+ }
265
+
231
266
  await actionLog
232
267
  .addDetail(`SAP Responded with `, result)
233
268
  .addDetail(`Repzo => SAP: Return Invoice - ${repzo_serial_number}`)
@@ -41,6 +41,24 @@ export const create_transfer = async (event: EVENT, options: Config) => {
41
41
  } catch (e) {}
42
42
 
43
43
  const repzo_serial_number = body?.serial_number?.formatted;
44
+ try {
45
+ if (body?._id) {
46
+ body.integration_meta = body?.integration_meta || {};
47
+ body.integration_meta.sync_to_sap_started = true;
48
+ body.integration_meta.sync_to_sap_succeeded =
49
+ body.integration_meta.sync_to_sap_succeeded || false;
50
+ await repzo.transfer.update(body._id, {
51
+ integration_meta: body.integration_meta,
52
+ });
53
+ }
54
+ } catch (e) {
55
+ console.error(e);
56
+ await actionLog
57
+ .addDetail(
58
+ `Failed updating integration_meta of Transfer: ${repzo_serial_number}`
59
+ )
60
+ .commit();
61
+ }
44
62
 
45
63
  await actionLog
46
64
  .addDetail(`Transfer - ${repzo_serial_number} => ${body?.sync_id}`)
@@ -157,6 +175,22 @@ export const create_transfer = async (event: EVENT, options: Config) => {
157
175
  );
158
176
 
159
177
  // console.log(result);
178
+ try {
179
+ if (body?._id) {
180
+ body.integration_meta = body?.integration_meta || {};
181
+ body.integration_meta.sync_to_sap_succeeded = true;
182
+ await repzo.transfer.update(body._id, {
183
+ integration_meta: body.integration_meta,
184
+ });
185
+ }
186
+ } catch (e) {
187
+ console.error(e);
188
+ await actionLog
189
+ .addDetail(
190
+ `Failed updating integration_meta of Transfer: ${repzo_serial_number}`
191
+ )
192
+ .commit();
193
+ }
160
194
 
161
195
  await actionLog
162
196
  .addDetail(`SAP Responded with `, result)
@@ -123,6 +123,27 @@ export const sync_price_list = async (commandEvent: CommandEvent) => {
123
123
  sap_unique_UoMs[key] = doc.ALTQTY;
124
124
  });
125
125
 
126
+ // Get Repzo {Product_sku : product_default_measureunit_name}
127
+ const repzo_product_default_measureunit: {
128
+ [productSKU: string]: string | null;
129
+ } = {};
130
+ repzo_products.data.forEach((product) => {
131
+ if (!product.sku) return;
132
+ if (!product.sv_measureUnit) {
133
+ repzo_product_default_measureunit[product.sku] = null;
134
+ } else {
135
+ const default_measureunit = repzo_UoMs.data.find(
136
+ (m) => m._id == product.sv_measureUnit
137
+ );
138
+ if (default_measureunit) {
139
+ repzo_product_default_measureunit[product.sku] =
140
+ default_measureunit.name;
141
+ } else {
142
+ repzo_product_default_measureunit[product.sku] = null;
143
+ }
144
+ }
145
+ });
146
+
126
147
  // sort the data
127
148
  const priceLists_withItems: { [key: string]: SAPPriceListItem[] } = {};
128
149
  sap_price_lists.forEach((doc) => {
@@ -249,8 +270,18 @@ export const sync_price_list = async (commandEvent: CommandEvent) => {
249
270
  priceList_items[key] = doc;
250
271
  } else {
251
272
  const current_doc = priceList_items[key];
252
- if (current_doc?.factor > doc?.factor) {
253
- priceList_items[key] = doc;
273
+ if (
274
+ current_doc.PLITEMUNIT !=
275
+ repzo_product_default_measureunit[current_doc.PLITEMID]
276
+ ) {
277
+ if (
278
+ doc.PLITEMUNIT ==
279
+ repzo_product_default_measureunit[current_doc.PLITEMID]
280
+ ) {
281
+ priceList_items[key] = doc;
282
+ } else if (current_doc?.factor > doc?.factor) {
283
+ priceList_items[key] = doc;
284
+ }
254
285
  }
255
286
  }
256
287
  });
@@ -287,9 +318,14 @@ export const sync_price_list = async (commandEvent: CommandEvent) => {
287
318
  continue;
288
319
  }
289
320
 
290
- const repzo_product_uom = repzo_UoMs?.data?.find(
321
+ const repzo_product_uoms = repzo_UoMs?.data?.filter(
291
322
  (uom) =>
292
- uom?._id?.toString() == repzo_product?.sv_measureUnit?.toString()
323
+ uom?._id?.toString() == repzo_product?.sv_measureUnit?.toString() ||
324
+ repzo_product.measureunit_family?.includes(uom?._id?.toString())
325
+ );
326
+
327
+ const repzo_product_uom = repzo_product_uoms.find(
328
+ (uom) => uom.name == item.PLITEMUNIT
293
329
  );
294
330
 
295
331
  if (!repzo_product_uom) {
@@ -3,15 +3,16 @@ import { Commands } from "../../index.js";
3
3
 
4
4
  let commandEvent: CommandEvent | any = {
5
5
  app: {
6
- _id: "6391a53edb71ef6435719794",
6
+ _id: "639f0bf52070c5be595e955c",
7
7
  name: "SAP",
8
8
  disabled: false,
9
9
  available_app: {
10
10
  _id: "6391a268db71ef64357195da",
11
11
  name: "repzo-sap-absjo",
12
12
  title: "SAP ABS JO",
13
- logo: "https://www.e2abs.com/wp-content/uploads/2021/03/Website-Main-Logo-1.svg",
14
- description: "",
13
+ logo: "https://prod-repzo-media-service.s3.us-east-1.amazonaws.com/repzo/image/2022/12/18/3f73de7d-1920-4786-90db-57c76d18acci-SAP_EBS_JO.png",
14
+ description:
15
+ "SAP Jordan. We provide real value to SMEs by understanding their business and driving their vision forward with SAP Business One",
15
16
  disabled: false,
16
17
  JSONSchema: {
17
18
  title: "SAP Integration Settings",
@@ -31,11 +32,95 @@ let commandEvent: CommandEvent | any = {
31
32
  format: "email",
32
33
  title: "Email in case of error",
33
34
  },
35
+ GroupCode: {
36
+ type: "string",
37
+ format: "string",
38
+ title: "Customers GroupCode",
39
+ },
34
40
  warehouseDefaultUpdateDate: {
35
41
  type: "string",
36
42
  format: "date",
37
43
  title: "Warehouse: Default Update Date",
38
44
  },
45
+ DepartmentCode: {
46
+ type: "string",
47
+ format: "string",
48
+ title: "Invoice/Return Department Code",
49
+ },
50
+ return_reason: {
51
+ type: "string",
52
+ format: "string",
53
+ title: "Return Reason Array",
54
+ },
55
+ SalPersCode: {
56
+ type: "string",
57
+ format: "string",
58
+ title: "Default Sales Person Code For Sales Orders",
59
+ },
60
+ SalesPersonCode: {
61
+ type: "string",
62
+ format: "string",
63
+ title: "Default Sales Person Code For Transfer",
64
+ },
65
+ invoices: {
66
+ type: "object",
67
+ title: "Invoices",
68
+ required: ["createInvoiceHook", "createReturnInvoiceHook"],
69
+ properties: {
70
+ createInvoiceHook: {
71
+ type: "boolean",
72
+ title: "Live Sync Invoices from Repzo to SAP",
73
+ default: false,
74
+ },
75
+ createReturnInvoiceHook: {
76
+ type: "boolean",
77
+ title: "Live Sync Return Invoice from Repzo to SAP",
78
+ default: false,
79
+ },
80
+ },
81
+ },
82
+ payments: {
83
+ type: "object",
84
+ title: "Payments",
85
+ required: ["createPaymentHook"],
86
+ properties: {
87
+ createPaymentHook: {
88
+ type: "boolean",
89
+ title: "Live Sync Payments from Repzo to SAP",
90
+ default: false,
91
+ },
92
+ },
93
+ },
94
+ proformas: {
95
+ type: "object",
96
+ title: "Sales Orders",
97
+ required: ["createApprovedProformaHook"],
98
+ properties: {
99
+ createApprovedProformaHook: {
100
+ type: "boolean",
101
+ title: "Live Sync Approved Sales Orders from Repzo to SAP",
102
+ default: false,
103
+ },
104
+ },
105
+ },
106
+ transfers: {
107
+ type: "object",
108
+ title: "Transfers",
109
+ required: ["createApprovedTransferHook"],
110
+ properties: {
111
+ createApprovedTransferHook: {
112
+ type: "boolean",
113
+ title: "Live Sync Approved Transfers from Repzo to SAP",
114
+ default: false,
115
+ },
116
+ adjustInventoryInFailedTransfer: {
117
+ type: "boolean",
118
+ title:
119
+ "Adjust Inventories in Repzo if creation Transfer Failed in SAP",
120
+ default: false,
121
+ },
122
+ },
123
+ },
39
124
  },
40
125
  },
41
126
  options_JSONSchema: {
@@ -48,6 +133,41 @@ let commandEvent: CommandEvent | any = {
48
133
  type: "string",
49
134
  format: "date",
50
135
  },
136
+ bench_time_channel: {
137
+ title: "Bench Time: Channels",
138
+ type: "string",
139
+ format: "date-time",
140
+ },
141
+ bench_time_payment_term: {
142
+ title: "Bench Time: Payment Terms",
143
+ type: "string",
144
+ format: "date-time",
145
+ },
146
+ bench_time_product: {
147
+ title: "Bench Time: Products",
148
+ type: "string",
149
+ format: "date-time",
150
+ },
151
+ bench_time_product_disabled: {
152
+ title: "Bench Time: Inactive Products",
153
+ type: "string",
154
+ format: "date-time",
155
+ },
156
+ bench_time_price_list: {
157
+ title: "Bench Time: Price List",
158
+ type: "string",
159
+ format: "date-time",
160
+ },
161
+ bench_time_client: {
162
+ title: "Bench Time: Clients",
163
+ type: "string",
164
+ format: "date-time",
165
+ },
166
+ bench_time_disabled_client: {
167
+ title: "Bench Time: Inactive Clients",
168
+ type: "string",
169
+ format: "date-time",
170
+ },
51
171
  },
52
172
  },
53
173
  app_settings: {
@@ -69,31 +189,161 @@ let commandEvent: CommandEvent | any = {
69
189
  description: "",
70
190
  _id: "6391a268db71ef64357195dd",
71
191
  },
192
+ {
193
+ command: "warehouse",
194
+ name: "Sync Warehouse",
195
+ description: "Sync Warehouses From SAP to Repzo",
196
+ _id: "6391c42a1b0f4f7a30e40f40",
197
+ },
198
+ {
199
+ command: "rep",
200
+ name: "Sync Representatives",
201
+ description: "Sync Representatives From SAP to Repzo",
202
+ _id: "639715c2bee5dd4b6b11e129",
203
+ },
204
+ {
205
+ command: "tax",
206
+ name: "Sync Taxes",
207
+ description: "Sync Taxes From SAP to Repzo",
208
+ _id: "639715c2bee5dd4b6b11e12a",
209
+ },
210
+ {
211
+ command: "tag",
212
+ name: "Sync Area Tags",
213
+ description: "Sync Area Tags From SAP to Repzo",
214
+ _id: "639715c2bee5dd4b6b11e12b",
215
+ },
216
+ {
217
+ command: "measureunit",
218
+ name: "Sync Measure Units",
219
+ description: "Sync Measure Units From SAP to Repzo",
220
+ _id: "639817eaedafde008af0ad0e",
221
+ },
222
+ {
223
+ command: "measureunit_family",
224
+ name: "Sync Measure Units Family",
225
+ description: "Sync Measure Units Family From SAP to Repzo",
226
+ _id: "63982d09edafde008af0f698",
227
+ },
228
+ {
229
+ command: "category",
230
+ name: "Sync Product Category",
231
+ description: "Sync Product Categories From SAP to Repzo",
232
+ _id: "63984085edafde008af2f689",
233
+ },
234
+ {
235
+ command: "channel",
236
+ name: "Sync Client's Channels",
237
+ description: "Sync Client's Channels From SAP to Repzo",
238
+ _id: "63984085edafde008af2f689",
239
+ },
240
+ {
241
+ command: "payment_term",
242
+ name: "Sync Payments Term",
243
+ description: "Sync Payments Term From SAP to Repzo",
244
+ _id: "63984085edafde008af2f68a",
245
+ },
246
+ {
247
+ command: "bank",
248
+ name: "Sync Banks",
249
+ description: "Sync Banks From SAP to Repzo",
250
+ _id: "63986018333b84929c538570",
251
+ },
252
+ {
253
+ command: "product",
254
+ name: "Sync Products",
255
+ description: "Sync Active Products From SAP to Repzo",
256
+ _id: "63987139333b84929c53a293",
257
+ },
258
+ {
259
+ command: "disabled_product",
260
+ name: "Sync Inactive Products",
261
+ description: "Sync Inactive Products From SAP to Repzo",
262
+ _id: "6399714d0242db686d496466",
263
+ },
264
+ {
265
+ command: "price_list",
266
+ name: "Sync Price Lists",
267
+ description: "Sync Price Lists From SAP to Repzo",
268
+ _id: "639972d6e8a1cfdd26deaa7e",
269
+ },
270
+ {
271
+ command: "client",
272
+ name: "Sync Clients",
273
+ description: "Sync Clients From SAP to Repzo",
274
+ _id: "63997615e8a1cfdd26ded7d1",
275
+ },
276
+ {
277
+ command: "disabled_client",
278
+ name: "Sync Inactive Clients",
279
+ description: "Sync Inactive Clients From SAP to Repzo",
280
+ _id: "639ac554e157f1c63770c1bc",
281
+ },
282
+ {
283
+ command: "adjust_inventory",
284
+ name: "Adjust Inventories",
285
+ description: "Adjust Inventories From SAP to Repzo",
286
+ _id: "639ac56fe157f1c63770c2eb",
287
+ },
288
+ ],
289
+ actions: [
290
+ {
291
+ action: "create_invoice",
292
+ name: "Sync Invoices",
293
+ description: "Sync Invoices From Repzo to SAP",
294
+ _id: "639ebeacdbba64d7af94520c",
295
+ },
296
+ {
297
+ action: "create_return_invoice",
298
+ name: "Sync Return Invoices",
299
+ description: "Sync Return Invoices From Repzo to SAP",
300
+ _id: "639ebeacdbba64d7af94520d",
301
+ },
302
+ {
303
+ action: "create_proforma",
304
+ name: "Sync Approved Sales Orders",
305
+ description: "Sync Approved Sales Orders From Repzo to SAP",
306
+ _id: "639ebeacdbba64d7af94520e",
307
+ },
308
+ {
309
+ action: "create_payment",
310
+ name: "Sync Paymants",
311
+ description: "Sync Paymants From Repzo to SAP",
312
+ _id: "639ebeacdbba64d7af94520f",
313
+ },
314
+ {
315
+ action: "create_transfer",
316
+ name: "Sync Approved Transfers",
317
+ description: "Sync Approved Transfers From Repzo to SAP",
318
+ _id: "639ebeacdbba64d7af945210",
319
+ },
72
320
  ],
73
- actions: [],
74
321
  createdAt: "2022-12-08T08:38:00.915Z",
75
- updatedAt: "2022-12-08T09:42:49.236Z",
322
+ updatedAt: "2022-12-20T11:09:00.384Z",
76
323
  __v: 0,
77
324
  },
78
- company_namespace: ["unisap"],
325
+ company_namespace: ["unipaljo"],
79
326
  formData: {
80
- repzoApiKey: "L98_Pc8qZG2R5hZIIMjxLQNUgUzT3_0aX2BuLvkyh74",
327
+ repzoApiKey: "mUOvoIBiv9uIg4ur7-nVdVP4m21EXto4EnlgWgDqP2c",
81
328
  sapHostUrl: "http://unipal.b1pro.com:8083/api",
82
- errorEmail: "maram.alshen@repzoapp.com",
83
- serviceApiKey: "awdas",
84
329
  warehouseDefaultUpdateDate: "2015-01-01",
330
+ DepartmentCode: "D2",
331
+ return_reason:
332
+ '[{sap_id:1,sap_name:"BarcodeIssue",repzo_name:"Barcodeissue",repzo_id:"62b074972b332895edf114fc"},{sap_id:2,sap_name:"Damaged",repzo_name:"Damaged",repzo_id:"62b074ace96258fb745982e4"},{sap_id:3,sap_name:"Nearexpiry",repzo_name:"Nearexpiry",repzo_id:"62b074c0a066173bd1c1ea0d"},{sap_id:4,sap_name:"Wrongprinting",repzo_name:"Wrongprinting",repzo_id:"62b074d79e7f41f306a4cb42"},{sap_id:5,sap_name:"experied",repzo_name:"Experied",repzo_id:"62b074faa066173bd1c1eec0"}]',
333
+ SalPersCode: "111",
334
+ SalesPersonCode: "111",
85
335
  },
86
336
  options_formData: {},
87
- createdAt: "2022-12-08T08:50:06.903Z",
88
- updatedAt: "2022-12-08T09:43:21.620Z",
337
+ createdAt: "2022-12-18T12:47:49.096Z",
338
+ updatedAt: "2022-12-21T09:04:34.538Z",
89
339
  __v: 0,
90
340
  },
91
341
  end_of_day: "04:00",
92
- nameSpace: ["unisap"],
342
+ nameSpace: ["unipaljo"],
93
343
  timezone: "Asia/Amman",
94
344
  meta: "",
95
345
  env: "staging",
96
- sync_id: "47c9c804-e136-4d54-928a-000013",
346
+ sync_id: "9811c42a-d26e-41e0-bee5-e75260c04767", // should change
97
347
  command: "price_list",
98
348
  };
99
349