@bookipi/htmlgenerator 1.9.4 → 1.9.5-alpha.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 +19 -15
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +19 -15
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -11710,18 +11710,19 @@ var ItemsContainer = function ItemsContainer(_ref) {
|
|
|
11710
11710
|
if (!(document !== null && document !== void 0 && document.it)) {
|
|
11711
11711
|
return '';
|
|
11712
11712
|
}
|
|
11713
|
+
var effectiveCurrency = document.currency || company.cr;
|
|
11713
11714
|
var itemsContainer = '';
|
|
11714
11715
|
for (var _iterator = _createForOfIteratorHelperLoose(document.it), _step; !(_step = _iterator()).done;) {
|
|
11715
11716
|
var _item$photos;
|
|
11716
11717
|
var item = _step.value;
|
|
11717
11718
|
var photoUrl = (_item$photos = item.photos) !== null && _item$photos !== void 0 && _item$photos[0] ? item.photos[0].url || "https://s3.amazonaws.com/bookipi/" + company._id + "/item/images/" + item.photos[0].filename + ".jpg" : '';
|
|
11718
|
-
itemsContainer = itemsContainer + html$5(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteralLoose(["<tr>\n <td>\n ", "\n <div style=\"display: block;page-break-inside: auto!important;\">\n <span class=\"text-inverse\"><strong>", "</strong></span>\n ", "\n <div class=\"mt-2\" style=\"page-break-inside: auto!important;\">\n ", "\n </div>\n <div class=\"d-block d-md-none mt-1\">\n ", "\n ", "\n </div>\n </div>\n </td>\n <td class=\"text-center d-none d-md-table-cell\">\n ", "\n </td>\n <td class=\"text-right d-none d-md-table-cell\">\n ", "\n </td>\n ", "\n <td class=\"text-right\">\n ", "\n </td>\n </tr>"])), photoUrl ? "<img style=\"width:56px;height:56px;display:inline-block;margin-right:12px;border-radius:4px;vertical-align:top;\" src=\"" + photoUrl + "\" />" : '', item.n || '', item.productCode ? html$5(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteralLoose(["<div class=\"text-inverse\">", "</div>"])), item.productCode) : '', nl2br(item.dsc) || '', (item.p || item.p == 0) && (item.q || item.q == 0) ? FormatCurrency$1(item.p,
|
|
11719
|
+
itemsContainer = itemsContainer + html$5(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteralLoose(["<tr>\n <td>\n ", "\n <div style=\"display: block;page-break-inside: auto!important;\">\n <span class=\"text-inverse\"><strong>", "</strong></span>\n ", "\n <div class=\"mt-2\" style=\"page-break-inside: auto!important;\">\n ", "\n </div>\n <div class=\"d-block d-md-none mt-1\">\n ", "\n ", "\n </div>\n </div>\n </td>\n <td class=\"text-center d-none d-md-table-cell\">\n ", "\n </td>\n <td class=\"text-right d-none d-md-table-cell\">\n ", "\n </td>\n ", "\n <td class=\"text-right\">\n ", "\n </td>\n </tr>"])), photoUrl ? "<img style=\"width:56px;height:56px;display:inline-block;margin-right:12px;border-radius:4px;vertical-align:top;\" src=\"" + photoUrl + "\" />" : '', item.n || '', item.productCode ? html$5(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteralLoose(["<div class=\"text-inverse\">", "</div>"])), item.productCode) : '', nl2br(item.dsc) || '', (item.p || item.p == 0) && (item.q || item.q == 0) ? FormatCurrency$1(item.p, effectiveCurrency, company.la, company.cf, {
|
|
11719
11720
|
forceDecimal: forceItemUnitPriceDecimal
|
|
11720
|
-
}) + ' ✕ ' + (item.q || '0') : '', discountOnItem && (item.p || item.p == 0) && item.dc ? "" + (item.dc > 0 ? ' - ' : ' + ') + FormatCurrency$1(Math.abs(item.dc),
|
|
11721
|
+
}) + ' ✕ ' + (item.q || '0') : '', discountOnItem && (item.p || item.p == 0) && item.dc ? "" + (item.dc > 0 ? ' - ' : ' + ') + FormatCurrency$1(Math.abs(item.dc), effectiveCurrency, company.la, company.cf, {
|
|
11721
11722
|
forceDecimal: forceItemUnitPriceDecimal
|
|
11722
|
-
}) + " (" + (company.r_dc ? company.r_dc : defaultLang.discount) + ")" : '', (item.p || item.p == 0) && (item.q || item.q == 0) ? item.q : '', item.p || item.p == 0 ? FormatCurrency$1(item.p,
|
|
11723
|
+
}) + " (" + (company.r_dc ? company.r_dc : defaultLang.discount) + ")" : '', (item.p || item.p == 0) && (item.q || item.q == 0) ? item.q : '', item.p || item.p == 0 ? FormatCurrency$1(item.p, effectiveCurrency, company.la, company.cf, {
|
|
11723
11724
|
forceDecimal: forceItemUnitPriceDecimal
|
|
11724
|
-
}) : '', discountOnItem ? html$5(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["<td class=\"text-right d-none d-md-table-cell\">\n ", "\n </td>"])), (item.p || item.p == 0) && item.dc ? FormatCurrency$1(item.dc,
|
|
11725
|
+
}) : '', discountOnItem ? html$5(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["<td class=\"text-right d-none d-md-table-cell\">\n ", "\n </td>"])), (item.p || item.p == 0) && item.dc ? FormatCurrency$1(item.dc, effectiveCurrency, company.la, company.cf) : '') : '', item.p || item.p == 0 ? FormatCurrency$1(item.t, effectiveCurrency, company.la, company.cf) : '');
|
|
11725
11726
|
}
|
|
11726
11727
|
return itemsContainer;
|
|
11727
11728
|
};
|
|
@@ -11759,7 +11760,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
11759
11760
|
if (document.pm) {
|
|
11760
11761
|
for (var _iterator = _createForOfIteratorHelperLoose(document.pm), _step; !(_step = _iterator()).done;) {
|
|
11761
11762
|
var payment = _step.value;
|
|
11762
|
-
paymentContainer = paymentContainer + html$6(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteralLoose(["<tr>\n <td class=\"text-md-right\" width=\"22%\">", "</td>\n <td class=\"text-right\" width=\"22%\">\n ", "\n </td>\n </tr>"])), paymentOn(payment), FormatCurrency$2(payment.a, company.cr, company.la, company.cf));
|
|
11763
|
+
paymentContainer = paymentContainer + html$6(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteralLoose(["<tr>\n <td class=\"text-md-right\" width=\"22%\">", "</td>\n <td class=\"text-right\" width=\"22%\">\n ", "\n </td>\n </tr>"])), paymentOn(payment), FormatCurrency$2(payment.a, document.currency || company.cr, company.la, company.cf));
|
|
11763
11764
|
}
|
|
11764
11765
|
}
|
|
11765
11766
|
return paymentContainer;
|
|
@@ -11809,7 +11810,8 @@ var InvoiceContent = function InvoiceContent(_ref) {
|
|
|
11809
11810
|
lang: lang,
|
|
11810
11811
|
t: t
|
|
11811
11812
|
});
|
|
11812
|
-
|
|
11813
|
+
var effectiveCurrency = document.currency || company.cr;
|
|
11814
|
+
return html$7(_templateObject$7 || (_templateObject$7 = _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 ", "\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>" : '', document.tx != 0 ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (taxName1 + taxIncluded1 + '(' + document.tp + '%)') + "</td>\n <td class=\"text-right\" width=\"22%\">" + ((document.t1d ? '(' : '') + FormatCurrency$3(document.tx, effectiveCurrency, company.la, company.cf) + (document.t1d ? ')' : '')) + "</td>\n </tr>" : '', document.ttx && document.tx2 != 0 ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (taxName2 + taxIncluded2 + '(' + document.tp2 + '%)') + "</td>\n <td class=\"text-right\" width=\"22%\">" + ((document.t2d ? '(' : '') + FormatCurrency$3(document.tx2, effectiveCurrency, company.la, company.cf) + (document.t2d ? ')' : '')) + "</td>\n </tr>" : '', 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>" : '');
|
|
11813
11815
|
};
|
|
11814
11816
|
|
|
11815
11817
|
var _templateObject$8, _templateObject2$2;
|
|
@@ -11852,7 +11854,7 @@ var InvoicePrice = function InvoicePrice(_ref) {
|
|
|
11852
11854
|
surcharge: surcharge,
|
|
11853
11855
|
defaultLang: defaultLang
|
|
11854
11856
|
});
|
|
11855
|
-
return html$9(_templateObject$9 || (_templateObject$9 = _taggedTemplateLiteralLoose(["\n <!-- begin invoice-price -->\n <div class=\"invoice-price page-not-break\">\n <div class=\"invoice-price-left text-right\">\n <!-- begin bookipay payment -->\n <div class=\"d-none d-md-block\">", "</div>\n <!-- end bookipay payment -->\n </div>\n <div class=\"invoice-price-right\">\n <small\n >", "\n ", "</small\n >\n <span class=\"f-w-600 mt-3\"\n >", "</span\n >\n </div>\n </div>\n <!-- end invoice-price -->\n "])), bookipayLinkComponent, document.ty == 1 && isDeposit && document.depositAmount > 0 ? company.r_deposit_due ? company.r_deposit_due : defaultLang['deposit_due'] : document.ty == 1 ? company.r_ad ? company.r_ad : defaultLang['amount_due'] : company.r_gt ? company.r_gt : defaultLang['grand_total'], document.ty == 1 && isDeposit && document.depositAmount > 0 && document.depositDue !== null ? "| " + formatDate(document.depositDue) : '', document.ty == 1 && isDeposit && document.depositAmount > 0 ? FormatCurrency$4(document.depositAmount, company.cr, company.la, company.cf) : FormatCurrency$4(document.ad - (document.hangingAmount || 0), company.cr, company.la, company.cf));
|
|
11857
|
+
return html$9(_templateObject$9 || (_templateObject$9 = _taggedTemplateLiteralLoose(["\n <!-- begin invoice-price -->\n <div class=\"invoice-price page-not-break\">\n <div class=\"invoice-price-left text-right\">\n <!-- begin bookipay payment -->\n <div class=\"d-none d-md-block\">", "</div>\n <!-- end bookipay payment -->\n </div>\n <div class=\"invoice-price-right\">\n <small\n >", "\n ", "</small\n >\n <span class=\"f-w-600 mt-3\"\n >", "</span\n >\n </div>\n </div>\n <!-- end invoice-price -->\n "])), bookipayLinkComponent, document.ty == 1 && isDeposit && document.depositAmount > 0 ? company.r_deposit_due ? company.r_deposit_due : defaultLang['deposit_due'] : document.ty == 1 ? company.r_ad ? company.r_ad : defaultLang['amount_due'] : company.r_gt ? company.r_gt : defaultLang['grand_total'], document.ty == 1 && isDeposit && document.depositAmount > 0 && document.depositDue !== null ? "| " + formatDate(document.depositDue) : '', document.ty == 1 && isDeposit && document.depositAmount > 0 ? FormatCurrency$4(document.depositAmount, document.currency || company.cr, company.la, company.cf) : FormatCurrency$4(document.ad - (document.hangingAmount || 0), document.currency || company.cr, company.la, company.cf));
|
|
11856
11858
|
};
|
|
11857
11859
|
|
|
11858
11860
|
var _templateObject$a;
|
|
@@ -11999,7 +12001,7 @@ var PaymentInstructions = function PaymentInstructions(_ref) {
|
|
|
11999
12001
|
|
|
12000
12002
|
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'];
|
|
12001
12003
|
|
|
12002
|
-
var DOCUMENT_KEYS = ['_id', 'ad', 'ty', 'cu', 'd', 'dd', 'rn', 'it', 'st', 'tx', 'tx2', 'tt', 'dc', 'dcp', 'dcpo', 'sp', 'sntx', 'tp', 'tp2', 'tn', 'tn2', 'tax1BaseAmount', 'tax2BaseAmount', 'ti', 'ttx', 't1d', 't2d', 'pm', 'sca', 'hangingAmount', 'depositAmount', 'um', 'shouldShowPaymentInstructions', 'customization', 'asi', 'no', 'proposal', 'd', 'rd', 'di', 'pon', 'pma', 'depositDue', 'noteHtml', 'nt', 'tc', 'sd', 'cs', 'a1', 'a2', 'a3', 't2di', 'dco', 'discountAfterTax', 'csd', 'tz', 'sent', 'isUserSignatureOverlayed'];
|
|
12004
|
+
var DOCUMENT_KEYS = ['_id', 'ad', 'ty', 'cu', 'currency', 'd', 'dd', 'rn', 'it', 'st', 'tx', 'tx2', 'tt', 'dc', 'dcp', 'dcpo', 'sp', 'sntx', 'tp', 'tp2', 'tn', 'tn2', 'tax1BaseAmount', 'tax2BaseAmount', 'ti', 'ttx', 't1d', 't2d', 'pm', 'sca', 'hangingAmount', 'depositAmount', 'um', 'shouldShowPaymentInstructions', 'customization', 'asi', 'no', 'proposal', 'd', 'rd', 'di', 'pon', 'pma', 'depositDue', 'noteHtml', 'nt', 'tc', 'sd', 'cs', 'a1', 'a2', 'a3', 't2di', 'dco', 'discountAfterTax', 'csd', 'tz', 'sent', 'isUserSignatureOverlayed'];
|
|
12003
12005
|
|
|
12004
12006
|
var decodeHtml = function decodeHtml(str) {
|
|
12005
12007
|
if (str === void 0) {
|
|
@@ -12475,17 +12477,18 @@ var ItemsContainer$1 = function ItemsContainer(_ref) {
|
|
|
12475
12477
|
return "";
|
|
12476
12478
|
}
|
|
12477
12479
|
var itemsContainer = "";
|
|
12480
|
+
var effectiveCurrency = document.currency || company.cr;
|
|
12478
12481
|
for (var _iterator = _createForOfIteratorHelperLoose(document.it), _step; !(_step = _iterator()).done;) {
|
|
12479
12482
|
var _item$photos;
|
|
12480
12483
|
var item = _step.value;
|
|
12481
12484
|
var photoUrl = (_item$photos = item.photos) !== null && _item$photos !== void 0 && _item$photos[0] ? item.photos[0].url || "https://s3.amazonaws.com/bookipi/" + company._id + "/item/images/" + item.photos[0].filename + ".jpg" : "";
|
|
12482
|
-
itemsContainer = itemsContainer + html$n(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["<tr>\n <td>\n ", "\n <div style=\"display:block;page-break-inside: auto!important;\">\n <span class=\"text-inverse\"\n ><span class=\"item-name\">", "</span></span\n >\n ", "\n <div class=\"item-description mt-2\" style=\"page-break-inside: auto!important;\">", "</div>\n <div class=\"d-block d-md-none mt-1\">\n ", "\n ", "\n </div>\n </div>\n </td>\n <td class=\"item-detail-cell text-center d-none d-md-table-cell\">\n ", "\n </td>\n <td class=\"item-detail-cell text-center d-none d-md-table-cell\">\n ", "\n </td>\n ", "\n <td class=\"item-detail-cell t text-right\" style=\"color: #000000;\">\n ", "\n </td>\n </tr>"])), photoUrl ? "<img style=\"width:56px;height:56px;display:inline-block;margin-right:12px;border-radius:4px;vertical-align:top;\" src=\"" + photoUrl + "\" />" : "", item.n || "", item.productCode ? html$n(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteralLoose(["<div class=\"item-productcode text-inverse\">\n ", "\n </div>"])), item.productCode) : "", nl2br(item.dsc) || "", (item.p || item.p == 0) && (item.q || item.q == 0) ? FormatCurrency$5(item.p,
|
|
12485
|
+
itemsContainer = itemsContainer + html$n(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["<tr>\n <td>\n ", "\n <div style=\"display:block;page-break-inside: auto!important;\">\n <span class=\"text-inverse\"\n ><span class=\"item-name\">", "</span></span\n >\n ", "\n <div class=\"item-description mt-2\" style=\"page-break-inside: auto!important;\">", "</div>\n <div class=\"d-block d-md-none mt-1\">\n ", "\n ", "\n </div>\n </div>\n </td>\n <td class=\"item-detail-cell text-center d-none d-md-table-cell\">\n ", "\n </td>\n <td class=\"item-detail-cell text-center d-none d-md-table-cell\">\n ", "\n </td>\n ", "\n <td class=\"item-detail-cell t text-right\" style=\"color: #000000;\">\n ", "\n </td>\n </tr>"])), photoUrl ? "<img style=\"width:56px;height:56px;display:inline-block;margin-right:12px;border-radius:4px;vertical-align:top;\" src=\"" + photoUrl + "\" />" : "", item.n || "", item.productCode ? html$n(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteralLoose(["<div class=\"item-productcode text-inverse\">\n ", "\n </div>"])), item.productCode) : "", nl2br(item.dsc) || "", (item.p || item.p == 0) && (item.q || item.q == 0) ? FormatCurrency$5(item.p, effectiveCurrency, company.la, company.cf, {
|
|
12483
12486
|
forceDecimal: forceItemUnitPriceDecimal
|
|
12484
|
-
}) + " ✕ " + (item.q || "0") : "", discountOnItem && (item.p || item.p == 0) && item.dc ? "" + (item.dc > 0 ? " - " : " + ") + FormatCurrency$5(Math.abs(item.dc),
|
|
12487
|
+
}) + " ✕ " + (item.q || "0") : "", discountOnItem && (item.p || item.p == 0) && item.dc ? "" + (item.dc > 0 ? " - " : " + ") + FormatCurrency$5(Math.abs(item.dc), effectiveCurrency, company.la, company.cf, {
|
|
12485
12488
|
forceDecimal: forceItemUnitPriceDecimal
|
|
12486
|
-
}) + " (" + (company.r_dc ? company.r_dc : defaultLang.discount) + ")" : "", item.p || item.p == 0 ? FormatCurrency$5(item.p,
|
|
12489
|
+
}) + " (" + (company.r_dc ? company.r_dc : defaultLang.discount) + ")" : "", item.p || item.p == 0 ? FormatCurrency$5(item.p, effectiveCurrency, company.la, company.cf, {
|
|
12487
12490
|
forceDecimal: forceItemUnitPriceDecimal
|
|
12488
|
-
}) : "", (item.p || item.p == 0) && (item.q || item.q == 0) ? item.q : "", discountOnItem ? html$n(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteralLoose(["<td class=\"item-detail-cell text-right d-none d-md-table-cell\">\n ", "\n </td>"])), (item.p || item.p == 0) && item.dc ? FormatCurrency$5(item.dc,
|
|
12491
|
+
}) : "", (item.p || item.p == 0) && (item.q || item.q == 0) ? item.q : "", discountOnItem ? html$n(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteralLoose(["<td class=\"item-detail-cell text-right d-none d-md-table-cell\">\n ", "\n </td>"])), (item.p || item.p == 0) && item.dc ? FormatCurrency$5(item.dc, effectiveCurrency, company.la, company.cf) : "") : "", item.p || item.p == 0 ? FormatCurrency$5(item.t, effectiveCurrency, company.la, company.cf) : "");
|
|
12489
12492
|
}
|
|
12490
12493
|
return itemsContainer;
|
|
12491
12494
|
};
|
|
@@ -12523,7 +12526,7 @@ var PaymentContainer$1 = function PaymentContainer(_ref) {
|
|
|
12523
12526
|
if (document.pm) {
|
|
12524
12527
|
for (var _iterator = _createForOfIteratorHelperLoose(document.pm), _step; !(_step = _iterator()).done;) {
|
|
12525
12528
|
var payment = _step.value;
|
|
12526
|
-
paymentContainer = paymentContainer + html$o(_templateObject$p || (_templateObject$p = _taggedTemplateLiteralLoose(["<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>"])), paymentOn(payment), FormatCurrency$6(payment.a, company.cr, company.la, company.cf));
|
|
12529
|
+
paymentContainer = paymentContainer + html$o(_templateObject$p || (_templateObject$p = _taggedTemplateLiteralLoose(["<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>"])), paymentOn(payment), FormatCurrency$6(payment.a, document.currency || company.cr, company.la, company.cf));
|
|
12527
12530
|
}
|
|
12528
12531
|
}
|
|
12529
12532
|
return paymentContainer;
|
|
@@ -12573,7 +12576,8 @@ var InvoiceContent$1 = function InvoiceContent(_ref) {
|
|
|
12573
12576
|
lang: lang,
|
|
12574
12577
|
t: t
|
|
12575
12578
|
});
|
|
12576
|
-
|
|
12579
|
+
var effectiveCurrency = document.currency || company.cr;
|
|
12580
|
+
return html$p(_templateObject$q || (_templateObject$q = _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\n class=\"d-none d-md-table-cell\"\n width=\"50%\"\n >\n </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 ", "\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>" : "", document.tx != 0 ? "<tr>\n <td width=\"22%\">" + (taxName1 + taxIncluded1 + "(" + document.tp + "%)") + "</td>\n <td class=\"text-right\" width=\"22%\">" + ((document.t1d ? "(" : "") + FormatCurrency$7(document.tx, effectiveCurrency, company.la, company.cf) + (document.t1d ? ")" : "")) + "</td>\n </tr>" : "", document.ttx && document.tx2 != 0 ? "<tr>\n <td width=\"22%\">" + (taxName2 + taxIncluded2 + "(" + document.tp2 + "%)") + "</td>\n <td class=\"text-right\" width=\"22%\">" + ((document.t2d ? "(" : "") + FormatCurrency$7(document.tx2, effectiveCurrency, company.la, company.cf) + (document.t2d ? ")" : "")) + "</td>\n </tr>" : "", 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>" : "");
|
|
12577
12581
|
};
|
|
12578
12582
|
|
|
12579
12583
|
var _templateObject$r;
|
|
@@ -12602,7 +12606,7 @@ var InvoicePrice$1 = function InvoicePrice(_ref) {
|
|
|
12602
12606
|
surcharge: surcharge,
|
|
12603
12607
|
defaultLang: defaultLang
|
|
12604
12608
|
});
|
|
12605
|
-
return html$q(_templateObject$r || (_templateObject$r = _taggedTemplateLiteralLoose(["\n <!-- begin invoice-price -->\n <table\n class=\"table table-borderless table-small invoice-price page-not-break\"\n style=\"margin-bottom: 40px;\"\n >\n <tbody>\n <tr>\n <td class=\"d-none d-md-table-cell invoice-price-left text-right\">\n <!-- begin bookipay payment -->\n <div class=\"d-none d-md-block\">", "</div>\n <!-- end bookipay payment -->\n </td>\n <td width=\"22%\" class=\"invoice-price-right\">\n <span class=\"price-title\"\n >", "\n ", "</span\n >\n <span class=\"price-amount\"\n >", "</span\n >\n </td>\n </tr>\n </tbody>\n </table>\n <!-- end invoice-price -->\n "])), bookipayLinkComponent, document.ty == 1 && isDeposit && document.depositAmount > 0 ? company.r_deposit_due ? company.r_deposit_due : defaultLang['deposit_due'] : document.ty == 1 ? company.r_ad ? company.r_ad : defaultLang['amount_due'] : company.r_gt ? company.r_gt : defaultLang['grand_total'], document.ty == 1 && isDeposit && document.depositAmount > 0 && document.depositDue !== null ? "| " + formatDate(document.depositDue) : '', document.ty == 1 && isDeposit && document.depositAmount > 0 ? FormatCurrency$8(document.depositAmount, company.cr, company.la, company.cf) : FormatCurrency$8(document.ad - (document.hangingAmount || 0), company.cr, company.la, company.cf));
|
|
12609
|
+
return html$q(_templateObject$r || (_templateObject$r = _taggedTemplateLiteralLoose(["\n <!-- begin invoice-price -->\n <table\n class=\"table table-borderless table-small invoice-price page-not-break\"\n style=\"margin-bottom: 40px;\"\n >\n <tbody>\n <tr>\n <td class=\"d-none d-md-table-cell invoice-price-left text-right\">\n <!-- begin bookipay payment -->\n <div class=\"d-none d-md-block\">", "</div>\n <!-- end bookipay payment -->\n </td>\n <td width=\"22%\" class=\"invoice-price-right\">\n <span class=\"price-title\"\n >", "\n ", "</span\n >\n <span class=\"price-amount\"\n >", "</span\n >\n </td>\n </tr>\n </tbody>\n </table>\n <!-- end invoice-price -->\n "])), bookipayLinkComponent, document.ty == 1 && isDeposit && document.depositAmount > 0 ? company.r_deposit_due ? company.r_deposit_due : defaultLang['deposit_due'] : document.ty == 1 ? company.r_ad ? company.r_ad : defaultLang['amount_due'] : company.r_gt ? company.r_gt : defaultLang['grand_total'], document.ty == 1 && isDeposit && document.depositAmount > 0 && document.depositDue !== null ? "| " + formatDate(document.depositDue) : '', document.ty == 1 && isDeposit && document.depositAmount > 0 ? FormatCurrency$8(document.depositAmount, document.currency || company.cr, company.la, company.cf) : FormatCurrency$8(document.ad - (document.hangingAmount || 0), document.currency || company.cr, company.la, company.cf));
|
|
12606
12610
|
};
|
|
12607
12611
|
|
|
12608
12612
|
var _templateObject$s, _templateObject2$c, _templateObject3$5;
|