@bookipi/htmlgenerator 1.1.34-alpha2 → 1.1.35-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.
@@ -2997,10 +2997,16 @@ var en = (_deposit_due$terms$pr = {
2997
2997
  details_line_2: function details_line_2(x) {
2998
2998
  return "This offer is valid from the date of issue and will expire at the close of business (" + x + "). Acceptance will be in the form of accepting and signing this proposal.";
2999
2999
  },
3000
+ details_line_3: function details_line_3(x, y, z) {
3001
+ return x + " (" + y + "). " + z;
3002
+ },
3003
+ details_line_3_1: 'This offer is valid from the date of issue and will expire at the close of business',
3004
+ details_line_3_2: 'Acceptance will be in the form of accepting and signing this proposal.',
3005
+ details_line_4: "Please accept this proposal and terms of service. This creates a legally binding contract between us. At any time if you have any questions please contact us on the details above. These terms will be effective throughout the period of our engagement and may only be changed by the Parties' agreement in writing.",
3000
3006
  supplier_details: "Supplier Details",
3001
3007
  customer_details: "Customer Details",
3002
3008
  effective_date: "Dated:"
3003
- }, _deposit_due$terms$pr["start_date"] = "Start Date:", _deposit_due$terms$pr["end_date"] = "End Date:", _deposit_due$terms$pr.supplier_empty = "No supplier added yet.", _deposit_due$terms$pr.customer_empty = "No customer added yet.", _deposit_due$terms$pr.details_line_3 = "Please accept this proposal and terms of service. This creates a legally binding contract between us. At any time if you have any questions please contact us on the details above. These terms will be effective throughout the period of our engagement and may only be changed by the Parties' agreement in writing.", _deposit_due$terms$pr.kind_regards = "Kind regards,", _deposit_due$terms$pr.services_title = "Billing Schedule", _deposit_due$terms$pr["total"] = "Total:", _deposit_due$terms$pr.items_empty = "No services added yet.", _deposit_due$terms$pr.agreement_title = "Terms and Conditions", _deposit_due$terms$pr["signature"] = "Signature", _deposit_due$terms$pr.proposal_id = "Proposal ID:", _deposit_due$terms$pr.client = "Client:", _deposit_due$terms$pr.email_addresses = "Email address:", _deposit_due$terms$pr.ip = "IP:", _deposit_due$terms$pr.time = "Time:", _deposit_due$terms$pr);
3009
+ }, _deposit_due$terms$pr["start_date"] = "Start Date:", _deposit_due$terms$pr["end_date"] = "End Date:", _deposit_due$terms$pr.supplier_empty = "No supplier added yet.", _deposit_due$terms$pr.customer_empty = "No customer added yet.", _deposit_due$terms$pr.kind_regards = "Kind regards,", _deposit_due$terms$pr.services_title = "Billing Schedule", _deposit_due$terms$pr["total"] = "Total:", _deposit_due$terms$pr.items_empty = "No services added yet.", _deposit_due$terms$pr.agreement_title = "Terms and Conditions", _deposit_due$terms$pr["signature"] = "Signature", _deposit_due$terms$pr.proposal_id = "Proposal ID:", _deposit_due$terms$pr.client = "Client:", _deposit_due$terms$pr.email_addresses = "Email address:", _deposit_due$terms$pr.ip = "IP:", _deposit_due$terms$pr.time = "Time:", _deposit_due$terms$pr);
3004
3010
 
3005
3011
  function _extends() {
3006
3012
  _extends = Object.assign ? Object.assign.bind() : function (target) {
@@ -11208,7 +11214,8 @@ var language = {
11208
11214
  var contractHtml = (function (props) {
11209
11215
  var proposal = props.proposal,
11210
11216
  realTimeCompany = props.company,
11211
- contractor = props.contractor;
11217
+ contractor = props.contractor,
11218
+ t = props.t;
11212
11219
  var lang = language[(props === null || props === void 0 ? void 0 : props.lang) || "en"];
11213
11220
  var customer = (proposal === null || proposal === void 0 ? void 0 : proposal.customer) || {};
11214
11221
  var frozenCompany = proposal === null || proposal === void 0 ? void 0 : proposal.company;
@@ -11228,16 +11235,16 @@ var contractHtml = (function (props) {
11228
11235
  };
11229
11236
  var styles = "<style>\n .pageBreak {\n page-break-inside: avoid;\n }\n #proposal-generator {\n background-color: #ffffff;\n max-width: 21cm;\n padding: 8px;\n }\n #proposal-generator hr {\n display: block;\n height: 1px;\n background: transparent;\n width: 100%;\n border: none;\n border-top: solid 2px #f0f3fb;\n margin: 16px 0;\n }\n #proposal-generator span, p, b {\n line-height: 1.5;\n }\n #proposal-generator b {\n font-size: 16px;\n font-weight: 700;\n }\n #proposal-generator table {\n width: 100%;\n }\n #proposal-generator section:not(:first-child) {\n margin-top: 40px;\n }\n #proposal-generator .section-title {\n font-size: 18px;\n font-weight: 700;\n color: #263238;\n }\n #proposal-generator .proposal-title {\n margin-bottom: 16px;\n work-break:break-all\n }\n #proposal-generator .contact-title {\n font-size: 24px;\n }\n #proposal-generator .table-details {\n margin: 16px 0;\n }\n #proposal-generator .table-details tr td {\n width: 50%;\n vertical-align: top;\n word-break: break-word;\n page-break-inside: avoid;\n }\n #proposal-generator .agreement-date {\n margin-bottom: 16px;\n }\n #proposal-generator .table-service {\n border-collapse: collapse;\n }\n #proposal-generator .table-service tr {\n padding-top: 10px;\n padding-bottom: 10px;\n border-bottom: 1px solid rgb(221, 221, 221);\n }\n #proposal-generator .table-service tr td {\n width: 50%;\n padding: 8px;\n vertical-align: top;\n word-break: break-word;\n page-break-inside: avoid;\n }\n #proposal-generator .table-agreement tr td {\n padding-top: 24px;\n page-break-inside: avoid;\n }\n @print {\n #proposal-generator {\n padding: 0;\n }\n }\n @media only screen and (max-width: 480px) {\n #proposal-generator{\n background-color: #ffffff;\n max-width: 21cm;\n padding: 20px;\n }\n #proposal-generator .table-details tr td {\n width: 100%;\n display: block;\n margin:10px 0px;\n }\n }\n @font-face {\n font-family: 'journal';\n src: local('journal'), url(data:font/ttf;base64," + fontJournal + ") format('truetype');\n }\n \n .signature {\n font-family: 'journal', sans-serif;\n font-size: 40px;\n font-weight: 600;\n color: #595959;\n }\n </style>";
11230
11237
  var sectionHeader = "<section>";
11231
- sectionHeader += "<h2 class=\"section-title contact-title\">" + ((lang === null || lang === void 0 ? void 0 : lang.service_agreement) || "") + "</h2>";
11238
+ sectionHeader += "<h2 class=\"section-title contact-title\">" + ((t ? t(lang === null || lang === void 0 ? void 0 : lang.service_agreement) : lang === null || lang === void 0 ? void 0 : lang.service_agreement) || "") + "</h2>";
11232
11239
  sectionHeader += "<hr />";
11233
11240
  sectionHeader += "</section>";
11234
11241
  var sectionUserInfo = "<section>";
11235
11242
  sectionUserInfo += "<h5 class=\"section-title proposal-title\" style=\"word-break: break-all\">" + ((proposal === null || proposal === void 0 ? void 0 : proposal.title) || "") + "</h5>";
11236
- sectionUserInfo += "<span>" + ((lang === null || lang === void 0 ? void 0 : lang.details_line_1) || "") + "</span>";
11243
+ sectionUserInfo += "<span>" + ((t ? t(lang === null || lang === void 0 ? void 0 : lang.details_line_1) : lang === null || lang === void 0 ? void 0 : lang.details_line_1) || "") + "</span>";
11237
11244
  sectionUserInfo += "<br />";
11238
- sectionUserInfo += "<span>" + (lang === null || lang === void 0 ? void 0 : lang.details_line_2(proposal !== null && proposal !== void 0 && proposal.expirationDate ? formatDate(proposal.expirationDate, company || {}) : formatDate(new Date(), company || {}))) + "</span>";
11245
+ sectionUserInfo += "<span>" + (lang === null || lang === void 0 ? void 0 : lang.details_line_3(t ? t(lang === null || lang === void 0 ? void 0 : lang.details_line_3_1) : lang === null || lang === void 0 ? void 0 : lang.details_line_3_1, proposal !== null && proposal !== void 0 && proposal.expirationDate ? formatDate(proposal.expirationDate, company || {}) : formatDate(new Date(), company || {}), t ? t(lang === null || lang === void 0 ? void 0 : lang.details_line_3_2) : lang === null || lang === void 0 ? void 0 : lang.details_line_3_2)) + "</span>";
11239
11246
  sectionUserInfo += '<table class="table-details"><tbody><tr><td>';
11240
- sectionUserInfo += "<b>" + ((lang === null || lang === void 0 ? void 0 : lang.supplier_details) || "") + "</b>";
11247
+ sectionUserInfo += "<b>" + ((t ? t(lang === null || lang === void 0 ? void 0 : lang.supplier_details) : lang === null || lang === void 0 ? void 0 : lang.supplier_details) || "") + "</b>";
11241
11248
  if (Object.keys(company || {}).length > 0) {
11242
11249
  if (company !== null && company !== void 0 && company.name) {
11243
11250
  sectionUserInfo += "<div><b>" + company.name + "</b></div>";
@@ -11253,10 +11260,10 @@ var contractHtml = (function (props) {
11253
11260
  }
11254
11261
  } else {
11255
11262
  sectionUserInfo += "<br />";
11256
- sectionUserInfo += "<span>" + ((lang === null || lang === void 0 ? void 0 : lang.supplier_empty) || "") + "</span>";
11263
+ sectionUserInfo += "<span>" + ((t ? t(lang === null || lang === void 0 ? void 0 : lang.supplier_empty) : lang === null || lang === void 0 ? void 0 : lang.supplier_empty) || "") + "</span>";
11257
11264
  }
11258
11265
  sectionUserInfo += "</td><td>";
11259
- sectionUserInfo += "<b>" + (lang === null || lang === void 0 ? void 0 : lang.customer_details) + "</b>";
11266
+ sectionUserInfo += "<b>" + (t ? t(lang === null || lang === void 0 ? void 0 : lang.customer_details) : lang === null || lang === void 0 ? void 0 : lang.customer_details) + "</b>";
11260
11267
  if (Object.keys(customer || {}).length > 0) {
11261
11268
  if (customer !== null && customer !== void 0 && customer.companyName) {
11262
11269
  sectionUserInfo += "<div><b>" + customer.companyName + "</b></div>";
@@ -11272,20 +11279,20 @@ var contractHtml = (function (props) {
11272
11279
  }
11273
11280
  } else {
11274
11281
  sectionUserInfo += "<br />";
11275
- sectionUserInfo += "<span>" + ((lang === null || lang === void 0 ? void 0 : lang.customer_empty) || "") + "</span>";
11282
+ sectionUserInfo += "<span>" + ((t ? t(lang === null || lang === void 0 ? void 0 : lang.customer_empty) : lang === null || lang === void 0 ? void 0 : lang.customer_empty) || "") + "</span>";
11276
11283
  }
11277
11284
  sectionUserInfo += "</td></tr></tbody></table>";
11278
- sectionUserInfo += "<p class=\"agreement-date\"><b>" + ((lang === null || lang === void 0 ? void 0 : lang.effective_date) || "") + "</b> " + (proposal !== null && proposal !== void 0 && proposal.effectiveDate ? formatDate(proposal.effectiveDate, company || {}) : "") + "</p>";
11279
- sectionUserInfo += "<p class=\"agreement-date\"><b>" + ((lang === null || lang === void 0 ? void 0 : lang.start_date) || "") + "</b> " + (proposal !== null && proposal !== void 0 && proposal.startDate ? formatDate(proposal.startDate, company || {}) : "") + "</p>";
11285
+ sectionUserInfo += "<p class=\"agreement-date\"><b>" + ((t ? t(lang === null || lang === void 0 ? void 0 : lang.effective_date) : lang === null || lang === void 0 ? void 0 : lang.effective_date) || "") + "</b> " + (proposal !== null && proposal !== void 0 && proposal.effectiveDate ? formatDate(proposal.effectiveDate, company || {}) : "") + "</p>";
11286
+ sectionUserInfo += "<p class=\"agreement-date\"><b>" + ((t ? t(lang === null || lang === void 0 ? void 0 : lang.start_date) : lang === null || lang === void 0 ? void 0 : lang.start_date) || "") + "</b> " + (proposal !== null && proposal !== void 0 && proposal.startDate ? formatDate(proposal.startDate, company || {}) : "") + "</p>";
11280
11287
  sectionUserInfo += "<p class=\"agreement-date\"><b>" + ((lang === null || lang === void 0 ? void 0 : lang.end_date) || "") + "</b> " + endDate(proposal, company || {}) + "</p>";
11281
11288
  sectionUserInfo += "<div style=\"margin: 6px 0\">";
11282
- sectionUserInfo += "<span>" + ((lang === null || lang === void 0 ? void 0 : lang.details_line_3) || "") + "</span><br />";
11289
+ sectionUserInfo += "<span>" + ((t ? t(lang === null || lang === void 0 ? void 0 : lang.details_line_4) : lang === null || lang === void 0 ? void 0 : lang.details_line_4) || "") + "</span><br />";
11283
11290
  sectionUserInfo += "</div>";
11284
- sectionUserInfo += "<p style=\"margin: 6px 0\">" + ((lang === null || lang === void 0 ? void 0 : lang.kind_regards) || "") + "</p>";
11291
+ sectionUserInfo += "<p style=\"margin: 6px 0\">" + ((t ? t(lang === null || lang === void 0 ? void 0 : lang.kind_regards) : lang === null || lang === void 0 ? void 0 : lang.kind_regards) || "") + "</p>";
11285
11292
  sectionUserInfo += "<b>" + ((contractor === null || contractor === void 0 ? void 0 : contractor.firstName) || "") + " " + ((contractor === null || contractor === void 0 ? void 0 : contractor.lastName) || "") + "</b><br />";
11286
11293
  sectionUserInfo += "</section>";
11287
11294
  var sectionServices = "<section>";
11288
- sectionServices += "<h5 class=\"section-title\">" + ((lang === null || lang === void 0 ? void 0 : lang.services_title) || "") + "</h5>";
11295
+ sectionServices += "<h5 class=\"section-title\">" + ((t ? t(lang === null || lang === void 0 ? void 0 : lang.services_title) : lang === null || lang === void 0 ? void 0 : lang.services_title) || "") + "</h5>";
11289
11296
  sectionServices += "<hr />";
11290
11297
  sectionServices += '<table class="table-service"><tbody>';
11291
11298
  if (items && items.length > 0) {
@@ -11318,12 +11325,12 @@ var contractHtml = (function (props) {
11318
11325
  sectionServices += "</td></tr>";
11319
11326
  });
11320
11327
  } else {
11321
- sectionServices += '<tr style="border:none;"><td style="border: unset;">' + ((lang === null || lang === void 0 ? void 0 : lang.items_empty) || "") + "</td></tr>";
11328
+ sectionServices += '<tr style="border:none;"><td style="border: unset;">' + ((t ? t(lang === null || lang === void 0 ? void 0 : lang.items_empty) : lang === null || lang === void 0 ? void 0 : lang.items_empty) || "") + "</td></tr>";
11322
11329
  }
11323
11330
  sectionServices += "</tbody></table>";
11324
11331
  sectionServices += "</section>";
11325
11332
  var sectionAgreement = "<section>";
11326
- sectionAgreement += "<h5 class=\"section-title\">" + ((lang === null || lang === void 0 ? void 0 : lang.agreement_title) || "") + "</h5>";
11333
+ sectionAgreement += "<h5 class=\"section-title\">" + ((t ? t(lang === null || lang === void 0 ? void 0 : lang.agreement_title) : lang === null || lang === void 0 ? void 0 : lang.agreement_title) || "") + "</h5>";
11327
11334
  sectionAgreement += "<hr />";
11328
11335
  sectionAgreement += '<table class="table-agreement"><tbody>';
11329
11336
  if (sectionsDefine && sectionsDefine.length > 0) {
@@ -11417,23 +11424,13 @@ var subscriptionInvoiceHtml = (function (_ref) {
11417
11424
  var productItems = (_invoiceItems$filter = invoiceItems.filter(function (item) {
11418
11425
  return item.type === 'product';
11419
11426
  })) != null ? _invoiceItems$filter : [];
11420
- var subtotalItem = invoiceItems.find(function (item) {
11421
- return item.type === 'subtotal';
11422
- });
11423
11427
  var taxItem = invoiceItems.find(function (item) {
11424
11428
  return item.type === 'tax';
11425
11429
  });
11426
- var discountItem = invoiceItems.find(function (item) {
11427
- return item.type === 'discount';
11428
- });
11429
- var renderItem = function renderItem(item, type) {
11430
- var isDiscount = type === 'discount';
11431
- return "\n <div class=\"invoice-order-item\">\n <div class=\"invoice-order-details\">\n <div>\n <div class=\"invoice-spacing invoice-body3\">" + (isDiscount ? item.name : item.description || item.name) + "</div>\n " + (isDiscount ? "<div class=\"invoice-subtitle4\">" + item.description + "</div>" : '') + "\n </div>\n <div style=\"font-size:16px;color:" + (isDiscount ? '#C81E1E' : 'inherit') + ";\">\n " + (isDiscount ? '-' : '') + formatPrice(item.total, currency) + "\n </div>\n </div>\n </div>\n ";
11430
+ var renderItem = function renderItem(item) {
11431
+ return "\n <div class=\"invoice-order-item\">\n <div class=\"invoice-order-details\">\n <div>\n <div class=\"invoice-spacing invoice-body3\">" + item.description + "</div>\n </div>\n <div style=\"font-size: 16px;\">\n " + formatPrice(item.total, currency) + "\n </div>\n </div>\n " + (taxItem ? "<div class=\"invoice-tax\">\n <div class=\"invoice-subtitle3\">" + taxItem.description + "</div>\n <div class=\"invoice-subtitle3\">" + formatPrice(taxItem.total, currency) + "</div>\n </div>" : '') + "\n </div>\n ";
11432
11432
  };
11433
- var hasDiscount = discountItem && (discountItem === null || discountItem === void 0 ? void 0 : discountItem.total) > 0;
11434
- var hasTax = taxItem && (taxItem === null || taxItem === void 0 ? void 0 : taxItem.total) > 0;
11435
- var hasSubtotal = subtotalItem && (subtotalItem === null || subtotalItem === void 0 ? void 0 : subtotalItem.total) > 0;
11436
- 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-bottom: 16px;\n justify-content: space-between;\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: right;\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-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 }\n .invoice-card img {\n height: 18px;\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\">Invoice #" + invoiceNumber + "</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-total\">\n <div class=\"invoice-summary-total-title invoice-semi-bold invoice-spacing\">Total</div>\n <div class=\"invoice-summary-total-value invoice-bold invoice-spacing\">" + formatPrice(total, currency) + "</div>\n </div>\n <div class=\"invoice-summary-customer\">\n <div><div class=\"invoice-bill-to invoice-semi-bold invoice-spacing\">Bill to</div></div>\n <div>\n <div class=\"invoice-bold invoice-spacing\">" + companyName + "</div>\n <div class=\"invoice-customer-email invoice-subtitle2\">" + email + "</div>\n </div>\n </div>\n </div>\n <div class=\"invoice-order\">\n <div class=\"invoice-order-header\">\n <div class=\"invoice-subtitle3\">Item</div>\n <div class=\"invoice-subtitle3\">Amount</div>\n </div>\n <div class=\"invoice-order-item-container\">\n " + productItems.map(renderItem) + "\n " + (hasDiscount ? renderItem(discountItem, 'discount') : '') + "\n " + (hasDiscount && hasTax && hasSubtotal ? renderItem(subtotalItem, 'subtotal') : '') + "\n " + (hasTax ? renderItem(taxItem, 'tax') : '') + "\n <div class=\"invoice-payment\">\n <div class=\"invoice-bold\" style=\"font-size: 16px;\">Total charged</div>\n <div class=\"invoice-body3\">\n <div class=\"invoice-bold invoice-spacing\" style=\"font-size: 18px;text-align: right;\">" + formatPrice(amountPaid, currency) + "</div>\n <div class=\"invoice-card\">\n <img src=" + cardLogo + " alt=" + cardBrand + " />\n <div class=\"invoice-semi-bold\" style=\"font-weight: 400;\">" + (cardBrand.charAt(0).toUpperCase() + cardBrand.slice(1)) + " \u2022\u2022\u2022\u2022 " + cardNumber + "</div>\n </div>\n </div>\n </div>\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 ";
11433
+ 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-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-bottom: 16px;\n justify-content: space-between;\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: right;\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 20px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.06);\n margin-bottom: 8px;\n }\n .invoice-order-details {\n display: flex;\n justify-content: space-between;\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 }\n .invoice-card {\n display: flex;\n }\n .invoice-card img {\n height: 18px;\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\">Invoice #" + invoiceNumber + "</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-total\">\n <div class=\"invoice-summary-total-title invoice-semi-bold invoice-spacing\">Total</div>\n <div class=\"invoice-summary-total-value invoice-bold invoice-spacing\">" + formatPrice(total, currency) + "</div>\n </div>\n <div class=\"invoice-summary-customer\">\n <div><div class=\"invoice-bill-to invoice-semi-bold invoice-spacing\">Bill to</div></div>\n <div>\n <div class=\"invoice-bold invoice-spacing\">" + companyName + "</div>\n <div class=\"invoice-customer-email invoice-subtitle2\">" + email + "</div>\n </div>\n </div>\n </div>\n <div class=\"invoice-order\">\n <div class=\"invoice-order-header\">\n <div class=\"invoice-subtitle3\">Item</div>\n <div class=\"invoice-subtitle3\">Amount</div>\n </div>\n <div class=\"invoice-order-item-container\">\n " + productItems.map(renderItem) + "\n <div class=\"invoice-payment\">\n <div class=\"invoice-bold\" style=\"font-size: 16px;\">Total charged</div>\n <div class=\"invoice-body3\">\n <div class=\"invoice-bold invoice-spacing\" style=\"font-size: 18px;text-align: right;\">" + formatPrice(amountPaid, currency) + "</div>\n <div class=\"invoice-card\">\n <img src=" + cardLogo + " alt=" + cardBrand + " />\n <div class=\"invoice-semi-bold\" style=\"font-weight: 400;\">" + (cardBrand.charAt(0).toUpperCase() + cardBrand.slice(1)) + " \u2022\u2022\u2022\u2022 " + cardNumber + "</div>\n </div>\n </div>\n </div>\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 ";
11437
11434
  return {
11438
11435
  html: html
11439
11436
  };