repzo-sap-absjo 1.0.28 → 1.0.30

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
@@ -10,12 +10,14 @@
10
10
  - [actions/payment] add the field UserId where it equals USERID of the SAP API REP @maramalshen
11
11
  - [commands/price_list_disabled] new command: Disabled PriceListItems from Repzo if it is not found on SAP @maramalshen
12
12
  - [commands/measureunit] create unique measure-unit for each product, by inject ITEMCODE in integration_meta.id @maramalshen
13
+ - [actions/create_invoice, actions/create_return_invoice] add new key: U_ISTDQR = ubl_qr || ubl_clearance_qr @maramalshen
13
14
 
14
15
  ### Changed
15
16
 
16
17
  - [commands/rep] delete hard code of rep.warehouse for reps start with: [WS, RET, MT] @maramalshen
17
18
  - [commands/client] decide if client is cash or credit depend on PAYMENTTERM instead of CLIENTGROUP @maramalshen
18
19
  - [actions/**] update integration_meta using repzo.updateIntegrationMeta instead of using service.update method to avoid infinity looping @maramalshen
20
+ - [actions/create_invoice, actions/create_return_invoice] RefNum: advanced_serial_number ||serial_number.formatted @maramalshen
19
21
 
20
22
  ### Fixed
21
23
 
@@ -333,7 +333,9 @@ export const create_invoice = async (event, options) => {
333
333
  });
334
334
  }
335
335
  const sap_invoice = {
336
- RefNum: repzo_invoice.serial_number.formatted,
336
+ RefNum:
337
+ repzo_invoice.advanced_serial_number ||
338
+ repzo_invoice.serial_number.formatted,
337
339
  SalPersCode:
338
340
  repzo_rep === null || repzo_rep === void 0
339
341
  ? void 0
@@ -349,6 +351,11 @@ export const create_invoice = async (event, options) => {
349
351
  Note: repzo_invoice.comment,
350
352
  WarehouseCode: repzo_warehouse.code,
351
353
  LinesDetails: items,
354
+ U_ISTDQR: repzo_invoice.ubl_qr
355
+ ? repzo_invoice.ubl_qr
356
+ : repzo_invoice.ubl_clearance_qr
357
+ ? repzo_invoice.ubl_clearance_qr
358
+ : undefined,
352
359
  };
353
360
  // console.dir(sap_invoice, { depth: null });
354
361
  actionLog.addDetail(
@@ -253,7 +253,7 @@ export const create_return_invoice = async (event, options) => {
253
253
  Brand:
254
254
  (_o = repzo_product.integration_meta) === null || _o === void 0
255
255
  ? void 0
256
- : _o.BRAND, // "B1",
256
+ : _o.BRAND,
257
257
  Department:
258
258
  ((_p =
259
259
  repzo_rep === null || repzo_rep === void 0
@@ -263,7 +263,7 @@ export const create_return_invoice = async (event, options) => {
263
263
  : _p.DEPARTMENTCODE) ||
264
264
  ((_q = options.data) === null || _q === void 0
265
265
  ? void 0
266
- : _q.DepartmentCode), // "D2"
266
+ : _q.DepartmentCode),
267
267
  Return_Reason:
268
268
  item_return_reason === null || item_return_reason === void 0
269
269
  ? void 0
@@ -271,7 +271,9 @@ export const create_return_invoice = async (event, options) => {
271
271
  });
272
272
  }
273
273
  const sap_return_invoice = {
274
- RefNum: repzo_invoice.serial_number.formatted,
274
+ RefNum:
275
+ repzo_invoice.advanced_serial_number ||
276
+ repzo_invoice.serial_number.formatted,
275
277
  SalPersCode:
276
278
  repzo_rep === null || repzo_rep === void 0
277
279
  ? void 0
@@ -287,6 +289,11 @@ export const create_return_invoice = async (event, options) => {
287
289
  Note: repzo_invoice.comment,
288
290
  WarehouseCode: repzo_warehouse.code,
289
291
  LinesDetails: return_items,
292
+ U_ISTDQR: repzo_invoice.ubl_qr
293
+ ? repzo_invoice.ubl_qr
294
+ : repzo_invoice.ubl_clearance_qr
295
+ ? repzo_invoice.ubl_clearance_qr
296
+ : undefined,
290
297
  };
291
298
  // console.dir(sap_return_invoice, { depth: null });
292
299
  actionLog.addDetail(
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.28",
4
+ "version": "1.0.30",
5
5
  "homepage": "",
6
6
  "keywords": [],
7
7
  "author": {
@@ -45,7 +45,7 @@
45
45
  "jsonwebtoken": "^8.5.1",
46
46
  "lodash": "^4.17.21",
47
47
  "moment-timezone": "^0.5.34",
48
- "repzo": "^1.0.33",
48
+ "repzo": "^1.0.109",
49
49
  "uuid": "^8.3.2"
50
50
  }
51
51
  }
@@ -35,6 +35,7 @@ interface SAPInvoice {
35
35
  Note?: string; // "",
36
36
  WarehouseCode?: string; // "VS21"; // Required
37
37
  LinesDetails: SAPInvoiceItem[];
38
+ U_ISTDQR?: string;
38
39
  }
39
40
 
40
41
  interface SAPOpenInvoice {
@@ -284,7 +285,9 @@ export const create_invoice = async (event: EVENT, options: Config) => {
284
285
  }
285
286
 
286
287
  const sap_invoice: SAPInvoice = {
287
- RefNum: repzo_invoice.serial_number.formatted,
288
+ RefNum:
289
+ repzo_invoice.advanced_serial_number ||
290
+ repzo_invoice.serial_number.formatted,
288
291
  SalPersCode: repzo_rep?.integration_id,
289
292
  DocDate: moment(repzo_invoice.issue_date, "YYYY-MM-DD").format(
290
293
  "YYYYMMDD"
@@ -297,6 +300,11 @@ export const create_invoice = async (event: EVENT, options: Config) => {
297
300
  Note: repzo_invoice.comment,
298
301
  WarehouseCode: repzo_warehouse.code,
299
302
  LinesDetails: items,
303
+ U_ISTDQR: repzo_invoice.ubl_qr
304
+ ? repzo_invoice.ubl_qr
305
+ : repzo_invoice.ubl_clearance_qr
306
+ ? repzo_invoice.ubl_clearance_qr
307
+ : undefined,
300
308
  };
301
309
 
302
310
  // console.dir(sap_invoice, { depth: null });
@@ -28,6 +28,7 @@ interface SAPInvoice {
28
28
  Note?: string; // "",
29
29
  WarehouseCode?: string; // "VS21"; // Required
30
30
  LinesDetails: SAPInvoiceItem[];
31
+ U_ISTDQR?: string;
31
32
  }
32
33
 
33
34
  interface ReturnReason {
@@ -207,7 +208,9 @@ export const create_return_invoice = async (event: EVENT, options: Config) => {
207
208
  }
208
209
 
209
210
  const sap_return_invoice: SAPInvoice = {
210
- RefNum: repzo_invoice.serial_number.formatted,
211
+ RefNum:
212
+ repzo_invoice.advanced_serial_number ||
213
+ repzo_invoice.serial_number.formatted,
211
214
  SalPersCode: repzo_rep?.integration_id,
212
215
  DocDate: moment(repzo_invoice.issue_date, "YYYY-MM-DD").format(
213
216
  "YYYYMMDD"
@@ -220,6 +223,11 @@ export const create_return_invoice = async (event: EVENT, options: Config) => {
220
223
  Note: repzo_invoice.comment,
221
224
  WarehouseCode: repzo_warehouse.code,
222
225
  LinesDetails: return_items,
226
+ U_ISTDQR: repzo_invoice.ubl_qr
227
+ ? repzo_invoice.ubl_qr
228
+ : repzo_invoice.ubl_clearance_qr
229
+ ? repzo_invoice.ubl_clearance_qr
230
+ : undefined,
223
231
  };
224
232
 
225
233
  // console.dir(sap_return_invoice, { depth: null });