title: Conditional Printing with Netsuite Advanced PDF/HTML Template (Zero Value)
body: <p>I have inherited a custom NetSuite Advanced PDF/HTML Template which is the primary default for the majority of our invoicing.</p>
  <p>We would like to have an expenses line <strong>not</strong> print when value is $0.00. Searches online and of Stack Overflow have not provided clear direction. It appears #if/#else might be solution, but I am unclear on how to integrate into the existing code. I have some HTML/CSS experience, but am new to Freemarker.</p>
  <p>The current code looks to wrap instructions for printing line items that are not entered as expenses <strong>within</strong> the Billable Expenses instructions?</p>
  <pre><code>&lt;#if record.item?has_content&gt;
          &lt;#assign totalBillableExpense = 0&gt;
          &lt;table class=&quot;itemtable&quot; style=&quot;width: 100%; margin-top: 10px;&quot;&gt;&lt;!-- start items --&gt;
              &lt;#list record.item as item&gt;
                  &lt;#if item_index==0&gt;
                      &lt;thead&gt;
                          &lt;tr&gt;
                              &lt;th colspan=&quot;20&quot; align=&quot;left&quot;&gt;${item.description@label}&lt;/th&gt;
                              &lt;!--th align=&quot;center&quot; colspan=&quot;3&quot;&gt;${item.quantity@label}&lt;/th--&gt;
                              &lt;!--th align=&quot;right&quot; colspan=&quot;4&quot;&gt;${item.rate@label}&lt;/th--&gt;
                              &lt;th align=&quot;right&quot; colspan=&quot;4&quot;&gt;${item.amount@label}&lt;/th&gt;
                          &lt;/tr&gt;
                      &lt;/thead&gt;
                  &lt;/#if&gt;
                  &lt;tr&gt;
                      &lt;#if item.custcol_ns_print_pdf?string == &quot;Yes&quot;&gt;                      
                          &lt;td colspan=&quot;20&quot;&gt;          
                              &lt;!--#if item.itemtype?contains(&quot;Description&quot;) || item.itemtype?contains(&quot;Subtotal&quot;)--&gt;
                              &lt;!--/#if--&gt;
  
                            ${item.description}&lt;/td&gt;
                              &lt;!--td align=&quot;center&quot; colspan=&quot;3&quot; line-height=&quot;150%&quot;&gt;${item.quantity}&lt;/td--&gt;
                              &lt;!--td align=&quot;right&quot; colspan=&quot;4&quot;&gt;${item.rate}&lt;/td--&gt;
                              &lt;td align=&quot;right&quot; colspan=&quot;4&quot;&gt;${item.amount}&lt;/td&gt;
                      &lt;/#if&gt;
                      &lt;#if item.description?contains(&quot;Total Billable Expenses&quot;)&gt;
                          &lt;#assign totalBillableExpense = totalBillableExpense + item.amount&gt;
                      &lt;/#if&gt;
                  &lt;/tr&gt;
              &lt;/#list&gt;&lt;!-- end items --&gt;
              &lt;tr&gt;
                  &lt;td colspan=&quot;20&quot;&gt;Billable Expenses &lt;/td&gt;
                  &lt;td align=&quot;right&quot; colspan=&quot;4&quot;&gt;${totalBillableExpense?string.currency}&lt;/td&gt;
              &lt;/tr&gt;
  </code></pre>