commit | 866cf70d3ac2b8a17a9016e8cc00dca881461a61 | [log] [tgz] |
---|---|---|
author | Nabin Hait <nabinhait@gmail.com> | Mon Feb 22 21:35:00 2021 +0530 |
committer | Nabin Hait <nabinhait@gmail.com> | Mon Feb 22 21:35:00 2021 +0530 |
tree | dc16c6edc40b00598e5c57e33aa0a3e43c841144 | |
parent | 214951a9c612ce72f3a392079b89c135d7bb952c [diff] |
fix: validate pan
diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 5f07863..cb30605 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py
@@ -56,7 +56,7 @@ .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}")