Mayur Kurhade
Mayur Kurhade

Reputation: 1

Spillting Tax & Fetching Same Tax Labels In Woocommerce

As per my country's tax system, I have added two tax classes. 5% & 18%. Standard rate is empty so I can use it for shipping. In my country, the tax system works this way. For example, consider one class only.

If the customer billing address state is DIFFERENT from the business state, it will be called IGST. So, the order will show 18% IGST.

Now if the customer billing address state is SAME as the business state, it gets divided into two parts, SGST & CGST. So the total tax will be divided equally as 9% CGST & 9% SGST, making it total 18%.

Same will apply for every tax class. I have created two dummy orders by considering the above mentioned scenario. Checkout those in images.

5% Rate Setup - https://snipboard.io/HJgLBu.jpg 18% Rate Setup - https://snipboard.io/e2Q3Ku.jpg

Orders reflecting the same.

Order with different state than business state - https://snipboard.io/w12sJO.jpg Order with same state as business state - https://snipboard.io/d8QFme.jpg

Now, I am facing difficulties in two things while working on custom invoice template for Woocommerce PDF Invoices & Packaging Slips.

  1. Fetching respective tax label in front of tax rates. e.g. IGST / CGST / SGST . These values are already stored in Woocommerce tax rates.
  2. For the second scenario, for orders in same state, in pdf invoice it show rates as 9%, 9% (for 18% class)in single column. I want to print those outputs in two separate rows instead.

For this, logic may be like if customer billing state is equal to business state, then it will print/split tax rate in two columns like this https://snipboard.io/l3gbJe.jpg

For different state, same invoice will be https://snipboard.io/SwAGVW.jpg

Upvotes: 0

Views: 462

Answers (1)

tylor davis
tylor davis

Reputation: 1

I can answer the 2nd part only. Select the Vat and on the row label write gst. then select the comination option from the botton dont click the single total. It will bifurcate your GST in 2-parts. suppose you have 18% GST and we want to div it 9% as cgst and 9% as sgst. then will will divide the gst as 9% in equal parts. On the tax rate select static text and then write the label as Tax rate and value as 18% as in this case.

Hope this will help you out.

Regards,

Tylor.

Upvotes: 0

Related Questions