@bookipi/htmlgenerator 1.13.0 → 1.13.1
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 +14 -7
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +14 -7
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11979,13 +11979,14 @@ var getTaxCodeBreakdown = function getTaxCodeBreakdown(document, company, curren
|
|
|
11979
11979
|
var globalDiscount = document !== null && document !== void 0 && document.discountAfterTax ? 0 : document !== null && document !== void 0 && document.dcpo ? percentDiscount : flatDiscount;
|
|
11980
11980
|
var distributed = 0;
|
|
11981
11981
|
var discountShares = items.map(function (item, index) {
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
var share = itemsSubtotal > 0 ? globalDiscount * (Number(item === null || item === void 0 ? void 0 : item.t) || 0) / itemsSubtotal : 0;
|
|
11982
|
+
var base = Number(item === null || item === void 0 ? void 0 : item.t) || 0;
|
|
11983
|
+
var rawShare = index === items.length - 1 ? globalDiscount - distributed : itemsSubtotal > 0 ? globalDiscount * base / itemsSubtotal : 0;
|
|
11984
|
+
var share = Math.max(0, Math.min(rawShare, Math.max(0, base)));
|
|
11986
11985
|
distributed = distributed + share;
|
|
11987
11986
|
return share;
|
|
11988
11987
|
});
|
|
11988
|
+
var shippingAmount = Math.max(0, parseFloat((document === null || document === void 0 ? void 0 : document.sp) || 0) || 0);
|
|
11989
|
+
var discountAbsorbedByShipping = Math.min(Math.max(0, globalDiscount - distributed), shippingAmount);
|
|
11989
11990
|
var buckets = new Map();
|
|
11990
11991
|
var bucketFor = function bucketFor(taxCode, ratePercent, inclusive) {
|
|
11991
11992
|
var key = taxCode + "|" + (inclusive ? 'in' : 'on');
|
|
@@ -12013,7 +12014,7 @@ var getTaxCodeBreakdown = function getTaxCodeBreakdown(document, company, curren
|
|
|
12013
12014
|
var rate = rateFor(item.taxCode, item.taxRate) || 0;
|
|
12014
12015
|
addToBucket(item.taxCode, rate, base - share, isLineInclusive(item), 'itemsAmount');
|
|
12015
12016
|
});
|
|
12016
|
-
var shipping = document !== null && document !== void 0 && document.
|
|
12017
|
+
var shipping = document !== null && document !== void 0 && document.sntx ? 0 : shippingAmount - discountAbsorbedByShipping;
|
|
12017
12018
|
if (shipping && document !== null && document !== void 0 && document.shippingTaxCode) {
|
|
12018
12019
|
var rate = rateFor(document.shippingTaxCode, document.shippingTaxRate) || 0;
|
|
12019
12020
|
addToBucket(document.shippingTaxCode, rate, shipping, shippingInclusive, 'shippingAmount');
|
|
@@ -12323,10 +12324,13 @@ var InvoiceContent = function InvoiceContent(_ref) {
|
|
|
12323
12324
|
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>";
|
|
12324
12325
|
};
|
|
12325
12326
|
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>" : '');
|
|
12327
|
+
var discountRow = 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>" : '';
|
|
12328
|
+
var shippingRow = 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>" : '';
|
|
12329
|
+
var discountAndShippingRows = taxCodeEntries.length ? "" + shippingRow + discountRow : "" + discountRow + shippingRow;
|
|
12326
12330
|
var taxBreakdownRows = taxCodeEntries.length ? taxCodeRows() : !eInvoiceTaxLines ? defaultTaxRows : isTaxSummaryMatching(eInvoiceTaxLines, document) ? eInvoiceTaxLines.map(function (line) {
|
|
12327
12331
|
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>";
|
|
12328
12332
|
}).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>";
|
|
12329
|
-
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 ", "
|
|
12333
|
+
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 </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), discountAndShippingRows, 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>" : '');
|
|
12330
12334
|
};
|
|
12331
12335
|
|
|
12332
12336
|
var _templateObject$9, _templateObject2$2;
|
|
@@ -13198,10 +13202,13 @@ var InvoiceContent$1 = function InvoiceContent(_ref) {
|
|
|
13198
13202
|
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>";
|
|
13199
13203
|
};
|
|
13200
13204
|
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>" : '');
|
|
13205
|
+
var discountRow = 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>" : '';
|
|
13206
|
+
var shippingRow = 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>" : '';
|
|
13207
|
+
var discountAndShippingRows = taxCodeEntries.length ? "" + shippingRow + discountRow : "" + discountRow + shippingRow;
|
|
13201
13208
|
var taxBreakdownRows = taxCodeEntries.length ? taxCodeRows() : !eInvoiceTaxLines ? defaultTaxRows : isTaxSummaryMatching(eInvoiceTaxLines, document) ? eInvoiceTaxLines.map(function (line) {
|
|
13202
13209
|
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>";
|
|
13203
13210
|
}).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>";
|
|
13204
|
-
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 ", "
|
|
13211
|
+
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 </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), discountAndShippingRows, 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>" : '');
|
|
13205
13212
|
};
|
|
13206
13213
|
|
|
13207
13214
|
var _templateObject$s;
|