@bookipi/htmlgenerator 1.3.1-alpha2 → 1.3.1-alpha4
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 +84 -11
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +84 -11
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12249,8 +12249,17 @@ var _templateObject$h;
|
|
|
12249
12249
|
var html$g = String.raw;
|
|
12250
12250
|
var invoiceStyle$1 = function invoiceStyle(_ref) {
|
|
12251
12251
|
var isFromReactnative = _ref.isFromReactnative,
|
|
12252
|
-
signItIntegration = _ref.signItIntegration
|
|
12253
|
-
|
|
12252
|
+
signItIntegration = _ref.signItIntegration,
|
|
12253
|
+
_ref$fontName = _ref.fontName,
|
|
12254
|
+
fontName = _ref$fontName === void 0 ? "normal" : _ref$fontName,
|
|
12255
|
+
_ref$fontSize = _ref.fontSize,
|
|
12256
|
+
fontSize = _ref$fontSize === void 0 ? "medium" : _ref$fontSize;
|
|
12257
|
+
var subFontSize = fontSize === "medium" ? "12px" : "14px";
|
|
12258
|
+
var bodyFontSize = fontSize === "medium" ? "14px" : "16px";
|
|
12259
|
+
var heading2FontSize = fontSize === "medium" ? "20px" : "24px";
|
|
12260
|
+
var headingFontSize = fontSize === "medium" ? "24px" : "36px";
|
|
12261
|
+
var titleFontSize = fontSize === "medium" ? "36px" : "56px";
|
|
12262
|
+
return html$g(_templateObject$h || (_templateObject$h = _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\n .invoice-body {\n background: #fff;\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: 1px solid #E5E7EB;\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 font-size: ", ";\n font-weight: 600;\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 }\n\n .invoice-detail-right {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n }\n\n .invoice-date {\n line-height: 30px;\n }\n\n .invoice-date .label {\n font-size: ", ";\n font-weight: 600;\n }\n\n /* InvoiceContent */\n\n .invoice-table-header{\n background: #F3F4F6;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .invoice-content td {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .item-name {\n font-weight: 500;\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-weight: 400;\n color: #4B5563;\n }\n\n .item-detail-cell {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n }\n\n .payment-instruction {\n margin-top: 0;\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.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 reak-before: auto;\n break-after: auto;\n break-inside: avoid;\n }\n\n @media print {\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: #f3f4f6 !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 }\n body, page, html {\n width: 100%;\n box-shadow: 0;\n //background-color: #fff;\n display: block;\n }\n .print {\n max-width:100%\n margin: 0 auto 0 auto;\n }\n\n .no-print {\n display: none;\n }\n\n #invoice {\n ", "\n }\n\n .invoice-price .invoice-price-right {\n color: black;\n }\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\n @media only screen {\n #invoice {\n margin-top:10px;\n max-width:28cm;\n // zoom: 0.8;\n border: 1px solid #E5E7EB;\n border-radius: 4px;\n margin-right:auto;margin-left:auto;\n background: 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: \"Comfortaa\", sans-serif;" : "", heading2FontSize, titleFontSize, headingFontSize, bodyFontSize, heading2FontSize, heading2FontSize, bodyFontSize, subFontSize, bodyFontSize, 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: \"Comfortaa\", sans-serif;" : "", bodyFontSize, fontSize === "medium" ? "85%" : "95%", isFromReactnative ? "zoom: 0.8; max-width:calc(38cm - 1.32cm);margin: 0 auto 0 auto;" : "", 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 " : "");
|
|
12254
12263
|
};
|
|
12255
12264
|
|
|
12256
12265
|
var _templateObject$i, _templateObject2$9;
|
|
@@ -12309,11 +12318,11 @@ var html$j = String.raw;
|
|
|
12309
12318
|
var Head$1 = function Head(_ref) {
|
|
12310
12319
|
var isOffline = _ref.isOffline,
|
|
12311
12320
|
removeHtmlStandardDom = _ref.removeHtmlStandardDom;
|
|
12312
|
-
var stylesheet = isOffline ? html$j(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["<style>\n ", "</style\n ><style>\n ", "\n </style
|
|
12321
|
+
var stylesheet = isOffline ? html$j(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["<style>\n ", "</style\n ><style>\n ", "\n </style>\n <link\n href=\"https://fonts.googleapis.com/css2?family=Comfortaa: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$j(_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=Comfortaa: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 /> "])));
|
|
12313
12322
|
if (removeHtmlStandardDom) {
|
|
12314
12323
|
return stylesheet;
|
|
12315
12324
|
}
|
|
12316
|
-
return html$j(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteralLoose(["<!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"utf-8\" />\n <title>Invoice</title>\n ", "\n
|
|
12325
|
+
return html$j(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteralLoose(["<!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"utf-8\" />\n <title>Invoice</title>\n ", "\n </head>\n </html>"])), stylesheet);
|
|
12317
12326
|
};
|
|
12318
12327
|
|
|
12319
12328
|
var _templateObject$l;
|
|
@@ -12364,13 +12373,14 @@ var ItemsContainer$1 = function ItemsContainer(_ref) {
|
|
|
12364
12373
|
for (var _iterator = _createForOfIteratorHelperLoose(document.it), _step; !(_step = _iterator()).done;) {
|
|
12365
12374
|
var _item$photos;
|
|
12366
12375
|
var item = _step.value;
|
|
12367
|
-
|
|
12376
|
+
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" : "";
|
|
12377
|
+
itemsContainer = itemsContainer + html$l(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["<tr>\n <td>\n ", "\n <div style=\"display: inline-block\">\n <span class=\"text-inverse\"\n ><span class=\"item-name\">", "</span></span\n >\n ", "\n <div class=\"item-description mt-2\">", "</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-right d-none d-md-table-cell\">\n ", "\n </td>\n ", "\n <td class=\"item-detail-cell t text-right\" style=\"font-weight: 600;\">\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$l(_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, {
|
|
12368
12378
|
forceDecimal: forceItemUnitPriceDecimal
|
|
12369
12379
|
}) + " ✕ " + (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, {
|
|
12370
12380
|
forceDecimal: forceItemUnitPriceDecimal
|
|
12371
12381
|
}) + " (" + (company.r_dc ? company.r_dc : defaultLang.discount) + ")" : "", (item.p || item.p == 0) && (item.q || item.q == 0) ? item.q : "", item.p || item.p == 0 ? FormatCurrency$5(item.p, company.cr, company.la, company.cf, {
|
|
12372
12382
|
forceDecimal: forceItemUnitPriceDecimal
|
|
12373
|
-
}) : "", discountOnItem ? html$l(_templateObject3$5 || (_templateObject3$5 = _taggedTemplateLiteralLoose(["<td class=\"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) : "");
|
|
12383
|
+
}) : "", discountOnItem ? html$l(_templateObject3$5 || (_templateObject3$5 = _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) : "");
|
|
12374
12384
|
}
|
|
12375
12385
|
return itemsContainer;
|
|
12376
12386
|
};
|
|
@@ -12464,7 +12474,7 @@ var InvoiceContent$1 = function InvoiceContent(_ref) {
|
|
|
12464
12474
|
});
|
|
12465
12475
|
var paymentOn = company.pi && document.ty === 1 && (company.p1 || company.p2 || company.p3);
|
|
12466
12476
|
var paymentInstructionDetails = "\n " + (paymentOn ? "<h2 class=\"payment-instruction\">" + (company.r_pi ? company.r_pi : defaultLang["payment_instruction"]) + "</h2>" : "") + "\n " + (paymentOn && company.p1 ? company.p1 + "<br>" : "") + "\n " + (paymentOn && company.p2 ? company.p2 + "<br>" : "") + "\n " + (paymentOn && company.p3 ? company.p3 + "<br>" : "") + "\n ";
|
|
12467
|
-
return html$n(_templateObject$o || (_templateObject$o = _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;\"\n >\n <thead class=\"invoice-table-header\">\n <tr class=\"table table-invoice\">\n <th\n class=\"text-left\"\n style=\"border-top-left-radius: 8px; border-bottom-left-radius: 8px;\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-center d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-right d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n ", "\n <th\n class=\"text-right item-last\"\n style=\"border-top-right-radius: 8px; border-bottom-right-radius: 8px;\"\n ", "\n >\n ", "\n </th>\n </tr>\n </thead>\n <tbody>\n ", "\n </tbody>\n </table>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <table class=\"table table-borderless table-small\">\n <tbody>\n <tr>\n <td\n class=\"d-none d-md-table-cell\"\n rowspan=\"", "\"\n >\n ", "\n </td>\n <td width=\"22%\" style=\"border-top: 1px solid #E5E7EB\">\n ", "\n </td>\n <td\n class=\"text-right\"\n width=\"22%\"\n style=\"border-top: 1px solid #E5E7EB\"\n >\n ", "\n </td>\n </tr>\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n </tbody>\n </table>\n </div>\n </div>\n\n <!-- end invoice-content -->\n </div>"])), itemWidth[0] ? "width='" + itemWidth[0] + "'" : "", company.r_it ? company.r_it : defaultLang["item"], itemWidth[1] ? "width='" + itemWidth[1] + "'" : "", document.um ? document.um : company.r_q ? company.r_q : defaultLang["quantity"], itemWidth[2] ? "width='" + itemWidth[2] + "'" : "", company.r_p ? company.r_p : defaultLang["price"], discountOnItem ? "<th class=\"text-right d-none d-md-table-cell\" " + (itemWidth[3] ? "width='" + itemWidth[3] + "'" : "") + ">" + (company.r_dc ? company.r_dc : defaultLang["discount"]) + "</th>" : "", itemWidth[4] ? "width='" + itemWidth[4] + "'" : "", company.r_a ? company.r_a : defaultLang["amount"], itemsContainer, numOfRowsPaymentInstruction, paymentOn ? paymentInstructionDetails : "", 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>" : "");
|
|
12477
|
+
return html$n(_templateObject$o || (_templateObject$o = _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;\"\n >\n <thead class=\"invoice-table-header\">\n <tr class=\"table table-invoice\">\n <th\n class=\"text-left\"\n style=\"border-top-left-radius: 8px; border-bottom-left-radius: 8px;\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-center d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-right d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n ", "\n <th\n class=\"text-right item-last\"\n style=\"border-top-right-radius: 8px; border-bottom-right-radius: 8px;\"\n ", "\n >\n ", "\n </th>\n </tr>\n </thead>\n <tbody>\n ", "\n </tbody>\n </table>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <table class=\"price-table table table-borderless table-small\">\n <tbody>\n <tr>\n <td\n class=\"d-none d-md-table-cell\"\n rowspan=\"", "\"\n >\n ", "\n </td>\n <td width=\"22%\" style=\"border-top: 1px solid #E5E7EB\">\n ", "\n </td>\n <td\n class=\"text-right\"\n width=\"22%\"\n style=\"border-top: 1px solid #E5E7EB\"\n >\n ", "\n </td>\n </tr>\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n </tbody>\n </table>\n </div>\n </div>\n\n <!-- end invoice-content -->\n </div>"])), itemWidth[0] ? "width='" + itemWidth[0] + "'" : "", company.r_it ? company.r_it : defaultLang["item"], itemWidth[1] ? "width='" + itemWidth[1] + "'" : "", document.um ? document.um : company.r_q ? company.r_q : defaultLang["quantity"], itemWidth[2] ? "width='" + itemWidth[2] + "'" : "", company.r_p ? company.r_p : defaultLang["price"], discountOnItem ? "<th class=\"text-right d-none d-md-table-cell\" " + (itemWidth[3] ? "width='" + itemWidth[3] + "'" : "") + ">" + (company.r_dc ? company.r_dc : defaultLang["discount"]) + "</th>" : "", itemWidth[4] ? "width='" + itemWidth[4] + "'" : "", company.r_a ? company.r_a : defaultLang["amount"], itemsContainer, numOfRowsPaymentInstruction, paymentOn ? paymentInstructionDetails : "", 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>" : "");
|
|
12468
12478
|
};
|
|
12469
12479
|
|
|
12470
12480
|
var _templateObject$p;
|
|
@@ -12496,7 +12506,66 @@ var InvoicePrice$1 = function InvoicePrice(_ref) {
|
|
|
12496
12506
|
return html$o(_templateObject$p || (_templateObject$p = _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));
|
|
12497
12507
|
};
|
|
12498
12508
|
|
|
12499
|
-
var _templateObject$q;
|
|
12509
|
+
var _templateObject$q, _templateObject2$c, _templateObject3$6;
|
|
12510
|
+
var html$p = String.raw;
|
|
12511
|
+
var ClientSignatureContainer$1 = function ClientSignatureContainer(_ref) {
|
|
12512
|
+
var customer = _ref.customer,
|
|
12513
|
+
customerSignBase64 = _ref.customerSignBase64,
|
|
12514
|
+
document = _ref.document,
|
|
12515
|
+
formatDate = _ref.formatDate,
|
|
12516
|
+
signItIntegration = _ref.signItIntegration;
|
|
12517
|
+
if (!(document !== null && document !== void 0 && document.cs) && !customerSignBase64) return "";
|
|
12518
|
+
return html$p(_templateObject$q || (_templateObject$q = _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$p(_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$p(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["<a href=\"#client_date_signature\"></a>"]))) : "(   /  /  )");
|
|
12519
|
+
};
|
|
12520
|
+
|
|
12521
|
+
var _templateObject$r, _templateObject2$d;
|
|
12522
|
+
var html$q = String.raw;
|
|
12523
|
+
var SignatureContainer$1 = function SignatureContainer(_ref) {
|
|
12524
|
+
var company = _ref.company,
|
|
12525
|
+
document = _ref.document,
|
|
12526
|
+
formatDate = _ref.formatDate,
|
|
12527
|
+
signatureBase64 = _ref.signatureBase64;
|
|
12528
|
+
if (!(document !== null && document !== void 0 && document.sd)) return "";
|
|
12529
|
+
return html$q(_templateObject$r || (_templateObject$r = _taggedTemplateLiteralLoose([" <div class=\"col-6\" style=\"text-align: center\">\n <strong class=\"signature-name\">", "</strong>\n <div\n 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$q(_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) : "");
|
|
12530
|
+
};
|
|
12531
|
+
|
|
12532
|
+
var _templateObject$s;
|
|
12533
|
+
var html$r = String.raw;
|
|
12534
|
+
var InvoiceSignature$1 = function InvoiceSignature(_ref) {
|
|
12535
|
+
var company = _ref.company,
|
|
12536
|
+
document = _ref.document,
|
|
12537
|
+
defaultLang = _ref.defaultLang,
|
|
12538
|
+
invoice = _ref.invoice,
|
|
12539
|
+
signItIntegration = _ref.signItIntegration;
|
|
12540
|
+
if (!document.cs && !document.sd) return "";
|
|
12541
|
+
var signatureBase64 = invoice.signatureBase64;
|
|
12542
|
+
var timeZone = company.tz;
|
|
12543
|
+
var formatDate = function formatDate(date) {
|
|
12544
|
+
return getFormatDate({
|
|
12545
|
+
company: company,
|
|
12546
|
+
date: date,
|
|
12547
|
+
timeZone: timeZone
|
|
12548
|
+
});
|
|
12549
|
+
};
|
|
12550
|
+
var signatureContainer = SignatureContainer$1({
|
|
12551
|
+
company: company,
|
|
12552
|
+
document: document,
|
|
12553
|
+
formatDate: formatDate,
|
|
12554
|
+
signatureBase64: signatureBase64
|
|
12555
|
+
});
|
|
12556
|
+
var customer = document.cu;
|
|
12557
|
+
var customerSignBase64 = invoice.customerSignBase64;
|
|
12558
|
+
var clientSignature = ClientSignatureContainer$1({
|
|
12559
|
+
customer: customer,
|
|
12560
|
+
customerSignBase64: customerSignBase64,
|
|
12561
|
+
document: document,
|
|
12562
|
+
formatDate: formatDate,
|
|
12563
|
+
signItIntegration: signItIntegration
|
|
12564
|
+
});
|
|
12565
|
+
return html$r(_templateObject$s || (_templateObject$s = _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 || "");
|
|
12566
|
+
};
|
|
12567
|
+
|
|
12568
|
+
var _templateObject$t;
|
|
12500
12569
|
var htmlRaw$1 = String.raw;
|
|
12501
12570
|
var invoiceHtmlWithDetailsNew = (function (_ref) {
|
|
12502
12571
|
var invoice = _ref.invoice,
|
|
@@ -12580,12 +12649,16 @@ var invoiceHtmlWithDetailsNew = (function (_ref) {
|
|
|
12580
12649
|
timeZone: timeZone
|
|
12581
12650
|
});
|
|
12582
12651
|
};
|
|
12583
|
-
var
|
|
12652
|
+
var fontName = document.customization ? document.customization.font.name : "normal";
|
|
12653
|
+
var fontSize = document.customization ? document.customization.font.size : "medium";
|
|
12654
|
+
var html = htmlRaw$1(_templateObject$t || (_templateObject$t = _taggedTemplateLiteralLoose(["\n ", "\n ", "\n ", "\n <div id=\"invoice\" class=\"print\">\n ", "\n ", "\n ", "\n ", "\n ", "\n <div class=\"note-and-sign invoice-body\">\n ", "\n ", "\n ", "\n </div>\n </div>\n\n ", "\n "])), Head$1({
|
|
12584
12655
|
removeHtmlStandardDom: removeHtmlStandardDom,
|
|
12585
12656
|
isOffline: isOffline
|
|
12586
12657
|
}), invoiceStyle$1({
|
|
12587
12658
|
isFromReactnative: isFromReactnative,
|
|
12588
|
-
signItIntegration: signItIntegration
|
|
12659
|
+
signItIntegration: signItIntegration,
|
|
12660
|
+
fontName: fontName,
|
|
12661
|
+
fontSize: fontSize
|
|
12589
12662
|
}), !removeHtmlStandardDom ? "<body id=\"bookipi-html-generator\">" : "", InvoiceCompany$1({
|
|
12590
12663
|
company: company,
|
|
12591
12664
|
invoice: invoice,
|
|
@@ -12623,7 +12696,7 @@ var invoiceHtmlWithDetailsNew = (function (_ref) {
|
|
|
12623
12696
|
company: company,
|
|
12624
12697
|
defaultLang: defaultLang,
|
|
12625
12698
|
document: document
|
|
12626
|
-
}), InvoiceSignature({
|
|
12699
|
+
}), InvoiceSignature$1({
|
|
12627
12700
|
company: company,
|
|
12628
12701
|
document: document,
|
|
12629
12702
|
defaultLang: defaultLang,
|