@bookipi/htmlgenerator 1.5.14 → 1.5.15
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 +5 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +5 -1
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -13432,9 +13432,13 @@ var subscriptionInvoiceHtml = (function (_ref) {
|
|
|
13432
13432
|
var hasDiscount = invoiceItems.some(function (item) {
|
|
13433
13433
|
return item.type === 'discount' && item.total > 0;
|
|
13434
13434
|
});
|
|
13435
|
+
var hasTax = invoiceItems.some(function (item) {
|
|
13436
|
+
return item.type === 'tax' && item.total > 0;
|
|
13437
|
+
});
|
|
13435
13438
|
var renderItem = function renderItem(item) {
|
|
13436
13439
|
var title = item.name || item.description;
|
|
13437
|
-
|
|
13440
|
+
var showSubtotal = hasTax && hasDiscount;
|
|
13441
|
+
if (!showSubtotal && item.type === 'subtotal') {
|
|
13438
13442
|
return '';
|
|
13439
13443
|
}
|
|
13440
13444
|
var isDiscount = item.type === 'discount';
|