Small template issue when updating to 4.4.3

Before upgrade, in my custom invoice template, I referred to the PubluicNotes and Terms as:

,
  {
    "text": "$publicNotes",
    "fontSize": 8,
    "margin": [
      0,
      0,
      0,
      0
    ]
  },
  {
    "text": "Terms",
    "bold": "true",
    "fontSize": 9,
    "margin": [
      0,
      20,
      0,
      0
    ]
  },
  {
    "text": "$terms",
    "fontSize": 8,
    "margin": [
      0,
      0,
      0,
      0
    ]
  },

However, now if either terms or publuc notes is empty, I get the variable ‘$publicNotes’ or ‘$terms’ printed on the invoice.

I can see it looks like there’s been a change with these variables, but could do with a pointer as to how I get them to not print on the invoice when they are empty.

We should have a fix for this in our next release.

Thanks. For a quick fix, if possible, using your new $notesAndTerms variable, how would I get the notes and terms to display without the $subtotals bit?:

  {
    "columns": [
      "$notesAndTerms",
      {
        "table": {
          "widths": [
            "*",
            "40%"
          ],
          "body": "$subtotals"
        },
        "layout": {
          "hLineWidth": "$none",
          "vLineWidth": "$none",
          "paddingLeft": "$amount:34",
          "paddingRight": "$amount:8",
          "paddingTop": "$amount:4",
          "paddingBottom": "$amount:4"
        }
      }
    ]
  },

I’m not sure I understand your question, you can just use the variable on its own.

Forgive me, that’s what I tried, but when I do the following, the “Terms” title get displayed, but no other information:

,
  {
    "text": "$notesAndTerms",
    "fontSize": 8,
    "margin": [
      0,
      0,
      0,
      0
    ]
  },

I’m not sure, do the terms/notes fields have values?

Yes. It seems it needs specific layout (see below). Will the next release go back to allowing me to use those individual variables Hillel? One template separates them you see:

,
 {
    "fontSize": 8,
    "columns": [
      "$notesAndTerms",
      {
        "text": "",
        "width": "0",
        "margin": [
          0,
          0,
          0,
          0
        ]
      }
    ]
  },

Yes, in the next release variables will be replaced when the values are blank.

Thats great. Are we talking weeks, months or days (sorry I had to ask!)

We should have a minor release next week.

Thanks. I’ll roll back and wait until then as I cannot see a way around it in my custom templates.

Just to confirm, this issue (empty variables having their variable names displayed on PDF’s) is addressed as Hillel described, in the newly released version 4.4.4

Great to hear, thanks for letting us know!