Merge pull request #9732 from adityaduggal/gstin_NA
First 2 digit validation would disregard NA values
diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py
index 62de7a9..84e5f3e 100644
--- a/erpnext/regional/india/utils.py
+++ b/erpnext/regional/india/utils.py
@@ -19,6 +19,6 @@
if doc.gst_state:
doc.gst_state_number = state_numbers[doc.gst_state]
- if doc.gst_state_number != doc.gstin[:2]:
+ if doc.gstin != "NA" and doc.gst_state_number != doc.gstin[:2]:
frappe.throw(_("First 2 digits of GSTIN should match with State number {0}")
- .format(doc.gst_state_number))
\ No newline at end of file
+ .format(doc.gst_state_number))