Currently, I have a table of values/attributes in my Custom Transaction Form.
I want to write an Advanced PDF Template, so when I print the form as PDF, some values are grouped to different sections.
For example, my form has four attributes, called Store, Product ID, Prices, and NumOfSales, like the following.
- AA, 123, 2.89, 10
- AA, 123, 2.89, 12
- BB, 123, 1.99, 29
- BB, 124, 4.00, 9
I want to write an advanced pdf template so that the printed result looks like the following. - AA, 123, 2.89, 22
- BB, 123, 1.99, 29
124, 4.00, 9
I am wondering if Advanced PDF Template - Freemaker has group_by() and sum() functions OR if I need to use SuiteScript to achieve that. If I need to used SuiteScript, how to combine Advanced PDF Template and Script together. Thanks for your help.