@bookipi/htmlgenerator 1.8.2 → 1.8.3

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.
@@ -13676,11 +13676,20 @@ var ItemsContainer$2 = function ItemsContainer(_ref) {
13676
13676
  var getItemUnit = function getItemUnit(item) {
13677
13677
  return item.unitType || defaultLang['item_unit_piece'];
13678
13678
  };
13679
+ var getQISTax = function getQISTax(item) {
13680
+ if (item.tx2) {
13681
+ return company.tp2 + "%";
13682
+ }
13683
+ if (item.tx) {
13684
+ return company.tp + "%";
13685
+ }
13686
+ return '0%';
13687
+ };
13679
13688
  for (var _iterator = _createForOfIteratorHelperLoose(document.it), _step; !(_step = _iterator()).done;) {
13680
13689
  var _item$photos;
13681
13690
  var item = _step.value;
13682
13691
  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" : '';
13683
- itemsContainer = itemsContainer + html$z(_templateObject$B || (_templateObject$B = _taggedTemplateLiteralLoose(["<tr>\n ", "\n <td\n class=\"item-detail-cell d-none d-md-table-cell\"\n style=\"", "\"\n >\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\n class=\"item-description mt-2\"\n style=\"page-break-inside: auto!important;\"\n >\n ", "\n </div>\n </div>\n </td>\n <td\n class=\"item-detail-cell d-table-cell d-md-none\"\n style=\"padding-left: .75rem;\"\n >\n ", "\n <div style=\"display:block;page-break-inside: auto!important;\">\n ", "\n\n <span class=\"text-inverse\"\n ><span class=\"item-name\">", "</span></span\n >\n ", "\n <div\n class=\"item-description\"\n style=\"page-break-inside: auto!important;\"\n >\n ", "\n </div>\n <div class=\"d-block d-md-none mt-2\">\n ", "\n ", "\n </div>\n </div>\n </td>\n ", "\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 ", "\n <td\n class=\"item-detail-cell t text-right item-total-cell\"\n style=\"padding-right: .75rem;\"\n >\n ", "\n ", "\n </td>\n </tr>"])), isQIS ? html$z(_templateObject2$h || (_templateObject2$h = _taggedTemplateLiteralLoose(["<td\n class=\"text-left d-none d-md-table-cell item-detail-cell\"\n style=\"padding-left: .75rem;\"\n >\n ", "\n </td>"])), item.deliveryDate ? formatShortDateJapan(item.deliveryDate, company.tz) : '—') : '', isQIS ? '' : 'padding-left: .75rem;', photoUrl ? "<img class=\"mb-2\" style=\"width:56px;height:56px;display:inline-block;margin-right:12px;border-radius:4px;vertical-align:top;\" src=\"" + photoUrl + "\" />" : '', item.n || '', item.productCode ? html$z(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["<div class=\"item-productcode text-inverse\">\n ", "\n </div>"])), item.productCode) : '', nl2br(item.dsc) || '', photoUrl ? "<img class=\"mb-2\" style=\"width:56px;height:56px;display:inline-block;margin-right:12px;border-radius:4px;vertical-align:top;\" src=\"" + photoUrl + "\" />" : '', item.deliveryDate ? "<div class=\"d-block d-md-none item-delivery-date-small-screen mb-2\">\n " + formatShortDateJapan(item.deliveryDate, company.tz) + "\n </div>" : ' ', item.n || '', item.productCode ? html$z(_templateObject4 || (_templateObject4 = _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) ? FormatCurrencyJP(item.p, company.cr, company.la, company.cf) + ' ✕ ' + (item.q || '0') + ' ' + getItemUnit(item) : '', discountOnItem && (item.p || item.p == 0) && item.dc ? "" + (item.dc > 0 ? ' - ' : ' + ') + FormatCurrencyJP(Math.abs(item.dc), company.cr, company.la, company.cf) + " (" + (company.r_dc ? company.r_dc : defaultLang.discount) + ")" : '', isQIS ? "\n <td class=\"item-detail-cell text-center d-none d-md-table-cell\">\n " + (item.tx2 ? '※' : '') + "\n </td>\n " : '', (item.p || item.p == 0) && (item.q || item.q == 0) ? item.q + ' ' + getItemUnit(item) : '', item.p || item.p == 0 ? FormatCurrencyJP(item.p, company.cr, company.la, company.cf) : '', discountOnItem ? html$z(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["<td\n class=\"item-detail-cell text-center d-none d-md-table-cell\"\n >\n ", "\n </td>"])), (item.p || item.p == 0) && item.dc ? FormatCurrencyJP(item.dc, company.cr, company.la, company.cf) : '') : '', isQIS ? html$z(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["<td\n class=\"item-detail-cell text-center d-none d-md-table-cell\"\n >\n ", "\n </td>"])), item.tx2 ? company.tp2 + "%" : company.tp + "%") : '', isQIS ? "\n <div class=\"d-block d-md-none mb-2 item-tax-small-screen\">\n <div>" + (item.tx2 ? '※ ' : '') + defaultLang['tax_rate'] + ": " + (item.tx2 ? company.tp2 + "%" : company.tp + "%") + "</div>\n </div>\n " : '', item.p || item.p == 0 ? FormatCurrencyJP(item.t, company.cr, company.la, company.cf) : '');
13692
+ itemsContainer = itemsContainer + html$z(_templateObject$B || (_templateObject$B = _taggedTemplateLiteralLoose(["<tr>\n ", "\n <td\n class=\"item-detail-cell d-none d-md-table-cell\"\n style=\"", "\"\n >\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\n class=\"item-description mt-2\"\n style=\"page-break-inside: auto!important;\"\n >\n ", "\n </div>\n </div>\n </td>\n <td\n class=\"item-detail-cell d-table-cell d-md-none\"\n style=\"padding-left: .75rem;\"\n >\n ", "\n <div style=\"display:block;page-break-inside: auto!important;\">\n ", "\n\n <span class=\"text-inverse\"\n ><span class=\"item-name\">", "</span></span\n >\n ", "\n <div\n class=\"item-description\"\n style=\"page-break-inside: auto!important;\"\n >\n ", "\n </div>\n <div class=\"d-block d-md-none mt-2\">\n ", "\n ", "\n </div>\n </div>\n </td>\n ", "\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 ", "\n <td\n class=\"item-detail-cell t text-right item-total-cell\"\n style=\"padding-right: .75rem;\"\n >\n ", "\n ", "\n </td>\n </tr>"])), isQIS ? html$z(_templateObject2$h || (_templateObject2$h = _taggedTemplateLiteralLoose(["<td\n class=\"text-left d-none d-md-table-cell item-detail-cell\"\n style=\"padding-left: .75rem;\"\n >\n ", "\n </td>"])), item.deliveryDate ? formatShortDateJapan(item.deliveryDate, company.tz) : '—') : '', isQIS ? '' : 'padding-left: .75rem;', photoUrl ? "<img class=\"mb-2\" style=\"width:56px;height:56px;display:inline-block;margin-right:12px;border-radius:4px;vertical-align:top;\" src=\"" + photoUrl + "\" />" : '', item.n || '', item.productCode ? html$z(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["<div class=\"item-productcode text-inverse\">\n ", "\n </div>"])), item.productCode) : '', nl2br(item.dsc) || '', photoUrl ? "<img class=\"mb-2\" style=\"width:56px;height:56px;display:inline-block;margin-right:12px;border-radius:4px;vertical-align:top;\" src=\"" + photoUrl + "\" />" : '', item.deliveryDate ? "<div class=\"d-block d-md-none item-delivery-date-small-screen mb-2\">\n " + formatShortDateJapan(item.deliveryDate, company.tz) + "\n </div>" : ' ', item.n || '', item.productCode ? html$z(_templateObject4 || (_templateObject4 = _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) ? FormatCurrencyJP(item.p, company.cr, company.la, company.cf) + ' ✕ ' + (item.q || '0') + ' ' + getItemUnit(item) : '', discountOnItem && (item.p || item.p == 0) && item.dc ? "" + (item.dc > 0 ? ' - ' : ' + ') + FormatCurrencyJP(Math.abs(item.dc), company.cr, company.la, company.cf) + " (" + (company.r_dc ? company.r_dc : defaultLang.discount) + ")" : '', isQIS ? "\n <td class=\"item-detail-cell text-center d-none d-md-table-cell\">\n " + (item.tx2 ? '※' : '') + "\n </td>\n " : '', (item.p || item.p == 0) && (item.q || item.q == 0) ? item.q + ' ' + getItemUnit(item) : '', item.p || item.p == 0 ? FormatCurrencyJP(item.p, company.cr, company.la, company.cf) : '', discountOnItem ? html$z(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["<td\n class=\"item-detail-cell text-center d-none d-md-table-cell\"\n >\n ", "\n </td>"])), (item.p || item.p == 0) && item.dc ? FormatCurrencyJP(item.dc, company.cr, company.la, company.cf) : '') : '', isQIS ? html$z(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["<td\n class=\"item-detail-cell text-center d-none d-md-table-cell\"\n >\n ", "\n </td>"])), getQISTax(item)) : '', isQIS ? "\n <div class=\"d-block d-md-none mb-2 item-tax-small-screen\">\n <div>" + (item.tx2 ? '※ ' : '') + defaultLang['tax_rate'] + ": " + getQISTax(item) + "</div>\n </div>\n " : '', item.p || item.p == 0 ? FormatCurrencyJP(item.t, company.cr, company.la, company.cf) : '');
13684
13693
  }
13685
13694
  return itemsContainer;
13686
13695
  };