how to print each invoices customer name in statem...
# ask-stanley-ai
d
how to print each invoices customer name in statement advanced pdf
c
AI generated answer (using internal Slack threads):
To print each invoice's customer name in a statement advanced PDF, you need to customize the PDF template of the statement. Here are the steps to do it: 1. Navigate to
Customization > Forms > Advanced PDF/HTML Templates
. 2. Click
Customize
next to the
Statement
form. 3. In the code of the template, you can access the customer name of each invoice using the
record
object. For example,
${record.customer.entityid}
will give you the customer's ID, and
${record.customer.name}
will give you the customer's name. 4. To print the customer name for each invoice, you can add it to the
line
table in the template. Here is an example of how to do it:
Copy code
html
<table class="itemtable" style="width: 100%; margin-top: 10px;">
<!-- start items -->
<#list record.lines as line>
<#if line_index==0>
<thead>
    <tr>
        <th colspan="3">${line.datecol@label}</th>
        <th colspan="3">Due Date</th>
        <th colspan="5">${line.description@label}</th>
        <th colspan="4">PO#</th>
        <th align="right" colspan="3">${line.charge@label}</th>
        <th align="right" colspan="3">${line.payment@label}</th>
        <th align="right" colspan="3">${line.balance@label}</th>
        <th align="right" colspan="3">Customer Name</th>
    </tr>
</thead>
</#if>
<tr>
    <td colspan="3">${line.datecol}</td>
    <td colspan="3">${line.duedate}</td>
    <td colspan="5">${line.description}</td>
    <td colspan="4">${line.otherrefnum}</td>
    <td align="right" colspan="3">${line.charge}</td>
    <td align="right" colspan="3">${line.payment}</td>
    <td align="right" colspan="3">${line.balance}</td>
    <td align="right" colspan="3">${record.customer.name}</td>
</tr>
</#list>
<!-- end items -->
</table>
In this example, a new column
Customer Name
is added to the table, and the customer name is printed for each invoice. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.820506036
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.819660187
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.812599
Please provide your feedback on this answer.