@bookipi/htmlgenerator 1.5.9 → 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/index.modern.js
CHANGED
|
@@ -8973,12 +8973,6 @@ var getTaxDetails = function getTaxDetails(document, company, defaultLang) {
|
|
|
8973
8973
|
taxIncluded2: taxIncluded2
|
|
8974
8974
|
};
|
|
8975
8975
|
};
|
|
8976
|
-
var getNumRowsPaymentInstruction = function getNumRowsPaymentInstruction(_ref3) {
|
|
8977
|
-
var _document$pm;
|
|
8978
|
-
var document = _ref3.document,
|
|
8979
|
-
isDeposit = _ref3.isDeposit;
|
|
8980
|
-
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();
|
|
8981
|
-
};
|
|
8982
8976
|
var getLogoPath = function getLogoPath(_ref4) {
|
|
8983
8977
|
var company = _ref4.company,
|
|
8984
8978
|
invoice = _ref4.invoice,
|
|
@@ -11842,7 +11836,6 @@ var _templateObject$7;
|
|
|
11842
11836
|
var FormatCurrency$3 = util.FormatCurrency;
|
|
11843
11837
|
var html$7 = String.raw;
|
|
11844
11838
|
var InvoiceContent = function InvoiceContent(_ref) {
|
|
11845
|
-
var _company$_id;
|
|
11846
11839
|
var company = _ref.company,
|
|
11847
11840
|
defaultLang = _ref.defaultLang,
|
|
11848
11841
|
document = _ref.document,
|
|
@@ -11850,8 +11843,7 @@ var InvoiceContent = function InvoiceContent(_ref) {
|
|
|
11850
11843
|
itemWidth = _ref.itemWidth,
|
|
11851
11844
|
isDeposit = _ref.isDeposit,
|
|
11852
11845
|
lang = _ref.lang,
|
|
11853
|
-
t = _ref.t
|
|
11854
|
-
showPaymentInstructions = _ref.showPaymentInstructions;
|
|
11846
|
+
t = _ref.t;
|
|
11855
11847
|
var _getTaxDetails = getTaxDetails(document, company, {
|
|
11856
11848
|
included: defaultLang.included
|
|
11857
11849
|
}),
|
|
@@ -11884,13 +11876,7 @@ var InvoiceContent = function InvoiceContent(_ref) {
|
|
|
11884
11876
|
lang: lang,
|
|
11885
11877
|
t: t
|
|
11886
11878
|
});
|
|
11887
|
-
|
|
11888
|
-
document: document,
|
|
11889
|
-
isDeposit: isDeposit
|
|
11890
|
-
});
|
|
11891
|
-
var paymentOn = company.pi && document.ty === 1 && (company.p1 || company.p2 || company.p3 || company.hasPaymentInstructionQRCode) && showPaymentInstructions !== false;
|
|
11892
|
-
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 ";
|
|
11893
|
-
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>" : "");
|
|
11879
|
+
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>" : "");
|
|
11894
11880
|
};
|
|
11895
11881
|
|
|
11896
11882
|
var _templateObject$8, _templateObject2$3;
|
|
@@ -11936,17 +11922,15 @@ var InvoicePrice = function InvoicePrice(_ref) {
|
|
|
11936
11922
|
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));
|
|
11937
11923
|
};
|
|
11938
11924
|
|
|
11939
|
-
var _templateObject$a
|
|
11925
|
+
var _templateObject$a;
|
|
11940
11926
|
var html$a = String.raw;
|
|
11941
11927
|
var InvoiceBookipayLink = function InvoiceBookipayLink(_ref) {
|
|
11942
11928
|
var company = _ref.company,
|
|
11943
11929
|
defaultLang = _ref.defaultLang,
|
|
11944
11930
|
document = _ref.document,
|
|
11945
11931
|
bookipayLink = _ref.bookipayLink,
|
|
11946
|
-
hidePayBtnInScreen = _ref.hidePayBtnInScreen
|
|
11947
|
-
showPaymentInstructions = _ref.showPaymentInstructions;
|
|
11932
|
+
hidePayBtnInScreen = _ref.hidePayBtnInScreen;
|
|
11948
11933
|
var surcharge = company.sc && company.sr || 0;
|
|
11949
|
-
var paymentOn = company.pi && document.ty === 1 && (company.p1 || company.p2 || company.p3 || company.hasPaymentInstructionQRCode) && showPaymentInstructions !== false;
|
|
11950
11934
|
var bookipayLinkComponent = BookipayLinkContainer({
|
|
11951
11935
|
document: document,
|
|
11952
11936
|
bookipayLink: bookipayLink,
|
|
@@ -11954,24 +11938,22 @@ var InvoiceBookipayLink = function InvoiceBookipayLink(_ref) {
|
|
|
11954
11938
|
surcharge: surcharge,
|
|
11955
11939
|
defaultLang: defaultLang
|
|
11956
11940
|
});
|
|
11957
|
-
if (
|
|
11958
|
-
|
|
11959
|
-
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>" : "");
|
|
11960
|
-
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>" : "");
|
|
11941
|
+
if (bookipayLinkComponent) {
|
|
11942
|
+
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>" : "");
|
|
11961
11943
|
}
|
|
11962
11944
|
return "";
|
|
11963
11945
|
};
|
|
11964
11946
|
|
|
11965
|
-
var _templateObject$b, _templateObject2$
|
|
11947
|
+
var _templateObject$b, _templateObject2$4, _templateObject3$2;
|
|
11966
11948
|
var html$b = String.raw;
|
|
11967
11949
|
var InvoiceNote = function InvoiceNote(_ref) {
|
|
11968
11950
|
var company = _ref.company,
|
|
11969
11951
|
defaultLang = _ref.defaultLang,
|
|
11970
11952
|
document = _ref.document;
|
|
11971
|
-
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$
|
|
11953
|
+
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 -->";
|
|
11972
11954
|
};
|
|
11973
11955
|
|
|
11974
|
-
var _templateObject$c, _templateObject2$
|
|
11956
|
+
var _templateObject$c, _templateObject2$5, _templateObject3$3;
|
|
11975
11957
|
var html$c = String.raw;
|
|
11976
11958
|
var ClientSignatureContainer = function ClientSignatureContainer(_ref) {
|
|
11977
11959
|
var customer = _ref.customer,
|
|
@@ -11980,10 +11962,10 @@ var ClientSignatureContainer = function ClientSignatureContainer(_ref) {
|
|
|
11980
11962
|
formatDate = _ref.formatDate,
|
|
11981
11963
|
signItIntegration = _ref.signItIntegration;
|
|
11982
11964
|
if (!(document !== null && document !== void 0 && document.cs) && !customerSignBase64) return "";
|
|
11983
|
-
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$
|
|
11965
|
+
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>"]))) : "(   /  /  )");
|
|
11984
11966
|
};
|
|
11985
11967
|
|
|
11986
|
-
var _templateObject$d, _templateObject2$
|
|
11968
|
+
var _templateObject$d, _templateObject2$6;
|
|
11987
11969
|
var html$d = String.raw;
|
|
11988
11970
|
var SignatureContainer = function SignatureContainer(_ref) {
|
|
11989
11971
|
var company = _ref.company,
|
|
@@ -11991,7 +11973,7 @@ var SignatureContainer = function SignatureContainer(_ref) {
|
|
|
11991
11973
|
formatDate = _ref.formatDate,
|
|
11992
11974
|
signatureBase64 = _ref.signatureBase64;
|
|
11993
11975
|
if (!(document !== null && document !== void 0 && document.sd)) return "";
|
|
11994
|
-
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$
|
|
11976
|
+
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) : "");
|
|
11995
11977
|
};
|
|
11996
11978
|
|
|
11997
11979
|
var _templateObject$e;
|
|
@@ -12030,7 +12012,7 @@ var InvoiceSignature = function InvoiceSignature(_ref) {
|
|
|
12030
12012
|
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 || "");
|
|
12031
12013
|
};
|
|
12032
12014
|
|
|
12033
|
-
var _templateObject$f, _templateObject2$
|
|
12015
|
+
var _templateObject$f, _templateObject2$7;
|
|
12034
12016
|
var html$f = String.raw;
|
|
12035
12017
|
var InvoiceAttachments = function InvoiceAttachments(_ref) {
|
|
12036
12018
|
var attachments = _ref.attachments;
|
|
@@ -12042,7 +12024,7 @@ var InvoiceAttachments = function InvoiceAttachments(_ref) {
|
|
|
12042
12024
|
} else {
|
|
12043
12025
|
return "";
|
|
12044
12026
|
}
|
|
12045
|
-
return html$f(_templateObject2$
|
|
12027
|
+
return html$f(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteralLoose(["<!-- begin invoice-attachments -->\n <div style=\"text-align: center\">", "</div>\n <!-- end invoice-attachments -->"])), attachmentContainer);
|
|
12046
12028
|
};
|
|
12047
12029
|
|
|
12048
12030
|
var _templateObject$g;
|
|
@@ -12064,7 +12046,23 @@ var BookipayBrandFooter = function BookipayBrandFooter(_ref) {
|
|
|
12064
12046
|
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>" : "");
|
|
12065
12047
|
};
|
|
12066
12048
|
|
|
12067
|
-
var _templateObject$h;
|
|
12049
|
+
var _templateObject$h, _templateObject2$8, _templateObject3$4;
|
|
12050
|
+
var html$h = String.raw;
|
|
12051
|
+
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>";
|
|
12052
|
+
var PaymentInstructions = function PaymentInstructions(_ref) {
|
|
12053
|
+
var _company$_id, _company$p;
|
|
12054
|
+
var company = _ref.company,
|
|
12055
|
+
defaultLang = _ref.defaultLang,
|
|
12056
|
+
document = _ref.document,
|
|
12057
|
+
showPaymentInstructions = _ref.showPaymentInstructions,
|
|
12058
|
+
showActions = _ref.showActions;
|
|
12059
|
+
var hasInstructions = company.pi && document.ty === 1 && (company.p1 || company.p2 || company.p3 || company.hasPaymentInstructionQRCode);
|
|
12060
|
+
var paymentOn = hasInstructions && showPaymentInstructions !== false;
|
|
12061
|
+
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 ";
|
|
12062
|
+
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) : "");
|
|
12063
|
+
};
|
|
12064
|
+
|
|
12065
|
+
var _templateObject$i;
|
|
12068
12066
|
var htmlRaw = String.raw;
|
|
12069
12067
|
var invoiceHtmlWithDetails = (function (_ref) {
|
|
12070
12068
|
var invoice = _ref.invoice,
|
|
@@ -12155,7 +12153,7 @@ var invoiceHtmlWithDetails = (function (_ref) {
|
|
|
12155
12153
|
timeZone: timeZone
|
|
12156
12154
|
});
|
|
12157
12155
|
};
|
|
12158
|
-
var html = htmlRaw(_templateObject$
|
|
12156
|
+
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({
|
|
12159
12157
|
removeHtmlStandardDom: removeHtmlStandardDom,
|
|
12160
12158
|
isOffline: isOffline
|
|
12161
12159
|
}), invoiceStyle({
|
|
@@ -12178,7 +12176,6 @@ var invoiceHtmlWithDetails = (function (_ref) {
|
|
|
12178
12176
|
defaultLang: defaultLang,
|
|
12179
12177
|
document: document,
|
|
12180
12178
|
forceItemUnitPriceDecimal: forceItemUnitPriceDecimal,
|
|
12181
|
-
showPaymentInstructions: document.shouldShowPaymentInstructions,
|
|
12182
12179
|
itemWidth: itemWidth,
|
|
12183
12180
|
isDeposit: isDeposit,
|
|
12184
12181
|
lang: lang,
|
|
@@ -12195,7 +12192,11 @@ var invoiceHtmlWithDetails = (function (_ref) {
|
|
|
12195
12192
|
defaultLang: defaultLang,
|
|
12196
12193
|
document: document,
|
|
12197
12194
|
bookipayLink: bookipayLink,
|
|
12198
|
-
hidePayBtnInScreen: hidePayBtnInScreen
|
|
12195
|
+
hidePayBtnInScreen: hidePayBtnInScreen
|
|
12196
|
+
}), PaymentInstructions({
|
|
12197
|
+
company: company,
|
|
12198
|
+
defaultLang: defaultLang,
|
|
12199
|
+
document: document,
|
|
12199
12200
|
showPaymentInstructions: document.shouldShowPaymentInstructions
|
|
12200
12201
|
}), InvoiceNote({
|
|
12201
12202
|
company: company,
|
|
@@ -12236,8 +12237,8 @@ var getBrightness = function getBrightness(rgb) {
|
|
|
12236
12237
|
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
12237
12238
|
};
|
|
12238
12239
|
|
|
12239
|
-
var _templateObject$
|
|
12240
|
-
var html$
|
|
12240
|
+
var _templateObject$j;
|
|
12241
|
+
var html$i = String.raw;
|
|
12241
12242
|
var invoiceStyle$1 = function invoiceStyle(_ref) {
|
|
12242
12243
|
var isFromReactnative = _ref.isFromReactnative,
|
|
12243
12244
|
signItIntegration = _ref.signItIntegration,
|
|
@@ -12266,11 +12267,11 @@ var invoiceStyle$1 = function invoiceStyle(_ref) {
|
|
|
12266
12267
|
var watermarkText = defaultLang["upgradeRequired"] || "Upgrade required";
|
|
12267
12268
|
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>";
|
|
12268
12269
|
var watermark = "url(\"data:image/svg+xml;utf8, " + encodeURIComponent(watermarkSvg) + "\")";
|
|
12269
|
-
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 " : "");
|
|
12270
|
+
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 " : "");
|
|
12270
12271
|
};
|
|
12271
12272
|
|
|
12272
|
-
var _templateObject$
|
|
12273
|
-
var html$
|
|
12273
|
+
var _templateObject$k, _templateObject2$9;
|
|
12274
|
+
var html$j = String.raw;
|
|
12274
12275
|
var LogoContainer$1 = function LogoContainer(_ref) {
|
|
12275
12276
|
var _ref$company = _ref.company,
|
|
12276
12277
|
company = _ref$company === void 0 ? {} : _ref$company,
|
|
@@ -12278,15 +12279,15 @@ var LogoContainer$1 = function LogoContainer(_ref) {
|
|
|
12278
12279
|
logoBase64 = _ref.logoBase64;
|
|
12279
12280
|
var logoContainer = null;
|
|
12280
12281
|
if (logoPath || logoBase64) {
|
|
12281
|
-
logoContainer = html$
|
|
12282
|
+
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);
|
|
12282
12283
|
} else if (company.c) {
|
|
12283
|
-
logoContainer = html$
|
|
12284
|
+
logoContainer = html$j(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteralLoose([" <h1 class=\"float-md-right logo-text-alternative\">\n ", "\n </h1>"])), company.c);
|
|
12284
12285
|
}
|
|
12285
12286
|
return logoContainer;
|
|
12286
12287
|
};
|
|
12287
12288
|
|
|
12288
|
-
var _templateObject$
|
|
12289
|
-
var html$
|
|
12289
|
+
var _templateObject$l;
|
|
12290
|
+
var html$k = String.raw;
|
|
12290
12291
|
var InvoiceCompany$1 = function InvoiceCompany(_ref) {
|
|
12291
12292
|
var _invoice$document;
|
|
12292
12293
|
var company = _ref.company,
|
|
@@ -12313,27 +12314,27 @@ var InvoiceCompany$1 = function InvoiceCompany(_ref) {
|
|
|
12313
12314
|
t: t
|
|
12314
12315
|
});
|
|
12315
12316
|
var companyAddress = getCompanyAddress(company);
|
|
12316
|
-
return html$
|
|
12317
|
+
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({
|
|
12317
12318
|
company: company,
|
|
12318
12319
|
logoPath: logoPath,
|
|
12319
12320
|
logoBase64: logoBase64
|
|
12320
12321
|
}), 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>" : "");
|
|
12321
12322
|
};
|
|
12322
12323
|
|
|
12323
|
-
var _templateObject$
|
|
12324
|
-
var html$
|
|
12324
|
+
var _templateObject$m, _templateObject2$a, _templateObject3$5;
|
|
12325
|
+
var html$l = String.raw;
|
|
12325
12326
|
var Head$1 = function Head(_ref) {
|
|
12326
12327
|
var isOffline = _ref.isOffline,
|
|
12327
12328
|
removeHtmlStandardDom = _ref.removeHtmlStandardDom;
|
|
12328
|
-
var stylesheet = isOffline ? html$
|
|
12329
|
+
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 /> "])));
|
|
12329
12330
|
if (removeHtmlStandardDom) {
|
|
12330
12331
|
return stylesheet;
|
|
12331
12332
|
}
|
|
12332
|
-
return html$
|
|
12333
|
+
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);
|
|
12333
12334
|
};
|
|
12334
12335
|
|
|
12335
|
-
var _templateObject$
|
|
12336
|
-
var html$
|
|
12336
|
+
var _templateObject$n;
|
|
12337
|
+
var html$m = String.raw;
|
|
12337
12338
|
var InvoiceHeader$1 = function InvoiceHeader(_ref) {
|
|
12338
12339
|
var company = _ref.company,
|
|
12339
12340
|
defaultLang = _ref.defaultLang,
|
|
@@ -12361,12 +12362,12 @@ var InvoiceHeader$1 = function InvoiceHeader(_ref) {
|
|
|
12361
12362
|
timeZone: timeZone
|
|
12362
12363
|
});
|
|
12363
12364
|
};
|
|
12364
|
-
return html$
|
|
12365
|
+
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 " : "");
|
|
12365
12366
|
};
|
|
12366
12367
|
|
|
12367
|
-
var _templateObject$
|
|
12368
|
+
var _templateObject$o, _templateObject2$b, _templateObject3$6;
|
|
12368
12369
|
var FormatCurrency$5 = util.FormatCurrency;
|
|
12369
|
-
var html$
|
|
12370
|
+
var html$n = String.raw;
|
|
12370
12371
|
var ItemsContainer$1 = function ItemsContainer(_ref) {
|
|
12371
12372
|
var company = _ref.company,
|
|
12372
12373
|
discountOnItem = _ref.discountOnItem,
|
|
@@ -12381,20 +12382,20 @@ var ItemsContainer$1 = function ItemsContainer(_ref) {
|
|
|
12381
12382
|
var _item$photos;
|
|
12382
12383
|
var item = _step.value;
|
|
12383
12384
|
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" : "";
|
|
12384
|
-
itemsContainer = itemsContainer + html$
|
|
12385
|
+
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, {
|
|
12385
12386
|
forceDecimal: forceItemUnitPriceDecimal
|
|
12386
12387
|
}) + " ✕ " + (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, {
|
|
12387
12388
|
forceDecimal: forceItemUnitPriceDecimal
|
|
12388
12389
|
}) + " (" + (company.r_dc ? company.r_dc : defaultLang.discount) + ")" : "", item.p || item.p == 0 ? FormatCurrency$5(item.p, company.cr, company.la, company.cf, {
|
|
12389
12390
|
forceDecimal: forceItemUnitPriceDecimal
|
|
12390
|
-
}) : "", (item.p || item.p == 0) && (item.q || item.q == 0) ? item.q : "", discountOnItem ? html$
|
|
12391
|
+
}) : "", (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) : "");
|
|
12391
12392
|
}
|
|
12392
12393
|
return itemsContainer;
|
|
12393
12394
|
};
|
|
12394
12395
|
|
|
12395
|
-
var _templateObject$
|
|
12396
|
+
var _templateObject$p;
|
|
12396
12397
|
var FormatCurrency$6 = util.FormatCurrency;
|
|
12397
|
-
var html$
|
|
12398
|
+
var html$o = String.raw;
|
|
12398
12399
|
var paymentOnDetails$1 = function paymentOnDetails(date, brand, endNumber) {
|
|
12399
12400
|
brand = formatCardBrand(brand);
|
|
12400
12401
|
if (brand && endNumber) {
|
|
@@ -12425,18 +12426,16 @@ var PaymentContainer$1 = function PaymentContainer(_ref) {
|
|
|
12425
12426
|
if (document.pm) {
|
|
12426
12427
|
for (var _iterator = _createForOfIteratorHelperLoose(document.pm), _step; !(_step = _iterator()).done;) {
|
|
12427
12428
|
var payment = _step.value;
|
|
12428
|
-
paymentContainer = paymentContainer + html$
|
|
12429
|
+
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));
|
|
12429
12430
|
}
|
|
12430
12431
|
}
|
|
12431
12432
|
return paymentContainer;
|
|
12432
12433
|
};
|
|
12433
12434
|
|
|
12434
|
-
var _templateObject$
|
|
12435
|
+
var _templateObject$q;
|
|
12435
12436
|
var FormatCurrency$7 = util.FormatCurrency;
|
|
12436
|
-
var html$
|
|
12437
|
-
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";
|
|
12437
|
+
var html$p = String.raw;
|
|
12438
12438
|
var InvoiceContent$1 = function InvoiceContent(_ref) {
|
|
12439
|
-
var _company$_id, _company$p;
|
|
12440
12439
|
var company = _ref.company,
|
|
12441
12440
|
defaultLang = _ref.defaultLang,
|
|
12442
12441
|
document = _ref.document,
|
|
@@ -12444,8 +12443,6 @@ var InvoiceContent$1 = function InvoiceContent(_ref) {
|
|
|
12444
12443
|
itemWidth = _ref.itemWidth,
|
|
12445
12444
|
isDeposit = _ref.isDeposit,
|
|
12446
12445
|
lang = _ref.lang,
|
|
12447
|
-
showPaymentInstructions = _ref.showPaymentInstructions,
|
|
12448
|
-
showActions = _ref.showActions,
|
|
12449
12446
|
t = _ref.t;
|
|
12450
12447
|
var _getTaxDetails = getTaxDetails(document, company, {
|
|
12451
12448
|
included: defaultLang.included
|
|
@@ -12479,19 +12476,12 @@ var InvoiceContent$1 = function InvoiceContent(_ref) {
|
|
|
12479
12476
|
lang: lang,
|
|
12480
12477
|
t: t
|
|
12481
12478
|
});
|
|
12482
|
-
|
|
12483
|
-
document: document,
|
|
12484
|
-
isDeposit: isDeposit
|
|
12485
|
-
});
|
|
12486
|
-
var hasInstructions = company.pi && document.ty === 1 && (company.p1 || company.p2 || company.p3 || company.hasPaymentInstructionQRCode);
|
|
12487
|
-
var paymentOn = hasInstructions && showPaymentInstructions !== false;
|
|
12488
|
-
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 ";
|
|
12489
|
-
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>" : "");
|
|
12479
|
+
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>" : "");
|
|
12490
12480
|
};
|
|
12491
12481
|
|
|
12492
|
-
var _templateObject$
|
|
12482
|
+
var _templateObject$r;
|
|
12493
12483
|
var FormatCurrency$8 = util.FormatCurrency;
|
|
12494
|
-
var html$
|
|
12484
|
+
var html$q = String.raw;
|
|
12495
12485
|
var InvoicePrice$1 = function InvoicePrice(_ref) {
|
|
12496
12486
|
var bookipayLink = _ref.bookipayLink,
|
|
12497
12487
|
company = _ref.company,
|
|
@@ -12515,11 +12505,11 @@ var InvoicePrice$1 = function InvoicePrice(_ref) {
|
|
|
12515
12505
|
surcharge: surcharge,
|
|
12516
12506
|
defaultLang: defaultLang
|
|
12517
12507
|
});
|
|
12518
|
-
return html$
|
|
12508
|
+
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));
|
|
12519
12509
|
};
|
|
12520
12510
|
|
|
12521
|
-
var _templateObject$
|
|
12522
|
-
var html$
|
|
12511
|
+
var _templateObject$s, _templateObject2$c, _templateObject3$7;
|
|
12512
|
+
var html$r = String.raw;
|
|
12523
12513
|
var ClientSignatureContainer$1 = function ClientSignatureContainer(_ref) {
|
|
12524
12514
|
var customer = _ref.customer,
|
|
12525
12515
|
customerSignBase64 = _ref.customerSignBase64,
|
|
@@ -12527,22 +12517,22 @@ var ClientSignatureContainer$1 = function ClientSignatureContainer(_ref) {
|
|
|
12527
12517
|
formatDate = _ref.formatDate,
|
|
12528
12518
|
signItIntegration = _ref.signItIntegration;
|
|
12529
12519
|
if (!(document !== null && document !== void 0 && document.cs) && !customerSignBase64) return "";
|
|
12530
|
-
return html$
|
|
12520
|
+
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>"]))) : "(   /  /  )");
|
|
12531
12521
|
};
|
|
12532
12522
|
|
|
12533
|
-
var _templateObject$
|
|
12534
|
-
var html$
|
|
12523
|
+
var _templateObject$t, _templateObject2$d;
|
|
12524
|
+
var html$s = String.raw;
|
|
12535
12525
|
var SignatureContainer$1 = function SignatureContainer(_ref) {
|
|
12536
12526
|
var company = _ref.company,
|
|
12537
12527
|
document = _ref.document,
|
|
12538
12528
|
formatDate = _ref.formatDate,
|
|
12539
12529
|
signatureBase64 = _ref.signatureBase64;
|
|
12540
12530
|
if (!(document !== null && document !== void 0 && document.sd)) return "";
|
|
12541
|
-
return html$
|
|
12531
|
+
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) : "");
|
|
12542
12532
|
};
|
|
12543
12533
|
|
|
12544
|
-
var _templateObject$
|
|
12545
|
-
var html$
|
|
12534
|
+
var _templateObject$u;
|
|
12535
|
+
var html$t = String.raw;
|
|
12546
12536
|
var InvoiceSignature$1 = function InvoiceSignature(_ref) {
|
|
12547
12537
|
var company = _ref.company,
|
|
12548
12538
|
document = _ref.document,
|
|
@@ -12574,10 +12564,10 @@ var InvoiceSignature$1 = function InvoiceSignature(_ref) {
|
|
|
12574
12564
|
formatDate: formatDate,
|
|
12575
12565
|
signItIntegration: signItIntegration
|
|
12576
12566
|
});
|
|
12577
|
-
return html$
|
|
12567
|
+
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 || "");
|
|
12578
12568
|
};
|
|
12579
12569
|
|
|
12580
|
-
var _templateObject$
|
|
12570
|
+
var _templateObject$v;
|
|
12581
12571
|
var htmlRaw$1 = String.raw;
|
|
12582
12572
|
var invoiceHtmlWithDetailsNew = (function (_ref) {
|
|
12583
12573
|
var invoice = _ref.invoice,
|
|
@@ -12650,7 +12640,7 @@ var invoiceHtmlWithDetailsNew = (function (_ref) {
|
|
|
12650
12640
|
surcharge: surcharge
|
|
12651
12641
|
});
|
|
12652
12642
|
} : lang["impose_surcharge"],
|
|
12653
|
-
payment_instruction: t ? t("Payment
|
|
12643
|
+
payment_instruction: t ? t("Payment Instruction") : lang["payment_instruction"],
|
|
12654
12644
|
included: t ? t("included") : lang["included"],
|
|
12655
12645
|
upgradeRequired: t ? t("Upgrade required") : lang["upgradeRequired"]
|
|
12656
12646
|
};
|
|
@@ -12678,7 +12668,7 @@ var invoiceHtmlWithDetailsNew = (function (_ref) {
|
|
|
12678
12668
|
var fontName = document.customization ? document.customization.font.name : "normal";
|
|
12679
12669
|
var fontSize = document.customization ? document.customization.font.size : "medium";
|
|
12680
12670
|
var color = document.customization ? document.customization.color : "#ffffff";
|
|
12681
|
-
var html = htmlRaw$1(_templateObject$
|
|
12671
|
+
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({
|
|
12682
12672
|
removeHtmlStandardDom: removeHtmlStandardDom,
|
|
12683
12673
|
isOffline: isOffline
|
|
12684
12674
|
}), invoiceStyle$1({
|
|
@@ -12706,12 +12696,10 @@ var invoiceHtmlWithDetailsNew = (function (_ref) {
|
|
|
12706
12696
|
defaultLang: defaultLang,
|
|
12707
12697
|
document: document,
|
|
12708
12698
|
forceItemUnitPriceDecimal: forceItemUnitPriceDecimal,
|
|
12709
|
-
showPaymentInstructions: document.shouldShowPaymentInstructions,
|
|
12710
12699
|
itemWidth: itemWidth,
|
|
12711
12700
|
isDeposit: isDeposit,
|
|
12712
12701
|
lang: lang,
|
|
12713
|
-
t: t
|
|
12714
|
-
showActions: showActions
|
|
12702
|
+
t: t
|
|
12715
12703
|
}), InvoicePrice$1({
|
|
12716
12704
|
bookipayLink: bookipayLink,
|
|
12717
12705
|
company: company,
|
|
@@ -12724,8 +12712,13 @@ var invoiceHtmlWithDetailsNew = (function (_ref) {
|
|
|
12724
12712
|
defaultLang: defaultLang,
|
|
12725
12713
|
document: document,
|
|
12726
12714
|
bookipayLink: bookipayLink,
|
|
12727
|
-
hidePayBtnInScreen: hidePayBtnInScreen
|
|
12728
|
-
|
|
12715
|
+
hidePayBtnInScreen: hidePayBtnInScreen
|
|
12716
|
+
}), PaymentInstructions({
|
|
12717
|
+
company: company,
|
|
12718
|
+
defaultLang: defaultLang,
|
|
12719
|
+
document: document,
|
|
12720
|
+
showPaymentInstructions: document.shouldShowPaymentInstructions,
|
|
12721
|
+
showActions: showActions
|
|
12729
12722
|
}), InvoiceNote({
|
|
12730
12723
|
company: company,
|
|
12731
12724
|
defaultLang: defaultLang,
|