ERPNext is GST Compatible

Hi @ajit.jain1, Our customers have many shipping addresses. Some are in state and some are out state. So we need to have this selection based on the Shipping Address rather than based on the Customer and Customer Group.

1 Like

@felix,
Sure. We will love to contribute. We are looking at right place to incorporate this change. We want to base it on the Company Address and Shipping Address state codes.

Thanks @rajagopalx for the format. However it is only working for the view. If we try to print it or convert to pdf, it is giving NIL for all the three taxes. Can you please help to resolve it.

-Amit

Hi Amit

He has mentioned that he is not able to get the print. We will need this for print though.
@umair how to (if possible) fetch child table values (IGST SGST CGST) rates from item master as a quick fix for now?
This is turning out to be the most important requirement for GST.
It is desirable to include rates instead of trying to “explain” to the authorities.

1 Like

Print format to get started will really help

Print format code

{%- for item in doc.items -%}
	{{ item.item_name }} :
	{% set iitem = frappe.get_doc("Item",item.item_code) %}
	{%- for itax in iitem.taxes -%}
		{%- for dtax in doc.taxes -%}
			{%- if dtax.account_head == itax.tax_type -%}
				{{ dtax.account_head }} @ {{ itax.tax_rate }}%
			{%- endif -%}
		{%- endfor -%}
	{%- endfor -%}<br />
{%- endfor -%}

IGST, SGST, CGST rate in invoice tax table should be kept ZERO. Tax rates for all 3 types of GST in each item must be set

Output: screen shot attached

1 Like

using @ItsRaichura’s code, one can display a lot of things in related to selling in a table.
See the following for example

HTML:

<style>
table {
    font-family: arial, sans-serif;
    border-collapse: collapse;
    width: 100%;
}

td, th {
    border: 1px solid #dddddd;
    text-align: left;
    padding: 8px;
}

tr:nth-child(even) {
    background-color: #dddddd;
}
</style>
</head>
<body>

<table>
  <tr>
    <th>Sr</th>
    <th>Item</th>
    <th>HSN</th>
    <th>Tax Rate</th>
    <th>Batch</th>
    <th>Expiry</th>
    <th>Quantity</th>
    <th>Rate</th>
    <th>Amount</th>
  </tr>
  {% for item in doc.items %}
    <tr>{% set this_item=frappe.get_doc("Item", item.item_code)%}
      <td>{{ item.idx }}</td>
      <td>{{ item.item_code}}<br>{{item.item_name}}</td>
      <td>{{ item.gst_hsn_code }}</td>
      <td>
	{% for itax in this_item.taxes %}
		{% for dtax in doc.taxes %}
			{% if dtax.account_head == itax.tax_type %}
				{{ '-'.join(dtax.account_head.split('-')[:-1]) }} @ {{ itax.tax_rate }}%
			{% endif %}
		{% endfor %}
	{% endfor %}
      </td>
      <td>{{ item.batch_no }}</td>
      <td>{{ frappe.db.get_value("Batch", item.batch_no, "expiry_date") }}</td>
      <td>{{ item.qty }} {{ item.stock_uom }}</td>
      <td>₹{{ item.rate }}</td>
      <td>₹{{ item.amount }}</td>
    </tr>
  {% endfor %}
</table>
<br/>
2 Likes

Hi does this work as is? I can’t seem to get it working.

For this you’ll need following things set up
→ Sales Tax templates defined for intra and inter state sales
See following for examples



→ HSN code and taxes set up in Items.
HSN:

Taxes:

→ GSTN Code set up in Company and Customer.
→ ERPNext version >= 8.22

3 Likes

Current implementation is just the first cut. We will push updates as we get more information on rates and other stuff.

All, closing this thread as its getting very long. Lets start a new thread for each GST issue.

Added a new print format for GST Tax Invoice in v8.3.0.

1 Like