@bookipi/htmlgenerator 1.8.4-alpha2 → 1.8.5-alpha1

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
@@ -13446,61 +13446,59 @@ var contractHtml = (function (props) {
13446
13446
  return html;
13447
13447
  });
13448
13448
 
13449
- var subscriptionInvoiceHtml = (function (_ref) {
13450
- var vendor = _ref.vendor,
13451
- invoice = _ref.invoice,
13452
- customer = _ref.customer,
13453
- _ref$includeHtmlWrapp = _ref.includeHtmlWrapper,
13454
- includeHtmlWrapper = _ref$includeHtmlWrapp === void 0 ? false : _ref$includeHtmlWrapp,
13455
- t = _ref.t;
13456
- var _ref2 = vendor != null ? vendor : {},
13457
- vendorName = _ref2.name,
13458
- logoUrl = _ref2.logoUrl,
13459
- businessNumber = _ref2.businessNumber,
13460
- address = _ref2.address;
13461
- var _ref3 = invoice != null ? invoice : {},
13462
- invoiceNumber = _ref3.no,
13463
- total = _ref3.total,
13464
- amountPaid = _ref3.amountPaid,
13465
- currency = _ref3.currency,
13466
- transaction = _ref3.transaction,
13467
- date = _ref3.date,
13468
- invoiceItems = _ref3.items;
13469
- var _ref4 = transaction != null ? transaction : {},
13470
- cardNumber = _ref4.cardNumber,
13471
- cardBrand = _ref4.cardBrand,
13472
- cardLogo = _ref4.cardLogo;
13473
- var _ref5 = customer != null ? customer : {},
13474
- companyName = _ref5.name,
13475
- email = _ref5.email;
13476
- var vendorLogoUrl = logoUrl != null ? logoUrl : 'https://web.bookipi.com/images/logos/logo-bookipi.png';
13477
- var formatPrice = function formatPrice(price, currency) {
13478
- if (price === void 0) {
13479
- price = 0;
13480
- }
13481
- if (currency === void 0) {
13482
- currency = 'USD';
13483
- }
13484
- return (price ? Number(price / 100).toFixed(2) : '0') + " " + currency;
13485
- };
13486
- var defaultLang = {
13487
- invoiceNo: t ? t('Invoice #', {
13488
- no: invoiceNumber
13489
- }) : "Invoice #" + invoiceNumber,
13490
- total: t ? t('Total') : 'Total',
13491
- billTo: t ? t('Bill to') : 'Bill to',
13492
- item: t ? t('Item') : 'Item',
13493
- amount: t ? t('Amount') : 'Amount',
13494
- totalCharged: t ? t('Total charged') : 'Total charged',
13495
- discount: t ? t('Discount') : 'Discount'
13496
- };
13449
+ var styleSheet = "\n<style>\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;900&family=Lato:wght@400;700&display=swap');\n\n .bookipay-invoice {\n width: 100%;\n max-width: 600px;\n background-color: white;\n display: flex;\n border-radius: 16px;\n flex-direction: column;\n overflow: hidden;\n font-family: 'Inter', sans-serif;\n line-height: 1.2;\n color: black;\n font-size: 16px;\n }\n\n .invoice-content {\n padding: 40px 30px;\n }\n\n .invoice-header {\n display: flex;\n padding: 10px;\n margin-bottom: 40px;\n justify-content: space-between;\n }\n\n .invoice-footer {\n padding: 30px 38px 40px;\n background-color: rgb(245, 246, 250);\n font-size: 12px;\n }\n\n .invoice-footer p {\n display: block;\n margin: 0;\n }\n\n .invoice-footer-logo {\n height: 20px;\n margin-bottom: 12px;\n }\n\n .invoice-logo {\n object-fit: contain;\n max-height: 52px;\n width: auto;\n height: auto;\n }\n\n .invoice-body {\n color: rgb(15, 23, 42);\n font-size: 16px;\n }\n\n .invoice-company {\n text-align: right;\n }\n\n .invoice-spacing {\n margin-bottom: 4px;\n }\n\n .invoice-semi-bold {\n color: rgb(15, 23, 42);\n font-weight: 600;\n font-size: 16px;\n }\n\n .invoice-bold {\n font-family: 'Lato', sans-serif;\n color: black;\n font-weight: 700;\n font-size: 20px;\n }\n\n .invoice-subtitle {\n color: rgba(0, 0, 0, 0.6);\n font-size: 14px;\n }\n\n .invoice-subtitle2 {\n color: rgb(147, 154, 172);\n font-size: 14px;\n }\n\n .invoice-subtitle3 {\n color: rgb(100, 116, 139);\n font-size: 14px;\n }\n\n .invoice-subtitle4 {\n font-size: 10px;\n }\n\n .invoice-summary {\n background-color: rgb(245, 246, 250);\n padding: 32px 24px;\n border-radius: 16px;\n margin-bottom: 40px;\n }\n\n .invoice-summary-total {\n display: flex;\n margin-top: 24px;\n flex-direction: column;\n }\n\n .invoice-summary-customer {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n }\n\n .invoice-summary-customer-column {\n flex: 1;\n overflow-wrap:anywhere;\n }\n\n .invoice-customer-email {\n text-align: right;\n }\n\n .invoice-order-header {\n padding: 8px 0;\n margin-bottom: 8px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.06);\n display: flex;\n justify-content: space-between;\n }\n\n .invoice-order-container {\n display: flex;\n justify-content: space-between;\n }\n\n .invoice-order-item {\n padding: 12px 0px 5px;\n }\n\n .invoice-order-details {\n display: flex;\n justify-content: space-between;\n }\n\n .invoice-item-details {\n color: rgb(100, 116, 139);\n font-size: 14px;\n margin-top: 4px;\n }\n\n .invoice-tax {\n display: flex;\n justify-content: space-between;\n margin-top: 8px;\n }\n\n .invoice-payment {\n display: flex;\n padding: 12px 0px 16px;\n justify-content: space-between;\n border-top: 1px solid rgba(0, 0, 0, 0.06);\n margin-top: 15px;\n }\n\n .invoice-card {\n display: flex;\n padding: 8px 0px;\n }\n\n .invoice-card img {\n height: 24px;\n margin-right: 6px;\n }\n\n .invoice-bill-to {\n display: none;\n }\n\n .invoice-order-item-amount {\n font-size: 16px;\n white-space: nowrap;\n }\n\n .invoice-card-number {\n color: rgb(15, 23, 42);\n font-size: 16px;\n font-weight: 400;\n }\n\n .invoice-total-amount {\n font-size: 18px;\n text-align: right;\n }\n\n @media (max-width: 600px) {\n .bookipay-invoice {\n border-radius: 0;\n }\n }\n\n @media (max-width: 799px) {\n .invoice-header {\n flex-direction: column;\n padding: 10px 0;\n }\n\n .invoice-company {\n text-align: left;\n }\n\n .invoice-logo {\n max-width: 100px;\n margin-bottom: 16px;\n }\n\n .invoice-header,\n .invoice-summary {\n margin-bottom: 20px;\n }\n\n .invoice-summary {\n margin-left: -30px;\n margin-right: -30px;\n border-radius: 0;\n padding: 32px 30px;\n }\n\n .invoice-content {\n padding: 20px 30px;\n }\n\n .invoice-bill-to {\n display: flex;\n }\n }\n\n @media (max-width: 399px) {\n .footer-actions {\n flex-direction: column;\n }\n\n .footer-action {\n margin-bottom: 12px;\n }\n\n footer {\n margin: 30px 0;\n }\n\n footer p {\n margin-top: 0;\n }\n }\n\n @media print {\n * {\n color-adjust: exact;\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n\n .invoice-footer {\n width: 100%;\n max-width: 100%;\n margin: 0;\n }\n\n .bookipay-invoice {\n max-width: 100%;\n }\n\n @page {\n margin: 0;\n }\n\n body {\n margin: 1.6cm;\n }\n }\n</style>\n";
13450
+
13451
+ function formatPrice(price, currency) {
13452
+ if (price === void 0) {
13453
+ price = 0;
13454
+ }
13455
+ if (currency === void 0) {
13456
+ currency = 'USD';
13457
+ }
13458
+ return (price ? Number(price / 100).toFixed(2) : '0') + " " + currency;
13459
+ }
13460
+ function renderAddressItems(addressItems) {
13461
+ if (addressItems === void 0) {
13462
+ addressItems = [];
13463
+ }
13464
+ return addressItems.filter(function (item) {
13465
+ return !!item;
13466
+ }).join(', ');
13467
+ }
13468
+ function Header(_ref) {
13469
+ var logoUrl = _ref.logoUrl,
13470
+ companyName = _ref.companyName,
13471
+ invoiceNo = _ref.invoiceNo,
13472
+ invoiceDate = _ref.invoiceDate;
13473
+ return "\n <div class=\"invoice-header\">\n <img class=\"invoice-logo\" src=" + logoUrl + " />\n <div class=\"invoice-company\">\n <div class=\"invoice-company-name invoice-semi-bold invoice-spacing\">\n " + companyName + "\n </div>\n <div class=\"invoice-number invoice-subtitle invoice-spacing\">\n " + invoiceNo + "\n </div>\n <div class=\"invoice-date invoice-subtitle invoice-spacing\">\n " + invoiceDate + "\n </div>\n </div>\n </div>\n ";
13474
+ }
13475
+ function InvoiceSummaryCard(params) {
13476
+ var email = params.email,
13477
+ companyName = params.companyName,
13478
+ businessNumber = params.businessNumber,
13479
+ address = params.address,
13480
+ total = params.total,
13481
+ currency = params.currency,
13482
+ defaultLang = params.defaultLang;
13483
+ var hasAddressLine = (address === null || address === void 0 ? void 0 : address.address1) || (address === null || address === void 0 ? void 0 : address.address2) || (address === null || address === void 0 ? void 0 : address.address3);
13484
+ var hasAddress = (address === null || address === void 0 ? void 0 : address.city) || (address === null || address === void 0 ? void 0 : address.zip) || (address === null || address === void 0 ? void 0 : address.country);
13485
+ return "\n <div class=\"invoice-summary\">\n <div class=\"invoice-summary-customer\">\n <div class=\"invoice-summary-customer-column\">\n <div class=\"invoice-bold invoice-spacing\">" + companyName + "</div>\n " + (businessNumber ? "<div class=\"invoice-subtitle2\">" + businessNumber + "</div>" : '') + "\n " + (hasAddressLine ? "<div class=\"invoice-subtitle2\">\n " + renderAddressItems([address.address1, address.address2, address.address3]) + "\n </div>" : '') + "\n " + (hasAddress ? "<div class=\"invoice-subtitle2\">\n " + renderAddressItems([address.city, address.zip, address.country]) + "\n </div>" : '') + "\n </div>\n <div class=\"invoice-customer-email invoice-subtitle2 invoice-summary-customer-column\">\n " + email + "\n </div>\n </div>\n <div class=\"invoice-summary-total\">\n <div class=\"invoice-subtitle3 invoice-spacing\">\n " + defaultLang.total + "\n </div>\n <div class=\"invoice-summary-total-value invoice-bold invoice-spacing\">\n " + formatPrice(total, currency) + "\n </div>\n </div>\n </div>\n ";
13486
+ }
13487
+ function OrderSummary(params) {
13488
+ var amountPaid = params.amountPaid,
13489
+ invoiceItems = params.invoiceItems,
13490
+ cardBrand = params.cardBrand,
13491
+ cardNumber = params.cardNumber,
13492
+ cardLogo = params.cardLogo,
13493
+ currency = params.currency,
13494
+ defaultLang = params.defaultLang;
13497
13495
  var hasDiscount = invoiceItems.some(function (item) {
13498
13496
  return item.type === 'discount' && item.total > 0;
13499
13497
  });
13500
13498
  var hasTax = invoiceItems.some(function (item) {
13501
13499
  return item.type === 'tax' && item.total > 0;
13502
13500
  });
13503
- var renderItem = function renderItem(item) {
13501
+ function renderItem(item) {
13504
13502
  var title = item.name || item.description;
13505
13503
  var showSubtotal = hasTax && hasDiscount;
13506
13504
  if (!showSubtotal && item.type === 'subtotal') {
@@ -13511,30 +13509,88 @@ var subscriptionInvoiceHtml = (function (_ref) {
13511
13509
  var color = isDiscount ? '#C81E1E' : 'inherit';
13512
13510
  var label = isDiscount ? defaultLang.discount + " (" + title + ")" : title;
13513
13511
  if (isDiscount && total === 0) return '';
13514
- return "\n <div class=\"invoice-order-item\">\n <div class=\"invoice-order-details\">\n <div>\n <div class=\"invoice-spacing invoice-body3\" style=\"color:" + color + ";\">" + label + "</div>\n " + (item.description && item.description !== item.name && item.description.trim() !== '' ? "<div class=\"invoice-item-details\">" + item.description + "</div>" : '') + "\n </div>\n <div style=\"font-size:16px;color:" + color + ";\">\n " + formatPrice(total, currency) + "\n </div>\n </div>\n </div>\n ";
13515
- };
13516
- var renderItems = function renderItems(items) {
13512
+ var hasDescription = item.description && item.description !== item.name && item.description.trim() !== '';
13513
+ return "\n <div class=\"invoice-order-item\">\n <div class=\"invoice-order-details\">\n <div>\n <div class=\"invoice-spacing invoice-body3\" style=\"color:" + color + ";\">\n " + label + "\n </div>\n " + (hasDescription ? "<div class=\"invoice-item-details\">" + item.description + "</div>" : '') + "\n </div>\n <div class=\"invoice-order-item-amount\" style=\"color:" + color + ";\">\n " + formatPrice(total, currency) + "\n </div>\n </div>\n </div>\n ";
13514
+ }
13515
+ function renderItems() {
13517
13516
  var rendered = '';
13518
- items.forEach(function (item) {
13517
+ invoiceItems.forEach(function (item) {
13519
13518
  rendered += renderItem(item);
13520
13519
  });
13521
13520
  return rendered;
13521
+ }
13522
+ return "\n <div class=\"invoice-order\">\n <div class=\"invoice-order-header\">\n <div class=\"invoice-subtitle3\">" + defaultLang.item + "</div>\n <div class=\"invoice-subtitle3\">" + defaultLang.amount + "</div>\n </div>\n <div class=\"invoice-order-item-container\">\n " + renderItems() + "\n <div class=\"invoice-payment\">\n <div class=\"invoice-bold\" style=\"font-size:'16px;\">\n " + defaultLang.totalCharged + "\n </div>\n <div class=\"invoice-body3\">\n <div class=\"invoice-bold invoice-spacing invoice-total-amount\">\n " + formatPrice(amountPaid, currency) + "\n </div>\n </div>\n </div>\n " + (cardBrand && cardNumber ? "\n <div class=\"invoice-card\">\n <img src=" + cardLogo + " alt=" + cardBrand + " />\n <div class=\"invoice-card-number\">\n " + (cardBrand.charAt(0).toUpperCase() + cardBrand.slice(1)) + " \u2022\u2022\u2022\u2022 " + cardNumber + "\n </div>\n </div>\n " : '') + "\n </div>\n </div>\n ";
13523
+ }
13524
+ function Footer(_ref2) {
13525
+ var logoUrl = _ref2.logoUrl;
13526
+ return "\n <div class=\"invoice-footer invoice-subtitle2\">\n <img class=\"invoice-footer-logo\" src=" + logoUrl + " />\n <p>\xA92025 Bookipi Pty Ltd.</p>\n <p>9 George St, North Strathfield NSW 2137, Australia</p>\n <p>ABN: 91617668185</p>\n </div>";
13527
+ }
13528
+ function SubscriptionInvoiceHtml(_ref3) {
13529
+ var vendor = _ref3.vendor,
13530
+ invoice = _ref3.invoice,
13531
+ customer = _ref3.customer,
13532
+ includeHtmlWrapper = _ref3.includeHtmlWrapper,
13533
+ t = _ref3.t;
13534
+ var _ref4 = vendor != null ? vendor : {},
13535
+ vendorName = _ref4.name,
13536
+ vendorLogoUrl = _ref4.logoUrl,
13537
+ businessNumber = _ref4.businessNumber,
13538
+ address = _ref4.address;
13539
+ var _ref5 = invoice != null ? invoice : {},
13540
+ invoiceNumber = _ref5.no,
13541
+ total = _ref5.total,
13542
+ amountPaid = _ref5.amountPaid,
13543
+ currency = _ref5.currency,
13544
+ transaction = _ref5.transaction,
13545
+ date = _ref5.date,
13546
+ invoiceItems = _ref5.items;
13547
+ var _ref6 = transaction != null ? transaction : {},
13548
+ cardNumber = _ref6.cardNumber,
13549
+ cardBrand = _ref6.cardBrand,
13550
+ cardLogo = _ref6.cardLogo;
13551
+ var _ref7 = customer != null ? customer : {},
13552
+ companyName = _ref7.name,
13553
+ email = _ref7.email;
13554
+ var logoUrl = vendorLogoUrl != null ? vendorLogoUrl : 'https://web.bookipi.com/images/logos/logo-bookipi.png';
13555
+ var defaultLang = {
13556
+ invoiceNo: t ? t('Invoice #', {
13557
+ no: invoiceNumber
13558
+ }) : "Invoice #" + invoiceNumber,
13559
+ total: t ? t('Total') : 'Total',
13560
+ billTo: t ? t('Bill to') : 'Bill to',
13561
+ item: t ? t('Item') : 'Item',
13562
+ amount: t ? t('Amount') : 'Amount',
13563
+ totalCharged: t ? t('Total charged') : 'Total charged',
13564
+ discount: t ? t('Discount') : 'Discount'
13522
13565
  };
13523
- var renderAddressItems = function renderAddressItems(addressItems) {
13524
- if (addressItems === void 0) {
13525
- addressItems = [];
13526
- }
13527
- return addressItems.filter(function (item) {
13528
- return !!item;
13529
- }).join(', ');
13530
- };
13531
- var hasAddressLine = (address === null || address === void 0 ? void 0 : address.address1) || (address === null || address === void 0 ? void 0 : address.address2) || (address === null || address === void 0 ? void 0 : address.address3);
13532
- var hasAddress = (address === null || address === void 0 ? void 0 : address.city) || (address === null || address === void 0 ? void 0 : address.zip) || (address === null || address === void 0 ? void 0 : address.country);
13533
- var html = "\n " + (includeHtmlWrapper ? '<!DOCTYPE html>\n<html>\n<head>\n<meta charset="utf-8">\n<title>Invoice</title>' : '') + "\n <style>\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;900&family=Lato:wght@400;700&display=swap');\n .bookipay-invoice {\n width: 100%;\n max-width: 600px;\n background-color: white;\n display:flex;\n border-radius: 16px;\n flex-direction: column;\n overflow: hidden;\n font-family: 'Inter', sans-serif;\n line-height: 1.2;\n color: black;\n font-size: 16px;\n }\n .invoice-content {\n padding: 40px 30px;\n }\n .invoice-header {\n display: flex;\n padding: 10px;\n margin-bottom: 40px;\n justify-content: space-between;\n }\n .invoice-footer {\n padding: 30px 38px 40px;\n background-color: rgb(245, 246, 250);\n }\n .invoice-footer p {\n display: block;\n margin: 0;\n }\n .invoice-footer-logo {\n height: 20px;\n margin-bottom: 12px;\n }\n .invoice-logo {\n object-fit: contain;\n max-height: 52px;\n width: auto;\n height: auto;\n }\n .invoice-body {\n color: color: rgb(15, 23, 42);\n font-size: 16px;\n }\n .invoice-company {\n text-align: right;\n }\n .invoice-spacing {\n margin-bottom: 4px;\n }\n .invoice-semi-bold {\n color: rgb(15, 23, 42);\n font-weight: 600;\n font-size: 16px;\n }\n .invoice-bold {\n font-family: 'Lato', sans-serif;\n color: black;\n font-weight: 700;\n font-size: 20px;\n }\n .invoice-subtitle {\n color: rgba(0, 0, 0, 0.6);\n font-size: 14px;\n }\n .invoice-subtitle2 {\n color: rgb(147, 154, 172);\n font-size: 14px;\n }\n .invoice-subtitle3 {\n color: rgb(100, 116, 139);\n font-size: 14px;\n }\n .invoice-subtitle4 {\n font-size: 10px;\n }\n .invoice-summary {\n background-color: rgb(245, 246, 250);\n padding: 32px 24px;\n border-radius: 16px;\n margin-bottom: 40px;\n }\n .invoice-summary-total {\n display: flex;\n margin-top: 24px;\n flex-direction: column;\n }\n .invoice-summary-customer {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n text-align: left;\n }\n .invoice-customer-email {\n margin-left: 8px;\n }\n .invoice-order-header {\n padding: 8px 0;\n margin-bottom: 8px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.06);\n display: flex;\n justify-content: space-between;\n }\n .invoice-order-container {\n display: flex;\n justify-content: space-between;\n }\n .invoice-order-item {\n padding: 12px 0px 5px;\n }\n .invoice-order-details {\n display: flex;\n justify-content: space-between;\n }\n .invoice-item-details {\n color: rgb(100, 116, 139);\n font-size: 14px;\n margin-top: 4px;\n }\n .invoice-tax {\n display: flex;\n justify-content:space-between;\n margin-top: 8px;\n }\n .invoice-payment {\n display: flex;\n padding: 12px 0px 16px;\n justify-content: space-between;\n border-top: 1px solid rgba(0, 0, 0, 0.06);\n margin-top: 15px;\n }\n .invoice-card {\n display: flex;\n padding: 8px 0px;\n }\n .invoice-card img {\n height: 24px;\n margin-right: 6px;\n }\n .invoice-bill-to {\n display: none;\n }\n @media (max-width: 600px) {\n .bookipay-invoice {\n border-radius: 0;\n }\n }\n @media (max-width: 799px) {\n .invoice-header {\n flex-direction: column;\n padding: 10px 0;\n }\n .invoice-company {\n text-align: left;\n }\n .invoice-logo {\n max-width: 100px;\n margin-bottom: 16px;\n }\n .invoice-header, .invoice-summary {\n margin-bottom: 20px;\n }\n .invoice-summary {\n margin-left: -30px;\n margin-right: -30px;\n border-radius: 0;\n padding: 32px 30px;\n }\n .invoice-content {\n padding: 20px 30px;\n }\n .invoice-bill-to {\n display: flex;\n }\n }\n @media (max-width: 399px) {\n .footer-actions {\n flex-direction: column;\n }\n .footer-action {\n margin-bottom: 12px;\n }\n footer {\n margin: 30px 0;\n }\n footer p {\n margin-top: 0;\n }\n }\n @media print {\n * {\n color-adjust: exact;\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n .invoice-footer {\n width: 100%;\n max-width: 100%;\n margin: 0;\n }\n .bookipay-invoice {\n max-width: 100%;\n }\n @page { margin: 0; }\n body { margin: 1.6cm; }\n }\n </style>\n <div class=\"bookipay-invoice\">\n <div class=\"invoice-content\">\n <div class=\"invoice-header\">\n <img class=\"invoice-logo\" src=\"" + vendorLogoUrl + "\" />\n <div class=\"invoice-company\">\n <div class=\"invoice-company-name invoice-semi-bold invoice-spacing\">" + vendorName + "</div>\n <div class=\"invoice-number invoice-subtitle invoice-spacing\">" + defaultLang.invoiceNo + "</div>\n <div class=\"invoice-date invoice-subtitle invoice-spacing\">" + date + "</div>\n </div>\n </div>\n <div class=\"invoice-summary\">\n <div class=\"invoice-summary-customer\">\n <div>\n <div class=\"invoice-bold invoice-spacing\">" + companyName + "</div>\n " + (businessNumber ? "<div class=\"invoice-subtitle2\">" + businessNumber + "</div>" : '') + "\n " + (hasAddressLine ? "<div class=\"invoice-subtitle2\">\n " + renderAddressItems([address.address1, address.address2, address.address3]) + "\n </div>" : '') + "\n " + (hasAddress ? "<div class=\"invoice-subtitle2\">\n " + renderAddressItems([address.city, address.zip, address.country]) + "\n </div>" : '') + "\n </div>\n <div class=\"invoice-customer-email invoice-subtitle2\">" + email + "</div>\n </div>\n <div class=\"invoice-summary-total\">\n <div class=\"invoice-subtitle3 invoice-spacing\">\n " + defaultLang.total + "\n </div>\n <div class=\"invoice-summary-total-value invoice-bold invoice-spacing\">\n " + formatPrice(total, currency) + "\n </div>\n </div>\n </div>\n <div class=\"invoice-order\">\n <div class=\"invoice-order-header\">\n <div class=\"invoice-subtitle3\">" + defaultLang.item + "</div>\n <div class=\"invoice-subtitle3\">" + defaultLang.amount + "</div>\n </div>\n <div class=\"invoice-order-item-container\">\n " + renderItems(invoiceItems) + "\n <div class=\"invoice-payment\">\n <div class=\"invoice-bold\" style=\"font-size: 16px;\">\n " + defaultLang.totalCharged + "</div>\n <div class=\"invoice-body3\">\n <div class=\"invoice-bold invoice-spacing\" style=\"font-size: 18px;text-align: right;\">\n " + formatPrice(amountPaid, currency) + "\n </div>\n </div>\n </div>\n " + (cardBrand && cardNumber ? "\n <div class=\"invoice-card\">\n <img src=" + cardLogo + " alt=" + cardBrand + " />\n <div class=\"invoice-semi-bold\" style=\"font-weight: 400;\">\n " + (cardBrand.charAt(0).toUpperCase() + cardBrand.slice(1)) + " \u2022\u2022\u2022\u2022 " + cardNumber + "\n </div>\n </div>\n " : '') + "\n </div>\n </div>\n </div>\n <div class=\"invoice-footer invoice-subtitle2\" style=\"font-size: 12px;\">\n <img class=\"invoice-footer-logo\" src=\"" + vendorLogoUrl + "\" />\n <!-- TODO: Dynamic company info -->\n <p>\xA92023 Bookipi Pty Ltd.</p>\n <p>9 George St, North Strathfield NSW 2137, Australia</p>\n <p>ABN: 91617668185</p>\n </div>\n </div>\n " + (includeHtmlWrapper ? '</body></html>' : '') + "\n ";
13566
+ var html = "\n " + (includeHtmlWrapper ? '<!DOCTYPE html>\n<html>\n<head>\n<meta charset="utf-8">\n<title>Invoice</title>' : '') + "\n " + styleSheet + "\n " + (includeHtmlWrapper ? '</head>' : '') + "\n <div class=\"bookipay-invoice\">\n <div class=\"invoice-content\">\n " + Header({
13567
+ logoUrl: logoUrl,
13568
+ companyName: vendorName,
13569
+ invoiceNo: defaultLang.invoiceNo,
13570
+ invoiceDate: date
13571
+ }) + "\n " + InvoiceSummaryCard({
13572
+ email: email,
13573
+ companyName: companyName,
13574
+ businessNumber: businessNumber,
13575
+ address: address,
13576
+ total: total,
13577
+ currency: currency,
13578
+ defaultLang: defaultLang
13579
+ }) + "\n " + OrderSummary({
13580
+ amountPaid: amountPaid,
13581
+ invoiceItems: invoiceItems,
13582
+ cardBrand: cardBrand,
13583
+ cardNumber: cardNumber,
13584
+ cardLogo: cardLogo,
13585
+ currency: currency,
13586
+ defaultLang: defaultLang
13587
+ }) + "\n </div>\n " + Footer({
13588
+ logoUrl: logoUrl
13589
+ }) + "\n </div>\n " + (includeHtmlWrapper ? '</body></html>' : '') + "\n ";
13534
13590
  return {
13535
13591
  html: html
13536
13592
  };
13537
- });
13593
+ }
13538
13594
 
13539
13595
  var _document$invoice$est;
13540
13596
  var langJP = (_document$invoice$est = {
@@ -14440,7 +14496,7 @@ exports.InvoiceCompatJapanHtml = InvoiceCompatHtml$1;
14440
14496
  exports.InvoiceHtml = invoiceHtml;
14441
14497
  exports.InvoiceJapanHtml = invoiceHtml$1;
14442
14498
  exports.PresentationHtml = presentationHtml;
14443
- exports.SubscriptionInvoiceHtml = subscriptionInvoiceHtml;
14499
+ exports.SubscriptionInvoiceHtml = SubscriptionInvoiceHtml;
14444
14500
  exports.invoiceHtmlWithDetails = renderOldLayout;
14445
14501
  exports.invoiceHtmlWithDetailsNew = renderNewLayout;
14446
14502
  exports.invoiceJapanHtmlWithDetails = renderLayout;