mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
fix: NoneType object has no attribute "gstin" (#16458)
* fix: NoneType object has no attribute "gstin" * fix: handle NoneType values
This commit is contained in:
committed by
Sagar Vora
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
|
from erpnext.controllers.taxes_and_totals import get_itemised_tax, get_itemised_taxable_amount
|
||||||
|
|
||||||
def validate_gstin_for_india(doc, method):
|
def validate_gstin_for_india(doc, method):
|
||||||
if not hasattr(doc, 'gstin'):
|
if not hasattr(doc, 'gstin') or not doc.gstin:
|
||||||
return
|
return
|
||||||
|
|
||||||
doc.gstin = doc.gstin.upper().strip()
|
doc.gstin = doc.gstin.upper().strip()
|
||||||
|
|||||||
Reference in New Issue
Block a user