@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.js
CHANGED
|
@@ -9049,7 +9049,7 @@ var invoiceStyle = function invoiceStyle(_ref) {
|
|
|
9049
9049
|
signItIntegration = _ref.signItIntegration,
|
|
9050
9050
|
_ref$isFullScreen = _ref.isFullScreen,
|
|
9051
9051
|
isFullScreen = _ref$isFullScreen === void 0 ? false : _ref$isFullScreen;
|
|
9052
|
-
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 " : '');
|
|
9052
|
+
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 " : '');
|
|
9053
9053
|
};
|
|
9054
9054
|
|
|
9055
9055
|
var _templateObject$1, _templateObject2;
|
|
@@ -9247,20 +9247,29 @@ var InvoiceHeader = function InvoiceHeader(_ref) {
|
|
|
9247
9247
|
});
|
|
9248
9248
|
};
|
|
9249
9249
|
var eInvoiceConfig = getEInvoiceConfig(company.co);
|
|
9250
|
+
var getNumberLabel = function getNumberLabel() {
|
|
9251
|
+
if (document.ty === 1 || document.ty === 5) {
|
|
9252
|
+
return defaultLang['invoice_number_abbreviated'] || documentName + " #";
|
|
9253
|
+
} else if (document.ty === 2) {
|
|
9254
|
+
return defaultLang['creditNote_number_abbreviated'] || documentName + " #";
|
|
9255
|
+
} else {
|
|
9256
|
+
return defaultLang['estimate_number_abbreviated'] || documentName + " #";
|
|
9257
|
+
}
|
|
9258
|
+
};
|
|
9250
9259
|
var customerAddressLine = [customerAddress.city, customerAddress.state, customerAddress.zip].filter(Boolean).join(' ');
|
|
9251
9260
|
var shippingAddressLine = [customerShippingAddress.city, customerShippingAddress.state, customerShippingAddress.zip].filter(Boolean).join(' ');
|
|
9252
9261
|
var renderAddress = function renderAddress(address) {
|
|
9253
9262
|
return "\n " + (address.address1 ? "<div>" + address.address1 + "</div>" : '') + "\n " + (address.address2 ? "<div>" + address.address2 + "</div>" : '') + "\n " + (address.address3 ? "<div>" + address.address3 + "</div>" : '') + "\n";
|
|
9254
9263
|
};
|
|
9255
9264
|
var renderInvoiceDetail = function renderInvoiceDetail(label, value) {
|
|
9256
|
-
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 ";
|
|
9265
|
+
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 ";
|
|
9257
9266
|
};
|
|
9258
9267
|
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({
|
|
9259
9268
|
config: eInvoiceConfig,
|
|
9260
9269
|
taxRegistrations: customer === null || customer === void 0 ? void 0 : (_customer$eInvoicing = customer.eInvoicing) === null || _customer$eInvoicing === void 0 ? void 0 : _customer$eInvoicing.taxRegistrations,
|
|
9261
9270
|
defaultLang: defaultLang,
|
|
9262
9271
|
wrapperClass: 'customer-einvoicing'
|
|
9263
|
-
}), 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(
|
|
9272
|
+
}), 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) : '');
|
|
9264
9273
|
};
|
|
9265
9274
|
|
|
9266
9275
|
var currencies = {
|
|
@@ -11882,6 +11891,42 @@ var getEInvoiceTaxLabel = function getEInvoiceTaxLabel(company, defaultLang) {
|
|
|
11882
11891
|
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';
|
|
11883
11892
|
};
|
|
11884
11893
|
|
|
11894
|
+
var checkHasShippingTaxRate = function checkHasShippingTaxRate(document) {
|
|
11895
|
+
return document.shippingTaxRate != null && document.shippingTaxRate !== '';
|
|
11896
|
+
};
|
|
11897
|
+
var computeShippingTax = function computeShippingTax(document) {
|
|
11898
|
+
var rate = checkHasShippingTaxRate(document) ? parseFloat(document.shippingTaxRate) : 0;
|
|
11899
|
+
var shipping = document.sp ? parseFloat(document.sp) : 0;
|
|
11900
|
+
if (!(rate > 0) || document.sntx || !shipping) {
|
|
11901
|
+
return 0;
|
|
11902
|
+
}
|
|
11903
|
+
return document.ti ? shipping * (1 - 1 / (1 + rate / 100)) : shipping * rate / 100;
|
|
11904
|
+
};
|
|
11905
|
+
var getShippingTaxBreakdown = function getShippingTaxBreakdown(document) {
|
|
11906
|
+
var hasShippingTaxRate = checkHasShippingTaxRate(document);
|
|
11907
|
+
var shippingTaxRate = hasShippingTaxRate ? parseFloat(document.shippingTaxRate) : 0;
|
|
11908
|
+
var shippingTax = computeShippingTax(document);
|
|
11909
|
+
var itemTax1 = document.tx ? parseFloat(document.tx) : 0;
|
|
11910
|
+
var itemTax2 = document.tx2 ? parseFloat(document.tx2) : 0;
|
|
11911
|
+
var shippingMatchesTax1 = hasShippingTaxRate && shippingTaxRate > 0 && !document.sntx && shippingTaxRate === parseFloat(document.tp || 0);
|
|
11912
|
+
var shippingMatchesTax2 = hasShippingTaxRate && shippingTaxRate > 0 && !document.sntx && !!document.ttx && shippingTaxRate === parseFloat(document.tp2 || 0) && !shippingMatchesTax1;
|
|
11913
|
+
var showTax1SubBreakdown = shippingMatchesTax1 && !!shippingTax;
|
|
11914
|
+
var showTax2SubBreakdown = shippingMatchesTax2 && !!shippingTax;
|
|
11915
|
+
var showSeparateShippingLine = hasShippingTaxRate && shippingTaxRate > 0 && !document.sntx && !shippingMatchesTax1 && !shippingMatchesTax2 && !!shippingTax;
|
|
11916
|
+
return {
|
|
11917
|
+
hasShippingTaxRate: hasShippingTaxRate,
|
|
11918
|
+
shippingTaxRate: shippingTaxRate,
|
|
11919
|
+
shippingTax: shippingTax,
|
|
11920
|
+
itemTax1: itemTax1,
|
|
11921
|
+
itemTax2: itemTax2,
|
|
11922
|
+
shippingMatchesTax1: shippingMatchesTax1,
|
|
11923
|
+
shippingMatchesTax2: shippingMatchesTax2,
|
|
11924
|
+
showTax1SubBreakdown: showTax1SubBreakdown,
|
|
11925
|
+
showTax2SubBreakdown: showTax2SubBreakdown,
|
|
11926
|
+
showSeparateShippingLine: showSeparateShippingLine
|
|
11927
|
+
};
|
|
11928
|
+
};
|
|
11929
|
+
|
|
11885
11930
|
var nl2br = function nl2br(str, is_xhtml) {
|
|
11886
11931
|
if (typeof str === "undefined" || str === null) {
|
|
11887
11932
|
return "";
|
|
@@ -12009,7 +12054,15 @@ var InvoiceContent = function InvoiceContent(_ref) {
|
|
|
12009
12054
|
var effectiveCurrency = document.currency || company.cr;
|
|
12010
12055
|
var eInvoiceTaxLines = getEInvoiceTaxLines(document);
|
|
12011
12056
|
var eInvoiceTaxRowLabel = getEInvoiceTaxLabel(company, defaultLang);
|
|
12012
|
-
var
|
|
12057
|
+
var shippingBreakdown = getShippingTaxBreakdown(document);
|
|
12058
|
+
var formatAmount = function formatAmount(amount) {
|
|
12059
|
+
return FormatCurrency$3(amount, effectiveCurrency, company.la, company.cf);
|
|
12060
|
+
};
|
|
12061
|
+
var shippingLabel = company.r_sp ? company.r_sp : defaultLang['shipping'];
|
|
12062
|
+
var subBreakdownRows = function subBreakdownRows(itemsAmount, shippingAmount) {
|
|
12063
|
+
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>";
|
|
12064
|
+
};
|
|
12065
|
+
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>" : '');
|
|
12013
12066
|
var taxBreakdownRows = !eInvoiceTaxLines ? defaultTaxRows : isTaxSummaryMatching(eInvoiceTaxLines, document) ? eInvoiceTaxLines.map(function (line) {
|
|
12014
12067
|
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>";
|
|
12015
12068
|
}).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>";
|
|
@@ -12203,7 +12256,7 @@ var PaymentInstructions = function PaymentInstructions(_ref) {
|
|
|
12203
12256
|
|
|
12204
12257
|
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'];
|
|
12205
12258
|
|
|
12206
|
-
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'];
|
|
12259
|
+
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'];
|
|
12207
12260
|
|
|
12208
12261
|
var decodeHtml = function decodeHtml(str) {
|
|
12209
12262
|
if (str === void 0) {
|
|
@@ -12400,7 +12453,11 @@ var getDefaultLang = function getDefaultLang(t, lang) {
|
|
|
12400
12453
|
vat: t ? t('vat') : lang['vat'],
|
|
12401
12454
|
serviceDeliveryDate: t ? t('service_delivery_date') : lang['service_delivery_date'],
|
|
12402
12455
|
tax_label: t ? t('tax_label') : lang['tax_label'],
|
|
12403
|
-
total_tax: t ? t('total_tax') : lang['total_tax']
|
|
12456
|
+
total_tax: t ? t('total_tax') : lang['total_tax'],
|
|
12457
|
+
tax: t ? t('tax') : lang['tax'],
|
|
12458
|
+
invoice_number_abbreviated: t ? t('invoice_number_abbreviated') : lang['invoice_number_abbreviated'],
|
|
12459
|
+
creditNote_number_abbreviated: t ? t('creditNote_number_abbreviated') : lang['creditNote_number_abbreviated'],
|
|
12460
|
+
estimate_number_abbreviated: t ? t('estimate_number_abbreviated') : lang['estimate_number_abbreviated']
|
|
12404
12461
|
};
|
|
12405
12462
|
};
|
|
12406
12463
|
|
|
@@ -12708,12 +12765,21 @@ var InvoiceHeader$1 = function InvoiceHeader(_ref) {
|
|
|
12708
12765
|
});
|
|
12709
12766
|
};
|
|
12710
12767
|
var eInvoiceConfig = getEInvoiceConfig(company.co);
|
|
12711
|
-
|
|
12768
|
+
var getNumberLabel = function getNumberLabel() {
|
|
12769
|
+
if (document.ty === 1 || document.ty === 5) {
|
|
12770
|
+
return defaultLang['invoice_number_abbreviated'] || documentName + " " + defaultLang['number'];
|
|
12771
|
+
} else if (document.ty === 2) {
|
|
12772
|
+
return defaultLang['creditNote_number_abbreviated'] || documentName + " " + defaultLang['number'];
|
|
12773
|
+
} else {
|
|
12774
|
+
return documentName + " " + defaultLang['number'];
|
|
12775
|
+
}
|
|
12776
|
+
};
|
|
12777
|
+
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({
|
|
12712
12778
|
config: eInvoiceConfig,
|
|
12713
12779
|
taxRegistrations: customer === null || customer === void 0 ? void 0 : (_customer$eInvoicing = customer.eInvoicing) === null || _customer$eInvoicing === void 0 ? void 0 : _customer$eInvoicing.taxRegistrations,
|
|
12714
12780
|
defaultLang: defaultLang,
|
|
12715
12781
|
wrapperClass: 'customer-einvoicing'
|
|
12716
|
-
}), 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 " : '',
|
|
12782
|
+
}), 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 " : '');
|
|
12717
12783
|
};
|
|
12718
12784
|
|
|
12719
12785
|
var _templateObject$p, _templateObject2$b, _templateObject3$5;
|
|
@@ -12835,7 +12901,15 @@ var InvoiceContent$1 = function InvoiceContent(_ref) {
|
|
|
12835
12901
|
var effectiveCurrency = document.currency || company.cr;
|
|
12836
12902
|
var eInvoiceTaxLines = getEInvoiceTaxLines(document);
|
|
12837
12903
|
var eInvoiceTaxRowLabel = getEInvoiceTaxLabel(company, defaultLang);
|
|
12838
|
-
var
|
|
12904
|
+
var shippingBreakdown = getShippingTaxBreakdown(document);
|
|
12905
|
+
var formatAmount = function formatAmount(amount) {
|
|
12906
|
+
return FormatCurrency$7(amount, effectiveCurrency, company.la, company.cf);
|
|
12907
|
+
};
|
|
12908
|
+
var shippingLabel = company.r_sp ? company.r_sp : defaultLang['shipping'];
|
|
12909
|
+
var subBreakdownRows = function subBreakdownRows(itemsAmount, shippingAmount) {
|
|
12910
|
+
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>";
|
|
12911
|
+
};
|
|
12912
|
+
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>" : '');
|
|
12839
12913
|
var taxBreakdownRows = !eInvoiceTaxLines ? defaultTaxRows : isTaxSummaryMatching(eInvoiceTaxLines, document) ? eInvoiceTaxLines.map(function (line) {
|
|
12840
12914
|
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>";
|
|
12841
12915
|
}).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>";
|