Displaying a single Tax row from the Sales invoice in the print format


I have setup the Sales Invoices where my first tax component (NBT) is considered as included in the Unit Price, and the second tax component (VAT) is calculated from the unit price.

Unit Price = actual item price + NBT (2%)
VAT = Unit Price x 15%
Grand total = Unit Price + VAT

Now the problem is in the Sales invoice that I print/PDF, needs to show only VAT component from the above table. I tried the variables that are available image
but they return the total tax value which includes the NBT, How can I please get the VAT value only to the print format?


Is there anyone who can share a solution for this ? Thanks

Hi, please add Sales Taxes and Charges table to the print format and check Select Columns


I did that, although this shows the correct Tax breakdown, I dont want to show the first tax component (NBT) separately as its already included in the unit price.

Is there some way I can display only the 2nd row (2nd tax component - VAT ) in the sales invoice, hiding the 1st tax component?

hi, I don’t think that it’s possible to show only second row it this print format.
you can create custom print format, where you can add html and css and i suppose there is possible to show only second row


Well I think I can add a custom HTML field to the print format to customise, but my only issue is that I dont know how to refer to the “Amount” column in the second row of the tax table. If you are referring to a field I can simply call it by e.g. {{doc.tax_id}} or use frappe.db.get_value, but in this case as its inside a table that dynamically calculates the Tax rate, I don’t know how to call that value.

Any Idea about this pls?

I don’t think we speak about the same print format.
When you’ll write HTML, you use: (it’s example)

for tax in doc.taxes
      if tax.id != 1
           {{ tax.name }} {{ tax.amount }}

Here is my print format, where you should created html page


Thanks for the info. I know what you meant. Now I’m trying to figure out the html code for this requirement.