rerobe-js-orm 3.8.4 → 3.8.5

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.
@@ -546,7 +546,7 @@ class OrderHelpers {
546
546
  };
547
547
  }
548
548
  buildReceiptObjFromOrder({ order, merchant, merchantLogoUrl = '', receiptNumber = '', }) {
549
- var _a, _b, _c, _d, _e, _f, _g, _h;
549
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
550
550
  const { address: merchantAddress, legalName, contactEmail, phone = '', organizationNumber = '', primaryDomain, currency: storeCurrencyCode, } = merchant;
551
551
  const currencyCode = ((_a = order.totalPricePresentment) === null || _a === void 0 ? void 0 : _a.currencyCode) || storeCurrencyCode;
552
552
  const presentmentLocale = (0, Utilities_1.getPresentmentLocaleByCurrencyCode)(currencyCode);
@@ -635,13 +635,17 @@ class OrderHelpers {
635
635
  currencyCode,
636
636
  amount: (_d = (_c = order.subtotalPricePresentment) === null || _c === void 0 ? void 0 : _c.amount) !== null && _d !== void 0 ? _d : '',
637
637
  fractionDigits: 2,
638
- }), amountPaid: (0, Utilities_1.formatPrice)({
638
+ }), total: (0, Utilities_1.formatPrice)({
639
639
  currencyCode,
640
640
  amount: (_f = (_e = order.totalPricePresentment) === null || _e === void 0 ? void 0 : _e.amount) !== null && _f !== void 0 ? _f : '',
641
641
  fractionDigits: 2,
642
+ }), amountPaid: (0, Utilities_1.formatPrice)({
643
+ currencyCode,
644
+ amount: (_h = (_g = order.totalPricePresentment) === null || _g === void 0 ? void 0 : _g.amount) !== null && _h !== void 0 ? _h : '',
645
+ fractionDigits: 2,
642
646
  }), tax: (0, Utilities_1.formatPrice)({
643
647
  currencyCode,
644
- amount: (_h = (_g = order.totalTaxPresentment) === null || _g === void 0 ? void 0 : _g.amount) !== null && _h !== void 0 ? _h : '',
648
+ amount: (_k = (_j = order.totalTaxPresentment) === null || _j === void 0 ? void 0 : _j.amount) !== null && _k !== void 0 ? _k : '',
645
649
  fractionDigits: 2,
646
650
  }), taxRates: formattedTaxRates }, this.generateReceiptLabels(presentmentLocale, paymentMethod)), this.getPaymentTerminalReceiptInfo(order));
647
651
  }
@@ -66,6 +66,7 @@ type ReceiptObj = {
66
66
  receiptNumber: string;
67
67
  lineItems: ReceiptLineItem[];
68
68
  subTotal: string;
69
+ total: string;
69
70
  amountPaid: string;
70
71
  tax: string;
71
72
  taxRates: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "3.8.4",
3
+ "version": "3.8.5",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",