fix: NoneType object has no attribute "gstin" (#16458)
* fix: NoneType object has no attribute "gstin" * fix: handle NoneType values
This commit is contained in:
parent
33bc3f3309
commit
237a871f17
@ -5,7 +5,7 @@ from erpnext.regional.india import states, state_numbers
|
||||
from erpnext.controllers.taxes_and_totals import get_itemised_tax, get_itemised_taxable_amount
|
||||
|
||||
def validate_gstin_for_india(doc, method):
|
||||
if not hasattr(doc, 'gstin'):
|
||||
if not hasattr(doc, 'gstin') or not doc.gstin:
|
||||
return
|
||||
|
||||
doc.gstin = doc.gstin.upper().strip()
|
||||
|
Loading…
x
Reference in New Issue
Block a user