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
|
-
}),
|
|
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: (
|
|
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
|
}
|