I need some help regarding customization.
As the current setting, GST details are in Address Doctype. ( Party GSTIN, GST State, GST State Number ).
I need these three fields in Customer Doctype. I can add the custom field and add all these three fields but I can not add ‘name’ for each field i.e. for GSTIN there is the name ‘gstin’, for GST State name is ‘gst_state’ and for GST State Number name is ‘gst_state_number’.
@Meet_Patel, I can’t understand you mean like this? Label, Type, Name ?
please elaborate more on what do you want to achieve?
I have updated it. Two GST fields in Customer Doctype. ( Party GSTIN, GST State )
But I am facing issues with GST Number validation. it accepts the wrong GST format also.
You will have to write the validation or call a part of the code that does it. Just adding a custom field doesn’t do anything by itself:
from erpnext.regional.india import states, state_numbers
from erpnext.controllers.taxes_and_totals import get_itemised_tax, get_itemised_taxable_amount
from erpnext.controllers.accounts_controller import get_taxes_and_charges
from erpnext.hr.utils import get_salary_assignment
from erpnext.payroll.doctype.salary_structure.salary_structure import make_salary_slip
from erpnext.regional.india import number_state_mapping
from six import string_types
from erpnext.accounts.general_ledger import make_gl_entries
from erpnext.accounts.utils import get_account_currency
def validate_gstin_for_india(doc, method):
if hasattr(doc, 'gst_state') and doc.gst_state:
doc.gst_state_number = state_numbers[doc.gst_state]
if not hasattr(doc, 'gstin') or not doc.gstin:
gst_category = 
link_doctype = doc.links.get("link_doctype")
link_name = doc.links.get("link_name")