From 866cf70d3ac2b8a17a9016e8cc00dca881461a61 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 22 Feb 2021 21:35:00 +0530 Subject: [PATCH] fix: validate pan --- erpnext/regional/india/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 5f078632d6..cb30605291 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -56,7 +56,7 @@ def validate_gstin_for_india(doc, method): .format(doc.gst_state_number)) def validate_pan_for_india(doc, method): - if doc.get('country') != 'India': + if doc.get('country') != 'India' or not doc.pan: return p = re.compile("[A-Z]{5}[0-9]{4}[A-Z]{1}")