Get Customer Invoices from Quote email
Hello again everyone,
We want to customize the "When quote is sent to client for approval" notification email (Classic Projects) so that it checks whether that customer has overdue invoices and their amount to add a custom text like (Please take care of the following overdue invoices).
The way we tried to go about it was:
#set($c = $utils.unwrap($quote).getCustomer())
#foreach($f in $c.getInvoices()))
#if ($f.isOverdue())
$overdue="TRUE"
//Print table with invoice information
#end
#end
However, we do not seem to be getting the set of customer invoices with $c.getInvoices(). I think it has something to do with the fact that the first line gives us a snapshot of the customer instead of the actual object, but maybe I am wrong. Does anyone have any clue how to approach this?
Customer support service by UserEcho
You are right. This is because the customer is a customerSnapshot.
You could reach the customer like this:
Thank you Dennis! Is that all documented somewhere or do you test and discover these?
Most of the things are documented, though not everything. After a while, you understand the minds of the XTRF software developers and then you can do some educated guesses.