@bookipi/htmlgenerator 1.1.46-alpha5 → 1.1.46-alpha6
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/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +4 -4
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12896,15 +12896,15 @@ var subscriptionInvoiceHtml = (function (_ref) {
|
|
|
12896
12896
|
});
|
|
12897
12897
|
if (discountItems.length === 0) {
|
|
12898
12898
|
discountItems = productItems.map(function (item) {
|
|
12899
|
-
return
|
|
12899
|
+
return {
|
|
12900
12900
|
type: 'discount',
|
|
12901
12901
|
name: 'Previous subscription discount',
|
|
12902
|
-
total: item.discount
|
|
12903
|
-
}
|
|
12902
|
+
total: item.discount || 0
|
|
12903
|
+
};
|
|
12904
12904
|
});
|
|
12905
12905
|
}
|
|
12906
12906
|
var renderDiscount = function renderDiscount(discountItem) {
|
|
12907
|
-
if (!discountItem) {
|
|
12907
|
+
if (!discountItem || discountItem.total === 0) {
|
|
12908
12908
|
return '';
|
|
12909
12909
|
}
|
|
12910
12910
|
return "<div class=\"invoice-order-item\">\n <div class=\"invoice-order-details\">\n <div>\n <div class=\"invoice-spacing invoice-body3\">" + discountItem.name + "</div>\n </div>\n <div style=\"font-size:16px;color:#C81E1E;\">\n -" + formatPrice(discountItem.total, currency) + "\n </div>\n </div>\n </div>";
|