@bookipi/htmlgenerator 1.13.0-alpha.1 → 1.13.0-alpha.2

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.
@@ -413,7 +413,7 @@ var en = (_deposit_due$terms$pr = {
413
413
  return "This offer is valid from the date of issue and will expire at the close of business (" + x + "). Acceptance will be in the form of accepting and signing this proposal.";
414
414
  }, _deposit_due$terms$pr.details_line_3 = function details_line_3(x, y, z) {
415
415
  return x + " (" + y + "). " + z;
416
- }, _deposit_due$terms$pr.details_line_3_1 = 'This offer is valid from the date of issue and will expire at the close of business', _deposit_due$terms$pr.details_line_3_2 = 'Acceptance will be in the form of accepting and signing this proposal.', _deposit_due$terms$pr.details_line_4 = "Please accept this proposal and terms of service. This creates a legally binding contract between us. At any time if you have any questions please contact us on the details above. These terms will be effective throughout the period of our engagement and may only be changed by the Parties' agreement in writing.", _deposit_due$terms$pr.supplier_details = 'Supplier Details', _deposit_due$terms$pr.customer_details = 'Customer Details', _deposit_due$terms$pr.effective_date = 'Dated', _deposit_due$terms$pr.supplier_empty = 'No supplier added yet.', _deposit_due$terms$pr.customer_empty = 'No customer added yet.', _deposit_due$terms$pr.kind_regards = 'Kind regards', _deposit_due$terms$pr.services_title = 'Billing Schedule', _deposit_due$terms$pr["total"] = 'Total:', _deposit_due$terms$pr.items_empty = 'No services added yet.', _deposit_due$terms$pr.agreement_title = 'Terms and Conditions', _deposit_due$terms$pr["signature"] = 'Signature', _deposit_due$terms$pr.proposal_id = 'Proposal ID:', _deposit_due$terms$pr.client = 'Client:', _deposit_due$terms$pr.email_addresses = 'Email address:', _deposit_due$terms$pr.ip = 'IP:', _deposit_due$terms$pr.time = 'Time:', _deposit_due$terms$pr.upgradeRequired = 'Upgrade required', _deposit_due$terms$pr.document = 'Document', _deposit_due$terms$pr["invoice"] = 'Invoice', _deposit_due$terms$pr.estimate = 'Estimate', _deposit_due$terms$pr.creditNote = 'Credit Note', _deposit_due$terms$pr.deliveryNote = 'Delivery Note', _deposit_due$terms$pr.purchaseOrder = 'Purchase Order', _deposit_due$terms$pr.Invoice = 'Invoice', _deposit_due$terms$pr["Estimate"] = 'Estimate', _deposit_due$terms$pr.creditnote = 'Credit Note', _deposit_due$terms$pr.service_delivery_date = 'Date of delivery or completion of service', _deposit_due$terms$pr["tax_label"] = 'VAT Rate', _deposit_due$terms$pr.label_siren = 'SIREN', _deposit_due$terms$pr.vat = 'VAT', _deposit_due$terms$pr.total_tax = 'Total tax', _deposit_due$terms$pr.item_unit_unit = 'Unit', _deposit_due$terms$pr.item_unit_unit_short = function item_unit_unit_short(n) {
416
+ }, _deposit_due$terms$pr.details_line_3_1 = 'This offer is valid from the date of issue and will expire at the close of business', _deposit_due$terms$pr.details_line_3_2 = 'Acceptance will be in the form of accepting and signing this proposal.', _deposit_due$terms$pr.details_line_4 = "Please accept this proposal and terms of service. This creates a legally binding contract between us. At any time if you have any questions please contact us on the details above. These terms will be effective throughout the period of our engagement and may only be changed by the Parties' agreement in writing.", _deposit_due$terms$pr.supplier_details = 'Supplier Details', _deposit_due$terms$pr.customer_details = 'Customer Details', _deposit_due$terms$pr.effective_date = 'Dated', _deposit_due$terms$pr.supplier_empty = 'No supplier added yet.', _deposit_due$terms$pr.customer_empty = 'No customer added yet.', _deposit_due$terms$pr.kind_regards = 'Kind regards', _deposit_due$terms$pr.services_title = 'Billing Schedule', _deposit_due$terms$pr["total"] = 'Total:', _deposit_due$terms$pr.items_empty = 'No services added yet.', _deposit_due$terms$pr.agreement_title = 'Terms and Conditions', _deposit_due$terms$pr["signature"] = 'Signature', _deposit_due$terms$pr.proposal_id = 'Proposal ID:', _deposit_due$terms$pr.client = 'Client:', _deposit_due$terms$pr.email_addresses = 'Email address:', _deposit_due$terms$pr.ip = 'IP:', _deposit_due$terms$pr.time = 'Time:', _deposit_due$terms$pr.upgradeRequired = 'Upgrade required', _deposit_due$terms$pr.document = 'Document', _deposit_due$terms$pr["invoice"] = 'Invoice', _deposit_due$terms$pr.estimate = 'Estimate', _deposit_due$terms$pr.creditNote = 'Credit Note', _deposit_due$terms$pr.deliveryNote = 'Delivery Note', _deposit_due$terms$pr.purchaseOrder = 'Purchase Order', _deposit_due$terms$pr.Invoice = 'Invoice', _deposit_due$terms$pr["Estimate"] = 'Estimate', _deposit_due$terms$pr.creditnote = 'Credit Note', _deposit_due$terms$pr.service_delivery_date = 'Date of delivery or completion of service', _deposit_due$terms$pr["tax_label"] = 'VAT Rate', _deposit_due$terms$pr.label_siren = 'SIREN', _deposit_due$terms$pr.vat = 'VAT', _deposit_due$terms$pr.total_tax = 'Total tax', _deposit_due$terms$pr.einvoice_tax_code_reverse_charge = 'Reverse charge', _deposit_due$terms$pr.einvoice_tax_code_intra_community = 'Intra-community supply', _deposit_due$terms$pr.einvoice_tax_code_export_non_eu = 'Export outside the EU', _deposit_due$terms$pr.einvoice_tax_code_exempt = 'Exempt', _deposit_due$terms$pr.einvoice_tax_code_out_of_scope = 'Out of scope', _deposit_due$terms$pr.item_unit_unit = 'Unit', _deposit_due$terms$pr.item_unit_unit_short = function item_unit_unit_short(n) {
417
417
  return n === 1 ? 'unit' : 'units';
418
418
  }, _deposit_due$terms$pr.item_unit_piece = 'Piece', _deposit_due$terms$pr.item_unit_piece_short = function item_unit_piece_short(n) {
419
419
  return n === 1 ? 'pc' : 'pcs';
@@ -9070,7 +9070,7 @@ var invoiceStyle = function invoiceStyle(_ref) {
9070
9070
  signItIntegration = _ref.signItIntegration,
9071
9071
  _ref$isFullScreen = _ref.isFullScreen,
9072
9072
  isFullScreen = _ref$isFullScreen === void 0 ? false : _ref$isFullScreen;
9073
- 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 " : '');
9073
+ 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\n .tax-breakdown-subrow {\n font-size: 12px;\n color: #999;\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 " : '');
9074
9074
  };
9075
9075
 
9076
9076
  var _templateObject$1, _templateObject2;
@@ -9125,7 +9125,26 @@ var frConfig = {
9125
9125
  }],
9126
9126
  serviceDeliveryDate: true,
9127
9127
  taxLabel: 'tax_label',
9128
- itemUnitType: true
9128
+ itemUnitType: true,
9129
+ itemTaxCodes: true,
9130
+ taxCodeRates: {
9131
+ FR_STANDARD_20: 20,
9132
+ FR_INTERMEDIATE_10: 10,
9133
+ FR_REDUCED_55: 5.5,
9134
+ FR_SUPER_REDUCED_21: 2.1,
9135
+ FR_REVERSE_CHARGE: 0,
9136
+ FR_INTRA_COMMUNITY: 0,
9137
+ FR_EXPORT_NON_EU: 0,
9138
+ FR_EXEMPT: 0,
9139
+ FR_OUT_OF_SCOPE: 0
9140
+ },
9141
+ taxCodeLabels: {
9142
+ FR_REVERSE_CHARGE: 'einvoice_tax_code_reverse_charge',
9143
+ FR_INTRA_COMMUNITY: 'einvoice_tax_code_intra_community',
9144
+ FR_EXPORT_NON_EU: 'einvoice_tax_code_export_non_eu',
9145
+ FR_EXEMPT: 'einvoice_tax_code_exempt',
9146
+ FR_OUT_OF_SCOPE: 'einvoice_tax_code_out_of_scope'
9147
+ }
9129
9148
  };
9130
9149
 
9131
9150
  var EINVOICE_CONFIGS = {
@@ -11913,10 +11932,10 @@ var formatTaxRate = function formatTaxRate(rate, locale) {
11913
11932
  }
11914
11933
  };
11915
11934
  var getEInvoiceTaxLabel = function getEInvoiceTaxLabel(company, defaultLang) {
11916
- var _ref, _ref2;
11935
+ var _ref, _ref2, _defaultLang$vat;
11917
11936
  var eInvoiceConfig = getEInvoiceConfig(company === null || company === void 0 ? void 0 : company.co);
11918
11937
  var configLabel = eInvoiceConfig !== null && eInvoiceConfig !== void 0 && eInvoiceConfig.taxLabel ? defaultLang === null || defaultLang === void 0 ? void 0 : defaultLang[eInvoiceConfig.taxLabel] : null;
11919
- 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';
11938
+ return (_ref = (_ref2 = (_defaultLang$vat = defaultLang === null || defaultLang === void 0 ? void 0 : defaultLang.vat) != null ? _defaultLang$vat : configLabel) != null ? _ref2 : defaultLang === null || defaultLang === void 0 ? void 0 : defaultLang.tax) != null ? _ref : 'Tax';
11920
11939
  };
11921
11940
 
11922
11941
  var currencies$1 = index.currencies;
@@ -11925,6 +11944,95 @@ var roundNumber$1 = function roundNumber(number, scale) {
11925
11944
  return Math.round((number + Number.EPSILON) * multiplier) / multiplier;
11926
11945
  };
11927
11946
 
11947
+ var vatOnBase = function vatOnBase(base, ratePercent, inclusive) {
11948
+ if (!(ratePercent > 0) || !base) {
11949
+ return 0;
11950
+ }
11951
+ return inclusive ? base - base / (1 + ratePercent / 100) : base * ratePercent / 100;
11952
+ };
11953
+ var getTaxCodeBreakdown = function getTaxCodeBreakdown(document, company, currencyCode) {
11954
+ var config = getEInvoiceConfig(company === null || company === void 0 ? void 0 : company.co);
11955
+ if (!(config !== null && config !== void 0 && config.itemTaxCodes)) {
11956
+ return [];
11957
+ }
11958
+ var _ref = currencies$1[currencyCode] || currencies$1.USD,
11959
+ decimal_digits = _ref.decimal_digits;
11960
+ var round = function round(value) {
11961
+ return roundNumber$1(value, decimal_digits);
11962
+ };
11963
+ var rateFor = function rateFor(taxCode, taxRate) {
11964
+ var _ref2, _config$taxCodeRates$, _config$taxCodeRates;
11965
+ return (_ref2 = (_config$taxCodeRates$ = (_config$taxCodeRates = config.taxCodeRates) === null || _config$taxCodeRates === void 0 ? void 0 : _config$taxCodeRates[taxCode]) != null ? _config$taxCodeRates$ : Number(taxRate)) != null ? _ref2 : 0;
11966
+ };
11967
+ var items = Array.isArray(document === null || document === void 0 ? void 0 : document.it) ? document.it : [];
11968
+ var inclusive = !!(document !== null && document !== void 0 && document.ti);
11969
+ var itemsSubtotal = items.reduce(function (sum, item) {
11970
+ return sum + (Number(item === null || item === void 0 ? void 0 : item.t) || 0);
11971
+ }, 0);
11972
+ var flatDiscount = Number(document === null || document === void 0 ? void 0 : document.dc) || 0;
11973
+ var percentDiscount = itemsSubtotal * (Number(document === null || document === void 0 ? void 0 : document.dcp) || 0) / 100;
11974
+ var globalDiscount = document !== null && document !== void 0 && document.discountAfterTax ? 0 : document !== null && document !== void 0 && document.dcpo ? percentDiscount : flatDiscount;
11975
+ var distributed = 0;
11976
+ var discountShares = items.map(function (item, index) {
11977
+ if (index === items.length - 1) {
11978
+ return globalDiscount - distributed;
11979
+ }
11980
+ var share = itemsSubtotal > 0 ? globalDiscount * (Number(item === null || item === void 0 ? void 0 : item.t) || 0) / itemsSubtotal : 0;
11981
+ distributed = distributed + share;
11982
+ return share;
11983
+ });
11984
+ var buckets = new Map();
11985
+ var bucketFor = function bucketFor(taxCode, ratePercent) {
11986
+ if (!buckets.has(taxCode)) {
11987
+ buckets.set(taxCode, {
11988
+ taxCode: taxCode,
11989
+ ratePercent: ratePercent,
11990
+ itemsAmount: 0,
11991
+ shippingAmount: 0
11992
+ });
11993
+ }
11994
+ return buckets.get(taxCode);
11995
+ };
11996
+ items.forEach(function (item, index) {
11997
+ if (!(item !== null && item !== void 0 && item.taxCode)) {
11998
+ return;
11999
+ }
12000
+ var base = Number(item.t) || 0;
12001
+ var share = discountShares[index];
12002
+ var rate = rateFor(item.taxCode, item.taxRate) || 0;
12003
+ bucketFor(item.taxCode, rate).itemsAmount += vatOnBase(base - share, rate, inclusive);
12004
+ });
12005
+ var shipping = document !== null && document !== void 0 && document.sp && !(document !== null && document !== void 0 && document.sntx) ? parseFloat(document.sp) : 0;
12006
+ if (shipping && document !== null && document !== void 0 && document.shippingTaxCode) {
12007
+ var rate = rateFor(document.shippingTaxCode, document.shippingTaxRate) || 0;
12008
+ bucketFor(document.shippingTaxCode, rate).shippingAmount += vatOnBase(shipping, rate, inclusive);
12009
+ }
12010
+ return [].concat(buckets.values()).map(function (bucket) {
12011
+ var itemsAmount = round(bucket.itemsAmount);
12012
+ var shippingAmount = round(bucket.shippingAmount);
12013
+ return _extends({}, bucket, {
12014
+ itemsAmount: itemsAmount,
12015
+ shippingAmount: shippingAmount,
12016
+ amount: round(itemsAmount + shippingAmount),
12017
+ included: inclusive,
12018
+ showSubBreakdown: itemsAmount > 0 && shippingAmount > 0
12019
+ });
12020
+ }).sort(function (a, b) {
12021
+ return b.ratePercent - a.ratePercent;
12022
+ });
12023
+ };
12024
+ var getTaxCodeRowLabel = function getTaxCodeRowLabel(entry, _ref3) {
12025
+ var taxLabel = _ref3.taxLabel,
12026
+ includedLabel = _ref3.includedLabel,
12027
+ formattedRate = _ref3.formattedRate,
12028
+ codeLabel = _ref3.codeLabel;
12029
+ var rate = "(" + formattedRate + "%)";
12030
+ if (codeLabel) {
12031
+ return codeLabel + " " + rate;
12032
+ }
12033
+ return entry !== null && entry !== void 0 && entry.included && (entry === null || entry === void 0 ? void 0 : entry.ratePercent) > 0 ? taxLabel + " " + includedLabel + " " + rate : taxLabel + " " + rate;
12034
+ };
12035
+
11928
12036
  var checkHasShippingTaxRate = function checkHasShippingTaxRate(document) {
11929
12037
  return document.shippingTaxRate != null && document.shippingTaxRate !== '';
11930
12038
  };
@@ -12131,6 +12239,7 @@ var _templateObject$8;
12131
12239
  var FormatCurrency$3 = util.FormatCurrency;
12132
12240
  var html$8 = String.raw;
12133
12241
  var InvoiceContent = function InvoiceContent(_ref) {
12242
+ var _getEInvoiceConfig;
12134
12243
  var company = _ref.company,
12135
12244
  defaultLang = _ref.defaultLang,
12136
12245
  document = _ref.document,
@@ -12184,11 +12293,25 @@ var InvoiceContent = function InvoiceContent(_ref) {
12184
12293
  return FormatCurrency$3(amount, effectiveCurrency, company.la, company.cf);
12185
12294
  };
12186
12295
  var shippingLabel = company.r_sp ? company.r_sp : defaultLang['shipping'];
12296
+ var taxCodeEntries = getTaxCodeBreakdown(document, company, effectiveCurrency);
12297
+ var taxCodeLabels = ((_getEInvoiceConfig = getEInvoiceConfig(company === null || company === void 0 ? void 0 : company.co)) === null || _getEInvoiceConfig === void 0 ? void 0 : _getEInvoiceConfig.taxCodeLabels) || {};
12298
+ var taxCodeRows = function taxCodeRows() {
12299
+ return taxCodeEntries.map(function (entry) {
12300
+ var _lang$labelKey;
12301
+ var labelKey = taxCodeLabels[entry.taxCode];
12302
+ return "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + getTaxCodeRowLabel(entry, {
12303
+ taxLabel: eInvoiceTaxRowLabel,
12304
+ includedLabel: defaultLang['included'],
12305
+ formattedRate: formatTaxRate(entry.ratePercent, company.la),
12306
+ codeLabel: labelKey ? (_lang$labelKey = lang === null || lang === void 0 ? void 0 : lang[labelKey]) != null ? _lang$labelKey : defaultLang[labelKey] : null
12307
+ }) + "</td>\n <td class=\"text-right\" width=\"22%\">" + formatAmount(entry.amount) + "</td>\n </tr>" + (entry.showSubBreakdown ? subBreakdownRows(entry.itemsAmount, entry.shippingAmount) : '');
12308
+ }).join('');
12309
+ };
12187
12310
  var subBreakdownRows = function subBreakdownRows(itemsAmount, shippingAmount) {
12188
- return "<tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"padding-left: 24px;\">" + defaultLang['items'] + "</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>";
12311
+ return "<tr>\n <td class=\"text-md-right tax-breakdown-subrow\" width=\"22%\" style=\"padding-left: 24px;\">" + defaultLang['items'] + "</td>\n <td class=\"text-right tax-breakdown-subrow\" width=\"22%\">" + formatAmount(itemsAmount) + "</td>\n </tr>\n <tr>\n <td class=\"text-md-right tax-breakdown-subrow\" width=\"22%\" style=\"padding-left: 24px;\">" + shippingLabel + "</td>\n <td class=\"text-right tax-breakdown-subrow\" width=\"22%\">" + formatAmount(shippingAmount) + "</td>\n </tr>";
12189
12312
  };
12190
12313
  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.tax1Amount) + (document.t1d ? ')' : '')) + "</td>\n </tr>" + (shippingBreakdown.showTax1SubBreakdown ? subBreakdownRows(shippingBreakdown.tax1ItemsAmount, shippingBreakdown.tax1ShippingAmount) : '') : '') + (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.tax2Amount) + (document.t2d ? ')' : '')) + "</td>\n </tr>" + (shippingBreakdown.showTax2SubBreakdown ? subBreakdownRows(shippingBreakdown.tax2ItemsAmount, shippingBreakdown.tax2ShippingAmount) : '') : '') + (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>" : '');
12191
- var taxBreakdownRows = !eInvoiceTaxLines ? defaultTaxRows : isTaxSummaryMatching(eInvoiceTaxLines, document) ? eInvoiceTaxLines.map(function (line) {
12314
+ var taxBreakdownRows = taxCodeEntries.length ? taxCodeRows() : !eInvoiceTaxLines ? defaultTaxRows : isTaxSummaryMatching(eInvoiceTaxLines, document) ? eInvoiceTaxLines.map(function (line) {
12192
12315
  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>";
12193
12316
  }).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>";
12194
12317
  return html$8(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteralLoose(["<!-- 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\n class=\"text-left\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-center d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-right d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n ", "\n <th\n class=\"text-right item-last\"\n ", "\n >\n ", "\n </th>\n </tr>\n </thead>\n <tbody>\n ", "\n </tbody>\n </table>\n </div>\n\n <hr />\n <div class=\"row\">\n <div class=\"col-12\">\n <table class=\"table table-borderless table-small\">\n <tbody>\n <tr>\n <td class=\"d-none d-md-table-cell\" width=\"50%\"></td>\n <td style=\"padding: 0;\">\n <table class=\"table table-borderless table-small\">\n <tr>\n <td class=\"text-md-right\" width=\"22%\">\n ", "\n </td>\n <td class=\"text-right\" width=\"22%\">\n ", "\n </td>\n </tr>\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n <!-- end invoice-content -->"])), itemWidth[0] ? "width='" + itemWidth[0] + "'" : '', company.r_it ? company.r_it : defaultLang['item'], itemWidth[1] ? "width='" + itemWidth[1] + "'" : '', document.um ? document.um : company.r_q ? company.r_q : defaultLang['quantity'], itemWidth[2] ? "width='" + itemWidth[2] + "'" : '', company.r_p ? company.r_p : defaultLang['price'], discountOnItem ? "<th class=\"text-right d-none d-md-table-cell\" " + (itemWidth[3] ? "width='" + itemWidth[3] + "'" : '') + ">" + (company.r_dc ? company.r_dc : defaultLang['discount']) + "</th>" : '', itemWidth[4] ? "width='" + itemWidth[4] + "'" : '', company.r_a ? company.r_a : defaultLang['amount'], itemsContainer, company.r_sb ? company.r_sb : defaultLang['subtotal'], FormatCurrency$3(document.st, effectiveCurrency, company.la, company.cf), document.dc && !document.discountAfterTax ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + ((company.r_dc ? company.r_dc : defaultLang['discount']) + (document.dcpo && document.dcp ? ' (' + document.dcp + '%)' : '')) + "</td>\n <td class=\"text-right\" width=\"22%\">" + ('(' + FormatCurrency$3(document.dc, effectiveCurrency, company.la, company.cf) + ')') + "</td>\n </tr>" : '', document.sp && !document.sntx ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (company.r_sp ? company.r_sp : defaultLang['shipping']) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$3(document.sp, effectiveCurrency, company.la, company.cf) + "</td>\n </tr>" : '', taxBreakdownRows, document.dc && document.discountAfterTax ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + ((company.r_dc ? company.r_dc : defaultLang['discount']) + (document.dcpo && document.dcp ? ' (' + document.dcp + '%)' : '')) + "</td>\n <td class=\"text-right\" width=\"22%\">" + ('(' + FormatCurrency$3(document.dc, effectiveCurrency, company.la, company.cf) + ')') + "</td>\n </tr>" : '', document.sp && document.sntx ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (company.r_sp ? company.r_sp : defaultLang['shipping']) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$3(document.sp, effectiveCurrency, company.la, company.cf) + "</td>\n </tr>" : '', document.ti && !document.t1d && !document.t2d ? "<tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + (company.r_n ? company.r_n : defaultLang['net']) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + FormatCurrency$3(document.tt - (document.tx || 0) - (document.tx2 || 0), effectiveCurrency, company.la, company.cf) + "</td>\n </tr>" : '', document.ty == 1 || document.ty !== 1 && (document.t1d || document.ttx && document.tx2 > 0 && document.t2d) ? "<tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"border-bottom: 1px solid #ddd\">" + (company.r_tt ? company.r_tt : defaultLang['total']) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-bottom: 1px solid #ddd\">" + FormatCurrency$3(document.tt ? document.tt : 0, effectiveCurrency, company.la, company.cf) + "</td>\n </tr>" : '', document.sca ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + defaultLang['credit_card_surcharge'] + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$3(document.sca, effectiveCurrency, company.la, company.cf) + "</td>\n </tr>" : '', document.hangingAmount && document.hangingAmount > 0 ? "<tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + (company.payment_in_progress ? company.payment_in_progress : defaultLang.payment_in_progress) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + FormatCurrency$3(document.hangingAmount || 0, effectiveCurrency, company.la, company.cf) + "</td>\n </tr>" : '', document.ty == 1 && document.pma && document.pm ? paymentContainer : '', document.ty == 1 && isDeposit && document.depositAmount > 0 ? "\n <tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + (document.ty == 1 ? company.r_ad ? company.r_ad : defaultLang['amount_due'] : company.r_gt ? company.r_gt : defaultLang['grand_total']) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + FormatCurrency$3(document.ad - (document.hangingAmount || 0), effectiveCurrency, company.la, company.cf) + "</td>\n </tr>" : '');
@@ -12381,7 +12504,7 @@ var PaymentInstructions = function PaymentInstructions(_ref) {
12381
12504
 
12382
12505
  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'];
12383
12506
 
12384
- 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'];
12507
+ var DOCUMENT_KEYS = ['_id', 'ad', 'ty', 'cu', 'currency', 'd', 'dd', 'rn', 'it', 'st', 'tx', 'tx2', 'tt', 'dc', 'dcp', 'dcpo', 'sp', 'sntx', 'shippingTaxRate', 'shippingTaxCode', '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'];
12385
12508
 
12386
12509
  var decodeHtml = function decodeHtml(str) {
12387
12510
  if (str === void 0) {
@@ -12778,7 +12901,7 @@ var invoiceStyle$1 = function invoiceStyle(_ref) {
12778
12901
  var watermarkText = defaultLang['upgradeRequired'] || 'Upgrade required';
12779
12902
  var watermarkSvg = "<svg style='width: 100%;' viewBox='0 0 692 405' fill='none' xmlns='http://www.w3.org/2000/svg'>\n<text opacity='0.03' fill='black' xml:space='preserve' style='white-space: pre' font-family='Inter, sans-serif' font-size='45' font-weight='bold' letter-spacing='0em' text-anchor='middle' alignment-baseline='middle'><tspan x='50%' y='50%'>" + watermarkText + "</tspan></text>\n</svg>";
12780
12903
  var watermark = "url(\"data:image/svg+xml;utf8, " + encodeURIComponent(watermarkSvg) + "\")";
12781
- return html$j(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose([" <style>\n * {\n -webkit-print-color-adjust: exact !important;\n color-adjust: exact !important;\n }\n body {\n -webkit-hyphens: auto;\n -ms-hyphens: auto;\n hyphens: auto;\n word-break: break-word;\n line-height: 1.5;\n font-size: ", ";\n font-weight: 400;\n }\n\n table {\n font-size: ", ";\n }\n\n #bookipi-html-generator, #invoice {\n padding: 36px 32px 40px 32px;\n\n ", "\n ", "\n ", "\n\n position: relative;\n z-index: 1;\n }\n\n #invoice:before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 7px;\n background: ", ";\n }\n\n #invoice:after {\n ", "\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n user-select: none;\n background-image: ", ";\n background-repeat: repeat-y;\n background-position: center;\n background-size: 90%;\n }\n\n .invoice-body {\n margin-bottom: 40px;\n }\n\n /* InvoiceCompany */\n\n .invoice-company {\n font-size: ", ";\n }\n\n .document-name {\n font-size:", ";\n font-weight:700;\n text-transform: uppercase;\n margin-bottom: 30px\n }\n\n .company-name {\n font-size: ", ";\n font-weight: 600;\n margin-bottom: 8px\n }\n\n .company-address {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n color: #6B7280;\n font-weight:400;\n font-size: ", ";\n }\n\n .company-einvoicing {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n color: #6B7280;\n font-size: ", ";\n margin-bottom: 8px;\n }\n\n .company-einvoicing .einvoicing-row {\n line-height: 1.5;\n }\n\n .company-einvoicing .einvoicing-label {\n font-weight: 400;\n margin-right: 6px;\n }\n\n .service-delivery-date {\n clear: both;\n padding-top: 22.5px;\n text-align: right;\n }\n\n .service-delivery-date-label {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n font-weight: 400;\n line-height: 1.5;\n color: #6B7280;\n }\n\n .service-delivery-date-value {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n font-weight: 500;\n color: #374151;\n line-height: 1.5;\n }\n\n .customer-einvoicing {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n color: #6B7280;\n font-size: ", ";\n margin-bottom: 8px;\n }\n \n .customer-einvoicing .einvoicing-row {\n line-height: 1.5;\n }\n\n .customer-einvoicing .einvoicing-label {\n font-weight: 400;\n margin-right: 6px;\n }\n\n .logo-text-alternative {\n font-size: ", ";\n font-weight: 600;\n text-transformation: none;\n }\n\n /* InvoiceHeader */\n\n .invoice-header {\n border: ", "\n background: ", "; /* 10% opacity */\n\n border-radius: 8px;\n padding: 16px 16px 8px 16px;\n margin-bottom: 40px;\n }\n\n .invoice-header .customer-name {\n font-size: ", ";\n font-weight: 600;\n margin-bottom: 8px\n }\n\n .invoice-header .heading {\n display: inline-block;\n font-size: 12px;\n font-weight: 600;\n line-height: 1.5;\n margin-bottom: 8px;\n }\n\n address {\n margin-bottom: 0;\n }\n\n .invoice-header .address-text {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n font-weight: 400;\n color: #6B7280;\n line-height: 1.5;\n }\n\n .invoice-detail-right {\n display: inline-block;\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n margin-bottom: 16px;\n min-width: 204px;\n }\n\n .invoice-date {\n line-height: 30px;\n }\n\n .invoice-date .label {\n font-size: ", ";\n font-weight: 600;\n line-height: 1.5;\n text-transform: uppercase;\n }\n\n /* InvoiceContent */\n\n .invoice-table-header{\n background: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .invoice-table-header > .table {\n color: ", ";\n }\n\n .invoice-items-head th {\n font-size: ", ";\n }\n\n .item-name {\n color: #000000;\n font-weight: 400;\n font-size: ", ";\n line-height: 1.5;\n }\n\n .item-productcode {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-weight: 400;\n color: #4B5563;\n }\n\n .item-description {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n font-weight: 400;\n color: #475467;\n line-height: 1.5;\n }\n\n .item-detail-cell {\n color: #111928;\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n line-height: 1.5;\n }\n\n .payment-instruction {\n margin-top: 0;\n margin-bottom: 12px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .invoice-price{\n display: table;\n width: 100%\n }\n\n .price-table {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n }\n\n .invoice-price .invoice-price-left,\n .invoice-price .invoice-price-right {\n display: table-cell;\n width: 56%;\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 border-radius: 8px;\n text-align: right;\n vertical-align: bottom;\n font-weight: 300;\n padding: 12px;\n display: flex;\n width: 100%;\n }\n\n .invoice-price .price-title {\n font-size: ", ";\n font-weight: 600;\n float: left;\n text-align: left;\n flex: 1;\n }\n\n .invoice-price .price-amount {\n font-size: ", ";\n font-weight: 600;\n }\n\n .bookipay-payment-pay-btn {\n right: 0;\n width: 220px;\n text-align: center;\n border-radius: 5px;\n font-size: ", ";\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-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n margin-top: 13px;\n margin-bottom: 10px;\n width: 140px;\n right: 0;\n float: right;\n text-align:center;\n }\n\n .invoice-footer {\n border-top: 1px solid #ddd;\n padding-top: 10px;\n font-size: 18px\n }\n\n .note-and-sign {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n }\n\n .signature-name {\n ", "\n ", "\n ", "\n }\n\n .signature-date {\n font-size: ", ";\n }\n\n .invoice-note {\n color: #999;\n margin-top: 80px;\n font-size: ", "\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\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\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\n .table thead th {\n background-color: ", " !important;\n }\n\n .logo-wrapper {\n order: 2 !important;\n float: right;\n text-align: right;\n }\n\n .document-name-wrapper {\n order: 1 !important;\n }\n\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 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 color: black;\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 .text-uppercase {\n text-transform: uppercase;\n }\n\n @media only screen {\n #invoice {\n ", "\n margin-right:auto;margin-left:auto;\n background-color: white;\n }\n .noInScreen{\n display: none;\n }\n }\n\n .item-last {\n width: 15%;\n }\n\n @media only screen and (max-width: 575.98px) {\n .item-last {\n width: 30%\n }\n #invoice-logo {\n max-width: 100%;\n display: block;\n }\n .invoice-date {\n margin-top:10px;\n }\n }\n\n .table-small td{\n padding: 8px 12px\n }\n\n .surcharge {\n margin-top: 3px;\n font-size: ", ";\n color: #999;\n }\n h2,h3,h4 {margin-top:15px}\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>"])), bodyFontSize, bodyFontSize, fontName === 'normal' ? "font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;" : '', fontName === 'classic' ? "font-family: \"Noto Serif\", \"Noto Serif TC\", serif;" : '', fontName === 'round' ? "font-family: \"Quicksand\", sans-serif;" : '', color, showWatermark && 'content: " ";', watermark, heading2FontSize, titleFontSize, headingFontSize, bodyFontSize, bodyFontSize, bodyFontSize, fontSize === 'medium' ? '17px' : '21px', bodyFontSize, heading2FontSize, color === '#ffffff' ? "1px solid #E5E7EB;" : "none;", color === '#ffffff' ? 'none' : color + '1A', heading2FontSize, bodyFontSize, subFontSize, color === '#ffffff' ? '#f3f4f6' : color, getHeaderTextColor(color), subFontSize, contentFontSize, contentFontSize, contentFontSize, heading2FontSize, heading2FontSize, fontSize === 'medium' ? '17px' : '21px', subFontSize, fontName === 'normal' ? "font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;" : '', fontName === 'classic' ? "font-family: \"Noto Serif\", \"Noto Serif TC\", serif;" : '', fontName === 'round' ? "font-family: \"Quicksand\", sans-serif;" : '', bodyFontSize, fontSize === 'medium' ? '85%' : '95%', color === '#ffffff' ? '#f3f4f6' : color, 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:22.5cm; border: 1px solid #E5E7EB; border-radius: 4px;', subFontSize, 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 " : '');
12904
+ return html$j(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose([" <style>\n * {\n -webkit-print-color-adjust: exact !important;\n color-adjust: exact !important;\n }\n body {\n -webkit-hyphens: auto;\n -ms-hyphens: auto;\n hyphens: auto;\n word-break: break-word;\n line-height: 1.5;\n font-size: ", ";\n font-weight: 400;\n }\n\n table {\n font-size: ", ";\n }\n\n #bookipi-html-generator, #invoice {\n padding: 36px 32px 40px 32px;\n\n ", "\n ", "\n ", "\n\n position: relative;\n z-index: 1;\n }\n\n #invoice:before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 7px;\n background: ", ";\n }\n\n #invoice:after {\n ", "\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n user-select: none;\n background-image: ", ";\n background-repeat: repeat-y;\n background-position: center;\n background-size: 90%;\n }\n\n .invoice-body {\n margin-bottom: 40px;\n }\n\n /* InvoiceCompany */\n\n .invoice-company {\n font-size: ", ";\n }\n\n .document-name {\n font-size:", ";\n font-weight:700;\n text-transform: uppercase;\n margin-bottom: 30px\n }\n\n .company-name {\n font-size: ", ";\n font-weight: 600;\n margin-bottom: 8px\n }\n\n .company-address {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n color: #6B7280;\n font-weight:400;\n font-size: ", ";\n }\n\n .company-einvoicing {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n color: #6B7280;\n font-size: ", ";\n margin-bottom: 8px;\n }\n\n .company-einvoicing .einvoicing-row {\n line-height: 1.5;\n }\n\n .company-einvoicing .einvoicing-label {\n font-weight: 400;\n margin-right: 6px;\n }\n\n .tax-breakdown-subrow {\n font-size: ", ";\n color: #6B7280;\n }\n\n .service-delivery-date {\n clear: both;\n padding-top: 22.5px;\n text-align: right;\n }\n\n .service-delivery-date-label {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n font-weight: 400;\n line-height: 1.5;\n color: #6B7280;\n }\n\n .service-delivery-date-value {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n font-weight: 500;\n color: #374151;\n line-height: 1.5;\n }\n\n .customer-einvoicing {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n color: #6B7280;\n font-size: ", ";\n margin-bottom: 8px;\n }\n \n .customer-einvoicing .einvoicing-row {\n line-height: 1.5;\n }\n\n .customer-einvoicing .einvoicing-label {\n font-weight: 400;\n margin-right: 6px;\n }\n\n .logo-text-alternative {\n font-size: ", ";\n font-weight: 600;\n text-transformation: none;\n }\n\n /* InvoiceHeader */\n\n .invoice-header {\n border: ", "\n background: ", "; /* 10% opacity */\n\n border-radius: 8px;\n padding: 16px 16px 8px 16px;\n margin-bottom: 40px;\n }\n\n .invoice-header .customer-name {\n font-size: ", ";\n font-weight: 600;\n margin-bottom: 8px\n }\n\n .invoice-header .heading {\n display: inline-block;\n font-size: 12px;\n font-weight: 600;\n line-height: 1.5;\n margin-bottom: 8px;\n }\n\n address {\n margin-bottom: 0;\n }\n\n .invoice-header .address-text {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n font-weight: 400;\n color: #6B7280;\n line-height: 1.5;\n }\n\n .invoice-detail-right {\n display: inline-block;\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n margin-bottom: 16px;\n min-width: 204px;\n }\n\n .invoice-date {\n line-height: 30px;\n }\n\n .invoice-date .label {\n font-size: ", ";\n font-weight: 600;\n line-height: 1.5;\n text-transform: uppercase;\n }\n\n /* InvoiceContent */\n\n .invoice-table-header{\n background: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .invoice-table-header > .table {\n color: ", ";\n }\n\n .invoice-items-head th {\n font-size: ", ";\n }\n\n .item-name {\n color: #000000;\n font-weight: 400;\n font-size: ", ";\n line-height: 1.5;\n }\n\n .item-productcode {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-weight: 400;\n color: #4B5563;\n }\n\n .item-description {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n font-weight: 400;\n color: #475467;\n line-height: 1.5;\n }\n\n .item-detail-cell {\n color: #111928;\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n line-height: 1.5;\n }\n\n .payment-instruction {\n margin-top: 0;\n margin-bottom: 12px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .invoice-price{\n display: table;\n width: 100%\n }\n\n .price-table {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n }\n\n .invoice-price .invoice-price-left,\n .invoice-price .invoice-price-right {\n display: table-cell;\n width: 56%;\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 border-radius: 8px;\n text-align: right;\n vertical-align: bottom;\n font-weight: 300;\n padding: 12px;\n display: flex;\n width: 100%;\n }\n\n .invoice-price .price-title {\n font-size: ", ";\n font-weight: 600;\n float: left;\n text-align: left;\n flex: 1;\n }\n\n .invoice-price .price-amount {\n font-size: ", ";\n font-weight: 600;\n }\n\n .bookipay-payment-pay-btn {\n right: 0;\n width: 220px;\n text-align: center;\n border-radius: 5px;\n font-size: ", ";\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-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n font-size: ", ";\n margin-top: 13px;\n margin-bottom: 10px;\n width: 140px;\n right: 0;\n float: right;\n text-align:center;\n }\n\n .invoice-footer {\n border-top: 1px solid #ddd;\n padding-top: 10px;\n font-size: 18px\n }\n\n .note-and-sign {\n font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;\n }\n\n .signature-name {\n ", "\n ", "\n ", "\n }\n\n .signature-date {\n font-size: ", ";\n }\n\n .invoice-note {\n color: #999;\n margin-top: 80px;\n font-size: ", "\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\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\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\n .table thead th {\n background-color: ", " !important;\n }\n\n .logo-wrapper {\n order: 2 !important;\n float: right;\n text-align: right;\n }\n\n .document-name-wrapper {\n order: 1 !important;\n }\n\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 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 color: black;\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 .text-uppercase {\n text-transform: uppercase;\n }\n\n @media only screen {\n #invoice {\n ", "\n margin-right:auto;margin-left:auto;\n background-color: white;\n }\n .noInScreen{\n display: none;\n }\n }\n\n .item-last {\n width: 15%;\n }\n\n @media only screen and (max-width: 575.98px) {\n .item-last {\n width: 30%\n }\n #invoice-logo {\n max-width: 100%;\n display: block;\n }\n .invoice-date {\n margin-top:10px;\n }\n }\n\n .table-small td{\n padding: 8px 12px\n }\n\n .surcharge {\n margin-top: 3px;\n font-size: ", ";\n color: #999;\n }\n h2,h3,h4 {margin-top:15px}\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>"])), bodyFontSize, bodyFontSize, fontName === 'normal' ? "font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;" : '', fontName === 'classic' ? "font-family: \"Noto Serif\", \"Noto Serif TC\", serif;" : '', fontName === 'round' ? "font-family: \"Quicksand\", sans-serif;" : '', color, showWatermark && 'content: " ";', watermark, heading2FontSize, titleFontSize, headingFontSize, bodyFontSize, bodyFontSize, subFontSize, bodyFontSize, fontSize === 'medium' ? '17px' : '21px', bodyFontSize, heading2FontSize, color === '#ffffff' ? "1px solid #E5E7EB;" : "none;", color === '#ffffff' ? 'none' : color + '1A', heading2FontSize, bodyFontSize, subFontSize, color === '#ffffff' ? '#f3f4f6' : color, getHeaderTextColor(color), subFontSize, contentFontSize, contentFontSize, contentFontSize, heading2FontSize, heading2FontSize, fontSize === 'medium' ? '17px' : '21px', subFontSize, fontName === 'normal' ? "font-family: \"Inter\", \"Noto Sans\", \"Noto Sans TC\", sans-serif;" : '', fontName === 'classic' ? "font-family: \"Noto Serif\", \"Noto Serif TC\", serif;" : '', fontName === 'round' ? "font-family: \"Quicksand\", sans-serif;" : '', bodyFontSize, fontSize === 'medium' ? '85%' : '95%', color === '#ffffff' ? '#f3f4f6' : color, 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:22.5cm; border: 1px solid #E5E7EB; border-radius: 4px;', subFontSize, 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 " : '');
12782
12905
  };
12783
12906
 
12784
12907
  var _templateObject$l, _templateObject2$9;
@@ -12991,6 +13114,7 @@ var _templateObject$r;
12991
13114
  var FormatCurrency$7 = util.FormatCurrency;
12992
13115
  var html$q = String.raw;
12993
13116
  var InvoiceContent$1 = function InvoiceContent(_ref) {
13117
+ var _getEInvoiceConfig;
12994
13118
  var company = _ref.company,
12995
13119
  defaultLang = _ref.defaultLang,
12996
13120
  document = _ref.document,
@@ -13044,11 +13168,25 @@ var InvoiceContent$1 = function InvoiceContent(_ref) {
13044
13168
  return FormatCurrency$7(amount, effectiveCurrency, company.la, company.cf);
13045
13169
  };
13046
13170
  var shippingLabel = company.r_sp ? company.r_sp : defaultLang['shipping'];
13171
+ var taxCodeEntries = getTaxCodeBreakdown(document, company, effectiveCurrency);
13172
+ var taxCodeLabels = ((_getEInvoiceConfig = getEInvoiceConfig(company === null || company === void 0 ? void 0 : company.co)) === null || _getEInvoiceConfig === void 0 ? void 0 : _getEInvoiceConfig.taxCodeLabels) || {};
13173
+ var taxCodeRows = function taxCodeRows() {
13174
+ return taxCodeEntries.map(function (entry) {
13175
+ var _lang$labelKey;
13176
+ var labelKey = taxCodeLabels[entry.taxCode];
13177
+ return "<tr>\n <td width=\"22%\">" + getTaxCodeRowLabel(entry, {
13178
+ taxLabel: eInvoiceTaxRowLabel,
13179
+ includedLabel: defaultLang['included'],
13180
+ formattedRate: formatTaxRate(entry.ratePercent, company.la),
13181
+ codeLabel: labelKey ? (_lang$labelKey = lang === null || lang === void 0 ? void 0 : lang[labelKey]) != null ? _lang$labelKey : defaultLang[labelKey] : null
13182
+ }) + "</td>\n <td class=\"text-right\" width=\"22%\">" + formatAmount(entry.amount) + "</td>\n </tr>" + (entry.showSubBreakdown ? subBreakdownRows(entry.itemsAmount, entry.shippingAmount) : '');
13183
+ }).join('');
13184
+ };
13047
13185
  var subBreakdownRows = function subBreakdownRows(itemsAmount, shippingAmount) {
13048
- return "<tr>\n <td width=\"22%\" style=\"padding-left: 24px;\">" + defaultLang['items'] + "</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>";
13186
+ return "<tr>\n <td class=\"tax-breakdown-subrow\" width=\"22%\" style=\"padding-left: 24px;\">" + defaultLang['items'] + "</td>\n <td class=\"text-right tax-breakdown-subrow\" width=\"22%\">" + formatAmount(itemsAmount) + "</td>\n </tr>\n <tr>\n <td class=\"tax-breakdown-subrow\" width=\"22%\" style=\"padding-left: 24px;\">" + shippingLabel + "</td>\n <td class=\"text-right tax-breakdown-subrow\" width=\"22%\">" + formatAmount(shippingAmount) + "</td>\n </tr>";
13049
13187
  };
13050
13188
  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.tax1Amount) + (document.t1d ? ')' : '')) + "</td>\n </tr>" + (shippingBreakdown.showTax1SubBreakdown ? subBreakdownRows(shippingBreakdown.tax1ItemsAmount, shippingBreakdown.tax1ShippingAmount) : '') : '') + (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.tax2Amount) + (document.t2d ? ')' : '')) + "</td>\n </tr>" + (shippingBreakdown.showTax2SubBreakdown ? subBreakdownRows(shippingBreakdown.tax2ItemsAmount, shippingBreakdown.tax2ShippingAmount) : '') : '') + (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>" : '');
13051
- var taxBreakdownRows = !eInvoiceTaxLines ? defaultTaxRows : isTaxSummaryMatching(eInvoiceTaxLines, document) ? eInvoiceTaxLines.map(function (line) {
13189
+ var taxBreakdownRows = taxCodeEntries.length ? taxCodeRows() : !eInvoiceTaxLines ? defaultTaxRows : isTaxSummaryMatching(eInvoiceTaxLines, document) ? eInvoiceTaxLines.map(function (line) {
13052
13190
  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>";
13053
13191
  }).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>";
13054
13192
  return html$q(_templateObject$r || (_templateObject$r = _taggedTemplateLiteralLoose(["<!-- begin invoice-content -->\n <div class=\"invoice-content\">\n <div class=\"table-responsive\">\n <table\n class=\"table table-borderless table-invoice\"\n style=\"margin-bottom: 40px; table-layout: fixed;\"\n >\n <thead class=\"invoice-table-header invoice-items-head\">\n <tr class=\"table table-invoice\">\n <th\n class=\"text-left text-uppercase\"\n style=\"border-top-left-radius: 8px; border-bottom-left-radius: 8px;\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-center text-uppercase d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n <th\n class=\"text-center text-uppercase d-none d-md-table-cell\"\n ", "\n >\n ", "\n </th>\n ", "\n <th\n class=\"text-right text-uppercase item-last\"\n style=\"border-top-right-radius: 8px; border-bottom-right-radius: 8px;\"\n ", "\n >\n ", "\n </th>\n </tr>\n </thead>\n <tbody>\n ", "\n </tbody>\n </table>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <table class=\"price-table table table-borderless table-small\">\n <tbody>\n <tr>\n <td class=\"d-none d-md-table-cell\" width=\"50%\"></td>\n <td style=\"padding: 0;\">\n <table class=\"price-table table table-borderless table-small\">\n <tr>\n <td width=\"22%\" style=\"border-top: 1px solid #E5E7EB\">\n ", "\n </td>\n <td\n class=\"text-right\"\n width=\"22%\"\n style=\"border-top: 1px solid #E5E7EB\"\n >\n ", "\n </td>\n </tr>\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n\n <!-- end invoice-content -->\n </div>"])), itemWidth[0] ? "width='" + itemWidth[0] + "'" : '', company.r_it ? company.r_it : defaultLang['item'], itemWidth[1] ? "width='" + itemWidth[1] + "'" : '', company.r_p ? company.r_p : defaultLang['price'], itemWidth[2] ? "width='" + itemWidth[2] + "'" : '', document.um ? document.um : company.r_q ? company.r_q : defaultLang['quantity'], discountOnItem ? "<th class=\"text-right text-uppercase d-none d-md-table-cell\" " + (itemWidth[3] ? "width='" + itemWidth[3] + "'" : '') + ">" + (company.r_dc ? company.r_dc : defaultLang['discount']) + "</th>" : '', itemWidth[4] ? "width='" + itemWidth[4] + "'" : '', company.r_a ? company.r_a : defaultLang['amount'], itemsContainer, company.r_sb ? company.r_sb : defaultLang['subtotal'], FormatCurrency$7(document.st, effectiveCurrency, company.la, company.cf), document.dc && !document.discountAfterTax ? "<tr>\n <td width=\"22%\">" + ((company.r_dc ? company.r_dc : defaultLang['discount']) + (document.dcpo && document.dcp ? ' (' + document.dcp + '%)' : '')) + "</td>\n <td class=\"text-right\" width=\"22%\">" + ('(' + FormatCurrency$7(document.dc, effectiveCurrency, company.la, company.cf) + ')') + "</td>\n </tr>" : '', document.sp && !document.sntx ? "<tr>\n <td width=\"22%\">" + (company.r_sp ? company.r_sp : defaultLang['shipping']) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$7(document.sp, effectiveCurrency, company.la, company.cf) + "</td>\n </tr>" : '', taxBreakdownRows, document.dc && document.discountAfterTax ? "<tr>\n <td width=\"22%\">" + ((company.r_dc ? company.r_dc : defaultLang['discount']) + (document.dcpo && document.dcp ? ' (' + document.dcp + '%)' : '')) + "</td>\n <td class=\"text-right\" width=\"22%\">" + ('(' + FormatCurrency$7(document.dc, effectiveCurrency, company.la, company.cf) + ')') + "</td>\n </tr>" : '', document.sp && document.sntx ? "<tr>\n <td width=\"22%\">" + (company.r_sp ? company.r_sp : defaultLang['shipping']) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$7(document.sp, effectiveCurrency, company.la, company.cf) + "</td>\n </tr>" : '', document.ti && !document.t1d && !document.t2d ? "<tr>\n <td width=\"22%\" style=\"border-top: 1px solid #E5E7EB\">" + (company.r_n ? company.r_n : defaultLang['net']) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-top: 1px solid #E5E7EB\">" + FormatCurrency$7(document.tt - (document.tx || 0) - (document.tx2 || 0), effectiveCurrency, company.la, company.cf) + "</td>\n </tr>" : '', document.ty == 1 || document.ty !== 1 && (document.t1d || document.ttx && document.tx2 > 0 && document.t2d) ? "<tr>\n <td width=\"22%\">" + (company.r_tt ? company.r_tt : defaultLang['total']) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$7(document.tt ? document.tt : 0, effectiveCurrency, company.la, company.cf) + "</td>\n </tr>" : '', document.sca ? "<tr>\n <td width=\"22%\">" + defaultLang['credit_card_surcharge'] + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$7(document.sca, effectiveCurrency, company.la, company.cf) + "</td>\n </tr>" : '', document.hangingAmount && document.hangingAmount > 0 ? "<tr>\n <td width=\"22%\" style=\"border-top: 1px solid #E5E7EB\">" + (company.payment_in_progress ? company.payment_in_progress : defaultLang.payment_in_progress) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-top: 1px solid #E5E7EB\">" + FormatCurrency$7(document.hangingAmount || 0, effectiveCurrency, company.la, company.cf) + "</td>\n </tr>" : '', document.ty == 1 && document.pma && document.pm ? paymentContainer : '', document.ty == 1 && isDeposit && document.depositAmount > 0 ? "\n <tr>\n <td width=\"22%\" style=\"border-top: 1px solid #E5E7EB\">" + (document.ty == 1 ? company.r_ad ? company.r_ad : defaultLang['amount_due'] : company.r_gt ? company.r_gt : defaultLang['grand_total']) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-top: 1px solid #E5E7EB\">" + FormatCurrency$7(document.ad - (document.hangingAmount || 0), effectiveCurrency, company.la, company.cf) + "</td>\n </tr>" : '');