@pmcretail/mapper-library 0.0.52 → 0.0.53
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/bundles/pmcretail-mapper-library.umd.js +19 -0
- package/bundles/pmcretail-mapper-library.umd.js.map +1 -1
- package/esm2015/lib/WebReturnSalesforceMapper.class.js +20 -1
- package/fesm2015/pmcretail-mapper-library.js +19 -0
- package/fesm2015/pmcretail-mapper-library.js.map +1 -1
- package/lib/WebReturnSalesforceMapper.class.d.ts +1 -0
- package/lib/WebReturnSalesforceMapper.class.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -4079,6 +4079,25 @@
|
|
|
4079
4079
|
appLogger_service.AppLoggerService.logDebug(this.className, "externalTransactionDetails", "externalTransactionDetails mapping ended...");
|
|
4080
4080
|
return this;
|
|
4081
4081
|
};
|
|
4082
|
+
WebReturnSalesforceMapperBuilderClass.prototype.updateTaxBreakdown = function () {
|
|
4083
|
+
appLogger_service.AppLoggerService.logDebug(this.className, "updateTaxBreakdown", "Mapping started...");
|
|
4084
|
+
var taxLines = this.orderDetails.product_items
|
|
4085
|
+
.map(function (product, index) {
|
|
4086
|
+
var VAT = product.tax_rate ? (product.tax_rate * 100) : 0;
|
|
4087
|
+
var VATCode = product.tax_class_id || '';
|
|
4088
|
+
return {
|
|
4089
|
+
itemLineId: index + 1,
|
|
4090
|
+
VAT: VAT,
|
|
4091
|
+
VATCode: VATCode
|
|
4092
|
+
};
|
|
4093
|
+
}) || [];
|
|
4094
|
+
this.webReturnObject.basket["taxBreakdown"] = {
|
|
4095
|
+
taxLines: taxLines
|
|
4096
|
+
};
|
|
4097
|
+
appLogger_service.AppLoggerService.logDebug(this.className, "updateTaxBreakdown", "Mapped " + taxLines.length + " tax lines.");
|
|
4098
|
+
appLogger_service.AppLoggerService.logDebug(this.className, "updateTaxBreakdown", "Mapping ended...");
|
|
4099
|
+
return this;
|
|
4100
|
+
};
|
|
4082
4101
|
WebReturnSalesforceMapperBuilderClass.prototype.basketSummary = function () {
|
|
4083
4102
|
appLogger_service.AppLoggerService.logDebug(this.className, "basketSummary", "basketSummary mapping started...");
|
|
4084
4103
|
var basketSummary = {};
|