I want to create a custom DocType and have a question on this.
The goal is to
collect due Purchase Invoices. This has to be flexible enough to only pick particular PINV and to not pick others.
calculate the total sum due of all the invoices collected in step #1
I have created a doctype which has a Child table linking to “Purchase invoice” Doctype. So I can choose invoices and list them with the Total Sum Each invoice. Now what I am struggling with is to make an addition of these values and produce a TOTAL for all invoices collected.
To me it looks like as if this should work similar to how an Invoice creates the Grand Total but when you look at that via the Customize Form Tool there is not hint whatsoever on how the calculation is being done.
Can anybody point me into the right direction on how to achieve this? Maybe you even need more then just setting fields correctly (like a custom script on top that does the calculation)?