I have created Complementary attributes (lines) for the Invoice Module, I’m trying to get a column with each line item’s subtotal tax value. I have tried the following formula but I’m getting the wrong values.
I just need a column with Tax Value = Total (inc. tax) - Total (excl.)
But when I use the following code, I’m not getting the right results
round($object->total_ttc - $object->total_ht, 2)
Here is the result of the PDF being created using this code.
Yes I’m using Number Word Module for my PDF template.
But I’m not using any Roundoff logic. The line that you see is a discount line item used to have a round off behavior.
Even I am trying to find the right method for automatic round off for my invoice. Limits and Accuracy didn’t work for me the way I need it or maybe I couldn’t configure it right… But I’m open hear the right way to achieve this.
I have updated my formula to include total_tva, considering if you are using all 3 layers of taxes which is applicable for India region (IGST, CGST, SGST)