PDF Templates - AOS Quotes

Hello,

I have the below template with both products and service items.

I have separated both of these and list the products in one table and the service items in another table.

The products show correctly however I am unable to get a total for all the products. Is there a function for this or can I create one for myself?

The services are calculating individual however I am trying to get them to have a total.

I have a grand total which includes the total for the products and services which seems to be adding it up correctly.

Please can anyone advise on the functions I can use or how I can create them myself?

Kind regards,