Customizing the List of Invoices in the Dunning Template File
In the sample templates provided by the Dunning Letters SuiteApp, if you use customer level dunning, the dunning letter shows a list of all the overdue invoices of the customer, including those invoices that have dunning procedures assigned.
Invoices with assigned dunning procedures are marked with an asterisk. Invoice groups with assigned dunning procedures are also marked with an asterisk
You can customize your template to modify what shows in the list:
-
Marking Invoices That Have Dunning Procedures Assigned
Marking invoices enables your customers to identify the invoices for which separate dunning letters can be sent. Marking invoice groups enables your customers to identify the invoice groups for which separate dunning letters can be sent.
The sample template shows all invoices to be dunned, and uses an asterisk to mark the invoices that have dunning procedures assigned.
The following sample code snippet checks for invoices that have dunning procedures assigned, and marks them with an asterisk:
<#if invoice.custbody_3805_dunning_procedure != "">*</#if>The following sample code snippet checks for invoice groups that have dunning procedures assigned, and marks them with an asterisk:
<#if invoicegrouprecord.custrecord_dl_ig_dunning_procedure!="">*</#if>You can add some text to explain what the asterisk means. For example, you can add text saying that the customer receive separate dunning letters for those marked invoices.
You can use a different way of marking the invoices, if you don't want to use an asterisk.
-
Showing all Invoices
The following sample code snippet includes all invoices to be dunned:
<#list invoicelist as invoice> <tr> <td>${invoice.tranid}</td> <td>${invoice.memo}</td> <td>${invoice.trandate}</td> <td>${invoice.duedate}</td> <td>${invoice.currency}</td> <td>${invoice.fxamountremaining?string.number}</td> </tr> </#list> -
Hiding Invoices With Dunning Procedures
You can hide the invoices that have dunning procedures if you don't want them included in the list.
The following sample code snippet includes only those invoices that do not have a dunning procedure assigned:
<#list invoicelist as invoice> <#if invoice.custbody_3805_dunning_procedure == ""> <tr> <td>${invoice.tranid}</td> <td>${invoice.memo}</td> <td>${invoice.trandate}</td> <td>${invoice.duedate}</td> <td>${invoice.currency}</td> <td>${invoice.fxamountremaining?string.number}</td> </tr> </#if> </#list> -
Showing all Invoice Groups
The following sample code snippet includes all invoice groups to be dunned:
<#list invoicegrouplist as invoicegrouprecord> <tr> <td>Invoice Group #${invoicegrouprecord.invoicegroupnumber} <#if invoicegrouprecord.custrecord_dl_ig_dunning_procedure!="">* </#if> </td> </tr> <#list invoicelist as invoice> <#if invoice.groupedto==invoicegrouprecord.invoicegroupnumber> <tr> <td>${invoice.tranid} <#if invoice.custbody_3805_dunning_procedure !="">*</#if> </td> <td>${invoice.memo}</td> <td>${invoice.trandate}</td> <td>${invoice.duedate}</td> <td>${invoice.currency}</td> <td>${invoice.fxamountremaining?string.number}</td> </tr> </#if> </#list> </#list> -
Hiding Invoice Groups With Dunning Procedures
You can hide the invoice groups that have dunning procedures if you don't want them included in the list.
The following sample code snippet includes only those invoice groups that do not have a dunning procedure assigned:
<#list invoicegrouplist as invoicegrouprecord> <#if invoicegrouprecord.custrecord_dl_ig_dunning_procedure == ""> <tr> <td>Invoice Group #${invoicegrouprecord.invoicegroupnumber}</td> </tr> <#list invoicelist as invoice> <#if invoice.groupedto==invoicegrouprecord.invoicegroupnumber> <tr> <td>${invoice.tranid} <#if invoice.custbody_3805_dunning_procedure !="">*</#if> </td> <td>${invoice.memo}</td> <td>${invoice.trandate}</td> <td>${invoice.duedate}</td> <td>${invoice.currency}</td> <td>${invoice.fxamountremaining?string.number}</td> </tr> </#if> </#list> </#if> </#list>