@bookipi/htmlgenerator 1.12.0-alpha5 → 1.12.0-alpha7
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 +83 -9
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +83 -9
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -9047,7 +9047,7 @@ var invoiceStyle = function invoiceStyle(_ref) {
|
|
|
9047
9047
|
signItIntegration = _ref.signItIntegration,
|
|
9048
9048
|
_ref$isFullScreen = _ref.isFullScreen,
|
|
9049
9049
|
isFullScreen = _ref$isFullScreen === void 0 ? false : _ref$isFullScreen;
|
|
9050
|
-
return html(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([" <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\n #invoice {\n position: relative;\n }\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\n .company-einvoicing,\n .customer-einvoicing {\n margin-bottom: 8px;\n }\n .company-einvoicing .einvoicing-row,\n .customer-einvoicing .einvoicing-row {\n line-height: 1.5;\n }\n .company-einvoicing .einvoicing-label,\n .customer-einvoicing .einvoicing-label {\n margin-right: 6px;\n }\n .service-delivery-date {\n padding-top: 22.5px;\n }\n .service-delivery-date-value {\n font-weight: 500;\n }\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 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 .btn-url:hover {\n cursor: pointer;\n text-decoration: none;\n }\n\n .btn.btn-white, .btn.btn-white.disabled, .btn.btn-white.disabled:focus, .btn.btn-white.disabled:hover, .btn.btn-white[disabled], .btn.btn-white[disabled]:focus, .btn.btn-white[disabled]:hover {\n color: #2d353c;\n background: #fff;\n border-color: #d9dfe3;\n }\n .table-inline-block{\n display: inline-block;\n }\n\n .page-not-break {\n page-break-before: auto;\n page-break-after: auto;\n page-break-inside: avoid;\n break-before: auto;\n break-after: auto;\n break-inside: avoid;\n }\n\n @media print {\n table {\n width: 100%;\n border-collapse: collapse;\n }\n tr, td {\n page-break-inside: auto!important;\n }\n td, th {\n word-wrap: break-word;\n white-space: normal;\n }\n .invoice-content {\n page-break-before: auto;\n }\n .col-md-6 {\n -ms-flex: 0 0 50%;\n flex: 0 0 50%;\n max-width: 50%;\n width:50%;\n float:left\n }\n .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: 100%;\n box-shadow: 0;\n background-color: #fff;\n display: block;\n }\n .print {\n max-width:100%\n margin: 0 auto 0 auto;\n }\n\n .no-print {\n display: none;\n }\n\n #invoice {\n ", ";\n }\n\n .invoice-price .invoice-price-right {\n background: #f0f3f4;\n color: black;\n border: 2px solid #f0f3f4;\n }\n\n .print-footer {\n position: fixed!important;\n }\n\n .print-footer-spacer {\n height: 60px;\n }\n\n .attachment-image {\n max-height: 90vh !important;\n page-break-inside: avoid;\n page-break-before: auto;\n page-break-after: auto;\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 zoom: 0.8;\n ", "\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-calc(100% - 20px);\n max-height: calc(100% - 20px);\n object-fit: contain;\n }\n ", "\n </style>"])), isFromReactnative ? 'zoom: 0.8; max-width:calc(38cm - 1.32cm);margin: 0 auto 0 auto;' : '', isFullScreen ? 'border-radius: 32px !important; overflow: hidden !important; max-width: 100% !important;' : 'margin-top:10px; max-width:28cm; box-shadow: 0 0 0.5cm rgba(0,0,0,0.2);', 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 " : '');
|
|
9050
|
+
return html(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([" <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\n #invoice {\n position: relative;\n }\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\n .company-einvoicing,\n .customer-einvoicing {\n margin-bottom: 8px;\n }\n .company-einvoicing .einvoicing-row,\n .customer-einvoicing .einvoicing-row {\n line-height: 1.5;\n }\n .company-einvoicing .einvoicing-label,\n .customer-einvoicing .einvoicing-label {\n margin-right: 6px;\n }\n .service-delivery-date {\n padding-top: 22.5px;\n }\n .service-delivery-date-value {\n font-weight: 500;\n }\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 line-height: 1.5;\n }\n\n .invoice-date .invoice-detail-row {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: baseline;\n align-items: baseline;\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 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 .btn-url:hover {\n cursor: pointer;\n text-decoration: none;\n }\n\n .btn.btn-white, .btn.btn-white.disabled, .btn.btn-white.disabled:focus, .btn.btn-white.disabled:hover, .btn.btn-white[disabled], .btn.btn-white[disabled]:focus, .btn.btn-white[disabled]:hover {\n color: #2d353c;\n background: #fff;\n border-color: #d9dfe3;\n }\n .table-inline-block{\n display: inline-block;\n }\n\n .page-not-break {\n page-break-before: auto;\n page-break-after: auto;\n page-break-inside: avoid;\n break-before: auto;\n break-after: auto;\n break-inside: avoid;\n }\n\n @media print {\n table {\n width: 100%;\n border-collapse: collapse;\n }\n tr, td {\n page-break-inside: auto!important;\n }\n td, th {\n word-wrap: break-word;\n white-space: normal;\n }\n .invoice-content {\n page-break-before: auto;\n }\n .col-md-6 {\n -ms-flex: 0 0 50%;\n flex: 0 0 50%;\n max-width: 50%;\n width:50%;\n float:left\n }\n .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: 100%;\n box-shadow: 0;\n background-color: #fff;\n display: block;\n }\n .print {\n max-width:100%\n margin: 0 auto 0 auto;\n }\n\n .no-print {\n display: none;\n }\n\n #invoice {\n ", ";\n }\n\n .invoice-price .invoice-price-right {\n background: #f0f3f4;\n color: black;\n border: 2px solid #f0f3f4;\n }\n\n .print-footer {\n position: fixed!important;\n }\n\n .print-footer-spacer {\n height: 60px;\n }\n\n .attachment-image {\n max-height: 90vh !important;\n page-break-inside: avoid;\n page-break-before: auto;\n page-break-after: auto;\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 zoom: 0.8;\n ", "\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-calc(100% - 20px);\n max-height: calc(100% - 20px);\n object-fit: contain;\n }\n ", "\n </style>"])), isFromReactnative ? 'zoom: 0.8; max-width:calc(38cm - 1.32cm);margin: 0 auto 0 auto;' : '', isFullScreen ? 'border-radius: 32px !important; overflow: hidden !important; max-width: 100% !important;' : 'margin-top:10px; max-width:28cm; box-shadow: 0 0 0.5cm rgba(0,0,0,0.2);', 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 " : '');
|
|
9051
9051
|
};
|
|
9052
9052
|
|
|
9053
9053
|
var _templateObject$1, _templateObject2;
|
|
@@ -9245,20 +9245,29 @@ var InvoiceHeader = function InvoiceHeader(_ref) {
|
|
|
9245
9245
|
});
|
|
9246
9246
|
};
|
|
9247
9247
|
var eInvoiceConfig = getEInvoiceConfig(company.co);
|
|
9248
|
+
var getNumberLabel = function getNumberLabel() {
|
|
9249
|
+
if (document.ty === 1 || document.ty === 5) {
|
|
9250
|
+
return defaultLang['invoice_number_abbreviated'] || documentName + " #";
|
|
9251
|
+
} else if (document.ty === 2) {
|
|
9252
|
+
return defaultLang['creditNote_number_abbreviated'] || documentName + " #";
|
|
9253
|
+
} else {
|
|
9254
|
+
return defaultLang['estimate_number_abbreviated'] || documentName + " #";
|
|
9255
|
+
}
|
|
9256
|
+
};
|
|
9248
9257
|
var customerAddressLine = [customerAddress.city, customerAddress.state, customerAddress.zip].filter(Boolean).join(' ');
|
|
9249
9258
|
var shippingAddressLine = [customerShippingAddress.city, customerShippingAddress.state, customerShippingAddress.zip].filter(Boolean).join(' ');
|
|
9250
9259
|
var renderAddress = function renderAddress(address) {
|
|
9251
9260
|
return "\n " + (address.address1 ? "<div>" + address.address1 + "</div>" : '') + "\n " + (address.address2 ? "<div>" + address.address2 + "</div>" : '') + "\n " + (address.address3 ? "<div>" + address.address3 + "</div>" : '') + "\n";
|
|
9252
9261
|
};
|
|
9253
9262
|
var renderInvoiceDetail = function renderInvoiceDetail(label, value) {
|
|
9254
|
-
return "\n <div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>" + label + "</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">\n " + (value != null ? value : '') + "\n </div>\n </div>\n ";
|
|
9263
|
+
return "\n <div class=\"row text-md-right invoice-detail-row\">\n <div class=\"col-6 col-md\">\n <strong>" + label + "</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">\n " + (value != null ? value : '') + "\n </div>\n </div>\n ";
|
|
9255
9264
|
};
|
|
9256
9265
|
return html$5(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteralLoose(["\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> ", " </strong>\n\n <div class=\"text-inverse mb-1\">\n <small style=\"font-size: 18px;\"> ", " </small>\n\n ", "\n </div>\n\n ", "\n\n <address class=\"m-t-5 m-b-5\">\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n </address>\n\n ", "\n </div>\n\n <div class=\"invoice-date col-sm-12 col-md-6\">\n ", "\n ", "\n ", "\n ", "\n ", "\n </div>\n </div>\n </div>\n <!-- end invoice-header -->\n "])), company.r_bt || defaultLang.bill_to, customerPrimaryName, customerSecondaryName ? "<div class=\"m-t-5 m-b-5\">" + customerSecondaryName + "</div>" : '', TaxRegistrations({
|
|
9257
9266
|
config: eInvoiceConfig,
|
|
9258
9267
|
taxRegistrations: customer === null || customer === void 0 ? void 0 : (_customer$eInvoicing = customer.eInvoicing) === null || _customer$eInvoicing === void 0 ? void 0 : _customer$eInvoicing.taxRegistrations,
|
|
9259
9268
|
defaultLang: defaultLang,
|
|
9260
9269
|
wrapperClass: 'customer-einvoicing'
|
|
9261
|
-
}), renderAddress(customerAddress), customerAddressLine ? "<div>" + customerAddressLine + "</div>" : '', customerAddress.country ? "<div>" + customerAddress.country + "</div>" : '', customer !== null && customer !== void 0 && customer.tfn ? "<div>" + (company.bn || 'Tax no.') + " : " + customer.tfn + "</div>" : '', customer !== null && customer !== void 0 && customer.e ? "<div>" + customer.e + "</div>" : '', customer !== null && customer !== void 0 && customer.ph ? "<div>" + customer.ph + "</div>" : '', customer !== null && customer !== void 0 && customer.ai ? "<div>" + customer.ai + "</div>" : '', shippingAddressExists ? "\n <strong style=\"margin-top:10px\">\n " + (company.r_st || defaultLang.ship_to) + "\n </strong>\n\n <address class=\"m-t-5 m-b-5\">\n " + renderAddress(customerShippingAddress) + "\n\n " + (shippingAddressLine ? "<div>" + shippingAddressLine + "</div>" : '') + "\n\n " + (customerShippingAddress.country ? "<div>" + customerShippingAddress.country + "</div>" : '') + "\n\n " + (document.asi ? "<div>" + document.asi + "</div>" : '') + "\n </address>\n " : '', renderInvoiceDetail(
|
|
9270
|
+
}), renderAddress(customerAddress), customerAddressLine ? "<div>" + customerAddressLine + "</div>" : '', customerAddress.country ? "<div>" + customerAddress.country + "</div>" : '', customer !== null && customer !== void 0 && customer.tfn ? "<div>" + (company.bn || 'Tax no.') + " : " + customer.tfn + "</div>" : '', customer !== null && customer !== void 0 && customer.e ? "<div>" + customer.e + "</div>" : '', customer !== null && customer !== void 0 && customer.ph ? "<div>" + customer.ph + "</div>" : '', customer !== null && customer !== void 0 && customer.ai ? "<div>" + customer.ai + "</div>" : '', shippingAddressExists ? "\n <strong style=\"margin-top:10px\">\n " + (company.r_st || defaultLang.ship_to) + "\n </strong>\n\n <address class=\"m-t-5 m-b-5\">\n " + renderAddress(customerShippingAddress) + "\n\n " + (shippingAddressLine ? "<div>" + shippingAddressLine + "</div>" : '') + "\n\n " + (customerShippingAddress.country ? "<div>" + customerShippingAddress.country + "</div>" : '') + "\n\n " + (document.asi ? "<div>" + document.asi + "</div>" : '') + "\n </address>\n " : '', renderInvoiceDetail("" + getNumberLabel(), document.no), (_document$proposal = document.proposal) !== null && _document$proposal !== void 0 && _document$proposal.no ? renderInvoiceDetail('Proposal #', document.proposal.no) : '', renderInvoiceDetail(company.r_d || defaultLang.date, formatDate(document.d)), document.ty === 1 && !document.rd ? renderInvoiceDetail(company.r_dd || defaultLang.due_date, document.dd ? formatDate(document.dd) : formatDate(new Date(document.d).setDate(new Date(document.d).getDate() + parseInt(document.di)))) : '', document.pon ? renderInvoiceDetail(company.r_po || defaultLang.po_number, document.pon) : '');
|
|
9262
9271
|
};
|
|
9263
9272
|
|
|
9264
9273
|
var currencies = {
|
|
@@ -11881,6 +11890,42 @@ var getEInvoiceTaxLabel = function getEInvoiceTaxLabel(company, defaultLang) {
|
|
|
11881
11890
|
return (_ref = (_ref2 = configLabel != null ? configLabel : defaultLang === null || defaultLang === void 0 ? void 0 : defaultLang.vat) != null ? _ref2 : defaultLang === null || defaultLang === void 0 ? void 0 : defaultLang.tax) != null ? _ref : 'Tax';
|
|
11882
11891
|
};
|
|
11883
11892
|
|
|
11893
|
+
var checkHasShippingTaxRate = function checkHasShippingTaxRate(document) {
|
|
11894
|
+
return document.shippingTaxRate != null && document.shippingTaxRate !== '';
|
|
11895
|
+
};
|
|
11896
|
+
var computeShippingTax = function computeShippingTax(document) {
|
|
11897
|
+
var rate = checkHasShippingTaxRate(document) ? parseFloat(document.shippingTaxRate) : 0;
|
|
11898
|
+
var shipping = document.sp ? parseFloat(document.sp) : 0;
|
|
11899
|
+
if (!(rate > 0) || document.sntx || !shipping) {
|
|
11900
|
+
return 0;
|
|
11901
|
+
}
|
|
11902
|
+
return document.ti ? shipping * (1 - 1 / (1 + rate / 100)) : shipping * rate / 100;
|
|
11903
|
+
};
|
|
11904
|
+
var getShippingTaxBreakdown = function getShippingTaxBreakdown(document) {
|
|
11905
|
+
var hasShippingTaxRate = checkHasShippingTaxRate(document);
|
|
11906
|
+
var shippingTaxRate = hasShippingTaxRate ? parseFloat(document.shippingTaxRate) : 0;
|
|
11907
|
+
var shippingTax = computeShippingTax(document);
|
|
11908
|
+
var itemTax1 = document.tx ? parseFloat(document.tx) : 0;
|
|
11909
|
+
var itemTax2 = document.tx2 ? parseFloat(document.tx2) : 0;
|
|
11910
|
+
var shippingMatchesTax1 = hasShippingTaxRate && shippingTaxRate > 0 && !document.sntx && shippingTaxRate === parseFloat(document.tp || 0);
|
|
11911
|
+
var shippingMatchesTax2 = hasShippingTaxRate && shippingTaxRate > 0 && !document.sntx && !!document.ttx && shippingTaxRate === parseFloat(document.tp2 || 0) && !shippingMatchesTax1;
|
|
11912
|
+
var showTax1SubBreakdown = shippingMatchesTax1 && !!shippingTax;
|
|
11913
|
+
var showTax2SubBreakdown = shippingMatchesTax2 && !!shippingTax;
|
|
11914
|
+
var showSeparateShippingLine = hasShippingTaxRate && shippingTaxRate > 0 && !document.sntx && !shippingMatchesTax1 && !shippingMatchesTax2 && !!shippingTax;
|
|
11915
|
+
return {
|
|
11916
|
+
hasShippingTaxRate: hasShippingTaxRate,
|
|
11917
|
+
shippingTaxRate: shippingTaxRate,
|
|
11918
|
+
shippingTax: shippingTax,
|
|
11919
|
+
itemTax1: itemTax1,
|
|
11920
|
+
itemTax2: itemTax2,
|
|
11921
|
+
shippingMatchesTax1: shippingMatchesTax1,
|
|
11922
|
+
shippingMatchesTax2: shippingMatchesTax2,
|
|
11923
|
+
showTax1SubBreakdown: showTax1SubBreakdown,
|
|
11924
|
+
showTax2SubBreakdown: showTax2SubBreakdown,
|
|
11925
|
+
showSeparateShippingLine: showSeparateShippingLine
|
|
11926
|
+
};
|
|
11927
|
+
};
|
|
11928
|
+
|
|
11884
11929
|
var nl2br = function nl2br(str, is_xhtml) {
|
|
11885
11930
|
if (typeof str === "undefined" || str === null) {
|
|
11886
11931
|
return "";
|
|
@@ -12008,7 +12053,15 @@ var InvoiceContent = function InvoiceContent(_ref) {
|
|
|
12008
12053
|
var effectiveCurrency = document.currency || company.cr;
|
|
12009
12054
|
var eInvoiceTaxLines = getEInvoiceTaxLines(document);
|
|
12010
12055
|
var eInvoiceTaxRowLabel = getEInvoiceTaxLabel(company, defaultLang);
|
|
12011
|
-
var
|
|
12056
|
+
var shippingBreakdown = getShippingTaxBreakdown(document);
|
|
12057
|
+
var formatAmount = function formatAmount(amount) {
|
|
12058
|
+
return FormatCurrency$3(amount, effectiveCurrency, company.la, company.cf);
|
|
12059
|
+
};
|
|
12060
|
+
var shippingLabel = company.r_sp ? company.r_sp : defaultLang['shipping'];
|
|
12061
|
+
var subBreakdownRows = function subBreakdownRows(itemsAmount, shippingAmount) {
|
|
12062
|
+
return "<tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"padding-left: 24px;\">" + defaultLang['item'] + "</td>\n <td class=\"text-right\" width=\"22%\">" + formatAmount(itemsAmount) + "</td>\n </tr>\n <tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"padding-left: 24px;\">" + shippingLabel + "</td>\n <td class=\"text-right\" width=\"22%\">" + formatAmount(shippingAmount) + "</td>\n </tr>";
|
|
12063
|
+
};
|
|
12064
|
+
var defaultTaxRows = "" + (document.tx != 0 ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + ("" + displayTaxName1 + taxIncluded1 + "(" + document.tp + "%)") + "</td>\n <td class=\"text-right\" width=\"22%\">" + ("" + (document.t1d ? '(' : '') + formatAmount(shippingBreakdown.shippingMatchesTax1 ? shippingBreakdown.itemTax1 + shippingBreakdown.shippingTax : document.tx) + (document.t1d ? ')' : '')) + "</td>\n </tr>" + (shippingBreakdown.showTax1SubBreakdown ? subBreakdownRows(shippingBreakdown.itemTax1, shippingBreakdown.shippingTax) : '') : '') + (document.ttx && document.tx2 != 0 ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + ("" + displayTaxName2 + taxIncluded2 + "(" + document.tp2 + "%)") + "</td>\n <td class=\"text-right\" width=\"22%\">" + ("" + (document.t2d ? '(' : '') + formatAmount(shippingBreakdown.shippingMatchesTax2 ? shippingBreakdown.itemTax2 + shippingBreakdown.shippingTax : document.tx2) + (document.t2d ? ')' : '')) + "</td>\n </tr>" + (shippingBreakdown.showTax2SubBreakdown ? subBreakdownRows(shippingBreakdown.itemTax2, shippingBreakdown.shippingTax) : '') : '') + (shippingBreakdown.showSeparateShippingLine ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (shippingLabel + " " + defaultLang['tax'] + (document.ti ? ' ' + defaultLang['included'] : '') + " (" + formatTaxRate(shippingBreakdown.shippingTaxRate, company.la) + "%)") + "</td>\n <td class=\"text-right\" width=\"22%\">" + formatAmount(shippingBreakdown.shippingTax) + "</td>\n </tr>" : '');
|
|
12012
12065
|
var taxBreakdownRows = !eInvoiceTaxLines ? defaultTaxRows : isTaxSummaryMatching(eInvoiceTaxLines, document) ? eInvoiceTaxLines.map(function (line) {
|
|
12013
12066
|
return "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (eInvoiceTaxRowLabel + " (" + formatTaxRate(line.rate, company.la) + "%)") + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$3(line.taxAmount, effectiveCurrency, company.la, company.cf) + "</td>\n </tr>";
|
|
12014
12067
|
}).join('') : "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (defaultLang['total_tax'] || 'Total tax') + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$3(document.tx || 0, effectiveCurrency, company.la, company.cf) + "</td>\n </tr>";
|
|
@@ -12202,7 +12255,7 @@ var PaymentInstructions = function PaymentInstructions(_ref) {
|
|
|
12202
12255
|
|
|
12203
12256
|
var COMPANY_KEYS = ['_id', 'fax', 'contactName', 'c', 'e', 'ph', 'tfn', 'la', 'cr', 'cf', 'tz', 'ls', 'doc', 'bn', 'tn', 'tn2', 'tp', 'tp2', 'ti', 'ttx', 't1d', 't2d', 'pi', 'p1', 'p2', 'p3', 'sg', 'a1', 'a2', 'a3', 'address', 'language', 'la', 'sc', 'sr', 'ai', 'ct', 'de', 'r_bs', 'r_tc', 'r_nt', 'r_deposit_due', 'r_ad', 'r_gt', 'r_po', 'r_bt', 'r_st', 'r_d', 'r_a', 'r_dc', 'r_ic', 'r_it', 'r_n', 'r_p', 'r_q', 'r_sb', 'r_sp', 'r_tt', 'r_pi', 'r_inv', 'r_est', 'r_crd', 'r_dd', 'df', 'lg', 'hasPaymentInstructionQRCode', 'updatedAt', 'payment_in_progress', 'eInvoicing', 'co'];
|
|
12204
12257
|
|
|
12205
|
-
var DOCUMENT_KEYS = ['_id', 'ad', 'ty', 'cu', 'currency', 'd', 'dd', 'rn', 'it', 'st', 'tx', 'tx2', 'tt', 'dc', 'dcp', 'dcpo', 'sp', 'sntx', 'tp', 'tp2', 'tn', 'tn2', 'tax1BaseAmount', 'tax2BaseAmount', 'ti', 'ttx', 't1d', 't2d', 'pm', 'sca', 'hangingAmount', 'depositAmount', 'um', 'shouldShowPaymentInstructions', 'customization', 'asi', 'no', 'proposal', 'd', 'rd', 'di', 'pon', 'pma', 'depositDue', 'noteHtml', 'nt', 'tc', 'sd', 'cs', 'a1', 'a2', 'a3', 't2di', 'dco', 'discountAfterTax', 'csd', 'tz', 'sent', 'isUserSignatureOverlayed', 'serviceDeliveryDate', 'eInvoicing'];
|
|
12258
|
+
var DOCUMENT_KEYS = ['_id', 'ad', 'ty', 'cu', 'currency', 'd', 'dd', 'rn', 'it', 'st', 'tx', 'tx2', 'tt', 'dc', 'dcp', 'dcpo', 'sp', 'sntx', 'shippingTaxRate', 'tp', 'tp2', 'tn', 'tn2', 'tax1BaseAmount', 'tax2BaseAmount', 'ti', 'ttx', 't1d', 't2d', 'pm', 'sca', 'hangingAmount', 'depositAmount', 'um', 'shouldShowPaymentInstructions', 'customization', 'asi', 'no', 'proposal', 'd', 'rd', 'di', 'pon', 'pma', 'depositDue', 'noteHtml', 'nt', 'tc', 'sd', 'cs', 'a1', 'a2', 'a3', 't2di', 'dco', 'discountAfterTax', 'csd', 'tz', 'sent', 'isUserSignatureOverlayed', 'serviceDeliveryDate', 'eInvoicing'];
|
|
12206
12259
|
|
|
12207
12260
|
var decodeHtml = function decodeHtml(str) {
|
|
12208
12261
|
if (str === void 0) {
|
|
@@ -12399,7 +12452,11 @@ var getDefaultLang = function getDefaultLang(t, lang) {
|
|
|
12399
12452
|
vat: t ? t('vat') : lang['vat'],
|
|
12400
12453
|
serviceDeliveryDate: t ? t('service_delivery_date') : lang['service_delivery_date'],
|
|
12401
12454
|
tax_label: t ? t('tax_label') : lang['tax_label'],
|
|
12402
|
-
total_tax: t ? t('total_tax') : lang['total_tax']
|
|
12455
|
+
total_tax: t ? t('total_tax') : lang['total_tax'],
|
|
12456
|
+
tax: t ? t('tax') : lang['tax'],
|
|
12457
|
+
invoice_number_abbreviated: t ? t('invoice_number_abbreviated') : lang['invoice_number_abbreviated'],
|
|
12458
|
+
creditNote_number_abbreviated: t ? t('creditNote_number_abbreviated') : lang['creditNote_number_abbreviated'],
|
|
12459
|
+
estimate_number_abbreviated: t ? t('estimate_number_abbreviated') : lang['estimate_number_abbreviated']
|
|
12403
12460
|
};
|
|
12404
12461
|
};
|
|
12405
12462
|
|
|
@@ -12707,12 +12764,21 @@ var InvoiceHeader$1 = function InvoiceHeader(_ref) {
|
|
|
12707
12764
|
});
|
|
12708
12765
|
};
|
|
12709
12766
|
var eInvoiceConfig = getEInvoiceConfig(company.co);
|
|
12710
|
-
|
|
12767
|
+
var getNumberLabel = function getNumberLabel() {
|
|
12768
|
+
if (document.ty === 1 || document.ty === 5) {
|
|
12769
|
+
return defaultLang['invoice_number_abbreviated'] || documentName + " " + defaultLang['number'];
|
|
12770
|
+
} else if (document.ty === 2) {
|
|
12771
|
+
return defaultLang['creditNote_number_abbreviated'] || documentName + " " + defaultLang['number'];
|
|
12772
|
+
} else {
|
|
12773
|
+
return documentName + " " + defaultLang['number'];
|
|
12774
|
+
}
|
|
12775
|
+
};
|
|
12776
|
+
return html$n(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["<!-- begin invoice-header -->\n <div class=\"invoice-header\">\n <div class=\"row\">\n <div class=\"invoice-to col-sm-12 col-md-6\">\n <span class=\"heading heading-title\">\n ", "</span\n >\n <div class=\"text-inverse customer-name\">", "</div>\n ", "\n ", "\n\n <address class=\"address-text\" style=\"margin-bottom: 40px;\">\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n </address>\n\n ", "\n ", "\n </div>\n\n <div class=\"invoice-date col-sm-12 col-md-6\">\n <div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <span class=\"label\"> ", " </span>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">\n ", "\n </div>\n </div>\n ", "\n <div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <span class=\"label\"\n >", "</span\n >\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">\n ", "\n </div>\n </div>\n ", "\n ", "\n </div>\n </div>\n </div>\n <!-- end invoice-header -->"])), company.r_bt ? company.r_bt : defaultLang['bill_to'], customerPrimaryName, customerSecondaryName ? "<div class=\"address-text customer-secondary-name\" style=\"margin-bottom: 8px;\">" + customerSecondaryName + "</div>" : '', TaxRegistrations({
|
|
12711
12777
|
config: eInvoiceConfig,
|
|
12712
12778
|
taxRegistrations: customer === null || customer === void 0 ? void 0 : (_customer$eInvoicing = customer.eInvoicing) === null || _customer$eInvoicing === void 0 ? void 0 : _customer$eInvoicing.taxRegistrations,
|
|
12713
12779
|
defaultLang: defaultLang,
|
|
12714
12780
|
wrapperClass: 'customer-einvoicing'
|
|
12715
|
-
}), customerAddress.address1 ? "<div>" + customerAddress.address1 + "</div>" : '', customerAddress.address2 ? "<div>" + customerAddress.address2 + "</div>" : '', customerAddress.address3 ? "<div>" + customerAddress.address3 + "</div>" : '', customerAddress.city || customerAddress.state || customerAddress.zip ? "<div>" + ((customerAddress.city ? customerAddress.city + ' ' : '') + (customerAddress.state ? customerAddress.state + ' ' : '') + (customerAddress.zip ? customerAddress.zip + ' ' : '')) + "</div>" : '', customerAddress.country ? "<div>" + customerAddress.country + "</div>" : '', customer && customer.tfn ? "<div>" + (customer.tfn ? (company.bn || 'Tax no.') + ' : ' + customer.tfn : '') + "</div>" : '', customer && customer.e ? "<div>" + customer.e + "</div>" : '', customer && customer.ph ? "<div>" + customer.ph + "</div>" : '', customer && customer.ai ? "<div>" + customer.ai + "</div>" : '', shippingAddressExists ? "<span class=\"heading\" >" + (company.r_st ? company.r_st : defaultLang.ship_to) + "</span>" : '', shippingAddressExists ? "\n <address class=\"address-text\" style=\"margin-bottom: 8px;\">\n " + (customerShippingAddress.address1 ? "<div>" + customerShippingAddress.address1 + "</div>" : '') + "\n " + (customerShippingAddress.address2 ? "<div>" + customerShippingAddress.address2 + "</div>" : '') + "\n " + (customerShippingAddress.address3 ? "<div>" + customerShippingAddress.address3 + "</div>" : '') + "\n " + (customerShippingAddress.city || customerShippingAddress.state || customerShippingAddress.zip ? "<div>" + ((customerShippingAddress.city ? customerShippingAddress.city + ' ' : '') + (customerShippingAddress.state ? customerShippingAddress.state + ' ' : '') + (customerShippingAddress.zip ? customerShippingAddress.zip + ' ' : '')) + "</div>" : '') + "\n " + (customerShippingAddress.country ? "<div>" + customerShippingAddress.country + "</div>" : '') + "\n " + (document.asi ? "<div>" + document.asi + "</div>" : '') + "\n </address>\n " : '',
|
|
12781
|
+
}), customerAddress.address1 ? "<div>" + customerAddress.address1 + "</div>" : '', customerAddress.address2 ? "<div>" + customerAddress.address2 + "</div>" : '', customerAddress.address3 ? "<div>" + customerAddress.address3 + "</div>" : '', customerAddress.city || customerAddress.state || customerAddress.zip ? "<div>" + ((customerAddress.city ? customerAddress.city + ' ' : '') + (customerAddress.state ? customerAddress.state + ' ' : '') + (customerAddress.zip ? customerAddress.zip + ' ' : '')) + "</div>" : '', customerAddress.country ? "<div>" + customerAddress.country + "</div>" : '', customer && customer.tfn ? "<div>" + (customer.tfn ? (company.bn || 'Tax no.') + ' : ' + customer.tfn : '') + "</div>" : '', customer && customer.e ? "<div>" + customer.e + "</div>" : '', customer && customer.ph ? "<div>" + customer.ph + "</div>" : '', customer && customer.ai ? "<div>" + customer.ai + "</div>" : '', shippingAddressExists ? "<span class=\"heading\" >" + (company.r_st ? company.r_st : defaultLang.ship_to) + "</span>" : '', shippingAddressExists ? "\n <address class=\"address-text\" style=\"margin-bottom: 8px;\">\n " + (customerShippingAddress.address1 ? "<div>" + customerShippingAddress.address1 + "</div>" : '') + "\n " + (customerShippingAddress.address2 ? "<div>" + customerShippingAddress.address2 + "</div>" : '') + "\n " + (customerShippingAddress.address3 ? "<div>" + customerShippingAddress.address3 + "</div>" : '') + "\n " + (customerShippingAddress.city || customerShippingAddress.state || customerShippingAddress.zip ? "<div>" + ((customerShippingAddress.city ? customerShippingAddress.city + ' ' : '') + (customerShippingAddress.state ? customerShippingAddress.state + ' ' : '') + (customerShippingAddress.zip ? customerShippingAddress.zip + ' ' : '')) + "</div>" : '') + "\n " + (customerShippingAddress.country ? "<div>" + customerShippingAddress.country + "</div>" : '') + "\n " + (document.asi ? "<div>" + document.asi + "</div>" : '') + "\n </address>\n " : '', getNumberLabel(), document.no ? document.no : '', document.proposal && document.proposal.no ? "<div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <span class=\"label\">Proposal #</span>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">\n " + document.proposal.no + "\n </div>\n </div>" : '', company.r_d ? company.r_d : defaultLang['issued'], formatDate(document.d), document.ty == 1 && !document.rd ? "<div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <span class=\"label\">" + (company.r_dd ? company.r_dd : defaultLang['due']) + "</span>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">\n " + (document.dd ? formatDate(document.dd) : formatDate(new Date(document.d).setDate(new Date(document.d).getDate() + parseInt(document.di)))) + "\n </div>\n </div>" : '', document.pon ? "<div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>" + (company.r_po ? company.r_po : defaultLang['po_number']) + "</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">" + document.pon + "</div>\n </div>\n " : '');
|
|
12716
12782
|
};
|
|
12717
12783
|
|
|
12718
12784
|
var _templateObject$p, _templateObject2$b, _templateObject3$5;
|
|
@@ -12834,7 +12900,15 @@ var InvoiceContent$1 = function InvoiceContent(_ref) {
|
|
|
12834
12900
|
var effectiveCurrency = document.currency || company.cr;
|
|
12835
12901
|
var eInvoiceTaxLines = getEInvoiceTaxLines(document);
|
|
12836
12902
|
var eInvoiceTaxRowLabel = getEInvoiceTaxLabel(company, defaultLang);
|
|
12837
|
-
var
|
|
12903
|
+
var shippingBreakdown = getShippingTaxBreakdown(document);
|
|
12904
|
+
var formatAmount = function formatAmount(amount) {
|
|
12905
|
+
return FormatCurrency$7(amount, effectiveCurrency, company.la, company.cf);
|
|
12906
|
+
};
|
|
12907
|
+
var shippingLabel = company.r_sp ? company.r_sp : defaultLang['shipping'];
|
|
12908
|
+
var subBreakdownRows = function subBreakdownRows(itemsAmount, shippingAmount) {
|
|
12909
|
+
return "<tr>\n <td width=\"22%\" style=\"padding-left: 24px;\">" + defaultLang['item'] + "</td>\n <td class=\"text-right\" width=\"22%\">" + formatAmount(itemsAmount) + "</td>\n </tr>\n <tr>\n <td width=\"22%\" style=\"padding-left: 24px;\">" + shippingLabel + "</td>\n <td class=\"text-right\" width=\"22%\">" + formatAmount(shippingAmount) + "</td>\n </tr>";
|
|
12910
|
+
};
|
|
12911
|
+
var defaultTaxRows = "" + (document.tx != 0 ? "<tr>\n <td width=\"22%\">" + (displayTaxName1 + taxIncluded1 + '(' + document.tp + '%)') + "</td>\n <td class=\"text-right\" width=\"22%\">" + ((document.t1d ? '(' : '') + formatAmount(shippingBreakdown.shippingMatchesTax1 ? shippingBreakdown.itemTax1 + shippingBreakdown.shippingTax : document.tx) + (document.t1d ? ')' : '')) + "</td>\n </tr>" + (shippingBreakdown.showTax1SubBreakdown ? subBreakdownRows(shippingBreakdown.itemTax1, shippingBreakdown.shippingTax) : '') : '') + (document.ttx && document.tx2 != 0 ? "<tr>\n <td width=\"22%\">" + (displayTaxName2 + taxIncluded2 + '(' + document.tp2 + '%)') + "</td>\n <td class=\"text-right\" width=\"22%\">" + ((document.t2d ? '(' : '') + formatAmount(shippingBreakdown.shippingMatchesTax2 ? shippingBreakdown.itemTax2 + shippingBreakdown.shippingTax : document.tx2) + (document.t2d ? ')' : '')) + "</td>\n </tr>" + (shippingBreakdown.showTax2SubBreakdown ? subBreakdownRows(shippingBreakdown.itemTax2, shippingBreakdown.shippingTax) : '') : '') + (shippingBreakdown.showSeparateShippingLine ? "<tr>\n <td width=\"22%\">" + (shippingLabel + ' ' + defaultLang['tax'] + (document.ti ? ' ' + defaultLang['included'] : '') + ' (' + formatTaxRate(shippingBreakdown.shippingTaxRate, company.la) + '%)') + "</td>\n <td class=\"text-right\" width=\"22%\">" + formatAmount(shippingBreakdown.shippingTax) + "</td>\n </tr>" : '');
|
|
12838
12912
|
var taxBreakdownRows = !eInvoiceTaxLines ? defaultTaxRows : isTaxSummaryMatching(eInvoiceTaxLines, document) ? eInvoiceTaxLines.map(function (line) {
|
|
12839
12913
|
return "<tr>\n <td width=\"22%\">" + (eInvoiceTaxRowLabel + ' (' + formatTaxRate(line.rate, company.la) + '%)') + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$7(line.taxAmount, effectiveCurrency, company.la, company.cf) + "</td>\n </tr>";
|
|
12840
12914
|
}).join('') : "<tr>\n <td width=\"22%\">" + (defaultLang['total_tax'] || 'Total tax') + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$7(document.tx || 0, effectiveCurrency, company.la, company.cf) + "</td>\n </tr>";
|