@pmcretail/mapper-library 0.0.18 → 0.0.20

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.
@@ -1080,6 +1080,8 @@
1080
1080
  TProduct.prototype.leadTime;
1081
1081
  /** @type {?|undefined} */
1082
1082
  TProduct.prototype.lineDiscount;
1083
+ /** @type {?|undefined} */
1084
+ TProduct.prototype.attributes;
1083
1085
  }
1084
1086
  /**
1085
1087
  * @record
@@ -5116,6 +5118,8 @@
5116
5118
  /** @type {?} */
5117
5119
  var obj = {};
5118
5120
  obj['XMLSchemaVersion'] = (/** @type {?} */ (_this)).xmlSchemaVersion;
5121
+ obj['DeviceID'] = (/** @type {?} */ (_this)).deviceId;
5122
+ obj['DateTimeCreated'] = (/** @type {?} */ (_this)).updatedAt;
5119
5123
  obj['NetValue'] = (/** @type {?} */ (_this)).convertToString(element.discountAmount * -1);
5120
5124
  obj['EffectiveNetValue'] = (/** @type {?} */ (_this)).convertToString(element.discountAmount * -1);
5121
5125
  obj['Description'] = element.reasonDisplayText;
@@ -5185,12 +5189,13 @@
5185
5189
  (/** @type {?} */ (this)).rjObject.Trailer.CompletedBy.CashierID = (/** @type {?} */ (this)).cashierId;
5186
5190
  (/** @type {?} */ (this)).rjObject.Trailer.CompletedBy.StoreID = (/** @type {?} */ (this)).transactionDocument.storeId;
5187
5191
  (/** @type {?} */ (this)).rjObject.Trailer.CompletedBy.BranchID = (/** @type {?} */ (this)).branchId;
5188
- (/** @type {?} */ (this)).rjObject.Trailer.CompletedBy.TerminalNumber = (/** @type {?} */ (this)).transactionDocument.terminalId;
5192
+ (/** @type {?} */ (this)).rjObject.Trailer.CompletedBy.TerminalNumber = (/** @type {?} */ (this)).terminalNumber;
5193
+ (/** @type {?} */ (this)).rjObject.Trailer.CompletedBy.TransactionNumber = (/** @type {?} */ (this)).transactionNumber;
5189
5194
  (/** @type {?} */ (this)).rjObject.Trailer.Total = (/** @type {?} */ (this)).convertToString((/** @type {?} */ (this)).transactionDocument.basketSummary.basketTotal * 100);
5190
5195
  (/** @type {?} */ (this)).rjObject.Trailer.ItemCount = (/** @type {?} */ (this)).itemCount; //gives total count for product
5191
5196
  (/** @type {?} */ (this)).rjObject.Trailer.ItemQuantity = (/** @type {?} */ (this)).convertToString((/** @type {?} */ (this)).transactionDocument.basketSummary.totalItems);
5192
5197
  (/** @type {?} */ (this)).rjObject.Trailer.NetItemQuantity = (/** @type {?} */ (this)).convertToString((/** @type {?} */ (this)).transactionDocument.basketSummary.totalItems);
5193
- (/** @type {?} */ (this)).rjObject.Trailer.TaxTotal = (/** @type {?} */ (this)).convertToString((/** @type {?} */ (this)).transactionDocument.basketSummary.VATTotal);
5198
+ (/** @type {?} */ (this)).rjObject.Trailer.TaxTotal = (/** @type {?} */ (this)).convertToString((/** @type {?} */ (this)).removeDecimal((/** @type {?} */ (this)).transactionDocument.basketSummary.VATTotal));
5194
5199
  (/** @type {?} */ (this)).rjObject.Trailer.SequenceDeviceID = (/** @type {?} */ (this)).deviceId;
5195
5200
  (/** @type {?} */ (this)).rjObject.Trailer.SequenceNumber = 'snsn'; //static for now
5196
5201
  (/** @type {?} */ (this)).rjObject['Trailer']['TaxItem'] = [];
@@ -5202,12 +5207,12 @@
5202
5207
  /** @type {?} */
5203
5208
  var obj = {};
5204
5209
  obj['XMLSchemaVersion'] = (/** @type {?} */ (_this)).xmlSchemaVersion;
5205
- obj['TaxRate'] = element.VAT;
5206
- obj['TaxableTotal'] = (/** @type {?} */ (_this)).convertToString(element.taxableAmount);
5207
- obj['TaxTotal'] = (/** @type {?} */ (_this)).convertToString(element.taxLineTotal);
5210
+ obj['TaxRate'] = (/** @type {?} */ (_this)).convertToString(element.VATCode);
5211
+ obj['TaxableTotal'] = (/** @type {?} */ (_this)).convertToString((/** @type {?} */ (_this)).removeDecimal(element.taxableAmount));
5212
+ obj['TaxTotal'] = (/** @type {?} */ (_this)).convertToString((/** @type {?} */ (_this)).removeDecimal((/** @type {?} */ (_this)).removeDecimal(element.taxLineTotal)));
5208
5213
  obj['TaxDescription'] = (/** @type {?} */ (_this)).convertToString(element.VATCode);
5209
5214
  obj['TaxIncluded'] = '1';
5210
- obj['TaxPercentage'] = element.VAT.toFixed(2); // todo
5215
+ obj['TaxPercentage'] = (/** @type {?} */ (_this)).addDecimal(element.VAT.toFixed(2)).toFixed(2);
5211
5216
  (/** @type {?} */ (_this)).rjObject['Trailer']['TaxItem'].push(obj);
5212
5217
  }));
5213
5218
  if ((/** @type {?} */ (this)).transactionDocument.basket.linePromotion.length > 0 || (/** @type {?} */ (this)).transactionDocument.basket.linePromotion.length > 0) {
@@ -5245,7 +5250,7 @@
5245
5250
  * @param {?} item
5246
5251
  * @return {?}
5247
5252
  */
5248
- function (item) { return item.itemLineId == element.itemLineId; })).VATCode; // todo
5253
+ function (item) { return item.itemLineId == element.itemLineId; })).VATCode;
5249
5254
  (/** @type {?} */ (_this)).rjObject['Trailer']['PromotionItem'].push(obj);
5250
5255
  }));
5251
5256
  }
@@ -5257,7 +5262,6 @@
5257
5262
  function (element) {
5258
5263
  /** @type {?} */
5259
5264
  var obj = {};
5260
- console.log('element');
5261
5265
  obj['PromotionID'] = element.promotionId;
5262
5266
  obj['PromotionSaving'] = element.promotionAmount < 0 ? element.promotionAmount : -element.promotionAmount;
5263
5267
  obj['PromotionQuantity'] = "1";
@@ -5351,15 +5355,15 @@
5351
5355
  XMLSchemaVersion: "1",
5352
5356
  LineNumber: (/** @type {?} */ (_this)).generateLineNumber(),
5353
5357
  //todo
5354
- NetValue: JSON.stringify(-1 * (Math.round(element.amount))),
5355
- EffectiveNetValue: JSON.stringify(-1 * (Math.round(element.amount))),
5358
+ NetValue: (/** @type {?} */ (_this)).convertToString(-1 * (/** @type {?} */ (_this)).removeDecimal(Math.round(element.amount))),
5359
+ EffectiveNetValue: (/** @type {?} */ (_this)).convertToString(-1 * (/** @type {?} */ (_this)).removeDecimal(Math.round(element.amount))),
5356
5360
  Description: (/** @type {?} */ (_this)).getDescription(element),
5357
5361
  DeviceID: (/** @type {?} */ (_this)).deviceId,
5358
5362
  UserID: (/** @type {?} */ (_this)).transactionDocument.userName,
5359
5363
  DateTimeCreated: (/** @type {?} */ (_this)).updatedAt,
5360
5364
  TenderType: element.externalTenderType ? element.externalTenderType : '',
5361
5365
  TenderSubType: element.externalSubTenderType ? element.externalSubTenderType : '',
5362
- TenderAmount: JSON.stringify(-1 * (Math.round(element.amount))),
5366
+ TenderAmount: (/** @type {?} */ (_this)).convertToString(-1 * (/** @type {?} */ (_this)).removeDecimal(Math.round(element.amount))),
5363
5367
  CurrencyID: (/** @type {?} */ (_this)).transactionDocument.baseCurrency,
5364
5368
  CurrencyDescription: (/** @type {?} */ (_this)).transactionDocument.baseCurrency,
5365
5369
  IncludeInTransactionTotalCheck: "1",
@@ -5376,15 +5380,15 @@
5376
5380
  var obj = {
5377
5381
  XMLSchemaVersion: (/** @type {?} */ (_this)).xmlSchemaVersion,
5378
5382
  LineNumber: (/** @type {?} */ (_this)).generateLineNumber(),
5379
- NetValue: (/** @type {?} */ (_this)).convertToString(-1 * (/** @type {?} */ (_this)).removeDecimal((Math.round(element.amount)))),
5380
- EffectiveNetValue: (/** @type {?} */ (_this)).convertToString(-1 * (/** @type {?} */ (_this)).removeDecimal((Math.round(element.amount)))),
5383
+ NetValue: JSON.stringify(-1 * (/** @type {?} */ (_this)).removeDecimal((Math.round(element.amount)))),
5384
+ EffectiveNetValue: JSON.stringify(-1 * (/** @type {?} */ (_this)).removeDecimal((Math.round(element.amount)))),
5381
5385
  Description: (/** @type {?} */ (_this)).getDescription(element),
5382
5386
  DeviceID: (/** @type {?} */ (_this)).deviceId,
5383
5387
  UserID: (/** @type {?} */ (_this)).transactionDocument.userName,
5384
5388
  DateTimeCreated: (/** @type {?} */ (_this)).updatedAt,
5385
5389
  TenderType: element.externalTenderType ? element.externalTenderType : '',
5386
5390
  TenderSubType: element.externalSubTenderType ? element.externalSubTenderType : '',
5387
- TenderAmount: (/** @type {?} */ (_this)).convertToString(-1 * (/** @type {?} */ (_this)).removeDecimal((Math.round(element.amount)))),
5391
+ TenderAmount: JSON.stringify(-1 * (/** @type {?} */ (_this)).removeDecimal((Math.round(element.amount)))),
5388
5392
  CurrencyID: (/** @type {?} */ (_this)).transactionDocument.baseCurrency,
5389
5393
  CurrencyDescription: (/** @type {?} */ (_this)).transactionDocument.baseCurrency,
5390
5394
  GiftVoucherSalesAllowed: '',
@@ -5400,15 +5404,15 @@
5400
5404
  var obj1 = {
5401
5405
  XMLSchemaVersion: "1",
5402
5406
  LineNumber: (/** @type {?} */ (_this)).generateLineNumber(),
5403
- NetValue: JSON.stringify(-1 * (Math.round(element.amount))),
5404
- EffectiveNetValue: JSON.stringify(-1 * (Math.round(element.amount))),
5407
+ NetValue: JSON.stringify(-1 * (/** @type {?} */ (_this)).removeDecimal((Math.round(element.amount)))),
5408
+ EffectiveNetValue: JSON.stringify(-1 * (/** @type {?} */ (_this)).removeDecimal((Math.round(element.amount)))),
5405
5409
  Description: (/** @type {?} */ (_this)).getDescription(element),
5406
5410
  DeviceID: (/** @type {?} */ (_this)).deviceId,
5407
5411
  UserID: (/** @type {?} */ (_this)).transactionDocument.userName,
5408
5412
  DateTimeCreated: (/** @type {?} */ (_this)).updatedAt,
5409
5413
  TenderType: element.externalTenderType ? element.externalTenderType : '',
5410
5414
  TenderSubType: element.externalSubTenderType ? element.externalSubTenderType : '',
5411
- TenderAmount: JSON.stringify(-1 * (Math.round(element.amount))),
5415
+ TenderAmount: JSON.stringify(-1 * (/** @type {?} */ (_this)).removeDecimal((Math.round(element.amount)))),
5412
5416
  CurrencyID: (/** @type {?} */ (_this)).transactionDocument.baseCurrency,
5413
5417
  CurrencyDescription: (/** @type {?} */ (_this)).transactionDocument.baseCurrency,
5414
5418
  IncludeInTransactionTotalCheck: "1",
@@ -5511,6 +5515,27 @@
5511
5515
  return element.paymentType;
5512
5516
  }
5513
5517
  };
5518
+ /**
5519
+ * @param {?} attributes
5520
+ * @return {?}
5521
+ */
5522
+ RJMapperBuilderClass.prototype.getMMGROUPID = /**
5523
+ * @param {?} attributes
5524
+ * @return {?}
5525
+ */
5526
+ function (attributes) {
5527
+ if (attributes && attributes.length > 0) {
5528
+ /** @type {?} */
5529
+ var filterValue = attributes.filter((/**
5530
+ * @param {?} attribute
5531
+ * @return {?}
5532
+ */
5533
+ function (attribute) { return attribute.name === "MMGROUPID"; }));
5534
+ if (filterValue && filterValue.length > 0) {
5535
+ return filterValue[0].value;
5536
+ }
5537
+ }
5538
+ };
5514
5539
  /**
5515
5540
  * @template THIS
5516
5541
  * @this {THIS}
@@ -5538,6 +5563,17 @@
5538
5563
  function (value) {
5539
5564
  return value * 100;
5540
5565
  };
5566
+ /**
5567
+ * @param {?} value
5568
+ * @return {?}
5569
+ */
5570
+ RJMapperBuilderClass.prototype.addDecimal = /**
5571
+ * @param {?} value
5572
+ * @return {?}
5573
+ */
5574
+ function (value) {
5575
+ return value / 100;
5576
+ };
5541
5577
  /**
5542
5578
  * @template THIS
5543
5579
  * @this {THIS}
@@ -5808,6 +5844,22 @@
5808
5844
  (/** @type {?} */ (this)).branchId = value;
5809
5845
  return (/** @type {?} */ (this));
5810
5846
  };
5847
+ /**
5848
+ * @template THIS
5849
+ * @this {THIS}
5850
+ * @param {?} value
5851
+ * @return {THIS}
5852
+ */
5853
+ RJMapperBuilderClass.prototype.setSalesPersonName = /**
5854
+ * @template THIS
5855
+ * @this {THIS}
5856
+ * @param {?} value
5857
+ * @return {THIS}
5858
+ */
5859
+ function (value) {
5860
+ (/** @type {?} */ (this)).salesPersonName = value;
5861
+ return (/** @type {?} */ (this));
5862
+ };
5811
5863
  /**
5812
5864
  * @param {?} date
5813
5865
  * @return {?}
@@ -5909,17 +5961,18 @@
5909
5961
  function (item) { return item.itemLineId == element['itemLineId']; })).VATCode;
5910
5962
  obj['DisplayTaxCode'] = ''; // todo
5911
5963
  obj['ProductAttributes'] = ''; //todo - not required
5912
- obj['Perishable'] = this.getAttributes();
5913
- obj['MMGroupID'] = this.getCaregories(element);
5964
+ obj['Perishable'] = this.getMMGROUPID(element.attributes);
5965
+ //obj['MMGroupID'] = this.getCaregories(element);
5966
+ obj['MMGroupID'] = this.getMMGROUPID(element.attributes);
5914
5967
  obj['CustomerDetails'] = ""; // todo - blank
5915
5968
  obj['TotalPromotionSaving'] = element['promotionAmount'] || -1; // TODO
5916
- obj['OriginalTaxAmount'] = this.convertToString(this.getOriginalTax(element, taxTotal.VAT) * -1);
5917
- obj['taxAmount'] = taxTotal.taxLineTotal < 0 ? (taxTotal.taxLineTotal) : (-taxTotal.taxLineTotal);
5969
+ obj['OriginalTaxAmount'] = this.convertToString((this.removeDecimal(this.getOriginalTax(element, taxTotal.VAT) * -1)).toFixed(2));
5970
+ obj['taxAmount'] = this.removeDecimal(taxTotal.taxLineTotal < 0 ? (taxTotal.taxLineTotal) : (-taxTotal.taxLineTotal));
5918
5971
  if (lineDiscount) {
5919
5972
  if (lineDiscount.percentageDiscountReasonName && lineDiscount.percentageDiscountReasonCode) {
5920
5973
  // line discount
5921
5974
  obj['Discount'] = {};
5922
- obj['Discount'].ModifierValue = this.removeDecimal(lineDiscount.unitPrice) * -1;
5975
+ obj['Discount'].ModifierValue = this.removeDecimal(lineDiscount.discountAmount) * -1;
5923
5976
  obj['Discount'].ModifierDateTime = obj.DateTimeCreated;
5924
5977
  obj['Discount'].ModifierReasonID = lineDiscount.percentageDiscountReasonCode;
5925
5978
  obj['Discount'].ModifierDescription = lineDiscount.percentageDiscountReasonName;
@@ -6048,10 +6101,10 @@
6048
6101
  DateTimeCreated: this.createdAt,
6049
6102
  ExtendedValue: this.removeDecimal(element.price),
6050
6103
  UnitPrice: this.removeDecimal(element.price),
6051
- MMGroupID: this.getCaregories(element),
6052
- Quantity: element.quantity.toFixed(1),
6053
- SalespersonID: this.transactionDocument.userId,
6054
- SalespersonName: this.transactionDocument.userName,
6104
+ //MMGroupID: this.getCaregories(element),
6105
+ Quantity: element.quantity,
6106
+ SalespersonID: this.transactionDocument.userName,
6107
+ SalespersonName: this.salesPersonName,
6055
6108
  TaxCode: this.transactionDocument.basket['taxBreakdown']['taxLines'].find((/**
6056
6109
  * @param {?} item
6057
6110
  * @return {?}
@@ -6059,21 +6112,22 @@
6059
6112
  function (item) { return item.itemLineId == element['itemLineId']; })).VATCode,
6060
6113
  TaxModifiable: "1",
6061
6114
  //todo
6062
- OriginalTaxAmount: this.convertToString(this.getOriginalTax(element, taxTotal.VAT)),
6063
- TaxAmount: this.convertToString(taxTotal.taxLineTotal),
6115
+ OriginalTaxAmount: this.convertToString((this.removeDecimal(this.getOriginalTax(element, taxTotal.VAT)).toFixed(2))),
6116
+ TaxAmount: this.convertToString(this.removeDecimal(taxTotal.taxLineTotal)),
6064
6117
  OriginalTaxAmountSet: "1",
6065
6118
  //todo
6066
6119
  ProductID: element.SKU,
6067
6120
  HandKeyed: "1",
6068
6121
  //todo
6069
6122
  CustomerDetails: "",
6070
- Perishable: this.getAttributes()
6123
+ Perishable: this.getMMGROUPID(element.attributes),
6124
+ MMGroupID: this.getMMGROUPID(element.attributes)
6071
6125
  };
6072
6126
  if (lineDiscount) {
6073
6127
  if (lineDiscount.percentageDiscountReasonName && lineDiscount.percentageDiscountReasonCode) {
6074
6128
  // line discount
6075
6129
  obj['Discount'] = {};
6076
- obj['Discount'].ModifierValue = this.removeDecimal(lineDiscount.unitPrice) * -1;
6130
+ obj['Discount'].ModifierValue = this.removeDecimal(lineDiscount.discountAmount) * -1;
6077
6131
  obj['Discount'].ModifierDateTime = obj.DateTimeCreated;
6078
6132
  obj['Discount'].ModifierReasonID = lineDiscount.percentageDiscountReasonCode;
6079
6133
  obj['Discount'].ModifierDescription = lineDiscount.percentageDiscountReasonName;
@@ -6121,7 +6175,7 @@
6121
6175
  /** @type {?} */
6122
6176
  var discountAmount = _this.convertToString(e.discountAmount * -1);
6123
6177
  discountObj.XMLSchemaVersion = _this.xmlSchemaVersion;
6124
- discountObj.DiscountedValue = -(_this.getDiscountedValue(element.totalLinePrice, e.discountAmount).toFixed(0));
6178
+ discountObj.DiscountedValue = -(_this.getDiscountedValue(element.totalLinePrice, e.discountAmount));
6125
6179
  discountObj.BasketDiscountLineNumber = _this.getLineNumber(e, discountAmount);
6126
6180
  obj['BasketDiscountModifier'].push(discountObj);
6127
6181
  }
@@ -6244,7 +6298,7 @@
6244
6298
  */
6245
6299
  function (price, discountAmount) {
6246
6300
  /** @type {?} */
6247
- var DiscountedValue = (price * discountAmount) / this.transactionDocument.basketSummary.saleTotal;
6301
+ var DiscountedValue = ((price * discountAmount) / this.transactionDocument.basketSummary.saleTotal) * 100;
6248
6302
  return DiscountedValue;
6249
6303
  };
6250
6304
  /**
@@ -6301,68 +6355,81 @@
6301
6355
  }));
6302
6356
  return x;
6303
6357
  };
6304
- /**
6305
- * @return {?}
6306
- */
6307
- RJMapperBuilderClass.prototype.getAttributes = /**
6308
- * @return {?}
6309
- */
6310
- function () {
6311
- /** @type {?} */
6312
- var name = [];
6313
- this.transactionDocument.basket.products.forEach((/**
6314
- * @param {?} element
6315
- * @return {?}
6316
- */
6317
- function (element) {
6318
- if (element.attributes && element.attributes.length > 0) {
6319
- name = element.attributes.filter((/**
6320
- * @param {?} x
6321
- * @return {?}
6322
- */
6323
- function (x) { return x.name.toUpperCase() === element.name.toUpperCase(); }));
6324
- }
6325
- }));
6326
- if (name.length > 0) {
6327
- return name[0].value;
6328
- }
6329
- else {
6330
- return "";
6331
- }
6332
- };
6333
- /**
6334
- * @param {?} element
6335
- * @return {?}
6336
- */
6337
- RJMapperBuilderClass.prototype.getCaregories = /**
6338
- * @param {?} element
6339
- * @return {?}
6340
- */
6341
- function (element) {
6342
- /** @type {?} */
6343
- var MMGroupId = " ";
6344
- if (element.categories && element.categories.length > 0) {
6345
- /** @type {?} */
6346
- var categories = element.categories.filter((/**
6347
- * @param {?} x
6348
- * @return {?}
6349
- */
6350
- function (x) { return x.parentId != ''; }));
6351
- /** @type {?} */
6352
- var value = categories.filter((/**
6353
- * @param {?} x
6354
- * @return {?}
6355
- */
6356
- function (x) { return x.id != x.parentId; }));
6357
- MMGroupId = value[0].name;
6358
- }
6359
- return MMGroupId;
6360
- };
6358
+ // getAttributes(){
6359
+ // let name: string | any[] = []
6360
+ // this.transactionDocument.basket.products.forEach((element: any) => {
6361
+ // if (element && element.attributes && element.attributes.length > 0) {
6362
+ // name = element.attributes.filter((x: any) => x.name.toUpperCase() === element.name.toUpperCase());
6363
+ // }
6364
+ // });
6365
+ // if (name.length > 0) {
6366
+ // return name[0].value
6367
+ // }
6368
+ // else{
6369
+ // return ""
6370
+ // }
6371
+ // }
6372
+ // getCaregories(element) {
6373
+ // let MMGroupId = " ";
6374
+ // if (element.categories && element.categories.length > 0) {
6375
+ // let categories = element.categories.filter((x) => x.parentId != '');
6376
+ // let value = categories.filter((x) => x.id != x.parentId);
6377
+ // MMGroupId = value[0].name;
6378
+ // }
6379
+ // return MMGroupId;
6380
+ // }
6381
+ // getAttributes(){
6382
+ // let name: string | any[] = []
6383
+ // this.transactionDocument.basket.products.forEach((element: any) => {
6384
+ // if (element && element.attributes && element.attributes.length > 0) {
6385
+ // name = element.attributes.filter((x: any) => x.name.toUpperCase() === element.name.toUpperCase());
6386
+ // }
6387
+ // });
6388
+ // if (name.length > 0) {
6389
+ // return name[0].value
6390
+ // }
6391
+ // else{
6392
+ // return ""
6393
+ // }
6394
+ // }
6395
+ // getCaregories(element) {
6396
+ // let MMGroupId = " ";
6397
+ // if (element.categories && element.categories.length > 0) {
6398
+ // let categories = element.categories.filter((x) => x.parentId != '');
6399
+ // let value = categories.filter((x) => x.id != x.parentId);
6400
+ // MMGroupId = value[0].name;
6401
+ // }
6402
+ // return MMGroupId;
6403
+ // }
6361
6404
  /**
6362
6405
  * @param {?} date
6363
6406
  * @return {?}
6364
6407
  */
6365
- RJMapperBuilderClass.prototype.getDate = /**
6408
+ RJMapperBuilderClass.prototype.getDate =
6409
+ // getAttributes(){
6410
+ // let name: string | any[] = []
6411
+ // this.transactionDocument.basket.products.forEach((element: any) => {
6412
+ // if (element && element.attributes && element.attributes.length > 0) {
6413
+ // name = element.attributes.filter((x: any) => x.name.toUpperCase() === element.name.toUpperCase());
6414
+ // }
6415
+ // });
6416
+ // if (name.length > 0) {
6417
+ // return name[0].value
6418
+ // }
6419
+ // else{
6420
+ // return ""
6421
+ // }
6422
+ // }
6423
+ // getCaregories(element) {
6424
+ // let MMGroupId = " ";
6425
+ // if (element.categories && element.categories.length > 0) {
6426
+ // let categories = element.categories.filter((x) => x.parentId != '');
6427
+ // let value = categories.filter((x) => x.id != x.parentId);
6428
+ // MMGroupId = value[0].name;
6429
+ // }
6430
+ // return MMGroupId;
6431
+ // }
6432
+ /**
6366
6433
  * @param {?} date
6367
6434
  * @return {?}
6368
6435
  */
@@ -6420,10 +6487,10 @@
6420
6487
  /** @type {?} */
6421
6488
  var quantity;
6422
6489
  if (this.transactionDocument.unreferencedRefund) {
6423
- quantity = element['quantity'] < 0 ? element['quantity'].toFixed(1) : (-element['quantity']).toFixed(1);
6490
+ quantity = element['quantity'] < 0 ? element['quantity'] : (-element['quantity']);
6424
6491
  }
6425
6492
  else {
6426
- quantity = element['refundedQuantity'] < 0 ? element['refundedQuantity'].toFixed(1) : (-element['refundedQuantity']).toFixed(1);
6493
+ quantity = element['refundedQuantity'] < 0 ? element['refundedQuantity'] : (-element['refundedQuantity']);
6427
6494
  }
6428
6495
  return quantity;
6429
6496
  };
@@ -6545,6 +6612,11 @@
6545
6612
  * @private
6546
6613
  */
6547
6614
  RJMapperBuilderClass.prototype.updatedAt;
6615
+ /**
6616
+ * @type {?}
6617
+ * @private
6618
+ */
6619
+ RJMapperBuilderClass.prototype.salesPersonName;
6548
6620
  /**
6549
6621
  * @type {?}
6550
6622
  * @private