diff --git a/erpnext/buying/doctype/supplier/regional/india.js b/erpnext/buying/doctype/supplier/regional/india.js new file mode 100644 index 0000000000..bd710e0df7 --- /dev/null +++ b/erpnext/buying/doctype/supplier/regional/india.js @@ -0,0 +1,3 @@ +{% include "erpnext/regional/india/party.js" %} + +erpnext.setup_gst_reminder_button('Supplier'); \ No newline at end of file diff --git a/erpnext/config/accounts.py b/erpnext/config/accounts.py index a17679e116..6d16e9202e 100644 --- a/erpnext/config/accounts.py +++ b/erpnext/config/accounts.py @@ -201,6 +201,10 @@ def get_data(): { "label": _("Goods and Services Tax (GST India)"), "items": [ + { + "type": "doctype", + "name": "GST Settings", + }, { "type": "doctype", "name": "GST HSN Code", diff --git a/erpnext/docs/assets/img/regional/india/gst-reminder-email.png b/erpnext/docs/assets/img/regional/india/gst-reminder-email.png new file mode 100644 index 0000000000..97bcd2488b Binary files /dev/null and b/erpnext/docs/assets/img/regional/india/gst-reminder-email.png differ diff --git a/erpnext/docs/assets/img/regional/india/gst-settings.png b/erpnext/docs/assets/img/regional/india/gst-settings.png new file mode 100644 index 0000000000..c7f59adb96 Binary files /dev/null and b/erpnext/docs/assets/img/regional/india/gst-settings.png differ diff --git a/erpnext/docs/assets/img/regional/india/gstin-portal-update.png b/erpnext/docs/assets/img/regional/india/gstin-portal-update.png new file mode 100644 index 0000000000..28302c875f Binary files /dev/null and b/erpnext/docs/assets/img/regional/india/gstin-portal-update.png differ diff --git a/erpnext/docs/user/manual/en/regional/india/gst-remimders.md b/erpnext/docs/user/manual/en/regional/india/gst-remimders.md new file mode 100644 index 0000000000..58526c4135 --- /dev/null +++ b/erpnext/docs/user/manual/en/regional/india/gst-remimders.md @@ -0,0 +1,21 @@ +# Sending GST Reminders + +You can send email reminders to your Customers and Suppliers so that they can directly add or update their GSTIN numbers + +To send GSTIN Reminders, you can either open the Customer / Supplier record or **GST Settings** + + + +Here you can click on the "Send GSTIN Update Reminders" button to send email reminders to all your customers + +### Updating GSTIN + +Your customers will receive an email asking them to update their GSTIN and that email will link them to a portal page: + + + +Here they can update their GSTIN and it will automatically be added to your customer GSTIN record. + +#### Sample GSTIN Reminder Email + + diff --git a/erpnext/docs/user/manual/en/regional/india/gst-setup.md b/erpnext/docs/user/manual/en/regional/india/gst-setup.md new file mode 100644 index 0000000000..48e5066611 --- /dev/null +++ b/erpnext/docs/user/manual/en/regional/india/gst-setup.md @@ -0,0 +1,67 @@ +# GST Features in ERPNext + +### 1. Setting up GSTIN + +GST Law requires that you maintain the GSTIN number for all your suppliers and vendors. In ERPNext, GSTIN is linked to the **Address** + + + +**GST for your Company Address** + +You also need to set the Address for your own Company and your Company's GST Number + +Go to the Company master and add the GSTIN to your default address. + + + +### 2. Setting up HSN Codes + +According to the GST Law, your itemised invoices must contain the HSN Code related to that Item. ERPNext comes pre-installed with all 12,000+ HSN Codes so that you can easily select the relevant HSN Code in your Item + + + +### 3. Making Tax Masters + +To setup Billing in GST, you need to create 3 Tax Accounts for the various GST reporting heads CGST - Central GST, SGST - State GST, IGST - Inter-state GST + +Go to your **Chart of Accounts**, under the Duties and Taxes head of your account, create 3 Accounts + +**Note:** Usually the rate in CGST and SGST is half of IGST. For example if most of your items are billed at 18%, then create IGST at 18%, CGST and SGST at 9% each. + + + +### 4. Make Tax Templates + +You will have have to make two tax templates for both your sales and purchase, one for in state sales and other for out of state sales. + +In your **In State GST** template, select 2 accounts, SGST and CGST + + + +In your **Out of State GST** template, select IGST + +### 5. Making GST Ready Invoices + +If you have setup the GSTIN of your Customers and Suppliers, and your tax template, you are ready to go for making GST Ready Invoices! + +For **Sales Invoice**, + +1. Select the correct Customer and Item and the address where the transaction will happen. +2. Check if the GSTIN of your Company and Supplier have been correctly set. +3. Check if the HSN Number has been set in the Item +4. Select the the **In State GST** or **Out of State GST** template that you have created based on the type of transaction +5. Save and Submit the Invoice + + + +### Reports + +ERPNext comes with most of your reports you need to prepare your GST Returns. Go to Accounts > GST India head for the list. + + + +You can check the impact of your invoice in the **GST Sales Register** and **GST Itemised Sales Register** + + + + diff --git a/erpnext/docs/user/manual/en/regional/india/index.md b/erpnext/docs/user/manual/en/regional/india/index.md index 16422070ca..4207a2f9af 100644 --- a/erpnext/docs/user/manual/en/regional/india/index.md +++ b/erpnext/docs/user/manual/en/regional/india/index.md @@ -2,70 +2,4 @@ As of 2017, India will fall under the new GST (Goods and Services Tax) regime and ERPNext makes it easy for users to track the details of its Supplier and Customers across Invoices and make the required reports. -## GST Features in ERPNext - -### 1. Setting up GSTIN - -GST Law requires that you maintain the GSTIN number for all your suppliers and vendors. In ERPNext, GSTIN is linked to the **Address** - - - -**GST for your Company Address** - -You also need to set the Address for your own Company and your Company's GST Number - -Go to the Company master and add the GSTIN to your default address. - - - -### 2. Setting up HSN Codes - -According to the GST Law, your itemised invoices must contain the HSN Code related to that Item. ERPNext comes pre-installed with all 12,000+ HSN Codes so that you can easily select the relevant HSN Code in your Item - - - -### 3. Making Tax Masters - -To setup Billing in GST, you need to create 3 Tax Accounts for the various GST reporting heads CGST - Central GST, SGST - State GST, IGST - Inter-state GST - -Go to your **Chart of Accounts**, under the Duties and Taxes head of your account, create 3 Accounts - -**Note:** Usually the rate in CGST and SGST is half of IGST. For example if most of your items are billed at 18%, then create IGST at 18%, CGST and SGST at 9% each. - - - -### 4. Make Tax Templates - -You will have have to make two tax templates for both your sales and purchase, one for in state sales and other for out of state sales. - -In your **In State GST** template, select 2 accounts, SGST and CGST - - - -In your **Out of State GST** template, select IGST - -### 5. Making GST Ready Invoices - -If you have setup the GSTIN of your Customers and Suppliers, and your tax template, you are ready to go for making GST Ready Invoices! - -For **Sales Invoice**, - -1. Select the correct Customer and Item and the address where the transaction will happen. -2. Check if the GSTIN of your Company and Supplier have been correctly set. -3. Check if the HSN Number has been set in the Item -4. Select the the **In State GST** or **Out of State GST** template that you have created based on the type of transaction -5. Save and Submit the Invoice - - - -### Reports - -ERPNext comes with most of your reports you need to prepare your GST Returns. Go to Accounts > GST India head for the list. - - - -You can check the impact of your invoice in the **GST Sales Register** and **GST Itemised Sales Register** - - - - +{index} \ No newline at end of file diff --git a/erpnext/docs/user/manual/en/regional/india/index.txt b/erpnext/docs/user/manual/en/regional/india/index.txt new file mode 100644 index 0000000000..8d72c56f43 --- /dev/null +++ b/erpnext/docs/user/manual/en/regional/india/index.txt @@ -0,0 +1,2 @@ +gst-setup +gst-reminders \ No newline at end of file diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 181cfcea9a..706638a20f 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -407,4 +407,4 @@ erpnext.patches.v8_0.create_domain_docs #16-05-2017 erpnext.patches.v8_0.update_sales_cost_in_project erpnext.patches.v8_0.save_system_settings erpnext.patches.v8_1.delete_deprecated_reports -erpnext.patches.v8_1.setup_gst_india +erpnext.patches.v8_1.setup_gst_india #2017-06-27 diff --git a/erpnext/patches/v8_1/setup_gst_india.py b/erpnext/patches/v8_1/setup_gst_india.py index 9e54815a13..d8c87f9a6a 100644 --- a/erpnext/patches/v8_1/setup_gst_india.py +++ b/erpnext/patches/v8_1/setup_gst_india.py @@ -17,9 +17,10 @@ def execute(): def send_gst_update_email(): message = """Hello, -
ERPNext is now GST Ready.
+ERPNext is now GST Ready!
-To start making GST Invoices from 1st of July, you just need to create new Tax Accounts, Templates and update your Customer's and Supplier's GST Numbers.
+To start making GST Invoices from 1st of July, you just need to create new Tax Accounts, +Templates and update your Customer's and Supplier's GST Numbers.
Please refer {gst_document_link} to know more about how to setup and implement GST in ERPNext.
diff --git a/erpnext/regional/doctype/gst_settings/__init__.py b/erpnext/regional/doctype/gst_settings/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/regional/doctype/gst_settings/gst_settings.js b/erpnext/regional/doctype/gst_settings/gst_settings.js new file mode 100644 index 0000000000..11301f0232 --- /dev/null +++ b/erpnext/regional/doctype/gst_settings/gst_settings.js @@ -0,0 +1,25 @@ +// Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.ui.form.on('GST Settings', { + refresh: function(frm) { + frm.add_custom_button('Send GST Update Reminder', () => { + return new Promise((resolve) => { + return frappe.call({ + method: 'erpnext.regional.doctype.gst_settings.gst_settings.send_reminder' + }).always(() => { resolve(); }); + }); + }); + + $(frm.fields_dict.gst_summary.wrapper).empty().html( + `Total Addresses | ${frm.doc.__onload.data.total_addresses} | +
Total Addresses with GST | ${frm.doc.__onload.data.total_addresses_with_gstin} | +
Hello,
+Please help us send you GST Ready Invoices.
++ + Click on the here to update your GSTIN Number in our system + +
+
+ Get your GST Ready ERP system at https://erpnext.com
+
+ ERPNext is a free and open source ERP system.
+
+ Invalid GSTIN +
++ Edit Again +
+{% elif updated %} ++ GSTIN Updated +
++ Edit Again +
+{% else %} +Please update your GSTIN for us to issue correct tax invoice
+ +{% endif %} +{% endblock %} diff --git a/erpnext/templates/pages/regional/india/update_gstin.py b/erpnext/templates/pages/regional/india/update_gstin.py new file mode 100644 index 0000000000..0d4ec37ef7 --- /dev/null +++ b/erpnext/templates/pages/regional/india/update_gstin.py @@ -0,0 +1,40 @@ +import frappe +from frappe import _ + +def get_context(context): + context.no_cache = 1 + party = frappe.form_dict.party + + try: + update_gstin(context) + except frappe.ValidationError: + context.invalid_gstin = 1 + + party_type = 'Customer' + party = frappe.db.get_value('Customer', party) + + if not party: + party_type = 'Supplier' + party = frappe.db.get_value('Supplier', party) + + if not party: + frappe.throw(_("Not Found"), frappe.DoesNotExistError) + + context.party = frappe.get_doc(party_type, party) + context.party.onload() + + +def update_gstin(context): + dirty = False + for key, value in frappe.form_dict.items(): + if key != 'party': + address_name = frappe.get_value('Address', key) + if address_name: + address = frappe.get_doc('Address', address_name) + address.gstin = value + address.save(ignore_permissions=True) + dirty = True + + if dirty: + frappe.db.commit() + context.updated = True