Anas Jakwani
07/09/2024, 12:13 PM<#list statements as statement>
<#assign totalCharges = 0>
<#assign totalPayments = 0>
<#list statement.lines as line>
<#assign totalCharges += (line.charge?number!0)>
<#assign totalPayments += (line.payment?number!0)>
</#list>
<#assign amountDue = totalCharges - totalPayments>
It doesn't give me an error when I save the template but customer statement is not being generated. I am thinking that is because, not each line of statement has both charge and payment and some lines must be returning null for each of them. Any idea how can I tackle this?
Thankscreece
07/09/2024, 3:59 PMAnas Jakwani
07/09/2024, 4:01 PMcreece
07/09/2024, 4:04 PMAnas Jakwani
07/09/2024, 4:04 PMAnas Jakwani
07/09/2024, 4:05 PMAnas Jakwani
07/09/2024, 4:08 PM<#if line.charge?has_content>
<#assign totalCharges = totalCharges + (line.charge?number!0)
</#if>
It gives 0 for totalCharges. I don't get why is it ignoring all lines. Even though it shouldn'tcreece
07/09/2024, 4:19 PMcreece
07/09/2024, 4:19 PMFred Pope
08/07/2024, 3:16 PMsuperman1987417
08/09/2024, 5:14 AM