@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 CHANGED
@@ -13433,9 +13433,13 @@ var subscriptionInvoiceHtml = (function (_ref) {
13433
13433
  var hasDiscount = invoiceItems.some(function (item) {
13434
13434
  return item.type === 'discount' && item.total > 0;
13435
13435
  });
13436
+ var hasTax = invoiceItems.some(function (item) {
13437
+ return item.type === 'tax' && item.total > 0;
13438
+ });
13436
13439
  var renderItem = function renderItem(item) {
13437
13440
  var title = item.name || item.description;
13438
- if (!hasDiscount && item.type === 'subtotal') {
13441
+ var showSubtotal = hasTax && hasDiscount;
13442
+ if (!showSubtotal && item.type === 'subtotal') {
13439
13443
  return '';
13440
13444
  }
13441
13445
  var isDiscount = item.type === 'discount';