@bookipi/htmlgenerator 1.5.3-alpha3 → 1.5.3-alpha5
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 +34 -21
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +34 -21
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11912,7 +11912,8 @@ var InvoiceContent = function InvoiceContent(_ref) {
|
|
|
11912
11912
|
itemWidth = _ref.itemWidth,
|
|
11913
11913
|
isDeposit = _ref.isDeposit,
|
|
11914
11914
|
lang = _ref.lang,
|
|
11915
|
-
t = _ref.t
|
|
11915
|
+
t = _ref.t,
|
|
11916
|
+
showPaymentInstructions = _ref.showPaymentInstructions;
|
|
11916
11917
|
var _getTaxDetails = getTaxDetails(document, company, {
|
|
11917
11918
|
included: defaultLang.included
|
|
11918
11919
|
}),
|
|
@@ -11949,9 +11950,9 @@ var InvoiceContent = function InvoiceContent(_ref) {
|
|
|
11949
11950
|
document: document,
|
|
11950
11951
|
isDeposit: isDeposit
|
|
11951
11952
|
});
|
|
11952
|
-
var paymentOn = company.pi && document.ty === 1 && (company.p1 || company.p2 || company.p3);
|
|
11953
|
-
var paymentInstructionDetails = "\n " + (paymentOn ? "<h2 style=\"margin-top: 0; margin-bottom: 12px; font-size: 18px; font-weight: 700;\">" + (company.r_pi ? company.r_pi : defaultLang["payment_instruction"]) + "</h2>" : "") + "\n " + (company.hasPaymentInstructionQRCode ? "\n <div style=\"padding: 10px; border-color: #D1D5DB; border-width: 1px; border-radius: 8px; width: 200px; height: 200px; border-style: solid; margin-bottom: 8px\">\n <img alt=\"paymentQrCode\" style=\"height: 180px; width: 180px;\" src=\"https://s3.amazonaws.com/bookipi/" + (company === null || company === void 0 ? void 0 : (_company$_id = company._id) === null || _company$_id === void 0 ? void 0 : _company$_id.toString()) + "/paymentInstructionQRCode.png?t=" + new Date().getTime() + "\"\n /></div>" : "") + "\n <span style=\"white-space: pre-line; margin-top:
|
|
11954
|
-
return html$7(_templateObject$7 || (_templateObject$7 = _taggedTemplateLiteralLoose(["<!-- begin invoice-content -->\n <div class=\"invoice-content\">\n <div class=\"table-responsive\">\n <table class=\"table table-invoice\">\n <thead>\n <tr class=\"table table-invoice\">\n <th\n class=\"text-left\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-center d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-right d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n ", "\n <th\n class=\"text-right item-last\"\n ", "\n >\n ", "\n </th>\n </tr>\n </thead>\n <tbody>\n ", "\n </tbody>\n </table>\n </div>\n\n <hr />\n <div class=\"row\">\n <div class=\"col-12\">\n <table class=\"table table-borderless table-small\">\n <tbody>\n <tr>\n <td\n class=\"d-none d-md-table-cell\"\n rowspan=\"", "\"\n >\n ", "\n </td>\n <td class=\"text-md-right\" width=\"22%\">\n ", "\n </td>\n <td class=\"text-right\" width=\"22%\">\n ", "\n </td>\n </tr>\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n </tbody>\n </table>\n </div>\n </div>\n </div>\n <!-- end invoice-content -->"])), itemWidth[0] ? "width='" + itemWidth[0] + "'" : "", company.r_it ? company.r_it : defaultLang["item"], itemWidth[1] ? "width='" + itemWidth[1] + "'" : "", document.um ? document.um : company.r_q ? company.r_q : defaultLang["quantity"], itemWidth[2] ? "width='" + itemWidth[2] + "'" : "", company.r_p ? company.r_p : defaultLang["price"], discountOnItem ? "<th class=\"text-right d-none d-md-table-cell\" " + (itemWidth[3] ? "width='" + itemWidth[3] + "'" : "") + ">" + (company.r_dc ? company.r_dc : defaultLang["discount"]) + "</th>" : "", itemWidth[4] ? "width='" + itemWidth[4] + "'" : "", company.r_a ? company.r_a : defaultLang["amount"], itemsContainer, numOfRowsPaymentInstruction, paymentOn
|
|
11953
|
+
var paymentOn = company.pi && document.ty === 1 && (company.p1 || company.p2 || company.p3 || company.hasPaymentInstructionQRCode) && showPaymentInstructions !== false;
|
|
11954
|
+
var paymentInstructionDetails = "\n " + (paymentOn ? "<h2 style=\"margin-top: 0; margin-bottom: 12px; font-size: 18px; font-weight: 700;\">" + (company.r_pi ? company.r_pi : defaultLang["payment_instruction"]) + "</h2>" : "") + "\n " + (company.hasPaymentInstructionQRCode ? "\n <div style=\"padding: 10px; border-color: #D1D5DB; border-width: 1px; border-radius: 8px; width: 200px; height: 200px; border-style: solid; margin-bottom: 8px\">\n <img alt=\"paymentQrCode\" style=\"height: 180px; width: 180px;\" src=\"https://s3.amazonaws.com/bookipi/" + (company === null || company === void 0 ? void 0 : (_company$_id = company._id) === null || _company$_id === void 0 ? void 0 : _company$_id.toString()) + "/paymentInstructionQRCode.png?t=" + new Date().getTime() + "\"\n /></div>" : "") + "\n <span style=\"white-space: pre-line; margin-top: -20px; display: block; color: #6B7280;\">\n " + (paymentOn && company.p1 ? company.p1 + "<br>" : "") + "\n " + (paymentOn && company.p2 ? company.p2 + "<br>" : "") + "\n " + (paymentOn && company.p3 ? company.p3 + "<br>" : "") + "\n </span>\n ";
|
|
11955
|
+
return html$7(_templateObject$7 || (_templateObject$7 = _taggedTemplateLiteralLoose(["<!-- begin invoice-content -->\n <div class=\"invoice-content\">\n <div class=\"table-responsive\">\n <table class=\"table table-invoice\">\n <thead>\n <tr class=\"table table-invoice\">\n <th\n class=\"text-left\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-center d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-right d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n ", "\n <th\n class=\"text-right item-last\"\n ", "\n >\n ", "\n </th>\n </tr>\n </thead>\n <tbody>\n ", "\n </tbody>\n </table>\n </div>\n\n <hr />\n <div class=\"row\">\n <div class=\"col-12\">\n <table class=\"table table-borderless table-small\">\n <tbody>\n <tr>\n <td\n class=\"d-none d-md-table-cell\"\n rowspan=\"", "\"\n >\n ", "\n </td>\n <td class=\"text-md-right\" width=\"22%\">\n ", "\n </td>\n <td class=\"text-right\" width=\"22%\">\n ", "\n </td>\n </tr>\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n </tbody>\n </table>\n </div>\n </div>\n </div>\n <!-- end invoice-content -->"])), itemWidth[0] ? "width='" + itemWidth[0] + "'" : "", company.r_it ? company.r_it : defaultLang["item"], itemWidth[1] ? "width='" + itemWidth[1] + "'" : "", document.um ? document.um : company.r_q ? company.r_q : defaultLang["quantity"], itemWidth[2] ? "width='" + itemWidth[2] + "'" : "", company.r_p ? company.r_p : defaultLang["price"], discountOnItem ? "<th class=\"text-right d-none d-md-table-cell\" " + (itemWidth[3] ? "width='" + itemWidth[3] + "'" : "") + ">" + (company.r_dc ? company.r_dc : defaultLang["discount"]) + "</th>" : "", itemWidth[4] ? "width='" + itemWidth[4] + "'" : "", company.r_a ? company.r_a : defaultLang["amount"], itemsContainer, numOfRowsPaymentInstruction, paymentOn ? paymentInstructionDetails : "", company.r_sb ? company.r_sb : defaultLang["subtotal"], FormatCurrency$3(document.st, company.cr, company.la, company.cf), document.dc ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + ((company.r_dc ? company.r_dc : defaultLang["discount"]) + (document.dcpo && document.dcp ? " (" + document.dcp + "%)" : "")) + "</td>\n <td class=\"text-right\" width=\"22%\">" + ("(" + FormatCurrency$3(document.dc, company.cr, company.la, company.cf) + ")") + "</td>\n </tr>" : "", document.sp && !document.sntx ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (company.r_sp ? company.r_sp : defaultLang["shipping"]) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$3(document.sp, company.cr, company.la, company.cf) + "</td>\n </tr>" : "", document.tx != 0 ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (taxName1 + taxIncluded1 + "(" + document.tp + "%)") + "</td>\n <td class=\"text-right\" width=\"22%\">" + ((document.t1d ? "(" : "") + FormatCurrency$3(document.tx, company.cr, company.la, company.cf) + (document.t1d ? ")" : "")) + "</td>\n </tr>" : "", document.ttx && document.tx2 != 0 ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (taxName2 + taxIncluded2 + "(" + document.tp2 + "%)") + "</td>\n <td class=\"text-right\" width=\"22%\">" + ((document.t2d ? "(" : "") + FormatCurrency$3(document.tx2, company.cr, company.la, company.cf) + (document.t2d ? ")" : "")) + "</td>\n </tr>" : "", document.sp && document.sntx ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (company.r_sp ? company.r_sp : defaultLang["shipping"]) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$3(document.sp, company.cr, company.la, company.cf) + "</td>\n </tr>" : "", document.ti && !document.t1d && !document.t2d ? "<tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + (company.r_n ? company.r_n : defaultLang["net"]) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + FormatCurrency$3(document.tt - (document.tx || 0) - (document.tx2 || 0), company.cr, company.la, company.cf) + "</td>\n </tr>" : "", document.ty == 1 || document.ty !== 1 && (document.t1d || document.ttx && document.tx2 > 0 && document.t2d) ? "<tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"border-bottom: 1px solid #ddd\">" + (company.r_tt ? company.r_tt : defaultLang["total"]) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-bottom: 1px solid #ddd\">" + FormatCurrency$3(document.tt ? document.tt : 0, company.cr, company.la, company.cf) + "</td>\n </tr>" : "", document.sca ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + defaultLang["credit_card_surcharge"] + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$3(document.sca, company.cr, company.la, company.cf) + "</td>\n </tr>" : "", document.hangingAmount && document.hangingAmount > 0 ? "<tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + (company.payment_in_progress ? company.payment_in_progress : defaultLang.payment_in_progress) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + FormatCurrency$3(document.hangingAmount || 0, company.cr, company.la, company.cf) + "</td>\n </tr>" : "", document.ty == 1 && document.pma && document.pm ? paymentContainer : "", document.ty == 1 && isDeposit && document.depositAmount > 0 ? "\n <tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + (document.ty == 1 ? company.r_ad ? company.r_ad : defaultLang["amount_due"] : company.r_gt ? company.r_gt : defaultLang["grand_total"]) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + FormatCurrency$3(document.ad - (document.hangingAmount || 0), company.cr, company.la, company.cf) + "</td>\n </tr>" : "");
|
|
11955
11956
|
};
|
|
11956
11957
|
|
|
11957
11958
|
var _templateObject$8, _templateObject2$3;
|
|
@@ -12007,7 +12008,7 @@ var InvoiceBookipayLink = function InvoiceBookipayLink(_ref) {
|
|
|
12007
12008
|
hidePayBtnInScreen = _ref.hidePayBtnInScreen,
|
|
12008
12009
|
showPaymentInstructions = _ref.showPaymentInstructions;
|
|
12009
12010
|
var surcharge = company.sc && company.sr || 0;
|
|
12010
|
-
var paymentOn = company.pi && document.ty === 1 && (company.p1 || company.p2 || company.p3) && showPaymentInstructions !== false;
|
|
12011
|
+
var paymentOn = company.pi && document.ty === 1 && (company.p1 || company.p2 || company.p3 || company.hasPaymentInstructionQRCode) && showPaymentInstructions !== false;
|
|
12011
12012
|
var bookipayLinkComponent = BookipayLinkContainer({
|
|
12012
12013
|
document: document,
|
|
12013
12014
|
bookipayLink: bookipayLink,
|
|
@@ -12017,7 +12018,7 @@ var InvoiceBookipayLink = function InvoiceBookipayLink(_ref) {
|
|
|
12017
12018
|
});
|
|
12018
12019
|
if (paymentOn || bookipayLinkComponent) {
|
|
12019
12020
|
var _company$_id;
|
|
12020
|
-
var paymentInstructionDetails = html$a(_templateObject$a || (_templateObject$a = _taggedTemplateLiteralLoose(["\n ", "\n ", "\n <span style=\"white-space: pre-line; margin-top:
|
|
12021
|
+
var paymentInstructionDetails = html$a(_templateObject$a || (_templateObject$a = _taggedTemplateLiteralLoose(["\n ", "\n ", "\n <span style=\"white-space: pre-line; margin-top: -20px; display: block; color: #6B7280;\">\n ", "\n ", "\n ", "\n </span>\n "])), paymentOn ? "<h2 style=\"margin-top: 0; margin-bottom: 12px; font-size: 18px; font-weight: 700;\">" + (company.r_pi ? company.r_pi : defaultLang["payment_instruction"]) + "</h2>" : "", company.hasPaymentInstructionQRCode ? "\n <div style=\"padding: 10px; border-color: #D1D5DB; border-width: 1px; border-radius: 8px; width: 200px; height: 200px; border-style: solid; margin-bottom: 8px\">\n <img alt=\"paymentQrCode\" style=\"height: 180px; width: 180px;\" src=\"https://s3.amazonaws.com/bookipi/" + (company === null || company === void 0 ? void 0 : (_company$_id = company._id) === null || _company$_id === void 0 ? void 0 : _company$_id.toString()) + "/paymentInstructionQRCode.png?t=" + new Date().getTime() + "\"\n /></div>" : "", paymentOn && company.p1 ? company.p1 + "<br>" : "", paymentOn && company.p2 ? company.p2 + "<br>" : "", paymentOn && company.p3 ? company.p3 + "<br>" : "");
|
|
12021
12022
|
return html$a(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteralLoose(["<!-- begin invoice-payment-link -->\n <div class=\"invoice-body\">\n <div class=\"d-block d-md-none\">\n ", "\n ", "\n </div>\n </div>\n <!-- end invoice-payment-link -->"])), paymentOn ? paymentInstructionDetails : "", bookipayLinkComponent ? "<div class=\"mt-4\">" + bookipayLinkComponent + "</div>" : "");
|
|
12022
12023
|
}
|
|
12023
12024
|
return "";
|
|
@@ -12484,11 +12485,12 @@ var PaymentContainer$1 = function PaymentContainer(_ref) {
|
|
|
12484
12485
|
return paymentContainer;
|
|
12485
12486
|
};
|
|
12486
12487
|
|
|
12487
|
-
var _templateObject$p;
|
|
12488
|
+
var _templateObject$p, _templateObject2$c, _templateObject3$6;
|
|
12488
12489
|
var FormatCurrency$7 = util.FormatCurrency;
|
|
12489
12490
|
var html$o = String.raw;
|
|
12491
|
+
var plusSvg = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.0004 21.6004C14.5465 21.6004 16.9883 20.589 18.7886 18.7886C20.589 16.9883 21.6004 14.5465 21.6004 12.0004C21.6004 9.45431 20.589 7.01252 18.7886 5.21217C16.9883 3.41182 14.5465 2.40039 12.0004 2.40039C9.45431 2.40039 7.01252 3.41182 5.21217 5.21217C3.41182 7.01252 2.40039 9.45431 2.40039 12.0004C2.40039 14.5465 3.41182 16.9883 5.21217 18.7886C7.01252 20.589 9.45431 21.6004 12.0004 21.6004ZM13.2004 8.40039C13.2004 8.08213 13.074 7.77691 12.8489 7.55186C12.6239 7.32682 12.3187 7.20039 12.0004 7.20039C11.6821 7.20039 11.3769 7.32682 11.1519 7.55186C10.9268 7.77691 10.8004 8.08213 10.8004 8.40039V10.8004H8.40039C8.08213 10.8004 7.77691 10.9268 7.55186 11.1519C7.32682 11.3769 7.20039 11.6821 7.20039 12.0004C7.20039 12.3187 7.32682 12.6239 7.55186 12.8489C7.77691 13.074 8.08213 13.2004 8.40039 13.2004H10.8004V15.6004C10.8004 15.9187 10.9268 16.2239 11.1519 16.4489C11.3769 16.674 11.6821 16.8004 12.0004 16.8004C12.3187 16.8004 12.6239 16.674 12.8489 16.4489C13.074 16.2239 13.2004 15.9187 13.2004 15.6004V13.2004H15.6004C15.9187 13.2004 16.2239 13.074 16.4489 12.8489C16.674 12.6239 16.8004 12.3187 16.8004 12.0004C16.8004 11.6821 16.674 11.3769 16.4489 11.1519C16.2239 10.9268 15.9187 10.8004 15.6004 10.8004H13.2004V8.40039Z\" fill=\"#1C64F2\"/>\n</svg>\n";
|
|
12490
12492
|
var InvoiceContent$1 = function InvoiceContent(_ref) {
|
|
12491
|
-
var _company$_id;
|
|
12493
|
+
var _company$_id, _company$p;
|
|
12492
12494
|
var company = _ref.company,
|
|
12493
12495
|
defaultLang = _ref.defaultLang,
|
|
12494
12496
|
document = _ref.document,
|
|
@@ -12497,6 +12499,7 @@ var InvoiceContent$1 = function InvoiceContent(_ref) {
|
|
|
12497
12499
|
isDeposit = _ref.isDeposit,
|
|
12498
12500
|
lang = _ref.lang,
|
|
12499
12501
|
showPaymentInstructions = _ref.showPaymentInstructions,
|
|
12502
|
+
showActions = _ref.showActions,
|
|
12500
12503
|
t = _ref.t;
|
|
12501
12504
|
var _getTaxDetails = getTaxDetails(document, company, {
|
|
12502
12505
|
included: defaultLang.included
|
|
@@ -12534,9 +12537,10 @@ var InvoiceContent$1 = function InvoiceContent(_ref) {
|
|
|
12534
12537
|
document: document,
|
|
12535
12538
|
isDeposit: isDeposit
|
|
12536
12539
|
});
|
|
12537
|
-
var
|
|
12538
|
-
var
|
|
12539
|
-
|
|
12540
|
+
var hasInstructions = company.pi && document.ty === 1 && (company.p1 || company.p2 || company.p3 || company.hasPaymentInstructionQRCode);
|
|
12541
|
+
var paymentOn = hasInstructions && showPaymentInstructions !== false;
|
|
12542
|
+
var paymentInstructionDetails = "\n " + (paymentOn ? "<h2 class=\"payment-instruction\">" + (company.r_pi ? company.r_pi : defaultLang["payment_instruction"]) + "</h2>" : "") + "\n " + (company.hasPaymentInstructionQRCode ? "\n <div style=\"padding: 5px; border-color: #D1D5DB; border-width: 1px; border-radius: 8px; width: 200px; height: 200px; border-style: solid; margin-bottom: 8px\">\n <img alt=\"newPaymentQr\" style=\"height: 190px; width: 190px;\" src=\"" + ("https://s3.amazonaws.com/bookipi/" + (company === null || company === void 0 ? void 0 : (_company$_id = company._id) === null || _company$_id === void 0 ? void 0 : _company$_id.toString()) + "/paymentInstructionQRCode.png?t=" + new Date().getTime()) + "\" />\n </div>" : "") + "\n <span style=\"white-space: pre-line; margin-top: -20px; display: block; color: #6B7280;\">\n " + (paymentOn && company.p1 ? ((_company$p = company.p1) === null || _company$p === void 0 ? void 0 : _company$p.replace('\n', '<br/>')) + "<br>" : "") + "\n " + (paymentOn && company.p2 ? company.p2 + "<br>" : "") + "\n " + (paymentOn && company.p3 ? company.p3 + "<br>" : "") + "\n </span>\n " + (showActions ? html$o(_templateObject$p || (_templateObject$p = _taggedTemplateLiteralLoose(["<button classname=\"no-print\" style=\"margin-top: -50px; color: #1C64F2; font-weight: 500; display: block; background: none;\" onclick=\"window.postMessage({ type: 'paymentInstruction' }, '*')\">\n Edit\n </button>"]))) : "") + "\n ";
|
|
12543
|
+
return html$o(_templateObject2$c || (_templateObject2$c = _taggedTemplateLiteralLoose(["<!-- begin invoice-content -->\n <div class=\"invoice-content\">\n <div class=\"table-responsive\">\n <table\n class=\"table table-borderless table-invoice\"\n style=\"margin-bottom: 40px; table-layout: fixed;\"\n >\n <thead class=\"invoice-table-header\">\n <tr class=\"table table-invoice\">\n <th\n class=\"text-left\"\n style=\"border-top-left-radius: 8px; border-bottom-left-radius: 8px;\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-center d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-right d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n ", "\n <th\n class=\"text-right item-last\"\n style=\"border-top-right-radius: 8px; border-bottom-right-radius: 8px;\"\n ", "\n >\n ", "\n </th>\n </tr>\n </thead>\n <tbody>\n ", "\n </tbody>\n </table>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <table class=\"price-table table table-borderless table-small\">\n <tbody>\n <tr>\n <td\n class=\"d-none d-md-table-cell\"\n rowspan=\"", "\"\n >\n ", "\n ", "\n </td>\n <td width=\"22%\" style=\"border-top: 1px solid #E5E7EB\">\n ", "\n </td>\n <td\n class=\"text-right\"\n width=\"22%\"\n style=\"border-top: 1px solid #E5E7EB\"\n >\n ", "\n </td>\n </tr>\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n </tbody>\n </table>\n </div>\n </div>\n\n <!-- end invoice-content -->\n </div>"])), itemWidth[0] ? "width='" + itemWidth[0] + "'" : "", company.r_it ? company.r_it : defaultLang["item"], itemWidth[1] ? "width='" + itemWidth[1] + "'" : "", document.um ? document.um : company.r_q ? company.r_q : defaultLang["quantity"], itemWidth[2] ? "width='" + itemWidth[2] + "'" : "", company.r_p ? company.r_p : defaultLang["price"], discountOnItem ? "<th class=\"text-right d-none d-md-table-cell\" " + (itemWidth[3] ? "width='" + itemWidth[3] + "'" : "") + ">" + (company.r_dc ? company.r_dc : defaultLang["discount"]) + "</th>" : "", itemWidth[4] ? "width='" + itemWidth[4] + "'" : "", company.r_a ? company.r_a : defaultLang["amount"], itemsContainer, numOfRowsPaymentInstruction, paymentOn ? paymentInstructionDetails : "", !hasInstructions ? html$o(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["<button classname=\"no-print\" style=\"color: #1C64F2; font-weight: 500; display: flex; gap: 9px; background: none;\" onclick=\"window.postMessage({ type: 'paymentInstruction' }, '*')\">", "Payment instruction</button>"])), plusSvg) : "", company.r_sb ? company.r_sb : defaultLang["subtotal"], FormatCurrency$7(document.st, company.cr, company.la, company.cf), document.dc ? "<tr>\n <td width=\"22%\">" + ((company.r_dc ? company.r_dc : defaultLang["discount"]) + (document.dcpo && document.dcp ? " (" + document.dcp + "%)" : "")) + "</td>\n <td class=\"text-right\" width=\"22%\">" + ("(" + FormatCurrency$7(document.dc, company.cr, company.la, company.cf) + ")") + "</td>\n </tr>" : "", document.sp && !document.sntx ? "<tr>\n <td width=\"22%\">" + (company.r_sp ? company.r_sp : defaultLang["shipping"]) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$7(document.sp, company.cr, company.la, company.cf) + "</td>\n </tr>" : "", document.tx != 0 ? "<tr>\n <td width=\"22%\">" + (taxName1 + taxIncluded1 + "(" + document.tp + "%)") + "</td>\n <td class=\"text-right\" width=\"22%\">" + ((document.t1d ? "(" : "") + FormatCurrency$7(document.tx, company.cr, company.la, company.cf) + (document.t1d ? ")" : "")) + "</td>\n </tr>" : "", document.ttx && document.tx2 != 0 ? "<tr>\n <td width=\"22%\">" + (taxName2 + taxIncluded2 + "(" + document.tp2 + "%)") + "</td>\n <td class=\"text-right\" width=\"22%\">" + ((document.t2d ? "(" : "") + FormatCurrency$7(document.tx2, company.cr, company.la, company.cf) + (document.t2d ? ")" : "")) + "</td>\n </tr>" : "", document.sp && document.sntx ? "<tr>\n <td width=\"22%\">" + (company.r_sp ? company.r_sp : defaultLang["shipping"]) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$7(document.sp, company.cr, company.la, company.cf) + "</td>\n </tr>" : "", document.ti && !document.t1d && !document.t2d ? "<tr>\n <td width=\"22%\" style=\"border-top: 1px solid #E5E7EB\">" + (company.r_n ? company.r_n : defaultLang["net"]) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-top: 1px solid #E5E7EB\">" + FormatCurrency$7(document.tt - (document.tx || 0) - (document.tx2 || 0), company.cr, company.la, company.cf) + "</td>\n </tr>" : "", document.ty == 1 || document.ty !== 1 && (document.t1d || document.ttx && document.tx2 > 0 && document.t2d) ? "<tr>\n <td width=\"22%\">" + (company.r_tt ? company.r_tt : defaultLang["total"]) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$7(document.tt ? document.tt : 0, company.cr, company.la, company.cf) + "</td>\n </tr>" : "", document.sca ? "<tr>\n <td width=\"22%\">" + defaultLang["credit_card_surcharge"] + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$7(document.sca, company.cr, company.la, company.cf) + "</td>\n </tr>" : "", document.hangingAmount && document.hangingAmount > 0 ? "<tr>\n <td width=\"22%\" style=\"border-top: 1px solid #E5E7EB\">" + (company.payment_in_progress ? company.payment_in_progress : defaultLang.payment_in_progress) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-top: 1px solid #E5E7EB\">" + FormatCurrency$7(document.hangingAmount || 0, company.cr, company.la, company.cf) + "</td>\n </tr>" : "", document.ty == 1 && document.pma && document.pm ? paymentContainer : "", document.ty == 1 && isDeposit && document.depositAmount > 0 ? "\n <tr>\n <td width=\"22%\" style=\"border-top: 1px solid #E5E7EB\">" + (document.ty == 1 ? company.r_ad ? company.r_ad : defaultLang["amount_due"] : company.r_gt ? company.r_gt : defaultLang["grand_total"]) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-top: 1px solid #E5E7EB\">" + FormatCurrency$7(document.ad - (document.hangingAmount || 0), company.cr, company.la, company.cf) + "</td>\n </tr>" : "");
|
|
12540
12544
|
};
|
|
12541
12545
|
|
|
12542
12546
|
var _templateObject$q;
|
|
@@ -12568,7 +12572,7 @@ var InvoicePrice$1 = function InvoicePrice(_ref) {
|
|
|
12568
12572
|
return html$p(_templateObject$q || (_templateObject$q = _taggedTemplateLiteralLoose(["\n <!-- begin invoice-price -->\n <table\n class=\"table table-borderless table-small invoice-price page-not-break\"\n style=\"margin-bottom: 40px;\"\n >\n <tbody>\n <tr>\n <td class=\"d-none d-md-table-cell invoice-price-left text-right\">\n <!-- begin bookipay payment -->\n <div class=\"d-none d-md-block\">", "</div>\n <!-- end bookipay payment -->\n </td>\n <td width=\"22%\" class=\"invoice-price-right\">\n <span class=\"price-title\"\n >", "\n ", "</span\n >\n <span class=\"price-amount\"\n >", "</span\n >\n </td>\n </tr>\n </tbody>\n </table>\n <!-- end invoice-price -->\n "])), bookipayLinkComponent, document.ty == 1 && isDeposit && document.depositAmount > 0 ? company.r_deposit_due ? company.r_deposit_due : defaultLang["deposit_due"] : document.ty == 1 ? company.r_ad ? company.r_ad : defaultLang["amount_due"] : company.r_gt ? company.r_gt : defaultLang["grand_total"], document.ty == 1 && isDeposit && document.depositAmount > 0 && document.depositDue !== null ? "| " + formatDate(document.depositDue) : "", document.ty == 1 && isDeposit && document.depositAmount > 0 ? FormatCurrency$8(document.depositAmount, company.cr, company.la, company.cf) : FormatCurrency$8(document.ad - (document.hangingAmount || 0), company.cr, company.la, company.cf));
|
|
12569
12573
|
};
|
|
12570
12574
|
|
|
12571
|
-
var _templateObject$r, _templateObject2$
|
|
12575
|
+
var _templateObject$r, _templateObject2$d, _templateObject3$7;
|
|
12572
12576
|
var html$q = String.raw;
|
|
12573
12577
|
var ClientSignatureContainer$1 = function ClientSignatureContainer(_ref) {
|
|
12574
12578
|
var customer = _ref.customer,
|
|
@@ -12577,10 +12581,10 @@ var ClientSignatureContainer$1 = function ClientSignatureContainer(_ref) {
|
|
|
12577
12581
|
formatDate = _ref.formatDate,
|
|
12578
12582
|
signItIntegration = _ref.signItIntegration;
|
|
12579
12583
|
if (!(document !== null && document !== void 0 && document.cs) && !customerSignBase64) return "";
|
|
12580
|
-
return html$q(_templateObject$r || (_templateObject$r = _taggedTemplateLiteralLoose([" <div class=\"col-6\" style=\"text-align: center\">\n <strong class=\"signature-name\">", "</strong>\n <div\n id=\"client_signature_parent\"\n style=\"height:100px;border-bottom:2px solid #dee2e6; margin-right:40px; margin-left:40px\"\n >\n ", "\n </div>\n <div id=\"client_date_signature\" class=\"signature-date\">\n ", "\n </div>\n </div>"])), customer ? customer.c : "", customerSignBase64 ? html$q(_templateObject2$
|
|
12584
|
+
return html$q(_templateObject$r || (_templateObject$r = _taggedTemplateLiteralLoose([" <div class=\"col-6\" style=\"text-align: center\">\n <strong class=\"signature-name\">", "</strong>\n <div\n id=\"client_signature_parent\"\n style=\"height:100px;border-bottom:2px solid #dee2e6; margin-right:40px; margin-left:40px\"\n >\n ", "\n </div>\n <div id=\"client_date_signature\" class=\"signature-date\">\n ", "\n </div>\n </div>"])), customer ? customer.c : "", customerSignBase64 ? html$q(_templateObject2$d || (_templateObject2$d = _taggedTemplateLiteralLoose(["<img\n src=\"", "\"\n class=\"signature-img\"\n onerror=\"this.style.display='none'\"\n />"])), customerSignBase64) : '<div id="signature_link"></div>', customerSignBase64 ? formatDate(new Date()) : signItIntegration ? html$q(_templateObject3$7 || (_templateObject3$7 = _taggedTemplateLiteralLoose(["<a href=\"#client_date_signature\"></a>"]))) : "(   /  /  )");
|
|
12581
12585
|
};
|
|
12582
12586
|
|
|
12583
|
-
var _templateObject$s, _templateObject2$
|
|
12587
|
+
var _templateObject$s, _templateObject2$e;
|
|
12584
12588
|
var html$r = String.raw;
|
|
12585
12589
|
var SignatureContainer$1 = function SignatureContainer(_ref) {
|
|
12586
12590
|
var company = _ref.company,
|
|
@@ -12588,7 +12592,7 @@ var SignatureContainer$1 = function SignatureContainer(_ref) {
|
|
|
12588
12592
|
formatDate = _ref.formatDate,
|
|
12589
12593
|
signatureBase64 = _ref.signatureBase64;
|
|
12590
12594
|
if (!(document !== null && document !== void 0 && document.sd)) return "";
|
|
12591
|
-
return html$r(_templateObject$s || (_templateObject$s = _taggedTemplateLiteralLoose([" <div class=\"col-6\" style=\"text-align: center\">\n <strong class=\"signature-name\">", "</strong>\n <div\n style=\"height:100px;border-bottom:2px solid #dee2e6; margin-right:40px; margin-left:40px\"\n >\n ", "\n </div>\n <div class=\"signature-date\">\n ", "\n </div>\n </div>"])), company ? company.c : "", signatureBase64 ? html$r(_templateObject2$
|
|
12595
|
+
return html$r(_templateObject$s || (_templateObject$s = _taggedTemplateLiteralLoose([" <div class=\"col-6\" style=\"text-align: center\">\n <strong class=\"signature-name\">", "</strong>\n <div\n style=\"height:100px;border-bottom:2px solid #dee2e6; margin-right:40px; margin-left:40px\"\n >\n ", "\n </div>\n <div class=\"signature-date\">\n ", "\n </div>\n </div>"])), company ? company.c : "", signatureBase64 ? html$r(_templateObject2$e || (_templateObject2$e = _taggedTemplateLiteralLoose(["<img\n src=\"", "\"\n class=\"signature-img\"\n onerror=\"this.style.display='none'\"\n />"])), signatureBase64) : "", document.sd ? formatDate(document.sd) : "");
|
|
12592
12596
|
};
|
|
12593
12597
|
|
|
12594
12598
|
var _templateObject$t;
|
|
@@ -12658,7 +12662,9 @@ var invoiceHtmlWithDetailsNew = (function (_ref) {
|
|
|
12658
12662
|
footerBrandText = _ref.footerBrandText,
|
|
12659
12663
|
t = _ref.t,
|
|
12660
12664
|
_ref$showWatermark = _ref.showWatermark,
|
|
12661
|
-
showWatermark = _ref$showWatermark === void 0 ? false : _ref$showWatermark
|
|
12665
|
+
showWatermark = _ref$showWatermark === void 0 ? false : _ref$showWatermark,
|
|
12666
|
+
_ref$showActions = _ref.showActions,
|
|
12667
|
+
showActions = _ref$showActions === void 0 ? false : _ref$showActions;
|
|
12662
12668
|
invoice = sanitize(invoice);
|
|
12663
12669
|
var defaultLang = {
|
|
12664
12670
|
document: t ? t("Document") : lang["Invoice"],
|
|
@@ -12751,7 +12757,8 @@ var invoiceHtmlWithDetailsNew = (function (_ref) {
|
|
|
12751
12757
|
itemWidth: itemWidth,
|
|
12752
12758
|
isDeposit: isDeposit,
|
|
12753
12759
|
lang: lang,
|
|
12754
|
-
t: t
|
|
12760
|
+
t: t,
|
|
12761
|
+
showActions: showActions
|
|
12755
12762
|
}), InvoicePrice$1({
|
|
12756
12763
|
bookipayLink: bookipayLink,
|
|
12757
12764
|
company: company,
|
|
@@ -12822,7 +12829,9 @@ var invoiceHtml = (function (_ref) {
|
|
|
12822
12829
|
showFooterBrand = _ref$showFooterBrand === void 0 ? false : _ref$showFooterBrand,
|
|
12823
12830
|
footerBrandText = _ref.footerBrandText,
|
|
12824
12831
|
_ref$showWatermark = _ref.showWatermark,
|
|
12825
|
-
showWatermark = _ref$showWatermark === void 0 ? false : _ref$showWatermark
|
|
12832
|
+
showWatermark = _ref$showWatermark === void 0 ? false : _ref$showWatermark,
|
|
12833
|
+
_ref$showActions = _ref.showActions,
|
|
12834
|
+
showActions = _ref$showActions === void 0 ? false : _ref$showActions;
|
|
12826
12835
|
var renderInvoice = isNewLayout ? invoiceHtmlWithDetailsNew : invoiceHtmlWithDetails;
|
|
12827
12836
|
return renderInvoice({
|
|
12828
12837
|
invoice: invoice,
|
|
@@ -12841,7 +12850,8 @@ var invoiceHtml = (function (_ref) {
|
|
|
12841
12850
|
footerBrandText: footerBrandText,
|
|
12842
12851
|
signItIntegration: signItIntegration,
|
|
12843
12852
|
t: t,
|
|
12844
|
-
showWatermark: showWatermark
|
|
12853
|
+
showWatermark: showWatermark,
|
|
12854
|
+
showActions: showActions
|
|
12845
12855
|
}).html;
|
|
12846
12856
|
});
|
|
12847
12857
|
|
|
@@ -13018,7 +13028,9 @@ var InvoiceCompatHtml = function InvoiceCompatHtml(_ref) {
|
|
|
13018
13028
|
showFooterBrand = _ref$showFooterBrand === void 0 ? false : _ref$showFooterBrand,
|
|
13019
13029
|
footerBrandText = _ref.footerBrandText,
|
|
13020
13030
|
_ref$showWatermark = _ref.showWatermark,
|
|
13021
|
-
showWatermark = _ref$showWatermark === void 0 ? false : _ref$showWatermark
|
|
13031
|
+
showWatermark = _ref$showWatermark === void 0 ? false : _ref$showWatermark,
|
|
13032
|
+
_ref$showActions = _ref.showActions,
|
|
13033
|
+
showActions = _ref$showActions === void 0 ? false : _ref$showActions;
|
|
13022
13034
|
return invoiceHtml({
|
|
13023
13035
|
invoice: _extends({}, invoice, {
|
|
13024
13036
|
document: InvoiceCompat(invoice.document),
|
|
@@ -13035,7 +13047,8 @@ var InvoiceCompatHtml = function InvoiceCompatHtml(_ref) {
|
|
|
13035
13047
|
isNewLayout: isNewLayout,
|
|
13036
13048
|
showFooterBrand: showFooterBrand,
|
|
13037
13049
|
footerBrandText: footerBrandText,
|
|
13038
|
-
showWatermark: showWatermark
|
|
13050
|
+
showWatermark: showWatermark,
|
|
13051
|
+
showActions: showActions
|
|
13039
13052
|
});
|
|
13040
13053
|
};
|
|
13041
13054
|
|