@bookipi/htmlgenerator 1.1.42-alpha2 → 1.1.42

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.
@@ -11844,9 +11844,8 @@ var ItemsContainer = function ItemsContainer(_ref) {
11844
11844
  }
11845
11845
  var itemsContainer = "";
11846
11846
  for (var _iterator = _createForOfIteratorHelperLoose(document.it), _step; !(_step = _iterator()).done;) {
11847
- var _item$photos;
11848
11847
  var item = _step.value;
11849
- itemsContainer = itemsContainer + html$5(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteralLoose(["<tr>\n <td>\n ", "\n <div style=\"display: inline-block\">\n <span class=\"text-inverse\"><strong>", "</strong></span>\n ", "\n <div class=\"mt-2\">", "</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>"])), (_item$photos = item.photos) !== null && _item$photos !== void 0 && _item$photos[0] ? "<img style=\"width:56px;height:56px;display:inline-block;margin-right:12px;border-radius:4px;\" src=\"https://s3.amazonaws.com/bookipi/" + company._id + "/item/images/" + item.photos[0].filename + ".jpg\" />" : "", item.n || "", item.productCode ? html$5(_templateObject2$2 || (_templateObject2$2 = _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, company.cr, company.la, company.cf, {
11848
+ itemsContainer = itemsContainer + html$5(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteralLoose(["<tr>\n <td>\n <span class=\"text-inverse\"><strong>", "</strong></span>\n ", "\n <div class=\"mt-2\">", "</div>\n <div class=\"d-block d-md-none mt-1\">\n ", "\n ", "\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>"])), item.n || "", item.productCode ? html$5(_templateObject2$2 || (_templateObject2$2 = _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, company.cr, company.la, company.cf, {
11850
11849
  forceDecimal: forceItemUnitPriceDecimal
11851
11850
  }) + " ✕ " + (item.q || "0") : "", discountOnItem && (item.p || item.p == 0) && item.dc ? "" + (item.dc > 0 ? " - " : " + ") + FormatCurrency$1(Math.abs(item.dc), company.cr, company.la, company.cf, {
11852
11851
  forceDecimal: forceItemUnitPriceDecimal
@@ -12564,7 +12563,7 @@ var getRecurringPeriodType = function getRecurringPeriodType(recurringPeriodType
12564
12563
  return recurringPeriodType;
12565
12564
  }
12566
12565
  };
12567
- function getBilling(item, proposal, company, t) {
12566
+ function getBilling(item, proposal, company) {
12568
12567
  var billingType = item.billingType,
12569
12568
  recurringPeriodFrequency = item.recurringPeriodFrequency,
12570
12569
  recurringPeriodType = item.recurringPeriodType,
@@ -12572,23 +12571,20 @@ function getBilling(item, proposal, company, t) {
12572
12571
  recurringStartType = item.recurringStartType;
12573
12572
  switch (billingType) {
12574
12573
  case "acceptance":
12575
- return t ? t("Billed today") : "Billed today";
12574
+ return "Billed today";
12576
12575
  case "completion":
12577
12576
  if (proposal.endType === "fixed_date") {
12578
- return t ? t("Billed on completion") : "Billed on completion";
12577
+ return "Billed on completion";
12579
12578
  } else if (proposal.endDate !== null) {
12580
- return (t ? t("Billed on") : "Billed on") + " " + formatDate(proposal.endDate, company);
12579
+ return "Billed on " + formatDate(proposal.endDate, company);
12581
12580
  } else {
12582
- return t ? t("Billed on completion") : "Billed on completion";
12581
+ return "Billed on completion";
12583
12582
  }
12584
12583
  case "recurring":
12585
12584
  var startDate = recurringStartType === "on_acceptance" ? "acceptance" : formatDate(recurringStartDate, company);
12586
- return t ? t("Billed every {{recurringPeriod}} " + getRecurringPeriodType(recurringPeriodType || "month", recurringPeriodFrequency) + " from {{startDate}}", {
12587
- recurringPeriod: recurringPeriodFrequency === 1 ? "" : recurringPeriodFrequency,
12588
- startDate: startDate
12589
- }) : "Billed every " + (recurringPeriodFrequency === 1 ? "" : recurringPeriodFrequency) + " " + getRecurringPeriodType(recurringPeriodType || "month", recurringPeriodFrequency) + " from " + startDate;
12585
+ return "Billed every " + (recurringPeriodFrequency === 1 ? "" : recurringPeriodFrequency) + " " + getRecurringPeriodType(recurringPeriodType || "month", recurringPeriodFrequency) + " from " + startDate;
12590
12586
  default:
12591
- return t ? t("Billing type should be selected") : "Billing type should be selected";
12587
+ return "Billing type should be selected";
12592
12588
  }
12593
12589
  }
12594
12590
 
@@ -12753,7 +12749,7 @@ var contractHtml = (function (props) {
12753
12749
  sectionServices += "</div>";
12754
12750
  }
12755
12751
  sectionServices += '</td><td align="right">';
12756
- sectionServices += "<p>" + (getBilling(it, proposal, company, t) + "</p>");
12752
+ sectionServices += "<p>" + (t ? getBilling(it, proposal, company).replace('Billed today', t('Billed today')).replace('Billed on completion', t('Billed on completion')).replace('Billed on', t('Billed on')) : getBilling(it, proposal, company) + "</p>");
12757
12753
  sectionServices += "</td></tr>";
12758
12754
  });
12759
12755
  } else {