@bookipi/htmlgenerator 1.1.38 → 1.1.39

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.
@@ -10553,7 +10553,7 @@ function sanitize(obj) {
10553
10553
  var invoiceStyle = function invoiceStyle(_ref) {
10554
10554
  var isFromReactnative = _ref.isFromReactnative,
10555
10555
  signItIntegration = _ref.signItIntegration;
10556
- return "<style>\n * {\n -webkit-print-color-adjust: exact !important;\n color-adjust: exact !important;\n }\n body {\n font-size: 18px;\n -webkit-hyphens: auto;\n -ms-hyphens: auto;\n hyphens: auto;\n word-break: break-word;\n }\n .invoice-body {\n background: #fff;\n padding: 30px 50px;\n }\n\n .invoice-company {\n font-size: 20px\n }\n\n .invoice-header {\n /* margin: 0 -50px; */\n background: #f0f3f4;\n padding: 25px 50px;\n }\n .invoice-content {\n padding: 20px 38px 10px;\n }\n .invoice-date,\n .invoice-from,\n .invoice-to {\n /* display: table-cell; */\n /* width: 1% */\n }\n\n .table td, .table th {\n padding: .50rem .75rem;\n }\n\n .invoice-from,\n .invoice-to {\n padding-right: 20px\n }\n\n .invoice-date .date,\n .invoice-from strong,\n .invoice-to strong {\n font-size: 18px;\n font-weight: 600\n }\n\n .invoice-date {\n /* text-align: right; */\n padding-left: 15px\n }\n\n .invoice-price{\n /* background: #f0f3f4; */\n display: table;\n width: 100%\n }\n \n .invoice-price .invoice-price-left,\n .invoice-price .invoice-price-right {\n display: table-cell;\n // padding: 20px 12px 16px;\n font-size: 20px;\n font-weight: 600;\n width: 70%;\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 width: 30%;\n background: #f0f3f4;\n color: black;\n border: 2px solid #f0f3f4;\n font-size: 28px;\n text-align: right;\n vertical-align: bottom;\n font-weight: 300;\n right: 38px;\n padding: 28px 12px 16px;\n }\n\n .bookipay-payment-pay-btn {\n right: 0;\n width: 220px;\n text-align: center;\n border-radius: 5px;\n font-size: 17px;\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-size: 12px;\n margin-top: 13px;\n margin-bottom: 10px;\n font-size: 12px;\n width: 140px;\n right: 0;\n float: right;\n text-align:center;\n }\n \n .invoice-price .invoice-price-right small {\n display: block;\n opacity: .7;\n position: absolute;\n top: 10px;\n left: 12px;\n font-size: 18px\n }\n \n .invoice-price .invoice-price-right span {\n display: block;\n font-weight: 400;\n }\n\n .invoice-footer {\n border-top: 1px solid #ddd;\n padding-top: 10px;\n font-size: 18px\n }\n\n .invoice-note {\n color: #999;\n margin-top: 80px;\n font-size: 85%\n }\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 .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 .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 @page {\n size: A4;\n margin: 0.66cm 0.66cm 0.66cm 0.66cm;\n }\n body, page, html {\n /*width: 21cm; */\n /*margin: 0; */\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 /* .invoice-body {\n padding:10;\n } */\n #invoice {\n " + (isFromReactnative ? "zoom: 0.8; max-width:calc(38cm - 1.32cm);margin: 0 auto 0 auto;" : "") + "\n }\n\n .invoice-price .invoice-price-right {\n background: #f0f3f4;\n color: black;\n border: 2px solid #f0f3f4;\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 box-shadow: 0 0 0.5cm rgba(0,0,0,0.2);\n margin-right:auto;margin-left:auto;\n background: white;\n }\n .noInScreen{\n display: none;\n }\n }\n\n @media (min-width: 575.99px) {\n .invoice-detail-right {\n max-width: 200px;\n }\n }\n\n .item-last {\n width: 15%;\n }\n\n @media only screen and (max-width: 575.98px) {\n .invoice-price-right{\n width: 290px !important;\n display: block !important;\n }\n .item-last {\n width: 30%\n }\n .invoice-body {\n padding: 30px\n }\n .invoice-header {\n padding: 20px 30px;\n }\n .invoice-content {\n padding: 18px;\n }\n .invoice-price .invoice-price-right {\n right: 18px;\n }\n #invoice-logo {\n max-width: 100%;\n display: block;\n }\n .invoice-date {\n margin-top:10px;\n /*border-top: 1px solid #dee2e6;*/\n }\n }\n\n .table-small td{\n padding: 8px 12px\n }\n .table-invoice-header{\n background: #f0f3f4\n }\n .surcharge {\n margin-top: 3px;\n font-size: 12px;\n color: #999;\n }\n h1,h2,h3,h4 {margin-top:15px}\n h1 {font-size:27px}\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 " + (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 " : "") + "\n</style>";
10556
+ return "<style>\n * {\n -webkit-print-color-adjust: exact !important;\n color-adjust: exact !important;\n }\n body#bookipi-html-generator {\n font-size: 18px;\n -webkit-hyphens: auto;\n -ms-hyphens: auto;\n hyphens: auto;\n word-break: break-word;\n }\n .invoice-body {\n background: #fff;\n padding: 30px 50px;\n }\n\n .invoice-company {\n font-size: 20px\n }\n\n .invoice-header {\n /* margin: 0 -50px; */\n background: #f0f3f4;\n padding: 25px 50px;\n }\n .invoice-content {\n padding: 20px 38px 10px;\n }\n .invoice-date,\n .invoice-from,\n .invoice-to {\n /* display: table-cell; */\n /* width: 1% */\n }\n\n .table td, .table th {\n padding: .50rem .75rem;\n }\n\n .invoice-from,\n .invoice-to {\n padding-right: 20px\n }\n\n .invoice-date .date,\n .invoice-from strong,\n .invoice-to strong {\n font-size: 18px;\n font-weight: 600\n }\n\n .invoice-date {\n /* text-align: right; */\n padding-left: 15px\n }\n\n .invoice-price{\n /* background: #f0f3f4; */\n display: table;\n width: 100%\n }\n \n .invoice-price .invoice-price-left,\n .invoice-price .invoice-price-right {\n display: table-cell;\n // padding: 20px 12px 16px;\n font-size: 20px;\n font-weight: 600;\n width: 70%;\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 width: 30%;\n background: #f0f3f4;\n color: black;\n border: 2px solid #f0f3f4;\n font-size: 28px;\n text-align: right;\n vertical-align: bottom;\n font-weight: 300;\n right: 38px;\n padding: 28px 12px 16px;\n }\n\n .bookipay-payment-pay-btn {\n right: 0;\n width: 220px;\n text-align: center;\n border-radius: 5px;\n font-size: 17px;\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-size: 12px;\n margin-top: 13px;\n margin-bottom: 10px;\n font-size: 12px;\n width: 140px;\n right: 0;\n float: right;\n text-align:center;\n }\n \n .invoice-price .invoice-price-right small {\n display: block;\n opacity: .7;\n position: absolute;\n top: 10px;\n left: 12px;\n font-size: 18px\n }\n \n .invoice-price .invoice-price-right span {\n display: block;\n font-weight: 400;\n }\n\n .invoice-footer {\n border-top: 1px solid #ddd;\n padding-top: 10px;\n font-size: 18px\n }\n\n .invoice-note {\n color: #999;\n margin-top: 80px;\n font-size: 85%\n }\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 .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 .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 @page {\n size: A4;\n margin: 0.66cm 0.66cm 0.66cm 0.66cm;\n }\n body, page, html {\n /*width: 21cm; */\n /*margin: 0; */\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 /* .invoice-body {\n padding:10;\n } */\n #invoice {\n " + (isFromReactnative ? "zoom: 0.8; max-width:calc(38cm - 1.32cm);margin: 0 auto 0 auto;" : "") + "\n }\n\n .invoice-price .invoice-price-right {\n background: #f0f3f4;\n color: black;\n border: 2px solid #f0f3f4;\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 box-shadow: 0 0 0.5cm rgba(0,0,0,0.2);\n margin-right:auto;margin-left:auto;\n background: white;\n }\n .noInScreen{\n display: none;\n }\n }\n\n @media (min-width: 575.99px) {\n .invoice-detail-right {\n max-width: 200px;\n }\n }\n\n .item-last {\n width: 15%;\n }\n\n @media only screen and (max-width: 575.98px) {\n .invoice-price-right{\n width: 290px !important;\n display: block !important;\n }\n .item-last {\n width: 30%\n }\n .invoice-body {\n padding: 30px\n }\n .invoice-header {\n padding: 20px 30px;\n }\n .invoice-content {\n padding: 18px;\n }\n .invoice-price .invoice-price-right {\n right: 18px;\n }\n #invoice-logo {\n max-width: 100%;\n display: block;\n }\n .invoice-date {\n margin-top:10px;\n /*border-top: 1px solid #dee2e6;*/\n }\n }\n\n .table-small td{\n padding: 8px 12px\n }\n .table-invoice-header{\n background: #f0f3f4\n }\n .surcharge {\n margin-top: 3px;\n font-size: 12px;\n color: #999;\n }\n h1,h2,h3,h4 {margin-top:15px}\n h1 {font-size:27px}\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 " + (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 " : "") + "\n</style>";
10557
10557
  };
10558
10558
 
10559
10559
  var FormatCurrency$1 = util.FormatCurrency;
@@ -10825,7 +10825,7 @@ var invoiceHtmlWithDetails = (function (_ref) {
10825
10825
  var html = (!removeHtmlStandardDom ? '<!DOCTYPE html>\n<html>\n <head>\n <meta charset="utf-8">\n <title>Invoice</title>' : "") + "\n " + (isOffline ? "<style>" + bootstrapCss + "</style><style>" + fontawesomeCss + "</style>" : " <link rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css\" integrity=\"sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh\" crossorigin=\"anonymous\">\n <link href=\"https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css\" rel=\"stylesheet\">") + "\n " + (!removeHtmlStandardDom ? "</head>" : "") + "\n " + invoiceStyle({
10826
10826
  isFromReactnative: isFromReactnative,
10827
10827
  signItIntegration: signItIntegration
10828
- }) + "\n " + (!removeHtmlStandardDom ? "<body>" : "") + "\n <div id=\"invoice\" class=\"print\">\n <div class=\"invoice-body\">\n <!-- begin invoice-company -->\n <div class=\"row\">\n <div class=\"col-sm-12 col-md-6 mb-3 mb-md-0\" style=\"padding-top:10px\">\n " + logoContainer + "\n </div>\n <div class=\"col-sm-12 col-md-6 text-md-right\">\n <h1>" + documentName + "</h1>\n <div class=\"text-inverse mb-1\" style=\"font-size: 20px;\">\n <strong>" + company.c + "</strong>\n </div>\n <address class=\"m-t-5 m-b-5\">\n <div class=\"mb-2\">\n " + (companyAddress.address1 ? "<div>" + companyAddress.address1 + "</div>" : "") + "\n " + (companyAddress.address2 ? "<div>" + companyAddress.address2 + "</div>" : "") + "\n " + (companyAddress.address3 ? "<div>" + companyAddress.address3 + "</div>" : "") + "\n " + (companyAddress.city || companyAddress.state || companyAddress.zip ? "<div>" + ((companyAddress.city ? companyAddress.city + " " : "") + (companyAddress.state ? companyAddress.state + " " : "") + (companyAddress.zip ? companyAddress.zip + " " : "")) + "</div>" : "") + "\n " + (companyAddress.country ? "<div>" + companyAddress.country + "</div>" : "") + "\n </div>\n " + (company.ai ? "<div>" + company.ai + "</div>" : "") + "\n " + (company.ph ? "<div>" + company.ph + "</div>" : "") + "\n " + (company.de ? "<div>" + company.de + "</div>" : "") + "\n " + (company.tfn ? "<div>" + ((company.bn ? company.bn : "Tax no.") + " : " + company.tfn) + "</div>" : "") + "\n </address>\n </div>\n </div>\n </div>\n <!-- end invoice-company -->\n <!-- begin invoice-header -->\n <div class=\"invoice-header\">\n <div class=\"row\">\n <div class=\"invoice-to col-sm-12 col-md-6\">\n <strong>" + (company.r_bt ? company.r_bt : defaultLang["bill_to"]) + "</strong>\n <div class=\"text-inverse mb-1\">\n <small style=\"font-size: 18px;\">" + (customer ? customer.c : "") + "</small>\n </div>\n <address class=\"m-t-5 m-b-5\">\n " + (customerAddress.address1 ? "<div>" + customerAddress.address1 + "</div>" : "") + "\n " + (customerAddress.address2 ? "<div>" + customerAddress.address2 + "</div>" : "") + "\n " + (customerAddress.address3 ? "<div>" + customerAddress.address3 + "</div>" : "") + "\n " + (customerAddress.city || customerAddress.state || customerAddress.zip ? "<div>" + ((customerAddress.city ? customerAddress.city + " " : "") + (customerAddress.state ? customerAddress.state + " " : "") + (customerAddress.zip ? customerAddress.zip + " " : "")) + "</div>" : "") + "\n " + (customerAddress.country ? "<div>" + customerAddress.country + "</div>" : "") + "\n " + (customer && customer.tfn ? "<div>" + (customer.tfn ? (company.bn || "Tax no.") + " : " + customer.tfn : "") + "</div>" : "") + "\n " + (customer && customer.e ? "<div>" + customer.e + "</div>" : "") + "\n " + (customer && customer.ph ? "<div>" + customer.ph + "</div>" : "") + "\n " + (customer && customer.ai ? "<div>" + customer.ai + "</div>" : "") + "\n </address>\n\n " + (shippingAddressExists ? "<strong stryle=\"margin-top:10px\">" + (company.r_st ? company.r_st : defaultLang.ship_to) + "</strong>" : "") + "\n " + (shippingAddressExists ? "\n <address class=\"m-t-5 m-b-5\">\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 " : "") + "\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 <strong>" + documentName + " #</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">" + (document.no ? document.no : "") + "</div>\n </div>\n " + (document.proposal && document.proposal.no ? "<div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>Proposal #</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">\n " + document.proposal.no + "\n </div>\n </div>" : "") + "\n <div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>" + (company.r_d ? company.r_d : defaultLang["date"]) + "</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">" + formatDate(document.d) + "</div>\n </div>\n " + (document.ty == 1 && !document.rd ? "<div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>" + (company.r_dd ? company.r_dd : defaultLang["due_date"]) + "</strong>\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>" : "") + "\n " + (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 " : "") + "\n </div>\n </div>\n </div>\n <!-- end invoice-header -->\n <!-- 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 class=\"text-left\" " + (itemWidth[0] ? "width='" + itemWidth[0] + "'" : "") + ">" + (company.r_it ? company.r_it : defaultLang["item"]) + "</th>\n <th class=\"text-center d-none d-md-table-cell\" " + (itemWidth[1] ? "width='" + itemWidth[1] + "'" : "") + ">" + (document.um ? document.um : company.r_q ? company.r_q : defaultLang["quantity"]) + "</th>\n <th class=\"text-right d-none d-md-table-cell\" " + (itemWidth[2] ? "width='" + itemWidth[2] + "'" : "") + ">" + (company.r_p ? company.r_p : defaultLang["price"]) + "</th>\n " + (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>" : "") + "\n <th class=\"text-right item-last\" " + (itemWidth[4] ? "width='" + itemWidth[4] + "'" : "") + ">" + (company.r_a ? company.r_a : defaultLang["amount"]) + "</th>\n </tr>\n </thead>\n <tbody>\n " + itemsContainer + "\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 class=\"d-none d-md-table-cell\" rowspan=\"" + numOfRowsPaymentInstruction + "\">\n " + (paymentOn ? paymentInstructionDetails : "") + "\n </td>\n <td class=\"text-md-right\" width=\"22%\">" + (company.r_sb ? company.r_sb : defaultLang["subtotal"]) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$3(document.st, company.cr, company.la, company.cf) + "</td>\n </tr>\n " + (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>" : "") + "\n " + (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>" : "") + "\n " + (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>" : "") + "\n " + (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>" : "") + "\n " + (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>" : "") + "\n " + (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>" : "") + "\n " + (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>" : "") + "\n " + (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>" : "") + "\n " + (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>" : "") + "\n " + (document.ty == 1 && document.pma && document.pm ? paymentContainer : "") + "\n " + (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>" : "") + "\n </tbody>\n </table>\n </div>\n </div>\n </div>\n <!-- end invoice-content -->\n \n \n\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\">\n " + bookipayLinkComponent + "\n </div>\n <!-- end bookipay payment -->\n </div>\n <div class=\"invoice-price-right\">\n <small>" + (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) : "") + "</small>\n <span class=\"f-w-600 mt-3\">" + (document.ty == 1 && isDeposit && document.depositAmount > 0 ? FormatCurrency$3(document.depositAmount, company.cr, company.la, company.cf) : FormatCurrency$3(document.ad - (document.hangingAmount || 0), company.cr, company.la, company.cf)) + "</span>\n \n </div>\n </div>\n <!-- end invoice price -->\n\n " + (paymentOn || bookipayLinkComponent ? "<div class=\"invoice-body\">\n <div class=\"d-block d-md-none\">\n " + (paymentOn ? paymentInstructionDetails : "") + "\n " + (bookipayLinkComponent ? "<div class=\"mt-4\">" + bookipayLinkComponent + "</div>" : "") + "\n </div>\n </div>" : "") + "\n\n <div class=\"invoice-body\">\n\n <!-- begin invoice-note -->\n " + (document.noteHtml ? "<div class=\"mt-1\">\n " + document.noteHtml + "\n </div>" : (document.nt ? "<div class=\"mt-1\">\n <h2>" + (company.r_nt ? company.r_nt : defaultLang["note"]) + "</h2>\n " + nl2br(document.nt) + "\n </div>" : "") + "\n " + (document.tc ? "<div class=\"mt-1\">\n <h2>" + (company.r_tc ? company.r_tc : defaultLang["terms"]) + "</h2>\n " + nl2br(document.tc) + "\n </div>" : "")) + "\n <!-- end invoice-note -->\n \n <!--- begin company signature -->\n <!-- begin invoice-signature -->\n " + (document.cs || document.sd ? "\n <div class=\"seperate-line\"></div>\n <div>" + (company.r_bs || defaultLang["by_signing"] || "") + "</div>\n <div class=\"row mt-1\">\n " + (signatureContainer || "") + "\n " + (clientSignature || "") + "\n </div>" : "") + "\n <!-- end invoice-signature-->\n\n <!-- begin invoice attachments -->\n\n " + (attachments && attachments.length > 0 ? "<div style=\"text-align: center\">\n " + attachmentContainer + "\n </div>" : "") + "\n <!-- end invoice attachment -->\n </div>\n </div>\n\n" + (!removeHtmlStandardDom ? "</body></html>" : "") + "\n";
10828
+ }) + "\n " + (!removeHtmlStandardDom ? "<body id=\"bookipi-html-generator\">" : "") + "\n <div id=\"invoice\" class=\"print\">\n <div class=\"invoice-body\">\n <!-- begin invoice-company -->\n <div class=\"row\">\n <div class=\"col-sm-12 col-md-6 mb-3 mb-md-0\" style=\"padding-top:10px\">\n " + logoContainer + "\n </div>\n <div class=\"col-sm-12 col-md-6 text-md-right\">\n <h1>" + documentName + "</h1>\n <div class=\"text-inverse mb-1\" style=\"font-size: 20px;\">\n <strong>" + company.c + "</strong>\n </div>\n <address class=\"m-t-5 m-b-5\">\n <div class=\"mb-2\">\n " + (companyAddress.address1 ? "<div>" + companyAddress.address1 + "</div>" : "") + "\n " + (companyAddress.address2 ? "<div>" + companyAddress.address2 + "</div>" : "") + "\n " + (companyAddress.address3 ? "<div>" + companyAddress.address3 + "</div>" : "") + "\n " + (companyAddress.city || companyAddress.state || companyAddress.zip ? "<div>" + ((companyAddress.city ? companyAddress.city + " " : "") + (companyAddress.state ? companyAddress.state + " " : "") + (companyAddress.zip ? companyAddress.zip + " " : "")) + "</div>" : "") + "\n " + (companyAddress.country ? "<div>" + companyAddress.country + "</div>" : "") + "\n </div>\n " + (company.ai ? "<div>" + company.ai + "</div>" : "") + "\n " + (company.ph ? "<div>" + company.ph + "</div>" : "") + "\n " + (company.de ? "<div>" + company.de + "</div>" : "") + "\n " + (company.tfn ? "<div>" + ((company.bn ? company.bn : "Tax no.") + " : " + company.tfn) + "</div>" : "") + "\n </address>\n </div>\n </div>\n </div>\n <!-- end invoice-company -->\n <!-- begin invoice-header -->\n <div class=\"invoice-header\">\n <div class=\"row\">\n <div class=\"invoice-to col-sm-12 col-md-6\">\n <strong>" + (company.r_bt ? company.r_bt : defaultLang["bill_to"]) + "</strong>\n <div class=\"text-inverse mb-1\">\n <small style=\"font-size: 18px;\">" + (customer ? customer.c : "") + "</small>\n </div>\n <address class=\"m-t-5 m-b-5\">\n " + (customerAddress.address1 ? "<div>" + customerAddress.address1 + "</div>" : "") + "\n " + (customerAddress.address2 ? "<div>" + customerAddress.address2 + "</div>" : "") + "\n " + (customerAddress.address3 ? "<div>" + customerAddress.address3 + "</div>" : "") + "\n " + (customerAddress.city || customerAddress.state || customerAddress.zip ? "<div>" + ((customerAddress.city ? customerAddress.city + " " : "") + (customerAddress.state ? customerAddress.state + " " : "") + (customerAddress.zip ? customerAddress.zip + " " : "")) + "</div>" : "") + "\n " + (customerAddress.country ? "<div>" + customerAddress.country + "</div>" : "") + "\n " + (customer && customer.tfn ? "<div>" + (customer.tfn ? (company.bn || "Tax no.") + " : " + customer.tfn : "") + "</div>" : "") + "\n " + (customer && customer.e ? "<div>" + customer.e + "</div>" : "") + "\n " + (customer && customer.ph ? "<div>" + customer.ph + "</div>" : "") + "\n " + (customer && customer.ai ? "<div>" + customer.ai + "</div>" : "") + "\n </address>\n\n " + (shippingAddressExists ? "<strong stryle=\"margin-top:10px\">" + (company.r_st ? company.r_st : defaultLang.ship_to) + "</strong>" : "") + "\n " + (shippingAddressExists ? "\n <address class=\"m-t-5 m-b-5\">\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 " : "") + "\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 <strong>" + documentName + " #</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">" + (document.no ? document.no : "") + "</div>\n </div>\n " + (document.proposal && document.proposal.no ? "<div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>Proposal #</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">\n " + document.proposal.no + "\n </div>\n </div>" : "") + "\n <div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>" + (company.r_d ? company.r_d : defaultLang["date"]) + "</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">" + formatDate(document.d) + "</div>\n </div>\n " + (document.ty == 1 && !document.rd ? "<div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>" + (company.r_dd ? company.r_dd : defaultLang["due_date"]) + "</strong>\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>" : "") + "\n " + (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 " : "") + "\n </div>\n </div>\n </div>\n <!-- end invoice-header -->\n <!-- 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 class=\"text-left\" " + (itemWidth[0] ? "width='" + itemWidth[0] + "'" : "") + ">" + (company.r_it ? company.r_it : defaultLang["item"]) + "</th>\n <th class=\"text-center d-none d-md-table-cell\" " + (itemWidth[1] ? "width='" + itemWidth[1] + "'" : "") + ">" + (document.um ? document.um : company.r_q ? company.r_q : defaultLang["quantity"]) + "</th>\n <th class=\"text-right d-none d-md-table-cell\" " + (itemWidth[2] ? "width='" + itemWidth[2] + "'" : "") + ">" + (company.r_p ? company.r_p : defaultLang["price"]) + "</th>\n " + (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>" : "") + "\n <th class=\"text-right item-last\" " + (itemWidth[4] ? "width='" + itemWidth[4] + "'" : "") + ">" + (company.r_a ? company.r_a : defaultLang["amount"]) + "</th>\n </tr>\n </thead>\n <tbody>\n " + itemsContainer + "\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 class=\"d-none d-md-table-cell\" rowspan=\"" + numOfRowsPaymentInstruction + "\">\n " + (paymentOn ? paymentInstructionDetails : "") + "\n </td>\n <td class=\"text-md-right\" width=\"22%\">" + (company.r_sb ? company.r_sb : defaultLang["subtotal"]) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$3(document.st, company.cr, company.la, company.cf) + "</td>\n </tr>\n " + (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>" : "") + "\n " + (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>" : "") + "\n " + (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>" : "") + "\n " + (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>" : "") + "\n " + (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>" : "") + "\n " + (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>" : "") + "\n " + (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>" : "") + "\n " + (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>" : "") + "\n " + (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>" : "") + "\n " + (document.ty == 1 && document.pma && document.pm ? paymentContainer : "") + "\n " + (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>" : "") + "\n </tbody>\n </table>\n </div>\n </div>\n </div>\n <!-- end invoice-content -->\n \n \n\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\">\n " + bookipayLinkComponent + "\n </div>\n <!-- end bookipay payment -->\n </div>\n <div class=\"invoice-price-right\">\n <small>" + (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) : "") + "</small>\n <span class=\"f-w-600 mt-3\">" + (document.ty == 1 && isDeposit && document.depositAmount > 0 ? FormatCurrency$3(document.depositAmount, company.cr, company.la, company.cf) : FormatCurrency$3(document.ad - (document.hangingAmount || 0), company.cr, company.la, company.cf)) + "</span>\n \n </div>\n </div>\n <!-- end invoice price -->\n\n " + (paymentOn || bookipayLinkComponent ? "<div class=\"invoice-body\">\n <div class=\"d-block d-md-none\">\n " + (paymentOn ? paymentInstructionDetails : "") + "\n " + (bookipayLinkComponent ? "<div class=\"mt-4\">" + bookipayLinkComponent + "</div>" : "") + "\n </div>\n </div>" : "") + "\n\n <div class=\"invoice-body\">\n\n <!-- begin invoice-note -->\n " + (document.noteHtml ? "<div class=\"mt-1\">\n " + document.noteHtml + "\n </div>" : (document.nt ? "<div class=\"mt-1\">\n <h2>" + (company.r_nt ? company.r_nt : defaultLang["note"]) + "</h2>\n " + nl2br(document.nt) + "\n </div>" : "") + "\n " + (document.tc ? "<div class=\"mt-1\">\n <h2>" + (company.r_tc ? company.r_tc : defaultLang["terms"]) + "</h2>\n " + nl2br(document.tc) + "\n </div>" : "")) + "\n <!-- end invoice-note -->\n \n <!--- begin company signature -->\n <!-- begin invoice-signature -->\n " + (document.cs || document.sd ? "\n <div class=\"seperate-line\"></div>\n <div>" + (company.r_bs || defaultLang["by_signing"] || "") + "</div>\n <div class=\"row mt-1\">\n " + (signatureContainer || "") + "\n " + (clientSignature || "") + "\n </div>" : "") + "\n <!-- end invoice-signature-->\n\n <!-- begin invoice attachments -->\n\n " + (attachments && attachments.length > 0 ? "<div style=\"text-align: center\">\n " + attachmentContainer + "\n </div>" : "") + "\n <!-- end invoice attachment -->\n </div>\n </div>\n\n" + (!removeHtmlStandardDom ? "</body></html>" : "") + "\n";
10829
10829
  return {
10830
10830
  html: html,
10831
10831
  timeZone: timeZone,