QQ on printing receipt

This should be very easy but I can’t figure it out.

So my receipt template is as shown in the photo

How do I get the Total to display ? The Total should display all ordered items price and gifted item price. I would like to show customer the Total and the Discount given and finally the amount they should pay which is the Grand Total.

Currently, the Total would not display. The receipt shows


Total: (blank)
Discount: (works fine)

Grand Total: (works fine)

I believe Plain total will not print if is the same value as ticket total.

As said above plus I’m pretty sure there is no single tag which will show a total before gift items.
You could achive by doing a sum/math.

Anyway you can show a simple example of the sum/math ?

I’m lost at this.

All good.

Did some digging on the forum

Thanks for the guidance