Jump to content

Display Level 2 Tax in Invoice

Recommended Posts


I've setup level 1 and Level 2 tax for export countries. I want to show both the taxes. Right now Calculations are good but Level 2 Tax is now showing up in invoice view or PDF.

Screenshot: http://prntscr.com/jm9bcn (same thing for PDF invoice)

However, L1 and L2 tax are showing up correctly for My country taxes. Screenshot: http://prntscr.com/jm9drn

I've set

18% IGST as a Level 1 tax and

-18% IGST Exempted as a Level 2 tax

(exports are exempted and we have to mention it)


I checked template files, both have tax2 code there.

I'm using 7.4.2 version, template Six.


Link to comment
Share on other sites

15 hours ago, vinod41 said:

I checked template files, both have tax2 code there.

the problem is that WHMCS is passing the negative $taxrate2 value to the invoice as 0... therefore the if statement isn't triggered... also, it nulls the $taxname2 variable... I really don't think WHMCS expected it's users to ever use negative tax rates. :)

the partial good news is that the $taxrate2 value is stored correctly in the database, so you can pull that value out using a hook...


but the taxname2 isn't, so you'd have to make an educated guess with the query... if you only have one -18% L2 tax rate, then that's simple enough... if there are multiple, it could be a nightmare!

also, you couldn't use a hook on the invoicepdf, so you'd have to embed the query into the file itself... and you'll run into a similar issue with the email invoice as that won't mention negative tax rates in it's output either.

there are a few GST products in Marketplace and it might be worth checking them out to see if they have a solution for this problem - otherwise, you're going to end up having to make a lot of modifications to get this to work.

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for tip Brian.

for now, I've renamed the tax1 name to Exempted. I've 1 -ve tax for each country.

Total = $ 100
Tax1 Exempted = 18%
Tax2 (exempted)= -18%
Grand Total $ 100


I'll see how my CA responds to it, else action hook or query will be a solution as you suggested. 

In Marketplace, there are 2 addons for India GST. both seems not updated for quiet a long. Guess I'll stick to what I'm doing for now.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated