@bookipi/htmlgenerator 1.1.17-alpha8 → 1.1.17
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/bookipayLogo~HwotOVDe.svg +31 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +2 -2
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="172.407" height="35.651" viewBox="0 0 172.407 35.651">
|
|
2
|
+
<g id="Group_8" data-name="Group 8" transform="translate(0 0.036)">
|
|
3
|
+
<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"/>
|
|
4
|
+
<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"/>
|
|
5
|
+
<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"/>
|
|
6
|
+
<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"/>
|
|
7
|
+
<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"/>
|
|
8
|
+
<g id="Group_4" data-name="Group 4" transform="translate(151.884 6.324)">
|
|
9
|
+
<g id="Group_1" data-name="Group 1" transform="translate(0 0.006)">
|
|
10
|
+
<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"/>
|
|
11
|
+
</g>
|
|
12
|
+
<g id="Group_2" data-name="Group 2" transform="translate(8.128)">
|
|
13
|
+
<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"/>
|
|
14
|
+
</g>
|
|
15
|
+
<g id="Group_3" data-name="Group 3" transform="translate(3.13 10.358)">
|
|
16
|
+
<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"/>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
<g id="Group_7" data-name="Group 7" transform="translate(128.385 6.322)">
|
|
20
|
+
<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"/>
|
|
21
|
+
<g id="Group_5" data-name="Group 5" transform="translate(14.72)">
|
|
22
|
+
<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"/>
|
|
23
|
+
</g>
|
|
24
|
+
<g id="Group_6" data-name="Group 6" transform="translate(14.72 4.432)">
|
|
25
|
+
<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"/>
|
|
26
|
+
</g>
|
|
27
|
+
</g>
|
|
28
|
+
<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"/>
|
|
29
|
+
<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"/>
|
|
30
|
+
</g>
|
|
31
|
+
</svg>
|
package/dist/index.js
CHANGED
|
@@ -2165,7 +2165,7 @@ var invoiceHtmlWithDetails = (function (_ref) {
|
|
|
2165
2165
|
if (document.it) {
|
|
2166
2166
|
for (var _iterator2 = _createForOfIteratorHelperLoose(document.it), _step2; !(_step2 = _iterator2()).done;) {
|
|
2167
2167
|
var _item = _step2.value;
|
|
2168
|
-
itemsContainer = itemsContainer + ("<tr>\n <td>\n <span class=\"text-inverse\"><strong>" + (_item.n || "") + "</strong></span>\n <div>" + (nl2br(_item.dsc) || "") + "</div>\n
|
|
2168
|
+
itemsContainer = itemsContainer + ("<tr>\n <td>\n <span class=\"text-inverse\"><strong>" + (_item.n || "") + "</strong></span>\n <div>" + (nl2br(_item.dsc) || "") + "</div>\n </td>\n <td class=\"text-center\">" + ((_item.p || _item.p == 0) && (_item.q || _item.q == 0) ? _item.q : "") + "</td>\n <td class=\"text-right\">\n " + (_item.p || _item.p == 0 ? FormatCurrency(_item.p, company.cr, company.la, company.cf) : "") + "\n </td>\n" + (discountOnItem ? "<td class=\"text-right\">" + ((_item.p || _item.p == 0) && _item.dc ? FormatCurrency(_item.dc, company.cr, company.la, company.cf) : "") + "</td>" : "") + "\n<td class=\"text-right\">" + (_item.p || _item.p == 0 ? FormatCurrency(_item.t, company.cr, company.la, company.cf) : "") + "</td>\n</tr>");
|
|
2169
2169
|
}
|
|
2170
2170
|
}
|
|
2171
2171
|
|
|
@@ -2216,7 +2216,7 @@ var invoiceHtmlWithDetails = (function (_ref) {
|
|
|
2216
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()) : "(   /  /  )") + "</div>\n </div>" : "";
|
|
2217
2217
|
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
2218
|
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 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";
|
|
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";
|
|
2220
2220
|
return {
|
|
2221
2221
|
html: html,
|
|
2222
2222
|
timeZone: timeZone,
|