@pmcretail/mapper-library 0.0.2 → 0.0.3

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/README.md CHANGED
@@ -1,24 +1,24 @@
1
- # MapperLibrary
2
-
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.14.
4
-
5
- ## Code scaffolding
6
-
7
- Run `ng generate component component-name --project mapper-library` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project mapper-library`.
8
- > Note: Don't forget to add `--project mapper-library` or else it will be added to the default project in your `angular.json` file.
9
-
10
- ## Build
11
-
12
- Run `ng build mapper-library` to build the project. The build artifacts will be stored in the `dist/` directory.
13
-
14
- ## Publishing
15
-
16
- After building your library with `ng build mapper-library`, go to the dist folder `cd dist/mapper-library` and run `npm publish`.
17
-
18
- ## Running unit tests
19
-
20
- Run `ng test mapper-library` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
-
22
- ## Further help
23
-
24
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
1
+ # MapperLibrary
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.14.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project mapper-library` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project mapper-library`.
8
+ > Note: Don't forget to add `--project mapper-library` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build mapper-library` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build mapper-library`, go to the dist folder `cd dist/mapper-library` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test mapper-library` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Further help
23
+
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
@@ -5204,7 +5204,7 @@
5204
5204
  obj['TaxTotal'] = (/** @type {?} */ (_this)).convertToString(element.taxLineTotal);
5205
5205
  obj['TaxDescription'] = (/** @type {?} */ (_this)).convertToString(element.VATCode);
5206
5206
  obj['TaxIncluded'] = '1';
5207
- obj['TaxPercentage'] = element.VAT; // todo
5207
+ obj['TaxPercentage'] = element.VAT.toFixed(2); // todo
5208
5208
  (/** @type {?} */ (_this)).rjObject['Trailer']['TaxItem'].push(obj);
5209
5209
  }));
5210
5210
  // TODO: make Trailer object from promotion
@@ -5776,6 +5776,7 @@
5776
5776
  function (element, lineDiscount) {
5777
5777
  /** @type {?} */
5778
5778
  var obj = {};
5779
+ obj['XMLSchemaVersion'] = this.xmlSchemaVersion;
5779
5780
  obj['LineNumber'] = element['itemLineId'];
5780
5781
  obj['NetValue'] = this.removeDecimal(element['refundedTotal']);
5781
5782
  obj['EffectiveNetValue'] = this.removeDecimal(element['refundedTotal']);
@@ -5783,7 +5784,7 @@
5783
5784
  obj['DeviceID'] = this.transactionDocument['terminalId'];
5784
5785
  obj['UserID'] = this.userId;
5785
5786
  obj['DateTimeCreated'] = this.transactionDocument['createdAt'];
5786
- obj['ExtendedValue'] = this.removeDecimal(element['totalLinePrice']);
5787
+ obj['ExtendedValue'] = this.removeDecimal(element['totalLinePrice'] * -1);
5787
5788
  obj['UnitPrice'] = this.removeDecimal(element['price']);
5788
5789
  obj['Quantity'] = element['refundedQuantity'] < 0 ? element['refundedQuantity'].toFixed(1) : -element['refundedQuantity'].toFixed(1);
5789
5790
  obj['OriginalTaxAmountSet'] = 1;
@@ -5793,7 +5794,7 @@
5793
5794
  obj['Return'] = {};
5794
5795
  obj['Return']['ReturnReasonID'] = element['refundedReason'];
5795
5796
  obj['Return']['ReturnDescription'] = element['refundedReasonDescription'];
5796
- obj['Return']['ReturnToStock'] = element['refundedQuantity'] > 0 ? element['refundedQuantity'] : -1 * element['refundedQuantity'];
5797
+ obj['Return']['ReturnToStock'] = element['refundedQuantity'] > 0 ? element['refundedQuantity'].toFixed(1) : -1 * element['refundedQuantity'].toFixed(1);
5797
5798
  obj['TaxCode'] = this.transactionDocument.basket['taxBreakdown']['taxLines'].find((/**
5798
5799
  * @param {?} item
5799
5800
  * @return {?}