@bookipi/htmlgenerator 1.5.9-alpha3 → 1.5.10-alpha1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +87 -94
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +87 -94
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
- package/dist/watermark~rKbOnEXj.svg +0 -11
package/dist/index.js
CHANGED
|
@@ -8975,12 +8975,6 @@ var getTaxDetails = function getTaxDetails(document, company, defaultLang) {
|
|
|
8975
8975
|
taxIncluded2: taxIncluded2
|
|
8976
8976
|
};
|
|
8977
8977
|
};
|
|
8978
|
-
var getNumRowsPaymentInstruction = function getNumRowsPaymentInstruction(_ref3) {
|
|
8979
|
-
var _document$pm;
|
|
8980
|
-
var document = _ref3.document,
|
|
8981
|
-
isDeposit = _ref3.isDeposit;
|
|
8982
|
-
return (1 + (document.dc ? 1 : 0) + (document.sp && !document.sntx ? 1 : 0) + (document.tx != 0 ? 1 : 0) + (document.ttx && document.tx2 != 0 ? 1 : 0) + (document.sp && document.sntx ? 1 : 0) + (document.ti ? 1 : 0) + (document.ty == 1 || document.ty !== 1 && (document.t1d || document.ttx && document.tx2 > 0 && document.t2d) ? 1 : 0) + (document.sca ? 1 : 0) + (((_document$pm = document.pm) === null || _document$pm === void 0 ? void 0 : _document$pm.length) || 0) + (document.hangingAmount && document.hangingAmount > 0 ? 1 : 0) + (document.ty == 1 && isDeposit && document.depositAmount > 0 ? 1 : 0)).toString();
|
|
8983
|
-
};
|
|
8984
8978
|
var getLogoPath = function getLogoPath(_ref4) {
|
|
8985
8979
|
var company = _ref4.company,
|
|
8986
8980
|
invoice = _ref4.invoice,
|
|
@@ -11843,7 +11837,6 @@ var _templateObject$7;
|
|
|
11843
11837
|
var FormatCurrency$3 = util.FormatCurrency;
|
|
11844
11838
|
var html$7 = String.raw;
|
|
11845
11839
|
var InvoiceContent = function InvoiceContent(_ref) {
|
|
11846
|
-
var _company$_id;
|
|
11847
11840
|
var company = _ref.company,
|
|
11848
11841
|
defaultLang = _ref.defaultLang,
|
|
11849
11842
|
document = _ref.document,
|
|
@@ -11851,8 +11844,7 @@ var InvoiceContent = function InvoiceContent(_ref) {
|
|
|
11851
11844
|
itemWidth = _ref.itemWidth,
|
|
11852
11845
|
isDeposit = _ref.isDeposit,
|
|
11853
11846
|
lang = _ref.lang,
|
|
11854
|
-
t = _ref.t
|
|
11855
|
-
showPaymentInstructions = _ref.showPaymentInstructions;
|
|
11847
|
+
t = _ref.t;
|
|
11856
11848
|
var _getTaxDetails = getTaxDetails(document, company, {
|
|
11857
11849
|
included: defaultLang.included
|
|
11858
11850
|
}),
|
|
@@ -11885,13 +11877,7 @@ var InvoiceContent = function InvoiceContent(_ref) {
|
|
|
11885
11877
|
lang: lang,
|
|
11886
11878
|
t: t
|
|
11887
11879
|
});
|
|
11888
|
-
|
|
11889
|
-
document: document,
|
|
11890
|
-
isDeposit: isDeposit
|
|
11891
|
-
});
|
|
11892
|
-
var paymentOn = company.pi && document.ty === 1 && (company.p1 || company.p2 || company.p3 || company.hasPaymentInstructionQRCode) && showPaymentInstructions !== false;
|
|
11893
|
-
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=" + (company === null || company === void 0 ? void 0 : company.updatedAt) + "\"\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 ";
|
|
11894
|
-
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 width=\"50%\"\n rowspan=\"", "\"\n >\n ", "\n </td>\n <td style=\"padding: 0;\">\n <table class=\"table table-borderless table-small\">\n <tr>\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 </table>\n </td>\n </tr>\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>" : "");
|
|
11880
|
+
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 width=\"50%\"\n >\n </td>\n <td style=\"padding: 0;\">\n <table class=\"table table-borderless table-small\">\n <tr>\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 </table>\n </td>\n </tr>\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, 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>" : "");
|
|
11895
11881
|
};
|
|
11896
11882
|
|
|
11897
11883
|
var _templateObject$8, _templateObject2$3;
|
|
@@ -11937,17 +11923,15 @@ var InvoicePrice = function InvoicePrice(_ref) {
|
|
|
11937
11923
|
return html$9(_templateObject$9 || (_templateObject$9 = _taggedTemplateLiteralLoose(["\n <!-- begin invoice-price -->\n <div class=\"invoice-price page-not-break\">\n <div class=\"invoice-price-left text-right\">\n <!-- begin bookipay payment -->\n <div class=\"d-none d-md-block\">", "</div>\n <!-- end bookipay payment -->\n </div>\n <div class=\"invoice-price-right\">\n <small\n >", "\n ", "</small\n >\n <span class=\"f-w-600 mt-3\"\n >", "</span\n >\n </div>\n </div>\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$4(document.depositAmount, company.cr, company.la, company.cf) : FormatCurrency$4(document.ad - (document.hangingAmount || 0), company.cr, company.la, company.cf));
|
|
11938
11924
|
};
|
|
11939
11925
|
|
|
11940
|
-
var _templateObject$a
|
|
11926
|
+
var _templateObject$a;
|
|
11941
11927
|
var html$a = String.raw;
|
|
11942
11928
|
var InvoiceBookipayLink = function InvoiceBookipayLink(_ref) {
|
|
11943
11929
|
var company = _ref.company,
|
|
11944
11930
|
defaultLang = _ref.defaultLang,
|
|
11945
11931
|
document = _ref.document,
|
|
11946
11932
|
bookipayLink = _ref.bookipayLink,
|
|
11947
|
-
hidePayBtnInScreen = _ref.hidePayBtnInScreen
|
|
11948
|
-
showPaymentInstructions = _ref.showPaymentInstructions;
|
|
11933
|
+
hidePayBtnInScreen = _ref.hidePayBtnInScreen;
|
|
11949
11934
|
var surcharge = company.sc && company.sr || 0;
|
|
11950
|
-
var paymentOn = company.pi && document.ty === 1 && (company.p1 || company.p2 || company.p3 || company.hasPaymentInstructionQRCode) && showPaymentInstructions !== false;
|
|
11951
11935
|
var bookipayLinkComponent = BookipayLinkContainer({
|
|
11952
11936
|
document: document,
|
|
11953
11937
|
bookipayLink: bookipayLink,
|
|
@@ -11955,24 +11939,22 @@ var InvoiceBookipayLink = function InvoiceBookipayLink(_ref) {
|
|
|
11955
11939
|
surcharge: surcharge,
|
|
11956
11940
|
defaultLang: defaultLang
|
|
11957
11941
|
});
|
|
11958
|
-
if (
|
|
11959
|
-
|
|
11960
|
-
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>" : "");
|
|
11961
|
-
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>" : "");
|
|
11942
|
+
if (bookipayLinkComponent) {
|
|
11943
|
+
return html$a(_templateObject$a || (_templateObject$a = _taggedTemplateLiteralLoose(["<!-- begin invoice-payment-link -->\n <div class=\"invoice-body\">\n <div class=\"d-block d-md-none\">\n ", "\n </div>\n </div>\n <!-- end invoice-payment-link -->"])), bookipayLinkComponent ? "<div class=\"mt-4\">" + bookipayLinkComponent + "</div>" : "");
|
|
11962
11944
|
}
|
|
11963
11945
|
return "";
|
|
11964
11946
|
};
|
|
11965
11947
|
|
|
11966
|
-
var _templateObject$b, _templateObject2$
|
|
11948
|
+
var _templateObject$b, _templateObject2$4, _templateObject3$2;
|
|
11967
11949
|
var html$b = String.raw;
|
|
11968
11950
|
var InvoiceNote = function InvoiceNote(_ref) {
|
|
11969
11951
|
var company = _ref.company,
|
|
11970
11952
|
defaultLang = _ref.defaultLang,
|
|
11971
11953
|
document = _ref.document;
|
|
11972
|
-
return "<!-- begin invoice-note -->" + (document.noteHtml ? html$b(_templateObject$b || (_templateObject$b = _taggedTemplateLiteralLoose(["<div class=\"mt-1\">", "</div>"])), document.noteHtml) : "\n " + (document.nt ? html$b(_templateObject2$
|
|
11954
|
+
return "<!-- begin invoice-note -->" + (document.noteHtml ? html$b(_templateObject$b || (_templateObject$b = _taggedTemplateLiteralLoose(["<div class=\"mt-1\">", "</div>"])), document.noteHtml) : "\n " + (document.nt ? html$b(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteralLoose(["<div class=\"mt-1\">\n <h2>", "</h2>\n ", "\n </div>"])), company.r_nt ? company.r_nt : defaultLang["note"], nl2br(document.nt)) : "") + "\n " + (document.tc ? html$b(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteralLoose(["<div class=\"mt-1\">\n <h2>", "</h2>\n ", "\n </div>"])), company.r_tc ? company.r_tc : defaultLang["terms"], nl2br(document.tc)) : "")) + "<!-- end invoice-note -->";
|
|
11973
11955
|
};
|
|
11974
11956
|
|
|
11975
|
-
var _templateObject$c, _templateObject2$
|
|
11957
|
+
var _templateObject$c, _templateObject2$5, _templateObject3$3;
|
|
11976
11958
|
var html$c = String.raw;
|
|
11977
11959
|
var ClientSignatureContainer = function ClientSignatureContainer(_ref) {
|
|
11978
11960
|
var customer = _ref.customer,
|
|
@@ -11981,10 +11963,10 @@ var ClientSignatureContainer = function ClientSignatureContainer(_ref) {
|
|
|
11981
11963
|
formatDate = _ref.formatDate,
|
|
11982
11964
|
signItIntegration = _ref.signItIntegration;
|
|
11983
11965
|
if (!(document !== null && document !== void 0 && document.cs) && !customerSignBase64) return "";
|
|
11984
|
-
return html$c(_templateObject$c || (_templateObject$c = _taggedTemplateLiteralLoose([" <div class=\"col-6\" style=\"text-align: center\">\n <strong>", "</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\" style=\"font-size:16px\">\n ", "\n </div>\n </div>"])), customer ? customer.c : "", customerSignBase64 ? html$c(_templateObject2$
|
|
11966
|
+
return html$c(_templateObject$c || (_templateObject$c = _taggedTemplateLiteralLoose([" <div class=\"col-6\" style=\"text-align: center\">\n <strong>", "</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\" style=\"font-size:16px\">\n ", "\n </div>\n </div>"])), customer ? customer.c : "", customerSignBase64 ? html$c(_templateObject2$5 || (_templateObject2$5 = _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$c(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteralLoose(["<a href=\"#client_date_signature\"></a>"]))) : "(   /  /  )");
|
|
11985
11967
|
};
|
|
11986
11968
|
|
|
11987
|
-
var _templateObject$d, _templateObject2$
|
|
11969
|
+
var _templateObject$d, _templateObject2$6;
|
|
11988
11970
|
var html$d = String.raw;
|
|
11989
11971
|
var SignatureContainer = function SignatureContainer(_ref) {
|
|
11990
11972
|
var company = _ref.company,
|
|
@@ -11992,7 +11974,7 @@ var SignatureContainer = function SignatureContainer(_ref) {
|
|
|
11992
11974
|
formatDate = _ref.formatDate,
|
|
11993
11975
|
signatureBase64 = _ref.signatureBase64;
|
|
11994
11976
|
if (!(document !== null && document !== void 0 && document.sd)) return "";
|
|
11995
|
-
return html$d(_templateObject$d || (_templateObject$d = _taggedTemplateLiteralLoose([" <div class=\"col-6\" style=\"text-align: center\">\n <strong>", "</strong>\n <div\n style=\"height:100px;border-bottom:2px solid #dee2e6; margin-right:40px; margin-left:40px\"\n >\n ", "\n </div>\n <div style=\"font-size:16px\">\n ", "\n </div>\n </div>"])), company ? company.c : "", signatureBase64 ? html$d(_templateObject2$
|
|
11977
|
+
return html$d(_templateObject$d || (_templateObject$d = _taggedTemplateLiteralLoose([" <div class=\"col-6\" style=\"text-align: center\">\n <strong>", "</strong>\n <div\n style=\"height:100px;border-bottom:2px solid #dee2e6; margin-right:40px; margin-left:40px\"\n >\n ", "\n </div>\n <div style=\"font-size:16px\">\n ", "\n </div>\n </div>"])), company ? company.c : "", signatureBase64 ? html$d(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteralLoose(["<img\n src=\"", "\"\n class=\"signature-img\"\n onerror=\"this.style.display='none'\"\n />"])), signatureBase64) : "", document.sd ? formatDate(document.sd) : "");
|
|
11996
11978
|
};
|
|
11997
11979
|
|
|
11998
11980
|
var _templateObject$e;
|
|
@@ -12031,7 +12013,7 @@ var InvoiceSignature = function InvoiceSignature(_ref) {
|
|
|
12031
12013
|
return html$e(_templateObject$e || (_templateObject$e = _taggedTemplateLiteralLoose(["<!-- begin invoice-signature -->\n <div class=\"seperate-line\"></div>\n <div>", "</div>\n <div class=\"row mt-1\">\n ", " ", "\n </div>\n <!-- end invoice-signature -->"])), company.r_bs || defaultLang["by_signing"] || "", signatureContainer || "", clientSignature || "");
|
|
12032
12014
|
};
|
|
12033
12015
|
|
|
12034
|
-
var _templateObject$f, _templateObject2$
|
|
12016
|
+
var _templateObject$f, _templateObject2$7;
|
|
12035
12017
|
var html$f = String.raw;
|
|
12036
12018
|
var InvoiceAttachments = function InvoiceAttachments(_ref) {
|
|
12037
12019
|
var attachments = _ref.attachments;
|
|
@@ -12043,7 +12025,7 @@ var InvoiceAttachments = function InvoiceAttachments(_ref) {
|
|
|
12043
12025
|
} else {
|
|
12044
12026
|
return "";
|
|
12045
12027
|
}
|
|
12046
|
-
return html$f(_templateObject2$
|
|
12028
|
+
return html$f(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteralLoose(["<!-- begin invoice-attachments -->\n <div style=\"text-align: center\">", "</div>\n <!-- end invoice-attachments -->"])), attachmentContainer);
|
|
12047
12029
|
};
|
|
12048
12030
|
|
|
12049
12031
|
var _templateObject$g;
|
|
@@ -12065,7 +12047,23 @@ var BookipayBrandFooter = function BookipayBrandFooter(_ref) {
|
|
|
12065
12047
|
return html$g(_templateObject$g || (_templateObject$g = _taggedTemplateLiteralLoose(["<div\n class=\"print-footer\"\n style=\"background-color:#EBF5FF;padding:16px;display:flex;justify-content:space-between;align-items:center;position:fixed;bottom:0;left:0;right:0;\"\n >\n <div style=\"display: flex;color:black;flex:1;align-items:center;\">\n ", "\n ", "\n </div>\n ", "\n ", "\n </div>"])), logoUrl ? "<img alt=\"brand logo\" style=\"max-height:24px;margin-right:16px;\" src=\"" + logoUrl + "\" />" : "", t ? t(title) : title, cta !== null && cta !== void 0 && cta.label && cta !== null && cta !== void 0 && cta.url ? "<a class=\"btn-url\" href=\"" + cta.url + "\" style=\"color:#1C64F2;line-height:2;\" target=\"blank\">" + (t ? t(cta.label) : cta.label) + "</a>" : "", cta !== null && cta !== void 0 && cta.label && cta !== null && cta !== void 0 && cta.action ? "<span class=\"btn-url\" onclick=\"window.postMessage({ type: '" + (cta === null || cta === void 0 ? void 0 : cta.action) + "' }, '*')\" style=\"color:#1C64F2;line-height:2;font-weight:600;\">" + (t ? t(cta.label) : cta.label) + "</span>" : "");
|
|
12066
12048
|
};
|
|
12067
12049
|
|
|
12068
|
-
var _templateObject$h;
|
|
12050
|
+
var _templateObject$h, _templateObject2$8, _templateObject3$4;
|
|
12051
|
+
var html$h = String.raw;
|
|
12052
|
+
var plusSvg = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M10.8333 1.67981C10.8333 1.65789 10.8333 1.64693 10.8324 1.62706C10.8127 1.21558 10.4509 0.853896 10.0394 0.834429C10.0195 0.83349 10.013 0.833492 10 0.833497H7.29888C6.6281 0.833488 6.07446 0.83348 5.62348 0.870327C5.15507 0.908598 4.72448 0.990735 4.32003 1.19681C3.69283 1.51639 3.18289 2.02632 2.86331 2.65353C2.65724 3.05798 2.5751 3.48856 2.53683 3.95698C2.49998 4.40797 2.49999 4.9616 2.5 5.63239V14.3679C2.49999 15.0387 2.49998 15.5924 2.53683 16.0434C2.5751 16.5118 2.65724 16.9424 2.86331 17.3468C3.18289 17.974 3.69283 18.4839 4.32003 18.8035C4.72448 19.0096 5.15507 19.0917 5.62348 19.13C6.07447 19.1669 6.6281 19.1668 7.2989 19.1668H12.7011C13.3719 19.1668 13.9255 19.1669 14.3765 19.13C14.8449 19.0917 15.2755 19.0096 15.68 18.8035C16.3072 18.4839 16.8171 17.974 17.1367 17.3468C17.3428 16.9424 17.4249 16.5118 17.4632 16.0434C17.5 15.5924 17.5 15.0387 17.5 14.3679V8.33345C17.5 8.3205 17.5 8.31403 17.4991 8.29418C17.4796 7.88265 17.1179 7.52076 16.7064 7.50112C16.6865 7.50017 16.6756 7.50017 16.6538 7.50017L12.9734 7.50017C12.7631 7.5002 12.5583 7.50022 12.3848 7.48605C12.1943 7.47049 11.9695 7.43376 11.7434 7.31852C11.4298 7.15873 11.1748 6.90376 11.015 6.59016C10.8997 6.36397 10.863 6.13919 10.8475 5.9487C10.8333 5.77523 10.8333 5.57041 10.8333 5.36009L10.8333 1.67981ZM6.66667 10.8335C6.20643 10.8335 5.83333 11.2066 5.83333 11.6668C5.83333 12.1271 6.20643 12.5002 6.66667 12.5002H13.3333C13.7936 12.5002 14.1667 12.1271 14.1667 11.6668C14.1667 11.2066 13.7936 10.8335 13.3333 10.8335H6.66667ZM6.66667 14.1668C6.20643 14.1668 5.83333 14.5399 5.83333 15.0002C5.83333 15.4604 6.20643 15.8335 6.66667 15.8335H11.6667C12.1269 15.8335 12.5 15.4604 12.5 15.0002C12.5 14.5399 12.1269 14.1668 11.6667 14.1668H6.66667Z\" fill=\"#374151\"/>\n<path d=\"M15.7566 5.83349C16.0013 5.83349 16.1237 5.8335 16.2239 5.77206C16.3654 5.68529 16.45 5.48086 16.4112 5.31944C16.3838 5.20514 16.304 5.12544 16.1444 4.96603L13.3675 2.1891C13.2081 2.02953 13.1284 1.94974 13.0141 1.92227C12.8526 1.88347 12.6482 1.96808 12.5614 2.10961C12.5 2.20983 12.5 2.33218 12.5 2.57686L12.5 5.1668C12.5 5.40014 12.5 5.51682 12.5454 5.60595C12.5854 5.68435 12.6491 5.74809 12.7275 5.78804C12.8166 5.83345 12.9333 5.83345 13.1667 5.83346L15.7566 5.83349Z\" fill=\"#374151\"/>\n</svg>";
|
|
12053
|
+
var PaymentInstructions = function PaymentInstructions(_ref) {
|
|
12054
|
+
var _company$_id, _company$p;
|
|
12055
|
+
var company = _ref.company,
|
|
12056
|
+
defaultLang = _ref.defaultLang,
|
|
12057
|
+
document = _ref.document,
|
|
12058
|
+
showPaymentInstructions = _ref.showPaymentInstructions,
|
|
12059
|
+
showActions = _ref.showActions;
|
|
12060
|
+
var hasInstructions = company.pi && document.ty === 1 && (company.p1 || company.p2 || company.p3 || company.hasPaymentInstructionQRCode);
|
|
12061
|
+
var paymentOn = hasInstructions && showPaymentInstructions !== false;
|
|
12062
|
+
var paymentInstructionDetails = "\n " + (paymentOn ? "<h2 class=\"payment-instruction\">" + (company.r_pi ? company.r_pi : defaultLang["payment_instruction"]) + "</h2>" : "") + "\n <div style=\"display:flex; gap: 24px; margin-bottom: 36px;\">\n " + (company.hasPaymentInstructionQRCode ? "\n <div style=\"padding: 5px; border-color: #D1D5DB; border-width: 1px; border-radius: 8px; width: 200px; height: 200px; border-style: solid;\">\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=" + (company === null || company === void 0 ? void 0 : company.updatedAt)) + "\" />\n </div>" : "") + "\n <div>\n <span style=\"white-space: pre-line; margin-top: -20px; display: block; color: #111928;\">\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 && document.ty === 1 ? html$h(_templateObject$h || (_templateObject$h = _taggedTemplateLiteralLoose(["<button\n class=\"no-print\"\n style=\"margin-top: -50px; color: #1C64F2; font-weight: 500; display: block; background: none;\"\n onclick=\"window.postMessage({ type: 'paymentInstruction' }, '*')\"\n >\n Edit\n </button>"]))) : "") + "\n </div>\n </div>\n ";
|
|
12063
|
+
return html$h(_templateObject2$8 || (_templateObject2$8 = _taggedTemplateLiteralLoose(["<!-- begin payment-instruction -->\n ", "\n ", "\n <!-- end payment-instruction -->"])), paymentOn ? paymentInstructionDetails : "", !hasInstructions && showActions && document.ty === 1 ? html$h(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteralLoose(["<button\n class=\"no-print\"\n style=\"color: #1F2A37; font-weight: 500; display: flex; gap: 9px; background: none; border: 1px solid #E5E7EB; padding: 12px 20px; border-radius: 8px;margin-bottom:36px;\"\n onclick=\"window.postMessage({ type: 'paymentInstruction' }, '*')\"\n >\n ", "Payment instruction\n </button>"])), plusSvg) : "");
|
|
12064
|
+
};
|
|
12065
|
+
|
|
12066
|
+
var _templateObject$i;
|
|
12069
12067
|
var htmlRaw = String.raw;
|
|
12070
12068
|
var invoiceHtmlWithDetails = (function (_ref) {
|
|
12071
12069
|
var invoice = _ref.invoice,
|
|
@@ -12156,7 +12154,7 @@ var invoiceHtmlWithDetails = (function (_ref) {
|
|
|
12156
12154
|
timeZone: timeZone
|
|
12157
12155
|
});
|
|
12158
12156
|
};
|
|
12159
|
-
var html = htmlRaw(_templateObject$
|
|
12157
|
+
var html = htmlRaw(_templateObject$i || (_templateObject$i = _taggedTemplateLiteralLoose(["\n ", "\n ", "\n ", "\n <div id=\"invoice\" class=\"print\">\n ", "\n ", "\n ", "\n ", "\n ", "\n <div class=\"invoice-body\">\n ", "\n </div>\n <div class=\"invoice-body\">\n ", "\n ", "\n ", "\n </div>\n ", "\n </div>\n\n ", "\n "])), Head({
|
|
12160
12158
|
removeHtmlStandardDom: removeHtmlStandardDom,
|
|
12161
12159
|
isOffline: isOffline
|
|
12162
12160
|
}), invoiceStyle({
|
|
@@ -12179,7 +12177,6 @@ var invoiceHtmlWithDetails = (function (_ref) {
|
|
|
12179
12177
|
defaultLang: defaultLang,
|
|
12180
12178
|
document: document,
|
|
12181
12179
|
forceItemUnitPriceDecimal: forceItemUnitPriceDecimal,
|
|
12182
|
-
showPaymentInstructions: document.shouldShowPaymentInstructions,
|
|
12183
12180
|
itemWidth: itemWidth,
|
|
12184
12181
|
isDeposit: isDeposit,
|
|
12185
12182
|
lang: lang,
|
|
@@ -12196,7 +12193,11 @@ var invoiceHtmlWithDetails = (function (_ref) {
|
|
|
12196
12193
|
defaultLang: defaultLang,
|
|
12197
12194
|
document: document,
|
|
12198
12195
|
bookipayLink: bookipayLink,
|
|
12199
|
-
hidePayBtnInScreen: hidePayBtnInScreen
|
|
12196
|
+
hidePayBtnInScreen: hidePayBtnInScreen
|
|
12197
|
+
}), PaymentInstructions({
|
|
12198
|
+
company: company,
|
|
12199
|
+
defaultLang: defaultLang,
|
|
12200
|
+
document: document,
|
|
12200
12201
|
showPaymentInstructions: document.shouldShowPaymentInstructions
|
|
12201
12202
|
}), InvoiceNote({
|
|
12202
12203
|
company: company,
|
|
@@ -12237,8 +12238,8 @@ var getBrightness = function getBrightness(rgb) {
|
|
|
12237
12238
|
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
12238
12239
|
};
|
|
12239
12240
|
|
|
12240
|
-
var _templateObject$
|
|
12241
|
-
var html$
|
|
12241
|
+
var _templateObject$j;
|
|
12242
|
+
var html$i = String.raw;
|
|
12242
12243
|
var invoiceStyle$1 = function invoiceStyle(_ref) {
|
|
12243
12244
|
var isFromReactnative = _ref.isFromReactnative,
|
|
12244
12245
|
signItIntegration = _ref.signItIntegration,
|
|
@@ -12267,11 +12268,11 @@ var invoiceStyle$1 = function invoiceStyle(_ref) {
|
|
|
12267
12268
|
var watermarkText = defaultLang["upgradeRequired"] || "Upgrade required";
|
|
12268
12269
|
var watermarkSvg = "<svg style='width: 100%;' viewBox='0 0 692 405' fill='none' xmlns='http://www.w3.org/2000/svg'>\n<text opacity='0.03' fill='black' xml:space='preserve' style='white-space: pre' font-family='Inter, sans-serif' font-size='45' font-weight='bold' letter-spacing='0em' text-anchor='middle' alignment-baseline='middle'><tspan x='50%' y='50%'>" + watermarkText + "</tspan></text>\n</svg>";
|
|
12269
12270
|
var watermark = "url(\"data:image/svg+xml;utf8, " + encodeURIComponent(watermarkSvg) + "\")";
|
|
12270
|
-
return html$h(_templateObject$i || (_templateObject$i = _taggedTemplateLiteralLoose([" <style>\n * {\n -webkit-print-color-adjust: exact !important;\n color-adjust: exact !important;\n }\n body {\n -webkit-hyphens: auto;\n -ms-hyphens: auto;\n hyphens: auto;\n word-break: break-word;\n line-height: 1.5;\n font-size: ", ";\n font-weight: 400;\n }\n\n table {\n font-size: ", ";\n }\n\n #bookipi-html-generator, #invoice {\n padding: 36px 32px 40px 32px;\n\n ", "\n ", "\n ", "\n\n position: relative;\n z-index: 1;\n }\n\n #invoice:after {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 7px;\n background: ", ";\n }\n\n #invoice::after {\n ", "\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n user-select: none;\n background-image: ", ";\n background-repeat: repeat-y;\n background-position: center;\n background-size: 90%;\n }\n\n .invoice-body {\n margin-bottom: 40px;\n }\n\n /* InvoiceCompany */\n\n .invoice-company {\n font-size: ", ";\n }\n\n .document-name {\n font-size:", ";\n font-weight:700;\n text-transform: uppercase;\n margin-bottom: 30px\n }\n\n .company-name {\n font-size: ", ";\n font-weight: 600;\n margin-bottom: 8px\n }\n\n .company-address {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n color: #6B7280;\n font-weight:400;\n font-size: ", ";\n }\n\n .logo-text-alternative {\n font-size: ", ";\n font-weight: 600;\n text-transformation: none;\n }\n\n /* InvoiceHeader */\n\n .invoice-header {\n border: ", "\n background: ", "; /* 10% opacity */\n\n border-radius: 8px;\n padding: 16px 16px 8px 16px;\n margin-bottom: 40px;\n }\n\n .invoice-header .customer-name {\n font-size: ", ";\n font-weight: 600;\n margin-bottom: 8px\n }\n\n .invoice-header .heading {\n display: inline-block;\n font-size: 12px;\n font-weight: 600;\n line-height: 1.5;\n margin-bottom: 8px;\n }\n\n address {\n margin-bottom: 0;\n }\n\n .invoice-header .address-text {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n font-weight: 400;\n color: #6B7280;\n line-height: 1.5;\n }\n\n .invoice-detail-right {\n display: inline-block;\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n margin-bottom: 16px;\n min-width: 204px;\n }\n\n .invoice-date {\n line-height: 30px;\n }\n\n .invoice-date .label {\n font-size: ", ";\n font-weight: 600;\n line-height: 1.5;\n text-transform: uppercase;\n }\n\n /* InvoiceContent */\n\n .invoice-table-header{\n background: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .invoice-table-header > .table {\n color: ", ";\n }\n\n .invoice-items-head th {\n font-size: ", ";\n }\n\n .item-name {\n color: #000000;\n font-weight: 400;\n font-size: ", ";\n line-height: 1.5;\n }\n\n .item-productcode {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-weight: 400;\n color: #4B5563;\n }\n\n .item-description {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n font-weight: 400;\n color: #475467;\n line-height: 1.5;\n }\n\n .item-detail-cell {\n color: #111928;\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n line-height: 1.5;\n }\n\n .payment-instruction {\n margin-top: 0;\n margin-bottom: 12px;\n font-size: 16px;\n font-weight: 600;\n }\n\n .invoice-price{\n display: table;\n width: 100%\n }\n\n .price-table {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n }\n\n .invoice-price .invoice-price-left,\n .invoice-price .invoice-price-right {\n display: table-cell;\n width: 56%;\n position: relative;\n vertical-align: middle\n }\n\n .invoice-price .invoice-price-row{\n display: table;\n float: left;\n }\n\n .invoice-price .invoice-price-right {\n border-radius: 8px;\n text-align: right;\n vertical-align: bottom;\n font-weight: 300;\n padding: 12px;\n display: flex;\n width: 100%;\n }\n\n .invoice-price .price-title {\n font-size: ", ";\n font-weight: 600;\n float: left;\n text-align: left;\n flex: 1;\n }\n\n .invoice-price .price-amount {\n font-size: ", ";\n font-weight: 600;\n }\n\n .bookipay-payment-pay-btn {\n right: 0;\n width: 220px;\n text-align: center;\n border-radius: 5px;\n font-size: ", ";\n font-weight: 700;\n background: #067EED;\n border: none;\n color: white;\n padding-top: 10px;\n padding-bottom: 10px;\n text-transform: uppercase;\n }\n\n .bookipay-payment-pay-btn:hover {\n background: #0571d6;\n color: #fff;\n }\n\n .invoice-price .invoice-price-right .bookipay-payment-with-span {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n margin-top: 13px;\n margin-bottom: 10px;\n width: 140px;\n right: 0;\n float: right;\n text-align:center;\n }\n\n .invoice-footer {\n border-top: 1px solid #ddd;\n padding-top: 10px;\n font-size: 18px\n }\n\n .note-and-sign {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n }\n\n .signature-name {\n ", "\n ", "\n ", "\n }\n\n .signature-date {\n font-size: ", ";\n }\n\n .invoice-note {\n color: #999;\n margin-top: 80px;\n font-size: ", "\n }\n\n .btn-url:hover {\n cursor: pointer;\n text-decoration: none;\n }\n\n .btn.btn-white, .btn.btn-white.disabled, .btn.btn-white.disabled:focus, .btn.btn-white.disabled:hover, .btn.btn-white[disabled], .btn.btn-white[disabled]:focus, .btn.btn-white[disabled]:hover {\n color: #2d353c;\n background: #fff;\n border-color: #d9dfe3;\n }\n\n .table-inline-block{\n display: inline-block;\n }\n\n .page-not-break {\n page-break-before: auto;\n page-break-after: auto;\n page-break-inside: avoid;\n break-before: auto;\n break-after: auto;\n break-inside: avoid;\n }\n\n @media print {\n table {\n width: 100%;\n border-collapse: collapse;\n }\n tr, td {\n page-break-inside: auto!important;\n }\n td, th {\n word-wrap: break-word;\n white-space: normal;\n }\n .invoice-content {\n page-break-before: auto;\n }\n .col-md-6 {\n -ms-flex: 0 0 50%;\n flex: 0 0 50%;\n max-width: 50%;\n width:50%;\n float:left\n }\n\n .mb-md-0 {margin-bottom:0;}\n .text-md-right{text-align: right;}\n .d-md-table-cell { display: table-cell!important; }\n .d-md-block { display: block !important; }\n .d-md-none {display: none !important;}\n\n .table thead th {\n background-color: ", " !important;\n }\n\n .logo-wrapper {\n order: 2 !important;\n float: right;\n text-align: right;\n }\n\n .document-name-wrapper {\n order: 1 !important;\n }\n\n @page {\n size: A4;\n margin: 0.66cm 0.66cm 0.66cm 0.66cm;\n min-height: 100vh;\n }\n body, page, html {\n width: 100%;\n box-shadow: 0;\n display: block;\n min-height: 100vh;\n }\n .print {\n max-width:100%\n margin: 0 auto 0 auto;\n min-height: 100vh;\n }\n\n .no-print {\n display: none;\n }\n\n #invoice {\n paddingBottom: 60px;\n ", "\n }\n\n .invoice-price .invoice-price-right {\n color: black;\n }\n\n .print-footer {\n page-break-before: always!important;\n position: fixed!important;\n }\n }\n\n .text-left{\n text-align: left;\n }\n .text-center{\n text-align: center;\n }\n .text-right{\n text-align: right;\n }\n .text-uppercase {\n text-transform: uppercase;\n }\n\n @media only screen {\n #invoice {\n ", "\n margin-right:auto;margin-left:auto;\n background-color: white;\n }\n .noInScreen{\n display: none;\n }\n }\n\n .item-last {\n width: 15%;\n }\n\n @media only screen and (max-width: 575.98px) {\n .item-last {\n width: 30%\n }\n #invoice-logo {\n max-width: 100%;\n display: block;\n }\n .invoice-date {\n margin-top:10px;\n }\n }\n\n .table-small td{\n padding: 8px 12px\n }\n\n .surcharge {\n margin-top: 3px;\n font-size: ", ";\n color: #999;\n }\n h2,h3,h4 {margin-top:15px}\n h2 {font-size:22px}\n .card-image {width:45px;}\n .seperate-line{\n border-top: 1px solid #dee2e6;\n margin-top: 20px;\n margin-bottom: 10px;\n }\n\n .signature-img{\n width:220px;\n margin-top:20px;\n max-height: -moz-calc(100% - 20px);\n max-height: -webkit-calc(100% - 20px);\n max-height: -o-cal(100% - 20px);\n max-height: calc(100% - 20px);\n object-fit: contain;\n }\n ", "\n </style>"])), bodyFontSize, bodyFontSize, fontName === "normal" ? "font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;" : "", fontName === "classic" ? "font-family: \"Noto Serif\", \"Noto Serif TC\", serif;" : "", fontName === "round" ? "font-family: \"Quicksand\", sans-serif;" : "", color, showWatermark && 'content: " ";', watermark, heading2FontSize, titleFontSize, headingFontSize, bodyFontSize, heading2FontSize, color === "#ffffff" ? "1px solid #E5E7EB;" : "none;", color === "#ffffff" ? "none" : color + "1A", heading2FontSize, bodyFontSize, subFontSize, color === "#ffffff" ? "#f3f4f6" : color, getHeaderTextColor(color), subFontSize, contentFontSize, contentFontSize, contentFontSize, heading2FontSize, heading2FontSize, fontSize === "medium" ? "17px" : "21px", subFontSize, fontName === "normal" ? "font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;" : "", fontName === "classic" ? "font-family: \"Noto Serif\", \"Noto Serif TC\", serif;" : "", fontName === "round" ? "font-family: \"Quicksand\", sans-serif;" : "", bodyFontSize, fontSize === "medium" ? "85%" : "95%", color === "#ffffff" ? "#f3f4f6" : color, isFromReactnative ? "zoom: 0.8; max-width:calc(38cm - 1.32cm);margin: 0 auto 0 auto;" : "", isFullScreen ? "border-radius: 32px !important; overflow: hidden !important; max-width: 100% !important;" : "margin-top:10px; max-width:22.5cm; border: 1px solid #E5E7EB; border-radius: 4px;", subFontSize, signItIntegration ? "\n #client_signature_parent {\n padding-top: 22.5px\n }\n #signature_link {\n margin-left: 75px;\n margin-top: 0;\n }\n #client_date_signature {\n margin-left: 100px;\n }\n " : "");
|
|
12271
|
+
return html$i(_templateObject$j || (_templateObject$j = _taggedTemplateLiteralLoose([" <style>\n * {\n -webkit-print-color-adjust: exact !important;\n color-adjust: exact !important;\n }\n body {\n -webkit-hyphens: auto;\n -ms-hyphens: auto;\n hyphens: auto;\n word-break: break-word;\n line-height: 1.5;\n font-size: ", ";\n font-weight: 400;\n }\n\n table {\n font-size: ", ";\n }\n\n #bookipi-html-generator, #invoice {\n padding: 36px 32px 40px 32px;\n\n ", "\n ", "\n ", "\n\n position: relative;\n z-index: 1;\n }\n\n #invoice:after {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 7px;\n background: ", ";\n }\n\n #invoice::after {\n ", "\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n user-select: none;\n background-image: ", ";\n background-repeat: repeat-y;\n background-position: center;\n background-size: 90%;\n }\n\n .invoice-body {\n margin-bottom: 40px;\n }\n\n /* InvoiceCompany */\n\n .invoice-company {\n font-size: ", ";\n }\n\n .document-name {\n font-size:", ";\n font-weight:700;\n text-transform: uppercase;\n margin-bottom: 30px\n }\n\n .company-name {\n font-size: ", ";\n font-weight: 600;\n margin-bottom: 8px\n }\n\n .company-address {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n color: #6B7280;\n font-weight:400;\n font-size: ", ";\n }\n\n .logo-text-alternative {\n font-size: ", ";\n font-weight: 600;\n text-transformation: none;\n }\n\n /* InvoiceHeader */\n\n .invoice-header {\n border: ", "\n background: ", "; /* 10% opacity */\n\n border-radius: 8px;\n padding: 16px 16px 8px 16px;\n margin-bottom: 40px;\n }\n\n .invoice-header .customer-name {\n font-size: ", ";\n font-weight: 600;\n margin-bottom: 8px\n }\n\n .invoice-header .heading {\n display: inline-block;\n font-size: 12px;\n font-weight: 600;\n line-height: 1.5;\n margin-bottom: 8px;\n }\n\n address {\n margin-bottom: 0;\n }\n\n .invoice-header .address-text {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n font-weight: 400;\n color: #6B7280;\n line-height: 1.5;\n }\n\n .invoice-detail-right {\n display: inline-block;\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n margin-bottom: 16px;\n min-width: 204px;\n }\n\n .invoice-date {\n line-height: 30px;\n }\n\n .invoice-date .label {\n font-size: ", ";\n font-weight: 600;\n line-height: 1.5;\n text-transform: uppercase;\n }\n\n /* InvoiceContent */\n\n .invoice-table-header{\n background: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .invoice-table-header > .table {\n color: ", ";\n }\n\n .invoice-items-head th {\n font-size: ", ";\n }\n\n .item-name {\n color: #000000;\n font-weight: 400;\n font-size: ", ";\n line-height: 1.5;\n }\n\n .item-productcode {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-weight: 400;\n color: #4B5563;\n }\n\n .item-description {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n font-weight: 400;\n color: #475467;\n line-height: 1.5;\n }\n\n .item-detail-cell {\n color: #111928;\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n line-height: 1.5;\n }\n\n .payment-instruction {\n margin-top: 0;\n margin-bottom: 12px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .invoice-price{\n display: table;\n width: 100%\n }\n\n .price-table {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n }\n\n .invoice-price .invoice-price-left,\n .invoice-price .invoice-price-right {\n display: table-cell;\n width: 56%;\n position: relative;\n vertical-align: middle\n }\n\n .invoice-price .invoice-price-row{\n display: table;\n float: left;\n }\n\n .invoice-price .invoice-price-right {\n border-radius: 8px;\n text-align: right;\n vertical-align: bottom;\n font-weight: 300;\n padding: 12px;\n display: flex;\n width: 100%;\n }\n\n .invoice-price .price-title {\n font-size: ", ";\n font-weight: 600;\n float: left;\n text-align: left;\n flex: 1;\n }\n\n .invoice-price .price-amount {\n font-size: ", ";\n font-weight: 600;\n }\n\n .bookipay-payment-pay-btn {\n right: 0;\n width: 220px;\n text-align: center;\n border-radius: 5px;\n font-size: ", ";\n font-weight: 700;\n background: #067EED;\n border: none;\n color: white;\n padding-top: 10px;\n padding-bottom: 10px;\n text-transform: uppercase;\n }\n\n .bookipay-payment-pay-btn:hover {\n background: #0571d6;\n color: #fff;\n }\n\n .invoice-price .invoice-price-right .bookipay-payment-with-span {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n margin-top: 13px;\n margin-bottom: 10px;\n width: 140px;\n right: 0;\n float: right;\n text-align:center;\n }\n\n .invoice-footer {\n border-top: 1px solid #ddd;\n padding-top: 10px;\n font-size: 18px\n }\n\n .note-and-sign {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n }\n\n .signature-name {\n ", "\n ", "\n ", "\n }\n\n .signature-date {\n font-size: ", ";\n }\n\n .invoice-note {\n color: #999;\n margin-top: 80px;\n font-size: ", "\n }\n\n .btn-url:hover {\n cursor: pointer;\n text-decoration: none;\n }\n\n .btn.btn-white, .btn.btn-white.disabled, .btn.btn-white.disabled:focus, .btn.btn-white.disabled:hover, .btn.btn-white[disabled], .btn.btn-white[disabled]:focus, .btn.btn-white[disabled]:hover {\n color: #2d353c;\n background: #fff;\n border-color: #d9dfe3;\n }\n\n .table-inline-block{\n display: inline-block;\n }\n\n .page-not-break {\n page-break-before: auto;\n page-break-after: auto;\n page-break-inside: avoid;\n break-before: auto;\n break-after: auto;\n break-inside: avoid;\n }\n\n @media print {\n table {\n width: 100%;\n border-collapse: collapse;\n }\n tr, td {\n page-break-inside: auto!important;\n }\n td, th {\n word-wrap: break-word;\n white-space: normal;\n }\n .invoice-content {\n page-break-before: auto;\n }\n .col-md-6 {\n -ms-flex: 0 0 50%;\n flex: 0 0 50%;\n max-width: 50%;\n width:50%;\n float:left\n }\n\n .mb-md-0 {margin-bottom:0;}\n .text-md-right{text-align: right;}\n .d-md-table-cell { display: table-cell!important; }\n .d-md-block { display: block !important; }\n .d-md-none {display: none !important;}\n\n .table thead th {\n background-color: ", " !important;\n }\n\n .logo-wrapper {\n order: 2 !important;\n float: right;\n text-align: right;\n }\n\n .document-name-wrapper {\n order: 1 !important;\n }\n\n @page {\n size: A4;\n margin: 0.66cm 0.66cm 0.66cm 0.66cm;\n min-height: 100vh;\n }\n body, page, html {\n width: 100%;\n box-shadow: 0;\n display: block;\n min-height: 100vh;\n }\n .print {\n max-width:100%\n margin: 0 auto 0 auto;\n min-height: 100vh;\n }\n\n .no-print {\n display: none;\n }\n\n #invoice {\n paddingBottom: 60px;\n ", "\n }\n\n .invoice-price .invoice-price-right {\n color: black;\n }\n\n .print-footer {\n page-break-before: always!important;\n position: fixed!important;\n }\n }\n\n .text-left{\n text-align: left;\n }\n .text-center{\n text-align: center;\n }\n .text-right{\n text-align: right;\n }\n .text-uppercase {\n text-transform: uppercase;\n }\n\n @media only screen {\n #invoice {\n ", "\n margin-right:auto;margin-left:auto;\n background-color: white;\n }\n .noInScreen{\n display: none;\n }\n }\n\n .item-last {\n width: 15%;\n }\n\n @media only screen and (max-width: 575.98px) {\n .item-last {\n width: 30%\n }\n #invoice-logo {\n max-width: 100%;\n display: block;\n }\n .invoice-date {\n margin-top:10px;\n }\n }\n\n .table-small td{\n padding: 8px 12px\n }\n\n .surcharge {\n margin-top: 3px;\n font-size: ", ";\n color: #999;\n }\n h2,h3,h4 {margin-top:15px}\n h2 {font-size:22px}\n .card-image {width:45px;}\n .seperate-line{\n border-top: 1px solid #dee2e6;\n margin-top: 20px;\n margin-bottom: 10px;\n }\n\n .signature-img{\n width:220px;\n margin-top:20px;\n max-height: -moz-calc(100% - 20px);\n max-height: -webkit-calc(100% - 20px);\n max-height: -o-cal(100% - 20px);\n max-height: calc(100% - 20px);\n object-fit: contain;\n }\n ", "\n </style>"])), bodyFontSize, bodyFontSize, fontName === "normal" ? "font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;" : "", fontName === "classic" ? "font-family: \"Noto Serif\", \"Noto Serif TC\", serif;" : "", fontName === "round" ? "font-family: \"Quicksand\", sans-serif;" : "", color, showWatermark && 'content: " ";', watermark, heading2FontSize, titleFontSize, headingFontSize, bodyFontSize, heading2FontSize, color === "#ffffff" ? "1px solid #E5E7EB;" : "none;", color === "#ffffff" ? "none" : color + "1A", heading2FontSize, bodyFontSize, subFontSize, color === "#ffffff" ? "#f3f4f6" : color, getHeaderTextColor(color), subFontSize, contentFontSize, contentFontSize, contentFontSize, heading2FontSize, heading2FontSize, fontSize === "medium" ? "17px" : "21px", subFontSize, fontName === "normal" ? "font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;" : "", fontName === "classic" ? "font-family: \"Noto Serif\", \"Noto Serif TC\", serif;" : "", fontName === "round" ? "font-family: \"Quicksand\", sans-serif;" : "", bodyFontSize, fontSize === "medium" ? "85%" : "95%", color === "#ffffff" ? "#f3f4f6" : color, isFromReactnative ? "zoom: 0.8; max-width:calc(38cm - 1.32cm);margin: 0 auto 0 auto;" : "", isFullScreen ? "border-radius: 32px !important; overflow: hidden !important; max-width: 100% !important;" : "margin-top:10px; max-width:22.5cm; border: 1px solid #E5E7EB; border-radius: 4px;", subFontSize, signItIntegration ? "\n #client_signature_parent {\n padding-top: 22.5px\n }\n #signature_link {\n margin-left: 75px;\n margin-top: 0;\n }\n #client_date_signature {\n margin-left: 100px;\n }\n " : "");
|
|
12271
12272
|
};
|
|
12272
12273
|
|
|
12273
|
-
var _templateObject$
|
|
12274
|
-
var html$
|
|
12274
|
+
var _templateObject$k, _templateObject2$9;
|
|
12275
|
+
var html$j = String.raw;
|
|
12275
12276
|
var LogoContainer$1 = function LogoContainer(_ref) {
|
|
12276
12277
|
var _ref$company = _ref.company,
|
|
12277
12278
|
company = _ref$company === void 0 ? {} : _ref$company,
|
|
@@ -12279,15 +12280,15 @@ var LogoContainer$1 = function LogoContainer(_ref) {
|
|
|
12279
12280
|
logoBase64 = _ref.logoBase64;
|
|
12280
12281
|
var logoContainer = null;
|
|
12281
12282
|
if (logoPath || logoBase64) {
|
|
12282
|
-
logoContainer = html$
|
|
12283
|
+
logoContainer = html$j(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["<img\n src=\"", "\"\n id=\"invoice-logo\"\n class=\"img-fluid float-md-right mb-2 mb-md-0\"\n style=\"border-radius: 10px; width:", "px; height:auto;\"\n />"])), logoPath || logoBase64, company.ls * 2 || 200);
|
|
12283
12284
|
} else if (company.c) {
|
|
12284
|
-
logoContainer = html$
|
|
12285
|
+
logoContainer = html$j(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteralLoose([" <h1 class=\"float-md-right logo-text-alternative\">\n ", "\n </h1>"])), company.c);
|
|
12285
12286
|
}
|
|
12286
12287
|
return logoContainer;
|
|
12287
12288
|
};
|
|
12288
12289
|
|
|
12289
|
-
var _templateObject$
|
|
12290
|
-
var html$
|
|
12290
|
+
var _templateObject$l;
|
|
12291
|
+
var html$k = String.raw;
|
|
12291
12292
|
var InvoiceCompany$1 = function InvoiceCompany(_ref) {
|
|
12292
12293
|
var _invoice$document;
|
|
12293
12294
|
var company = _ref.company,
|
|
@@ -12314,27 +12315,27 @@ var InvoiceCompany$1 = function InvoiceCompany(_ref) {
|
|
|
12314
12315
|
t: t
|
|
12315
12316
|
});
|
|
12316
12317
|
var companyAddress = getCompanyAddress(company);
|
|
12317
|
-
return html$
|
|
12318
|
+
return html$k(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose([" <!-- begin invoice-company -->\n <div class=\"invoice-body\">\n <div class=\"row\">\n <div\n class=\"logo-wrapper col-sm-12 col-md-6 order-sm-1 order-md-2\"\n style=\"padding-top:10px\"\n >\n ", "\n </div>\n <div\n class=\"document-name-wrapper col-sm-12 col-md-6 order-sm-2 order-md-1\"\n >\n <h1 class=\"document-name\">", "</h1>\n <div class=\"company-name text-inverse\" style=\"\">\n <span>", "</span>\n </div>\n <address class=\"company-address\">\n <div>\n ", "\n ", "\n ", "\n ", "\n ", "\n </div>\n ", "\n ", "\n ", "\n ", "\n </address>\n </div>\n </div>\n </div>\n <!-- end invoice-company -->"])), LogoContainer$1({
|
|
12318
12319
|
company: company,
|
|
12319
12320
|
logoPath: logoPath,
|
|
12320
12321
|
logoBase64: logoBase64
|
|
12321
12322
|
}), documentName, company.c, companyAddress.address1 ? "<div>" + companyAddress.address1 + "</div>" : "", companyAddress.address2 ? "<div>" + companyAddress.address2 + "</div>" : "", companyAddress.address3 ? "<div>" + companyAddress.address3 + "</div>" : "", companyAddress.city || companyAddress.state || companyAddress.zip ? "<div>" + ((companyAddress.city ? companyAddress.city + " " : "") + (companyAddress.state ? companyAddress.state + " " : "") + (companyAddress.zip ? companyAddress.zip + " " : "")) + "</div>" : "", companyAddress.country ? "<div>" + companyAddress.country + "</div>" : "", company.ai ? "<div>" + company.ai + "</div>" : "", company.ph ? "<div>" + company.ph + "</div>" : "", company.de ? "<div>" + company.de + "</div>" : "", company.tfn ? "<div>" + ((company.bn ? company.bn : "Tax no.") + " : " + company.tfn) + "</div>" : "");
|
|
12322
12323
|
};
|
|
12323
12324
|
|
|
12324
|
-
var _templateObject$
|
|
12325
|
-
var html$
|
|
12325
|
+
var _templateObject$m, _templateObject2$a, _templateObject3$5;
|
|
12326
|
+
var html$l = String.raw;
|
|
12326
12327
|
var Head$1 = function Head(_ref) {
|
|
12327
12328
|
var isOffline = _ref.isOffline,
|
|
12328
12329
|
removeHtmlStandardDom = _ref.removeHtmlStandardDom;
|
|
12329
|
-
var stylesheet = isOffline ? html$
|
|
12330
|
+
var stylesheet = isOffline ? html$l(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["<style>\n ", "</style\n ><style>\n ", "\n </style>\n <link\n href=\"https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Noto+Sans+TC:wght@100..900&family=Noto+Sans:ital,wght@0,100..900;1,100..900&family=Noto+Serif+TC:wght@200..900&family=Noto+Serif:ital,wght@0,100..900;1,100..900&display=swap\"\n rel=\"stylesheet\"\n /> "])), bootstrapCss, fontawesomeCss) : html$l(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteralLoose(["<link\n rel=\"stylesheet\"\n href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css\"\n integrity=\"sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh\"\n crossorigin=\"anonymous\"\n />\n <link\n href=\"https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Noto+Sans+TC:wght@100..900&family=Noto+Sans:ital,wght@0,100..900;1,100..900&family=Noto+Serif+TC:wght@200..900&family=Noto+Serif:ital,wght@0,100..900;1,100..900&display=swap\"\n rel=\"stylesheet\"\n /> "])));
|
|
12330
12331
|
if (removeHtmlStandardDom) {
|
|
12331
12332
|
return stylesheet;
|
|
12332
12333
|
}
|
|
12333
|
-
return html$
|
|
12334
|
+
return html$l(_templateObject3$5 || (_templateObject3$5 = _taggedTemplateLiteralLoose(["<!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"utf-8\" />\n <title>Invoice</title>\n ", "\n </head>\n </html>"])), stylesheet);
|
|
12334
12335
|
};
|
|
12335
12336
|
|
|
12336
|
-
var _templateObject$
|
|
12337
|
-
var html$
|
|
12337
|
+
var _templateObject$n;
|
|
12338
|
+
var html$m = String.raw;
|
|
12338
12339
|
var InvoiceHeader$1 = function InvoiceHeader(_ref) {
|
|
12339
12340
|
var company = _ref.company,
|
|
12340
12341
|
defaultLang = _ref.defaultLang,
|
|
@@ -12362,12 +12363,12 @@ var InvoiceHeader$1 = function InvoiceHeader(_ref) {
|
|
|
12362
12363
|
timeZone: timeZone
|
|
12363
12364
|
});
|
|
12364
12365
|
};
|
|
12365
|
-
return html$
|
|
12366
|
+
return html$m(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["<!-- begin invoice-header -->\n <div class=\"invoice-header\">\n <div class=\"row\">\n <div class=\"invoice-to col-sm-12 col-md-6\">\n <span class=\"heading heading-title\">\n ", "</span\n >\n <div class=\"text-inverse customer-name\">\n ", "\n </div>\n <address class=\"address-text\" style=\"margin-bottom: 40px;\">\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n </address>\n\n ", "\n ", "\n </div>\n\n <div class=\"invoice-date col-sm-12 col-md-6\">\n <div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <span class=\"label\">", " NUMBER</span>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">\n ", "\n </div>\n </div>\n ", "\n <div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <span class=\"label\"\n >", "</span\n >\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">\n ", "\n </div>\n </div>\n ", "\n ", "\n </div>\n </div>\n </div>\n <!-- end invoice-header -->"])), company.r_bt ? company.r_bt : defaultLang["bill_to"], customer ? customer.c : "", customerAddress.address1 ? "<div>" + customerAddress.address1 + "</div>" : "", customerAddress.address2 ? "<div>" + customerAddress.address2 + "</div>" : "", customerAddress.address3 ? "<div>" + customerAddress.address3 + "</div>" : "", customerAddress.city || customerAddress.state || customerAddress.zip ? "<div>" + ((customerAddress.city ? customerAddress.city + " " : "") + (customerAddress.state ? customerAddress.state + " " : "") + (customerAddress.zip ? customerAddress.zip + " " : "")) + "</div>" : "", customerAddress.country ? "<div>" + customerAddress.country + "</div>" : "", customer && customer.tfn ? "<div>" + (customer.tfn ? (company.bn || "Tax no.") + " : " + customer.tfn : "") + "</div>" : "", customer && customer.e ? "<div>" + customer.e + "</div>" : "", customer && customer.ph ? "<div>" + customer.ph + "</div>" : "", customer && customer.ai ? "<div>" + customer.ai + "</div>" : "", shippingAddressExists ? "<span class=\"heading\" >" + (company.r_st ? company.r_st : defaultLang.ship_to) + "</span>" : "", shippingAddressExists ? "\n <address class=\"address-text\" style=\"margin-bottom: 8px;\">\n " + (customerShippingAddress.address1 ? "<div>" + customerShippingAddress.address1 + "</div>" : "") + "\n " + (customerShippingAddress.address2 ? "<div>" + customerShippingAddress.address2 + "</div>" : "") + "\n " + (customerShippingAddress.address3 ? "<div>" + customerShippingAddress.address3 + "</div>" : "") + "\n " + (customerShippingAddress.city || customerShippingAddress.state || customerShippingAddress.zip ? "<div>" + ((customerShippingAddress.city ? customerShippingAddress.city + " " : "") + (customerShippingAddress.state ? customerShippingAddress.state + " " : "") + (customerShippingAddress.zip ? customerShippingAddress.zip + " " : "")) + "</div>" : "") + "\n " + (customerShippingAddress.country ? "<div>" + customerShippingAddress.country + "</div>" : "") + "\n " + (document.asi ? "<div>" + document.asi + "</div>" : "") + "\n </address>\n " : "", documentName, document.no ? document.no : "", document.proposal && document.proposal.no ? "<div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <span class=\"label\">Proposal #</span>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">\n " + document.proposal.no + "\n </div>\n </div>" : "", company.r_d ? company.r_d : defaultLang["issued"], formatDate(document.d), document.ty == 1 && !document.rd ? "<div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <span class=\"label\">" + (company.r_dd ? company.r_dd : defaultLang["due"]) + "</span>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">\n " + (document.dd ? formatDate(document.dd) : formatDate(new Date(document.d).setDate(new Date(document.d).getDate() + parseInt(document.di)))) + "\n </div>\n </div>" : "", document.pon ? "<div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>" + (company.r_po ? company.r_po : defaultLang["po_number"]) + "</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">" + document.pon + "</div>\n </div>\n " : "");
|
|
12366
12367
|
};
|
|
12367
12368
|
|
|
12368
|
-
var _templateObject$
|
|
12369
|
+
var _templateObject$o, _templateObject2$b, _templateObject3$6;
|
|
12369
12370
|
var FormatCurrency$5 = util.FormatCurrency;
|
|
12370
|
-
var html$
|
|
12371
|
+
var html$n = String.raw;
|
|
12371
12372
|
var ItemsContainer$1 = function ItemsContainer(_ref) {
|
|
12372
12373
|
var company = _ref.company,
|
|
12373
12374
|
discountOnItem = _ref.discountOnItem,
|
|
@@ -12382,20 +12383,20 @@ var ItemsContainer$1 = function ItemsContainer(_ref) {
|
|
|
12382
12383
|
var _item$photos;
|
|
12383
12384
|
var item = _step.value;
|
|
12384
12385
|
var photoUrl = (_item$photos = item.photos) !== null && _item$photos !== void 0 && _item$photos[0] ? item.photos[0].url || "https://s3.amazonaws.com/bookipi/" + company._id + "/item/images/" + item.photos[0].filename + ".jpg" : "";
|
|
12385
|
-
itemsContainer = itemsContainer + html$
|
|
12386
|
+
itemsContainer = itemsContainer + html$n(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["<tr>\n <td>\n ", "\n <div style=\"display:block;page-break-inside: auto!important;\">\n <span class=\"text-inverse\"\n ><span class=\"item-name\">", "</span></span\n >\n ", "\n <div class=\"item-description mt-2\" style=\"page-break-inside: auto!important;\">", "</div>\n <div class=\"d-block d-md-none mt-1\">\n ", "\n ", "\n </div>\n </div>\n </td>\n <td class=\"item-detail-cell text-center d-none d-md-table-cell\">\n ", "\n </td>\n <td class=\"item-detail-cell text-center d-none d-md-table-cell\">\n ", "\n </td>\n ", "\n <td class=\"item-detail-cell t text-right\" style=\"color: #000000;\">\n ", "\n </td>\n </tr>"])), photoUrl ? "<img style=\"width:56px;height:56px;display:inline-block;margin-right:12px;border-radius:4px;vertical-align:top;\" src=\"" + photoUrl + "\" />" : "", item.n || "", item.productCode ? html$n(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteralLoose(["<div class=\"item-productcode text-inverse\">\n ", "\n </div>"])), item.productCode) : "", nl2br(item.dsc) || "", (item.p || item.p == 0) && (item.q || item.q == 0) ? FormatCurrency$5(item.p, company.cr, company.la, company.cf, {
|
|
12386
12387
|
forceDecimal: forceItemUnitPriceDecimal
|
|
12387
12388
|
}) + " ✕ " + (item.q || "0") : "", discountOnItem && (item.p || item.p == 0) && item.dc ? "" + (item.dc > 0 ? " - " : " + ") + FormatCurrency$5(Math.abs(item.dc), company.cr, company.la, company.cf, {
|
|
12388
12389
|
forceDecimal: forceItemUnitPriceDecimal
|
|
12389
12390
|
}) + " (" + (company.r_dc ? company.r_dc : defaultLang.discount) + ")" : "", item.p || item.p == 0 ? FormatCurrency$5(item.p, company.cr, company.la, company.cf, {
|
|
12390
12391
|
forceDecimal: forceItemUnitPriceDecimal
|
|
12391
|
-
}) : "", (item.p || item.p == 0) && (item.q || item.q == 0) ? item.q : "", discountOnItem ? html$
|
|
12392
|
+
}) : "", (item.p || item.p == 0) && (item.q || item.q == 0) ? item.q : "", discountOnItem ? html$n(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["<td class=\"item-detail-cell text-right d-none d-md-table-cell\">\n ", "\n </td>"])), (item.p || item.p == 0) && item.dc ? FormatCurrency$5(item.dc, company.cr, company.la, company.cf) : "") : "", item.p || item.p == 0 ? FormatCurrency$5(item.t, company.cr, company.la, company.cf) : "");
|
|
12392
12393
|
}
|
|
12393
12394
|
return itemsContainer;
|
|
12394
12395
|
};
|
|
12395
12396
|
|
|
12396
|
-
var _templateObject$
|
|
12397
|
+
var _templateObject$p;
|
|
12397
12398
|
var FormatCurrency$6 = util.FormatCurrency;
|
|
12398
|
-
var html$
|
|
12399
|
+
var html$o = String.raw;
|
|
12399
12400
|
var paymentOnDetails$1 = function paymentOnDetails(date, brand, endNumber) {
|
|
12400
12401
|
brand = formatCardBrand(brand);
|
|
12401
12402
|
if (brand && endNumber) {
|
|
@@ -12426,18 +12427,16 @@ var PaymentContainer$1 = function PaymentContainer(_ref) {
|
|
|
12426
12427
|
if (document.pm) {
|
|
12427
12428
|
for (var _iterator = _createForOfIteratorHelperLoose(document.pm), _step; !(_step = _iterator()).done;) {
|
|
12428
12429
|
var payment = _step.value;
|
|
12429
|
-
paymentContainer = paymentContainer + html$
|
|
12430
|
+
paymentContainer = paymentContainer + html$o(_templateObject$p || (_templateObject$p = _taggedTemplateLiteralLoose(["<tr>\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>"])), paymentOn(payment), FormatCurrency$6(payment.a, company.cr, company.la, company.cf));
|
|
12430
12431
|
}
|
|
12431
12432
|
}
|
|
12432
12433
|
return paymentContainer;
|
|
12433
12434
|
};
|
|
12434
12435
|
|
|
12435
|
-
var _templateObject$
|
|
12436
|
+
var _templateObject$q;
|
|
12436
12437
|
var FormatCurrency$7 = util.FormatCurrency;
|
|
12437
|
-
var html$
|
|
12438
|
-
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";
|
|
12438
|
+
var html$p = String.raw;
|
|
12439
12439
|
var InvoiceContent$1 = function InvoiceContent(_ref) {
|
|
12440
|
-
var _company$_id, _company$p;
|
|
12441
12440
|
var company = _ref.company,
|
|
12442
12441
|
defaultLang = _ref.defaultLang,
|
|
12443
12442
|
document = _ref.document,
|
|
@@ -12445,8 +12444,6 @@ var InvoiceContent$1 = function InvoiceContent(_ref) {
|
|
|
12445
12444
|
itemWidth = _ref.itemWidth,
|
|
12446
12445
|
isDeposit = _ref.isDeposit,
|
|
12447
12446
|
lang = _ref.lang,
|
|
12448
|
-
showPaymentInstructions = _ref.showPaymentInstructions,
|
|
12449
|
-
showActions = _ref.showActions,
|
|
12450
12447
|
t = _ref.t;
|
|
12451
12448
|
var _getTaxDetails = getTaxDetails(document, company, {
|
|
12452
12449
|
included: defaultLang.included
|
|
@@ -12480,19 +12477,12 @@ var InvoiceContent$1 = function InvoiceContent(_ref) {
|
|
|
12480
12477
|
lang: lang,
|
|
12481
12478
|
t: t
|
|
12482
12479
|
});
|
|
12483
|
-
|
|
12484
|
-
document: document,
|
|
12485
|
-
isDeposit: isDeposit
|
|
12486
|
-
});
|
|
12487
|
-
var hasInstructions = company.pi && document.ty === 1 && (company.p1 || company.p2 || company.p3 || company.hasPaymentInstructionQRCode);
|
|
12488
|
-
var paymentOn = hasInstructions && showPaymentInstructions !== false;
|
|
12489
|
-
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=" + (company === null || company === void 0 ? void 0 : company.updatedAt)) + "\" />\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 && document.ty === 1 ? html$o(_templateObject$p || (_templateObject$p = _taggedTemplateLiteralLoose(["<button class=\"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 ";
|
|
12490
|
-
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 invoice-items-head\">\n <tr class=\"table table-invoice\">\n <th\n class=\"text-left text-uppercase\"\n style=\"border-top-left-radius: 8px; border-bottom-left-radius: 8px;\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-center text-uppercase d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-center text-uppercase d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n ", "\n <th\n class=\"text-right text-uppercase 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 width=\"50%\"\n >\n ", "\n ", "\n </td>\n <td style=\"padding: 0;\">\n <table class=\"price-table table table-borderless table-small\">\n <tr>\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 </table>\n </td>\n </tr>\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] + "'" : "", company.r_p ? company.r_p : defaultLang["price"], itemWidth[2] ? "width='" + itemWidth[2] + "'" : "", document.um ? document.um : company.r_q ? company.r_q : defaultLang["quantity"], discountOnItem ? "<th class=\"text-right text-uppercase 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 && showActions && document.ty === 1 ? html$o(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["<button class=\"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>" : "");
|
|
12480
|
+
return html$p(_templateObject$q || (_templateObject$q = _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 invoice-items-head\">\n <tr class=\"table table-invoice\">\n <th\n class=\"text-left text-uppercase\"\n style=\"border-top-left-radius: 8px; border-bottom-left-radius: 8px;\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-center text-uppercase d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-center text-uppercase d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n ", "\n <th\n class=\"text-right text-uppercase 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 width=\"50%\"\n >\n </td>\n <td style=\"padding: 0;\">\n <table class=\"price-table table table-borderless table-small\">\n <tr>\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 </table>\n </td>\n </tr>\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] + "'" : "", company.r_p ? company.r_p : defaultLang["price"], itemWidth[2] ? "width='" + itemWidth[2] + "'" : "", document.um ? document.um : company.r_q ? company.r_q : defaultLang["quantity"], discountOnItem ? "<th class=\"text-right text-uppercase 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, 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>" : "");
|
|
12491
12481
|
};
|
|
12492
12482
|
|
|
12493
|
-
var _templateObject$
|
|
12483
|
+
var _templateObject$r;
|
|
12494
12484
|
var FormatCurrency$8 = util.FormatCurrency;
|
|
12495
|
-
var html$
|
|
12485
|
+
var html$q = String.raw;
|
|
12496
12486
|
var InvoicePrice$1 = function InvoicePrice(_ref) {
|
|
12497
12487
|
var bookipayLink = _ref.bookipayLink,
|
|
12498
12488
|
company = _ref.company,
|
|
@@ -12516,11 +12506,11 @@ var InvoicePrice$1 = function InvoicePrice(_ref) {
|
|
|
12516
12506
|
surcharge: surcharge,
|
|
12517
12507
|
defaultLang: defaultLang
|
|
12518
12508
|
});
|
|
12519
|
-
return html$
|
|
12509
|
+
return html$q(_templateObject$r || (_templateObject$r = _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));
|
|
12520
12510
|
};
|
|
12521
12511
|
|
|
12522
|
-
var _templateObject$
|
|
12523
|
-
var html$
|
|
12512
|
+
var _templateObject$s, _templateObject2$c, _templateObject3$7;
|
|
12513
|
+
var html$r = String.raw;
|
|
12524
12514
|
var ClientSignatureContainer$1 = function ClientSignatureContainer(_ref) {
|
|
12525
12515
|
var customer = _ref.customer,
|
|
12526
12516
|
customerSignBase64 = _ref.customerSignBase64,
|
|
@@ -12528,22 +12518,22 @@ var ClientSignatureContainer$1 = function ClientSignatureContainer(_ref) {
|
|
|
12528
12518
|
formatDate = _ref.formatDate,
|
|
12529
12519
|
signItIntegration = _ref.signItIntegration;
|
|
12530
12520
|
if (!(document !== null && document !== void 0 && document.cs) && !customerSignBase64) return "";
|
|
12531
|
-
return html$
|
|
12521
|
+
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 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$r(_templateObject2$c || (_templateObject2$c = _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$r(_templateObject3$7 || (_templateObject3$7 = _taggedTemplateLiteralLoose(["<a href=\"#client_date_signature\"></a>"]))) : "(   /  /  )");
|
|
12532
12522
|
};
|
|
12533
12523
|
|
|
12534
|
-
var _templateObject$
|
|
12535
|
-
var html$
|
|
12524
|
+
var _templateObject$t, _templateObject2$d;
|
|
12525
|
+
var html$s = String.raw;
|
|
12536
12526
|
var SignatureContainer$1 = function SignatureContainer(_ref) {
|
|
12537
12527
|
var company = _ref.company,
|
|
12538
12528
|
document = _ref.document,
|
|
12539
12529
|
formatDate = _ref.formatDate,
|
|
12540
12530
|
signatureBase64 = _ref.signatureBase64;
|
|
12541
12531
|
if (!(document !== null && document !== void 0 && document.sd)) return "";
|
|
12542
|
-
return html$
|
|
12532
|
+
return html$s(_templateObject$t || (_templateObject$t = _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$s(_templateObject2$d || (_templateObject2$d = _taggedTemplateLiteralLoose(["<img\n src=\"", "\"\n class=\"signature-img\"\n onerror=\"this.style.display='none'\"\n />"])), signatureBase64) : "", document.sd ? formatDate(document.sd) : "");
|
|
12543
12533
|
};
|
|
12544
12534
|
|
|
12545
|
-
var _templateObject$
|
|
12546
|
-
var html$
|
|
12535
|
+
var _templateObject$u;
|
|
12536
|
+
var html$t = String.raw;
|
|
12547
12537
|
var InvoiceSignature$1 = function InvoiceSignature(_ref) {
|
|
12548
12538
|
var company = _ref.company,
|
|
12549
12539
|
document = _ref.document,
|
|
@@ -12575,10 +12565,10 @@ var InvoiceSignature$1 = function InvoiceSignature(_ref) {
|
|
|
12575
12565
|
formatDate: formatDate,
|
|
12576
12566
|
signItIntegration: signItIntegration
|
|
12577
12567
|
});
|
|
12578
|
-
return html$
|
|
12568
|
+
return html$t(_templateObject$u || (_templateObject$u = _taggedTemplateLiteralLoose(["<!-- begin invoice-signature -->\n <div class=\"seperate-line\"></div>\n <div>", "</div>\n <div class=\"row mt-1\">\n ", " ", "\n </div>\n <!-- end invoice-signature -->"])), company.r_bs || defaultLang["by_signing"] || "", signatureContainer || "", clientSignature || "");
|
|
12579
12569
|
};
|
|
12580
12570
|
|
|
12581
|
-
var _templateObject$
|
|
12571
|
+
var _templateObject$v;
|
|
12582
12572
|
var htmlRaw$1 = String.raw;
|
|
12583
12573
|
var invoiceHtmlWithDetailsNew = (function (_ref) {
|
|
12584
12574
|
var invoice = _ref.invoice,
|
|
@@ -12651,7 +12641,7 @@ var invoiceHtmlWithDetailsNew = (function (_ref) {
|
|
|
12651
12641
|
surcharge: surcharge
|
|
12652
12642
|
});
|
|
12653
12643
|
} : lang["impose_surcharge"],
|
|
12654
|
-
payment_instruction: t ? t("Payment
|
|
12644
|
+
payment_instruction: t ? t("Payment Instruction") : lang["payment_instruction"],
|
|
12655
12645
|
included: t ? t("included") : lang["included"],
|
|
12656
12646
|
upgradeRequired: t ? t("Upgrade required") : lang["upgradeRequired"]
|
|
12657
12647
|
};
|
|
@@ -12679,7 +12669,7 @@ var invoiceHtmlWithDetailsNew = (function (_ref) {
|
|
|
12679
12669
|
var fontName = document.customization ? document.customization.font.name : "normal";
|
|
12680
12670
|
var fontSize = document.customization ? document.customization.font.size : "medium";
|
|
12681
12671
|
var color = document.customization ? document.customization.color : "#ffffff";
|
|
12682
|
-
var html = htmlRaw$1(_templateObject$
|
|
12672
|
+
var html = htmlRaw$1(_templateObject$v || (_templateObject$v = _taggedTemplateLiteralLoose(["\n ", "\n ", "\n ", "\n <div id=\"invoice\" class=\"print\">\n ", "\n ", "\n ", "\n ", "\n ", "\n <div>\n ", "\n </div>\n <div class=\"note-and-sign invoice-body\">\n ", "\n ", "\n ", "\n </div>\n ", "\n </div>\n\n ", "\n "])), Head$1({
|
|
12683
12673
|
removeHtmlStandardDom: removeHtmlStandardDom,
|
|
12684
12674
|
isOffline: isOffline
|
|
12685
12675
|
}), invoiceStyle$1({
|
|
@@ -12707,12 +12697,10 @@ var invoiceHtmlWithDetailsNew = (function (_ref) {
|
|
|
12707
12697
|
defaultLang: defaultLang,
|
|
12708
12698
|
document: document,
|
|
12709
12699
|
forceItemUnitPriceDecimal: forceItemUnitPriceDecimal,
|
|
12710
|
-
showPaymentInstructions: document.shouldShowPaymentInstructions,
|
|
12711
12700
|
itemWidth: itemWidth,
|
|
12712
12701
|
isDeposit: isDeposit,
|
|
12713
12702
|
lang: lang,
|
|
12714
|
-
t: t
|
|
12715
|
-
showActions: showActions
|
|
12703
|
+
t: t
|
|
12716
12704
|
}), InvoicePrice$1({
|
|
12717
12705
|
bookipayLink: bookipayLink,
|
|
12718
12706
|
company: company,
|
|
@@ -12725,8 +12713,13 @@ var invoiceHtmlWithDetailsNew = (function (_ref) {
|
|
|
12725
12713
|
defaultLang: defaultLang,
|
|
12726
12714
|
document: document,
|
|
12727
12715
|
bookipayLink: bookipayLink,
|
|
12728
|
-
hidePayBtnInScreen: hidePayBtnInScreen
|
|
12729
|
-
|
|
12716
|
+
hidePayBtnInScreen: hidePayBtnInScreen
|
|
12717
|
+
}), PaymentInstructions({
|
|
12718
|
+
company: company,
|
|
12719
|
+
defaultLang: defaultLang,
|
|
12720
|
+
document: document,
|
|
12721
|
+
showPaymentInstructions: document.shouldShowPaymentInstructions,
|
|
12722
|
+
showActions: showActions
|
|
12730
12723
|
}), InvoiceNote({
|
|
12731
12724
|
company: company,
|
|
12732
12725
|
defaultLang: defaultLang,
|