@bookipi/htmlgenerator 1.1.30-alpha1 → 1.1.30-alpha2

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 CHANGED
@@ -9689,7 +9689,7 @@ var invoiceHtmlWithDetails = (function (_ref) {
9689
9689
  if (document.it) {
9690
9690
  for (var _iterator2 = _createForOfIteratorHelperLoose(document.it), _step2; !(_step2 = _iterator2()).done;) {
9691
9691
  var _item = _step2.value;
9692
- itemsContainer = itemsContainer + ("<tr>\n <td>\n <span class=\"text-inverse\"><strong>" + (_item.n || "") + "</strong></span>\n " + (_item.pc ? "<div class=\"text-inverse\">" + _item.pc + "</div>" : "") + "\n <div class=\"mt-2\">" + (nl2br(_item.dsc) || "") + "</div>\n <div class=\"d-block d-md-none mt-1\">\n " + ((_item.p || _item.p == 0) && (_item.q || _item.q == 0) ? FormatCurrency$1(_item.p, company.cr, company.la, company.cf, {
9692
+ itemsContainer = itemsContainer + ("<tr>\n <td>\n <span class=\"text-inverse\"><strong>" + (_item.n || "") + "</strong></span>\n " + (_item.productCode ? "<div class=\"text-inverse\">" + _item.productCode + "</div>" : "") + "\n <div class=\"mt-2\">" + (nl2br(_item.dsc) || "") + "</div>\n <div class=\"d-block d-md-none mt-1\">\n " + ((_item.p || _item.p == 0) && (_item.q || _item.q == 0) ? FormatCurrency$1(_item.p, company.cr, company.la, company.cf, {
9693
9693
  forceDecimal: forceItemUnitPriceDecimal
9694
9694
  }) + " ✕ " + (_item.q || "0") : "") + "\n " + (discountOnItem && (_item.p || _item.p == 0) && _item.dc ? "" + (_item.dc > 0 ? " - " : " + ") + FormatCurrency$1(Math.abs(_item.dc), company.cr, company.la, company.cf, {
9695
9695
  forceDecimal: forceItemUnitPriceDecimal
@@ -9793,7 +9793,7 @@ var invoiceHtml = (function (_ref) {
9793
9793
  var docTypeMapping = new Map([[0, "estimate"], [1, "invoice"], [2, "credit_note"], [3, "delivery_note"], [4, "purchase_order"], ["estimate", 0], ["invoice", 1], ["credit_note", 2], ["delivery_note", 3], ["purchase_order", 4]]);
9794
9794
  var ItemCompat = function ItemCompat(item) {
9795
9795
  if (item == null) return null;
9796
- var mapping = new Map([["name", "n"], ["productCode", "pc"], ["description", "dsc"], ["price", "p"], ["quantity", "q"], ["tax", "tx"], ["tax2", "tx2"], ["discount", "dc"], ["total", "t"]]);
9796
+ var mapping = new Map([["name", "n"], ["productCode", "productCode"], ["description", "dsc"], ["price", "p"], ["quantity", "q"], ["tax", "tx"], ["tax2", "tx2"], ["discount", "dc"], ["total", "t"]]);
9797
9797
  return Object.fromEntries(Object.entries(item).map(function (_ref) {
9798
9798
  var k = _ref[0],
9799
9799
  v = _ref[1];