@bookipi/htmlgenerator 1.5.16-alpha1 → 1.5.16-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.
@@ -12223,6 +12223,10 @@ var invoiceHtmlWithDetails = (function (_ref) {
12223
12223
  };
12224
12224
  });
12225
12225
 
12226
+ var DOCUMENT_KEYS = ['_id', 'ad', 'ty', 'cu', 'd', 'dd', 'rn', 'it', 'st', 'tx', 'tx2', 'tt', 'dc', 'dcp', 'dcpo', 'sp', 'sntx', 'tp', 'tn', 'tp2', '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'];
12227
+
12228
+ var COMPANY_KEYS = ['_id', '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', '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'];
12229
+
12226
12230
  var hexToRGB = function hexToRGB(hex) {
12227
12231
  hex = hex.replace(/^#/, "");
12228
12232
  return {
@@ -12745,6 +12749,16 @@ var invoiceHtmlWithDetailsNew = (function (_ref) {
12745
12749
  };
12746
12750
  });
12747
12751
 
12752
+ var trimInvoiceKeys = (function (obj, keys) {
12753
+ var result = {};
12754
+ keys.forEach(function (key) {
12755
+ if (obj.hasOwnProperty(key)) {
12756
+ result[key] = obj[key];
12757
+ }
12758
+ });
12759
+ return result;
12760
+ });
12761
+
12748
12762
  var invoiceHtml = (function (_ref) {
12749
12763
  var invoice = _ref.invoice,
12750
12764
  _ref$lang = _ref.lang,
@@ -12786,7 +12800,10 @@ var invoiceHtml = (function (_ref) {
12786
12800
  isFullScreen = _ref$isFullScreen === void 0 ? false : _ref$isFullScreen;
12787
12801
  var renderInvoice = isNewLayout ? invoiceHtmlWithDetailsNew : invoiceHtmlWithDetails;
12788
12802
  return renderInvoice({
12789
- invoice: invoice,
12803
+ invoice: _extends({}, invoice, {
12804
+ document: trimInvoiceKeys(invoice.document, DOCUMENT_KEYS),
12805
+ company: trimInvoiceKeys(invoice.company, COMPANY_KEYS)
12806
+ }),
12790
12807
  lang: lang,
12791
12808
  referral: referral,
12792
12809
  companyLogoBase: companyLogoBase,