@bookipi/htmlgenerator 1.5.3-alpha4 → 1.5.3
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 +29 -17
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +29 -17
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -11950,7 +11950,7 @@ var InvoiceContent = function InvoiceContent(_ref) {
|
|
|
11950
11950
|
isDeposit: isDeposit
|
|
11951
11951
|
});
|
|
11952
11952
|
var paymentOn = company.pi && document.ty === 1 && (company.p1 || company.p2 || company.p3 || company.hasPaymentInstructionQRCode) && showPaymentInstructions !== false;
|
|
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:
|
|
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: -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 ";
|
|
11954
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 ? 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
11955
|
};
|
|
11956
11956
|
|
|
@@ -12017,7 +12017,7 @@ var InvoiceBookipayLink = function InvoiceBookipayLink(_ref) {
|
|
|
12017
12017
|
});
|
|
12018
12018
|
if (paymentOn || bookipayLinkComponent) {
|
|
12019
12019
|
var _company$_id;
|
|
12020
|
-
var paymentInstructionDetails = html$a(_templateObject$a || (_templateObject$a = _taggedTemplateLiteralLoose(["\n ", "\n ", "\n <span style=\"white-space: pre-line; margin-top:
|
|
12020
|
+
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
12021
|
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
12022
|
}
|
|
12023
12023
|
return "";
|
|
@@ -12484,11 +12484,12 @@ var PaymentContainer$1 = function PaymentContainer(_ref) {
|
|
|
12484
12484
|
return paymentContainer;
|
|
12485
12485
|
};
|
|
12486
12486
|
|
|
12487
|
-
var _templateObject$p;
|
|
12487
|
+
var _templateObject$p, _templateObject2$c, _templateObject3$6;
|
|
12488
12488
|
var FormatCurrency$7 = util.FormatCurrency;
|
|
12489
12489
|
var html$o = String.raw;
|
|
12490
|
+
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
12491
|
var InvoiceContent$1 = function InvoiceContent(_ref) {
|
|
12491
|
-
var _company$_id;
|
|
12492
|
+
var _company$_id, _company$p;
|
|
12492
12493
|
var company = _ref.company,
|
|
12493
12494
|
defaultLang = _ref.defaultLang,
|
|
12494
12495
|
document = _ref.document,
|
|
@@ -12497,6 +12498,7 @@ var InvoiceContent$1 = function InvoiceContent(_ref) {
|
|
|
12497
12498
|
isDeposit = _ref.isDeposit,
|
|
12498
12499
|
lang = _ref.lang,
|
|
12499
12500
|
showPaymentInstructions = _ref.showPaymentInstructions,
|
|
12501
|
+
showActions = _ref.showActions,
|
|
12500
12502
|
t = _ref.t;
|
|
12501
12503
|
var _getTaxDetails = getTaxDetails(document, company, {
|
|
12502
12504
|
included: defaultLang.included
|
|
@@ -12534,9 +12536,10 @@ var InvoiceContent$1 = function InvoiceContent(_ref) {
|
|
|
12534
12536
|
document: document,
|
|
12535
12537
|
isDeposit: isDeposit
|
|
12536
12538
|
});
|
|
12537
|
-
var
|
|
12538
|
-
var
|
|
12539
|
-
|
|
12539
|
+
var hasInstructions = company.pi && document.ty === 1 && (company.p1 || company.p2 || company.p3 || company.hasPaymentInstructionQRCode);
|
|
12540
|
+
var paymentOn = hasInstructions && showPaymentInstructions !== false;
|
|
12541
|
+
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 ";
|
|
12542
|
+
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
12543
|
};
|
|
12541
12544
|
|
|
12542
12545
|
var _templateObject$q;
|
|
@@ -12568,7 +12571,7 @@ var InvoicePrice$1 = function InvoicePrice(_ref) {
|
|
|
12568
12571
|
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
12572
|
};
|
|
12570
12573
|
|
|
12571
|
-
var _templateObject$r, _templateObject2$
|
|
12574
|
+
var _templateObject$r, _templateObject2$d, _templateObject3$7;
|
|
12572
12575
|
var html$q = String.raw;
|
|
12573
12576
|
var ClientSignatureContainer$1 = function ClientSignatureContainer(_ref) {
|
|
12574
12577
|
var customer = _ref.customer,
|
|
@@ -12577,10 +12580,10 @@ var ClientSignatureContainer$1 = function ClientSignatureContainer(_ref) {
|
|
|
12577
12580
|
formatDate = _ref.formatDate,
|
|
12578
12581
|
signItIntegration = _ref.signItIntegration;
|
|
12579
12582
|
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$
|
|
12583
|
+
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
12584
|
};
|
|
12582
12585
|
|
|
12583
|
-
var _templateObject$s, _templateObject2$
|
|
12586
|
+
var _templateObject$s, _templateObject2$e;
|
|
12584
12587
|
var html$r = String.raw;
|
|
12585
12588
|
var SignatureContainer$1 = function SignatureContainer(_ref) {
|
|
12586
12589
|
var company = _ref.company,
|
|
@@ -12588,7 +12591,7 @@ var SignatureContainer$1 = function SignatureContainer(_ref) {
|
|
|
12588
12591
|
formatDate = _ref.formatDate,
|
|
12589
12592
|
signatureBase64 = _ref.signatureBase64;
|
|
12590
12593
|
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$
|
|
12594
|
+
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
12595
|
};
|
|
12593
12596
|
|
|
12594
12597
|
var _templateObject$t;
|
|
@@ -12658,7 +12661,9 @@ var invoiceHtmlWithDetailsNew = (function (_ref) {
|
|
|
12658
12661
|
footerBrandText = _ref.footerBrandText,
|
|
12659
12662
|
t = _ref.t,
|
|
12660
12663
|
_ref$showWatermark = _ref.showWatermark,
|
|
12661
|
-
showWatermark = _ref$showWatermark === void 0 ? false : _ref$showWatermark
|
|
12664
|
+
showWatermark = _ref$showWatermark === void 0 ? false : _ref$showWatermark,
|
|
12665
|
+
_ref$showActions = _ref.showActions,
|
|
12666
|
+
showActions = _ref$showActions === void 0 ? false : _ref$showActions;
|
|
12662
12667
|
invoice = sanitize(invoice);
|
|
12663
12668
|
var defaultLang = {
|
|
12664
12669
|
document: t ? t("Document") : lang["Invoice"],
|
|
@@ -12751,7 +12756,8 @@ var invoiceHtmlWithDetailsNew = (function (_ref) {
|
|
|
12751
12756
|
itemWidth: itemWidth,
|
|
12752
12757
|
isDeposit: isDeposit,
|
|
12753
12758
|
lang: lang,
|
|
12754
|
-
t: t
|
|
12759
|
+
t: t,
|
|
12760
|
+
showActions: showActions
|
|
12755
12761
|
}), InvoicePrice$1({
|
|
12756
12762
|
bookipayLink: bookipayLink,
|
|
12757
12763
|
company: company,
|
|
@@ -12822,7 +12828,9 @@ var invoiceHtml = (function (_ref) {
|
|
|
12822
12828
|
showFooterBrand = _ref$showFooterBrand === void 0 ? false : _ref$showFooterBrand,
|
|
12823
12829
|
footerBrandText = _ref.footerBrandText,
|
|
12824
12830
|
_ref$showWatermark = _ref.showWatermark,
|
|
12825
|
-
showWatermark = _ref$showWatermark === void 0 ? false : _ref$showWatermark
|
|
12831
|
+
showWatermark = _ref$showWatermark === void 0 ? false : _ref$showWatermark,
|
|
12832
|
+
_ref$showActions = _ref.showActions,
|
|
12833
|
+
showActions = _ref$showActions === void 0 ? false : _ref$showActions;
|
|
12826
12834
|
var renderInvoice = isNewLayout ? invoiceHtmlWithDetailsNew : invoiceHtmlWithDetails;
|
|
12827
12835
|
return renderInvoice({
|
|
12828
12836
|
invoice: invoice,
|
|
@@ -12841,7 +12849,8 @@ var invoiceHtml = (function (_ref) {
|
|
|
12841
12849
|
footerBrandText: footerBrandText,
|
|
12842
12850
|
signItIntegration: signItIntegration,
|
|
12843
12851
|
t: t,
|
|
12844
|
-
showWatermark: showWatermark
|
|
12852
|
+
showWatermark: showWatermark,
|
|
12853
|
+
showActions: showActions
|
|
12845
12854
|
}).html;
|
|
12846
12855
|
});
|
|
12847
12856
|
|
|
@@ -13018,7 +13027,9 @@ var InvoiceCompatHtml = function InvoiceCompatHtml(_ref) {
|
|
|
13018
13027
|
showFooterBrand = _ref$showFooterBrand === void 0 ? false : _ref$showFooterBrand,
|
|
13019
13028
|
footerBrandText = _ref.footerBrandText,
|
|
13020
13029
|
_ref$showWatermark = _ref.showWatermark,
|
|
13021
|
-
showWatermark = _ref$showWatermark === void 0 ? false : _ref$showWatermark
|
|
13030
|
+
showWatermark = _ref$showWatermark === void 0 ? false : _ref$showWatermark,
|
|
13031
|
+
_ref$showActions = _ref.showActions,
|
|
13032
|
+
showActions = _ref$showActions === void 0 ? false : _ref$showActions;
|
|
13022
13033
|
return invoiceHtml({
|
|
13023
13034
|
invoice: _extends({}, invoice, {
|
|
13024
13035
|
document: InvoiceCompat(invoice.document),
|
|
@@ -13035,7 +13046,8 @@ var InvoiceCompatHtml = function InvoiceCompatHtml(_ref) {
|
|
|
13035
13046
|
isNewLayout: isNewLayout,
|
|
13036
13047
|
showFooterBrand: showFooterBrand,
|
|
13037
13048
|
footerBrandText: footerBrandText,
|
|
13038
|
-
showWatermark: showWatermark
|
|
13049
|
+
showWatermark: showWatermark,
|
|
13050
|
+
showActions: showActions
|
|
13039
13051
|
});
|
|
13040
13052
|
};
|
|
13041
13053
|
|