@bookipi/htmlgenerator 1.1.17 → 1.1.18-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 CHANGED
@@ -2042,6 +2042,8 @@ var defaultLang = {
2042
2042
  search_item: "Search item"
2043
2043
  };
2044
2044
 
2045
+ var bookipayLogo = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"172.407\" height=\"35.651\" viewBox=\"0 0 172.407 35.651\">\n <g id=\"Group_8\" data-name=\"Group 8\" transform=\"translate(0 0.036)\">\n <path id=\"Path_1\" data-name=\"Path 1\" d=\"M123.173,50.085a9.585,9.585,0,0,1-2.983-7.342,9.44,9.44,0,0,1,2.966-7.288,11.191,11.191,0,0,1,14.662,0,9.466,9.466,0,0,1,2.946,7.288,9.67,9.67,0,0,1-2.929,7.342,10.188,10.188,0,0,1-7.305,2.786A10.372,10.372,0,0,1,123.173,50.085Zm10.251-3.636a5.143,5.143,0,0,0,1.2-3.669,4.986,4.986,0,0,0-1.235-3.652,3.979,3.979,0,0,0-2.931-1.254,3.92,3.92,0,0,0-2.914,1.254,5.03,5.03,0,0,0-1.217,3.652,5,5,0,0,0,1.254,3.669,4,4,0,0,0,2.946,1.271A3.851,3.851,0,0,0,133.425,46.449Z\" transform=\"translate(-96.969 -26.398)\" fill=\"#1f2a59\"/>\n <path id=\"Path_2\" data-name=\"Path 2\" d=\"M242.443,50.085a9.585,9.585,0,0,1-2.983-7.342,9.44,9.44,0,0,1,2.966-7.288,11.191,11.191,0,0,1,14.662,0,9.468,9.468,0,0,1,2.948,7.288,9.671,9.671,0,0,1-2.931,7.342,10.188,10.188,0,0,1-7.305,2.786A10.375,10.375,0,0,1,242.443,50.085Zm10.251-3.636a5.143,5.143,0,0,0,1.2-3.669,4.986,4.986,0,0,0-1.235-3.652,3.975,3.975,0,0,0-2.929-1.254,3.923,3.923,0,0,0-2.914,1.254A5.03,5.03,0,0,0,245.6,42.78a5,5,0,0,0,1.254,3.669A4,4,0,0,0,249.8,47.72,3.847,3.847,0,0,0,252.695,46.449Z\" transform=\"translate(-193.195 -26.398)\" fill=\"#1f2a59\"/>\n <path id=\"Path_3\" data-name=\"Path 3\" d=\"M18.177,9.2A8.341,8.341,0,0,0,11.8,6.352,6.685,6.685,0,0,0,6.032,9.144V5A5.07,5.07,0,0,0,1.285.04,9.04,9.04,0,0,0,0,.144V26.26H6.034V23.4a6.692,6.692,0,0,0,5.823,3.109,8.3,8.3,0,0,0,6.32-2.829,10.24,10.24,0,0,0,2.61-7.23A10.31,10.31,0,0,0,18.177,9.2ZM13.339,20.029a4.187,4.187,0,0,1-6-.015,4.79,4.79,0,0,1-1.31-3.6,4.731,4.731,0,0,1,1.31-3.582,4.205,4.205,0,0,1,6,.015,4.8,4.8,0,0,1,1.31,3.6A4.725,4.725,0,0,1,13.339,20.029Z\" transform=\"translate(0 -0.032)\" fill=\"#1f2a59\"/>\n <path id=\"Path_4\" data-name=\"Path 4\" d=\"M386.312,26.228H378.3l-6.206-7.871v7.871H366.06V.091A4.9,4.9,0,0,1,367,0a4.967,4.967,0,0,1,1.061.112,5.088,5.088,0,0,1,4.032,4.741v9.908L376.3,9.1l.008-.015.813-1.09a5.025,5.025,0,0,1,2.6-1.451,4.968,4.968,0,0,1,1.061-.114,4.86,4.86,0,0,1,1.061.114,5.106,5.106,0,0,1,2.943,1.82l-6.426,7.659h-.008l-.475.572Z\" transform=\"translate(-295.335)\" fill=\"#1f2a59\"/>\n <path id=\"Path_5\" data-name=\"Path 5\" d=\"M562.107,35.552a8.31,8.31,0,0,0-6.364-2.842,6.678,6.678,0,0,0-5.7,2.693.706.706,0,0,0-.075.1v-.22a5.055,5.055,0,0,0-3.3-2.353h-2.116a3.587,3.587,0,0,0-.624.18v28.73a3.515,3.515,0,0,0,.361.073,5.1,5.1,0,0,0,1,.095,5.237,5.237,0,0,0,1.009-.095,4.209,4.209,0,0,0,3.671-3.611V49.758l.008.012a6.677,6.677,0,0,0,5.816,3.1,8.268,8.268,0,0,0,6.312-2.829,10.234,10.234,0,0,0,2.612-7.232A10.317,10.317,0,0,0,562.107,35.552Zm-4.838,10.835a4.187,4.187,0,0,1-6-.015,4.786,4.786,0,0,1-1.3-3.6,4.727,4.727,0,0,1,1.3-3.582,4.205,4.205,0,0,1,6,.015,4.8,4.8,0,0,1,1.31,3.6A4.725,4.725,0,0,1,557.269,46.387Z\" transform=\"translate(-438.84 -26.39)\" fill=\"#3797d3\"/>\n <g id=\"Group_4\" data-name=\"Group 4\" transform=\"translate(151.884 6.324)\">\n <g id=\"Group_1\" data-name=\"Group 1\" transform=\"translate(0 0.006)\">\n <path id=\"Path_6\" data-name=\"Path 6\" d=\"M793.464,35.844l5.781,14.529-5.622,2.237L786.13,33.779a2.871,2.871,0,0,1,.3-.22,4.234,4.234,0,0,1,.887-.479,4.281,4.281,0,0,1,.98-.263A4.8,4.8,0,0,1,793.464,35.844Z\" transform=\"translate(-786.13 -32.761)\" fill=\"#3797d3\"/>\n </g>\n <g id=\"Group_2\" data-name=\"Group 2\" transform=\"translate(8.128)\">\n <path id=\"Path_7\" data-name=\"Path 7\" d=\"M840.144,39.367l-6.478,13.665L828.2,50.439l8.4-17.709a2.711,2.711,0,0,1,.365.073,4.521,4.521,0,0,1,1.814.86A4.682,4.682,0,0,1,840.144,39.367Z\" transform=\"translate(-828.2 -32.73)\" fill=\"#3797d3\"/>\n </g>\n <g id=\"Group_3\" data-name=\"Group 3\" transform=\"translate(3.13 10.358)\">\n <path id=\"Path_8\" data-name=\"Path 8\" d=\"M809.722,102.59l6.55-13.631-5.454-2.62-8.487,17.667a2.889,2.889,0,0,0,.288.238,4.319,4.319,0,0,0,.854.535,4.474,4.474,0,0,0,.956.334A4.677,4.677,0,0,0,809.722,102.59Z\" transform=\"translate(-802.33 -86.34)\" fill=\"#3797d3\"/>\n </g>\n </g>\n <g id=\"Group_7\" data-name=\"Group 7\" transform=\"translate(128.385 6.322)\">\n <path id=\"Path_9\" data-name=\"Path 9\" d=\"M667.483,50.085a9.585,9.585,0,0,1-2.983-7.342,9.44,9.44,0,0,1,2.966-7.288,11.191,11.191,0,0,1,14.662,0,9.468,9.468,0,0,1,2.948,7.288,9.671,9.671,0,0,1-2.931,7.342,10.189,10.189,0,0,1-7.305,2.786A10.375,10.375,0,0,1,667.483,50.085Zm10.251-3.636a5.143,5.143,0,0,0,1.2-3.669,4.986,4.986,0,0,0-1.235-3.652,3.975,3.975,0,0,0-2.929-1.254,3.923,3.923,0,0,0-2.914,1.254,5.03,5.03,0,0,0-1.217,3.652,5,5,0,0,0,1.254,3.669,4,4,0,0,0,2.946,1.271A3.846,3.846,0,0,0,677.734,46.449Z\" transform=\"translate(-664.5 -32.72)\" fill=\"#3797d3\"/>\n <g id=\"Group_5\" data-name=\"Group 5\" transform=\"translate(14.72)\">\n <path id=\"Path_10\" data-name=\"Path 10\" d=\"M746.739,36.435v12H740.69V32.882a3.506,3.506,0,0,1,.361-.071,5.592,5.592,0,0,1,2.007,0C745.166,33.174,746.739,34.662,746.739,36.435Z\" transform=\"translate(-740.69 -32.72)\" fill=\"#3797d3\"/>\n </g>\n <g id=\"Group_6\" data-name=\"Group 6\" transform=\"translate(14.72 4.432)\">\n <path id=\"Path_11\" data-name=\"Path 11\" d=\"M740.69,67.664v-12h6.049V71.219a3.5,3.5,0,0,1-.361.071,5.592,5.592,0,0,1-2.007,0C742.263,70.925,740.69,69.437,740.69,67.664Z\" transform=\"translate(-740.69 -55.66)\" fill=\"#3797d3\"/>\n </g>\n </g>\n <path id=\"Path_12\" data-name=\"Path 12\" d=\"M491.439,53.59v12.7H485.39V49.83a3.52,3.52,0,0,1,.361-.075,5.071,5.071,0,0,1,1-.095,5.2,5.2,0,0,1,1.007.095A4.159,4.159,0,0,1,491.439,53.59Z\" transform=\"translate(-391.61 -40.065)\" fill=\"#1f2a59\"/>\n <path id=\"Path_13\" data-name=\"Path 13\" d=\"M488.41,5.2c0,.021-.006.043-.008.064v.006h0c-.008.07-.021.137-.033.209s-.025.149-.039.226c-.029.155-.068.311-.1.477-.023.081-.044.164-.068.249s-.046.17-.075.257-.056.174-.083.261-.064.174-.1.265c-.017.044-.033.089-.05.135s-.037.089-.056.133c-.039.089-.077.18-.116.27a9.887,9.887,0,0,1-.58,1.076c-.145.226-.3.45-.466.667-.091.12-.185.24-.284.354a9.353,9.353,0,0,1-.891.9,9.135,9.135,0,0,1-.983.738l-.048.029-.048-.029a8.94,8.94,0,0,1-.983-.738,8.924,8.924,0,0,1-.891-.9c-.1-.116-.191-.234-.282-.354-.166-.216-.321-.441-.466-.667a9.732,9.732,0,0,1-.58-1.076c-.039-.091-.077-.182-.116-.27-.019-.044-.039-.089-.056-.133s-.033-.091-.05-.135c-.033-.089-.068-.176-.1-.265s-.056-.176-.085-.261-.052-.172-.075-.257-.046-.168-.068-.249c-.037-.166-.075-.325-.1-.477q-.02-.116-.041-.226a2.147,2.147,0,0,1-.033-.214v0l-.006-.05v0a.2.2,0,0,1,.191-.214.191.191,0,0,1,.164.1l.017.046c.023.062.05.124.079.187s.058.128.087.193c.06.131.129.261.2.4.039.066.075.133.114.2s.077.137.122.2.087.135.129.2.093.135.139.2c.025.033.046.068.071.1s.05.066.075.1c.052.066.1.131.155.2a7.725,7.725,0,0,0,.7.744,7.055,7.055,0,0,0,.8.628,6.977,6.977,0,0,0,.856.477c.029.012.056.025.083.037l.083-.037a6.968,6.968,0,0,0,.856-.477,7.664,7.664,0,0,0,.8-.628,7.725,7.725,0,0,0,.7-.744c.052-.068.1-.133.155-.2.025-.033.052-.066.075-.1s.048-.068.072-.1c.046-.068.1-.135.141-.2l.129-.2c.044-.068.083-.137.122-.2s.077-.135.114-.2c.068-.137.139-.269.2-.4.029-.066.058-.129.085-.193s.056-.126.079-.187l.006-.015s0-.006,0-.008a.19.19,0,0,1,.174-.126A.2.2,0,0,1,488.41,5.2Z\" transform=\"translate(-387.625 -4.026)\" fill=\"#3797d3\" stroke=\"#3897d3\" stroke-miterlimit=\"10\" stroke-width=\"2\"/>\n </g>\n</svg>";
2046
+
2045
2047
  var invoiceHtmlWithDetails = (function (_ref) {
2046
2048
  var _customer$address, _customer$address2, _customer$address3, _customer$shippingAdd, _customer$shippingAdd2, _customer$shippingAdd3;
2047
2049
 
@@ -2057,7 +2059,9 @@ var invoiceHtmlWithDetails = (function (_ref) {
2057
2059
  _ref$isFromReactnativ = _ref.isFromReactnative,
2058
2060
  isFromReactnative = _ref$isFromReactnativ === void 0 ? false : _ref$isFromReactnativ,
2059
2061
  _ref$removeHtmlStanda = _ref.removeHtmlStandardDom,
2060
- removeHtmlStandardDom = _ref$removeHtmlStanda === void 0 ? false : _ref$removeHtmlStanda;
2062
+ removeHtmlStandardDom = _ref$removeHtmlStanda === void 0 ? false : _ref$removeHtmlStanda,
2063
+ _ref$bookipayLink = _ref.bookipayLink,
2064
+ bookipayLink = _ref$bookipayLink === void 0 ? null : _ref$bookipayLink;
2061
2065
  var company = invoice.company || {};
2062
2066
  var document = invoice.document || {};
2063
2067
  var logoBase64 = invoice.logoBase64;
@@ -2213,10 +2217,10 @@ var invoiceHtmlWithDetails = (function (_ref) {
2213
2217
  }
2214
2218
 
2215
2219
  var signatureContainer = document.sd ? "\n <div class=\"col-6\" style=\"text-align: center\">\n <strong>" + (document.cs || customerSignBase64 ? company.c : "") + "</strong>\n <div style=\"height:100px;border-bottom:2px solid #dee2e6; margin-right:40px; margin-left:40px\">\n " + (signatureBase64 ? "<img src=\"" + signatureBase64 + "\" style=\"width:220px;margin-top:20px;\" />" : "") + "\n </div>\n <div style=\"font-size:16px\">" + (document.sd ? formatDate(document.sd) : "") + "</div>\n </div>" : "";
2216
- var clientSignature = document.cs || customerSignBase64 ? "\n <div class=\"col-6\" style=\"text-align: center\">\n <strong>" + (customer ? customer.c : '') + "</strong>\n <div style=\"height:100px;border-bottom:2px solid #dee2e6; margin-right:40px; margin-left:40px\">\n " + (customerSignBase64 ? "<img src=\"" + customerSignBase64 + "\" style=\"width:220px;margin-top:20px;\" />" : "") + "\n </div>\n <div style=\"font-size:16px\">" + (customerSignBase64 ? formatDate(new Date()) : "( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp/ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp)") + "</div>\n </div>" : "";
2220
+ var clientSignature = document.cs || customerSignBase64 ? "\n <div class=\"col-6\" style=\"text-align: center\">\n <strong>" + (customer ? customer.c : "") + "</strong>\n <div style=\"height:100px;border-bottom:2px solid #dee2e6; margin-right:40px; margin-left:40px\">\n " + (customerSignBase64 ? "<img src=\"" + customerSignBase64 + "\" style=\"width:220px;margin-top:20px;\" />" : "") + "\n </div>\n <div style=\"font-size:16px\">" + (customerSignBase64 ? formatDate(new Date()) : "( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp/ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp)") + "</div>\n </div>" : "";
2217
2221
  var numOfRowsPaymentInstruction = (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)).toString();
2218
2222
  var paymentInstructionDetails = "\n " + (paymentOn ? "<h2 style=\"margin-top: 0; font-size: 18px; font-weight: 700;\">" + (company.r_pi ? company.r_pi : lang["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 ";
2219
- 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 <style>\n * {\n -webkit-print-color-adjust: exact !important;\n color-adjust: exact !important;\n }\n html {\n min-width: 800px;\n }\n body {\n font-size: 18px;removeHtmlStandardDom\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: 25px 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: 20px\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: 28px 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-left .sub-price {\n display: table-cell;\n vertical-align: middle;\n padding: 0 20px\n }\n\n .invoice-price small {\n font-size: 18px;\n font-weight: 400;\n display: block\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: #5B717D;\n color: #fff;\n font-size: 28px;\n text-align: right;\n vertical-align: bottom;\n font-weight: 300;\n right: 38px;\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-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 .invoice-body > div:not(.invoice-footer) {\n margin-bottom: 20px\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 @media print {\n @page {\n size: A4;\n margin: 0 0.66cm 0 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 /* .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 .col-sm {\n -ms-flex-preferred-size: 0;\n flex-basis: 0;\n -ms-flex-positive: 1;\n flex-grow: 1;\n max-width: 100%;\n }\n \n .col-sm-6 {\n -ms-flex: 0 0 50%;\n flex: 0 0 50%;\n max-width: 50%;\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 }\n\n @media (min-width: 767.99px) {\n .invoice-detail-right {\n max-width: 200px;\n }\n }\n @media (max-width: 767.98px) {\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 h1,h2,h3,h4 {margin-top:15px}\n h1 {font-size:27px}\n h2 {font-size:22px}\n </style>\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\" style=\"padding-top:10px\">\n " + logoContainer + "\n </div>\n <div class=\"col text-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-6\">\n <strong>" + (company.r_bt ? company.r_bt : lang["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.ph ? "<div>" + customer.ph + "</div>" : "") + "\n </address>\n\n " + (shippingAddressExists ? "<strong stryle=\"margin-top:10px\">" + (company.r_st ? company.r_st : lang.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-6\">\n <div class=\"row text-right\">\n <div class=\"col\">\n <strong>" + documentName + " #</strong>\n </div>\n <div class=\"col invoice-detail-right\">" + (document.no ? document.no : "") + "</div>\n </div>\n <div class=\"row text-right\">\n <div class=\"col\">\n <strong>" + (company.r_d ? company.r_d : lang["date"]) + "</strong>\n </div>\n <div class=\"col invoice-detail-right\">" + formatDate(document.d) + "</div>\n </div>\n " + (document.ty == 1 && !document.rd ? "<div class=\"row text-right\">\n <div class=\"col\">\n <strong>" + (company.r_dd ? company.r_dd : lang["due_date"]) + "</strong>\n </div>\n <div class=\"col 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-right\">\n <div class=\"col\">\n <strong>" + (company.r_po ? company.r_po : lang["po_number"]) + "</strong>\n </div>\n <div class=\"col 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\">" + (company.r_it ? company.r_it : lang["item"]) + "</th>\n <th class=\"text-center\" width=\"15%\">" + (document.um ? document.um : company.r_q ? company.r_q : lang["quantity"]) + "</th>\n <th class=\"text-right\" width=\"15%\">" + (company.r_p ? company.r_p : lang["price"]) + "</th>\n " + (discountOnItem ? "<th class=\"text-right\" width=\"15%\">" + (company.r_dc ? company.r_dc : lang["discount"]) + "</th>" : "") + "\n <th class=\"text-right\" width=\"15%\">" + (company.r_a ? company.r_a : lang["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-table-cell\" rowspan=\"" + numOfRowsPaymentInstruction + "\">\n " + (paymentOn ? paymentInstructionDetails : "") + "\n </td>\n <td class=\"text-right\" width=\"25%\">" + (company.r_sb ? company.r_sb : lang["subtotal"]) + "</td>\n <td class=\"text-right\" width=\"25%\">" + FormatCurrency(document.st, company.cr, company.la, company.cf) + "</td>\n </tr>\n " + (document.dc ? "<tr>\n <td class=\"text-right\" width=\"25%\">" + ((company.r_dc ? company.r_dc : lang["discount"]) + (document.dcpo && document.dcp ? " (" + document.dcp + "%)" : "")) + "</td>\n <td class=\"text-right\" width=\"25%\">" + ("(" + FormatCurrency(document.dc, company.cr, company.la, company.cf) + ")") + "</td>\n </tr>" : "") + "\n " + (document.sp && !document.sntx ? "<tr>\n <td class=\"text-right\" width=\"25%\">" + (company.r_sp ? company.r_sp : lang["shipping"]) + "</td>\n <td class=\"text-right\" width=\"25%\">" + FormatCurrency(document.sp, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.tx != 0 ? "<tr>\n <td class=\"text-right\" width=\"25%\">" + (taxName1 + taxIncluded1 + "(" + document.tp + "%)") + "</td>\n <td class=\"text-right\" width=\"25%\">" + ((document.t1d ? "(" : "") + FormatCurrency(document.tx, company.cr, company.la, company.cf) + (document.t1d ? ")" : "")) + "</td>\n </tr>" : "") + "\n " + (document.ttx && document.tx2 != 0 ? "<tr>\n <td class=\"text-right\" width=\"25%\">" + (taxName2 + taxIncluded2 + "(" + document.tp2 + "%)") + "</td>\n <td class=\"text-right\" width=\"25%\">" + ((document.t2d ? "(" : "") + FormatCurrency(document.tx2, company.cr, company.la, company.cf) + (document.t2d ? ")" : "")) + "</td>\n </tr>" : "") + "\n " + (document.sp && document.sntx ? "<tr>\n <td class=\"text-right\" width=\"25%\">" + (company.r_sp ? company.r_sp : lang["shipping"]) + "</td>\n <td class=\"text-right\" width=\"25%\">" + FormatCurrency(document.sp, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.ti ? "<tr>\n <td class=\"text-right\" width=\"25%\" style=\"border-top: 1px solid #ddd\">" + (company.r_n ? company.r_n : lang["net"]) + "</td>\n <td class=\"text-right\" width=\"25%\" style=\"border-top: 1px solid #ddd\">" + FormatCurrency(document.tt - (document.tx || 0) - (document.tx2 || 0), company.cr, company.la, company.cd) + "</td>\n </tr>" : "") + "\n " + (document.ty == 1 || document.ty !== 1 && (document.t1d || document.ttx && document.tx2 > 0 && document.t2d) ? "<tr>\n <td class=\"text-right\" width=\"25%\" style=\"border-bottom: 1px solid #ddd\">" + (company.r_tt ? company.r_tt : lang["total"]) + "</td>\n <td class=\"text-right\" width=\"25%\" style=\"border-bottom: 1px solid #ddd\">" + FormatCurrency(document.tt ? document.tt : 0, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.sca ? "<tr>\n <td class=\"text-right\" width=\"25%\">" + lang["credit_card_surcharge"] + "</td>\n <td class=\"text-right\" width=\"25%\">" + FormatCurrency(document.sca, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.ty == 1 && document.pma && document.pm ? paymentContainer : "") + "\n </tbody>\n </table>\n </div>\n </div>\n </div>\n <!-- end invoice-content -->\n\n <!-- begin invoice price -->\n <div class=\"invoice-price\">\n <div class=\"invoice-price-left\">\n <div class=\"invoice-price-row\"></div>\n </div>\n <div class=\"invoice-price-right\">\n <small>" + (document.ty == 1 ? company.r_ad ? company.r_ad : lang["amount_due"] : company.r_gt ? company.r_gt : lang["grand_total"]) + "</small>\n <span class=\"f-w-600\">" + (isDeposit ? FormatCurrency(document.depositAmount, company.cr, company.la, company.cf) : FormatCurrency(document.ad, company.cr, company.la, company.cf)) + "</span>\n </div>\n </div>\n <!-- end invoice price -->\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 : lang["note"]) + "</h2>\n " + nl2br(document.nt) + "\n </div>" : "") + "\n " + (document.tc ? "<div class=\"mt-1\">\n <h2>" + (company.r_tc ? company.r_tc : lang["terms"]) + "</h2>\n " + nl2br(document.tc) + "\n </div>" : "")) + "\n <!-- end invoice-note -->\n \n <!--- begin company signature -->\n <!-- begin invoice-signature -->\n " + (document.sd || document.cs || customerSignBase64 ? "<div>" + (company.r_bs || lang["by_signing"] || "") + "</div>\n <div class=\"row mt-1\">\n " + (signatureContainer || clientSignature || "") + "\n " + (signatureContainer && 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";
2223
+ 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 <style>\n * {\n -webkit-print-color-adjust: exact !important;\n color-adjust: exact !important;\n }\n html {\n min-width: 800px;\n }\n body {\n font-size: 18px;removeHtmlStandardDom\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: 25px 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: 20px\n }\n\n .invoice-price {\n /* background: #f0f3f4; */\n display: table;\n width: 100%\n }\n .bookipay-payment{\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: 28px 12px 16px;\n font-size: 20px;\n font-weight: 600;\n width: 70%;\n position: relative;\n vertical-align: middle\n }\n \n .bookipay-payment .bookipay-payment-left,\n .bookipay-payment .bookipay-payment-right {\n display: table-cell;\n padding: 28px 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-left .sub-price {\n display: table-cell;\n vertical-align: middle;\n padding: 0 20px\n }\n\n .invoice-price small {\n font-size: 18px;\n font-weight: 400;\n display: block\n }\n\n .invoice-price .invoice-price-row {\n display: table;\n float: left\n }\n .bookipay-payment .bookipay-payment-row{\n display: table;\n float: left;\n }\n\n .invoice-price .invoice-price-right {\n width: 30%;\n background: #5B717D;\n color: #fff;\n font-size: 28px;\n text-align: right;\n vertical-align: bottom;\n font-weight: 300;\n right: 38px;\n }\n \n .bookipay-payment .bookipay-payment-right {\n width: 150px;\n font-size: 28px;\n text-align: right;\n vertical-align: bottom;\n font-weight: 300;\n right: 38px;\n }\n \n .bookipay-payment .bookipay-payment-right .bookipay-payment-pay-btn {\n right: 0;\n width: 140px;\n text-align: center;\n border-radius: 5px;\n font-size: 14px;\n font-weight: 700;\n background: #067EED;\n border: none;\n color:white;\n padding-top: 10px;\n padding-bottom: 10px;\n }\n \n .bookipay-payment .bookipay-payment-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 .bookipay-payment .bookipay-payment-right .bookipay-payment-logo-div {\n width: 140px;\n float: right;\n }\n \n .bookipay-payment .bookipay-payment-right .bookipay-payment-logo-div svg {\n width: 140px;\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-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 .invoice-body > div:not(.invoice-footer) {\n margin-bottom: 20px\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 @media print {\n @page {\n size: A4;\n margin: 0 0.66cm 0 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 .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 .col-sm {\n -ms-flex-preferred-size: 0;\n flex-basis: 0;\n -ms-flex-positive: 1;\n flex-grow: 1;\n max-width: 100%;\n }\n \n .col-sm-6 {\n -ms-flex: 0 0 50%;\n flex: 0 0 50%;\n max-width: 50%;\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 }\n\n @media (min-width: 767.99px) {\n .invoice-detail-right {\n max-width: 200px;\n }\n }\n @media (max-width: 767.98px) {\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 h1,h2,h3,h4 {margin-top:15px}\n h1 {font-size:27px}\n h2 {font-size:22px}\n </style>\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\" style=\"padding-top:10px\">\n " + logoContainer + "\n </div>\n <div class=\"col text-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-6\">\n <strong>" + (company.r_bt ? company.r_bt : lang["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.ph ? "<div>" + customer.ph + "</div>" : "") + "\n </address>\n\n " + (shippingAddressExists ? "<strong stryle=\"margin-top:10px\">" + (company.r_st ? company.r_st : lang.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-6\">\n <div class=\"row text-right\">\n <div class=\"col\">\n <strong>" + documentName + " #</strong>\n </div>\n <div class=\"col invoice-detail-right\">" + (document.no ? document.no : "") + "</div>\n </div>\n <div class=\"row text-right\">\n <div class=\"col\">\n <strong>" + (company.r_d ? company.r_d : lang["date"]) + "</strong>\n </div>\n <div class=\"col invoice-detail-right\">" + formatDate(document.d) + "</div>\n </div>\n " + (document.ty == 1 && !document.rd ? "<div class=\"row text-right\">\n <div class=\"col\">\n <strong>" + (company.r_dd ? company.r_dd : lang["due_date"]) + "</strong>\n </div>\n <div class=\"col 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-right\">\n <div class=\"col\">\n <strong>" + (company.r_po ? company.r_po : lang["po_number"]) + "</strong>\n </div>\n <div class=\"col 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\">" + (company.r_it ? company.r_it : lang["item"]) + "</th>\n <th class=\"text-center\" width=\"15%\">" + (document.um ? document.um : company.r_q ? company.r_q : lang["quantity"]) + "</th>\n <th class=\"text-right\" width=\"15%\">" + (company.r_p ? company.r_p : lang["price"]) + "</th>\n " + (discountOnItem ? "<th class=\"text-right\" width=\"15%\">" + (company.r_dc ? company.r_dc : lang["discount"]) + "</th>" : "") + "\n <th class=\"text-right\" width=\"15%\">" + (company.r_a ? company.r_a : lang["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-table-cell\" rowspan=\"" + numOfRowsPaymentInstruction + "\">\n " + (paymentOn ? paymentInstructionDetails : "") + "\n </td>\n <td class=\"text-right\" width=\"25%\">" + (company.r_sb ? company.r_sb : lang["subtotal"]) + "</td>\n <td class=\"text-right\" width=\"25%\">" + FormatCurrency(document.st, company.cr, company.la, company.cf) + "</td>\n </tr>\n " + (document.dc ? "<tr>\n <td class=\"text-right\" width=\"25%\">" + ((company.r_dc ? company.r_dc : lang["discount"]) + (document.dcpo && document.dcp ? " (" + document.dcp + "%)" : "")) + "</td>\n <td class=\"text-right\" width=\"25%\">" + ("(" + FormatCurrency(document.dc, company.cr, company.la, company.cf) + ")") + "</td>\n </tr>" : "") + "\n " + (document.sp && !document.sntx ? "<tr>\n <td class=\"text-right\" width=\"25%\">" + (company.r_sp ? company.r_sp : lang["shipping"]) + "</td>\n <td class=\"text-right\" width=\"25%\">" + FormatCurrency(document.sp, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.tx != 0 ? "<tr>\n <td class=\"text-right\" width=\"25%\">" + (taxName1 + taxIncluded1 + "(" + document.tp + "%)") + "</td>\n <td class=\"text-right\" width=\"25%\">" + ((document.t1d ? "(" : "") + FormatCurrency(document.tx, company.cr, company.la, company.cf) + (document.t1d ? ")" : "")) + "</td>\n </tr>" : "") + "\n " + (document.ttx && document.tx2 != 0 ? "<tr>\n <td class=\"text-right\" width=\"25%\">" + (taxName2 + taxIncluded2 + "(" + document.tp2 + "%)") + "</td>\n <td class=\"text-right\" width=\"25%\">" + ((document.t2d ? "(" : "") + FormatCurrency(document.tx2, company.cr, company.la, company.cf) + (document.t2d ? ")" : "")) + "</td>\n </tr>" : "") + "\n " + (document.sp && document.sntx ? "<tr>\n <td class=\"text-right\" width=\"25%\">" + (company.r_sp ? company.r_sp : lang["shipping"]) + "</td>\n <td class=\"text-right\" width=\"25%\">" + FormatCurrency(document.sp, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.ti ? "<tr>\n <td class=\"text-right\" width=\"25%\" style=\"border-top: 1px solid #ddd\">" + (company.r_n ? company.r_n : lang["net"]) + "</td>\n <td class=\"text-right\" width=\"25%\" style=\"border-top: 1px solid #ddd\">" + FormatCurrency(document.tt - (document.tx || 0) - (document.tx2 || 0), company.cr, company.la, company.cd) + "</td>\n </tr>" : "") + "\n " + (document.ty == 1 || document.ty !== 1 && (document.t1d || document.ttx && document.tx2 > 0 && document.t2d) ? "<tr>\n <td class=\"text-right\" width=\"25%\" style=\"border-bottom: 1px solid #ddd\">" + (company.r_tt ? company.r_tt : lang["total"]) + "</td>\n <td class=\"text-right\" width=\"25%\" style=\"border-bottom: 1px solid #ddd\">" + FormatCurrency(document.tt ? document.tt : 0, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.sca ? "<tr>\n <td class=\"text-right\" width=\"25%\">" + lang["credit_card_surcharge"] + "</td>\n <td class=\"text-right\" width=\"25%\">" + FormatCurrency(document.sca, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.ty == 1 && document.pma && document.pm ? paymentContainer : "") + "\n </tbody>\n </table>\n </div>\n </div>\n </div>\n <!-- end invoice-content -->\n\n <!-- begin invoice price -->\n <div class=\"invoice-price\">\n <div class=\"invoice-price-left\">\n <div class=\"invoice-price-row\"></div>\n </div>\n <div class=\"invoice-price-right\">\n <small>" + (document.ty == 1 ? company.r_ad ? company.r_ad : lang["amount_due"] : company.r_gt ? company.r_gt : lang["grand_total"]) + "</small>\n <span class=\"f-w-600\">" + (isDeposit ? FormatCurrency(document.depositAmount, company.cr, company.la, company.cf) : FormatCurrency(document.ad, company.cr, company.la, company.cf)) + "</span>\n </div>\n </div>\n <!-- end invoice price -->\n\n " + (bookipayLink && "\n <!-- begin bookipay payment -->\n <div class=\"bookipay-payment no-print\">\n <div class=\"bookipay-payment-left\">\n <div class=\"bookipay-payment-row\"></div>\n </div>\n <div class=\"bookipay-payment-right\">\n <a href=\"" + bookipayLink + "\" class=\"btn bookipay-payment-pay-btn\">\n " + (lang["pay_now"] || "Pay now") + "\n </a>\n <br/>\n <span class=\"bookipay-payment-with-span\">" + (lang["with"] || "with") + "</span>\n <br/>\n <div class=\"bookipay-payment-logo-div\">\n " + bookipayLogo + "\n </div>\n </div>\n </div>\n <!-- end bookipay payment -->\n ") + "\n\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 : lang["note"]) + "</h2>\n " + nl2br(document.nt) + "\n </div>" : "") + "\n " + (document.tc ? "<div class=\"mt-1\">\n <h2>" + (company.r_tc ? company.r_tc : lang["terms"]) + "</h2>\n " + nl2br(document.tc) + "\n </div>" : "")) + "\n <!-- end invoice-note -->\n \n <!--- begin company signature -->\n <!-- begin invoice-signature -->\n " + (document.sd || document.cs || customerSignBase64 ? "<div>" + (company.r_bs || lang["by_signing"] || "") + "</div>\n <div class=\"row mt-1\">\n " + (signatureContainer || clientSignature || "") + "\n " + (signatureContainer && 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";
2220
2224
  return {
2221
2225
  html: html,
2222
2226
  timeZone: timeZone,
@@ -2239,7 +2243,9 @@ var invoiceHtml = (function (_ref) {
2239
2243
  _ref$isFromReactnativ = _ref.isFromReactnative,
2240
2244
  isFromReactnative = _ref$isFromReactnativ === void 0 ? false : _ref$isFromReactnativ,
2241
2245
  _ref$removeHtmlStanda = _ref.removeHtmlStandardDom,
2242
- removeHtmlStandardDom = _ref$removeHtmlStanda === void 0 ? false : _ref$removeHtmlStanda;
2246
+ removeHtmlStandardDom = _ref$removeHtmlStanda === void 0 ? false : _ref$removeHtmlStanda,
2247
+ _ref$bookipayLink = _ref.bookipayLink,
2248
+ bookipayLink = _ref$bookipayLink === void 0 ? null : _ref$bookipayLink;
2243
2249
  return invoiceHtmlWithDetails({
2244
2250
  invoice: invoice,
2245
2251
  lang: lang,
@@ -2248,7 +2254,8 @@ var invoiceHtml = (function (_ref) {
2248
2254
  isDeposit: isDeposit,
2249
2255
  isOffline: isOffline,
2250
2256
  isFromReactnative: isFromReactnative,
2251
- removeHtmlStandardDom: removeHtmlStandardDom
2257
+ removeHtmlStandardDom: removeHtmlStandardDom,
2258
+ bookipayLink: bookipayLink
2252
2259
  }).html;
2253
2260
  });
2254
2261
 
@@ -2430,7 +2437,9 @@ var InvoiceCompatHtml = function InvoiceCompatHtml(_ref) {
2430
2437
  _ref$isFromReactnativ = _ref.isFromReactnative,
2431
2438
  isFromReactnative = _ref$isFromReactnativ === void 0 ? false : _ref$isFromReactnativ,
2432
2439
  _ref$removeHtmlStanda = _ref.removeHtmlStandardDom,
2433
- removeHtmlStandardDom = _ref$removeHtmlStanda === void 0 ? false : _ref$removeHtmlStanda;
2440
+ removeHtmlStandardDom = _ref$removeHtmlStanda === void 0 ? false : _ref$removeHtmlStanda,
2441
+ _ref$bookipayLink = _ref.bookipayLink,
2442
+ bookipayLink = _ref$bookipayLink === void 0 ? null : _ref$bookipayLink;
2434
2443
  return invoiceHtml({
2435
2444
  invoice: _extends({}, invoice, {
2436
2445
  document: InvoiceCompat(invoice.document),
@@ -2440,7 +2449,8 @@ var InvoiceCompatHtml = function InvoiceCompatHtml(_ref) {
2440
2449
  isDeposit: isDeposit,
2441
2450
  isOffline: isOffline,
2442
2451
  isFromReactnative: isFromReactnative,
2443
- removeHtmlStandardDom: removeHtmlStandardDom
2452
+ removeHtmlStandardDom: removeHtmlStandardDom,
2453
+ bookipayLink: bookipayLink
2444
2454
  });
2445
2455
  };
2446
2456