[minor] use party_name instead of party and save GSTIN in uppercase
diff --git a/erpnext/templates/pages/regional/india/update_gstin.py b/erpnext/templates/pages/regional/india/update_gstin.py
index 0d4ec37..5dc4316 100644
--- a/erpnext/templates/pages/regional/india/update_gstin.py
+++ b/erpnext/templates/pages/regional/india/update_gstin.py
@@ -11,16 +11,16 @@
context.invalid_gstin = 1
party_type = 'Customer'
- party = frappe.db.get_value('Customer', party)
+ party_name = frappe.db.get_value('Customer', party)
- if not party:
+ if not party_name:
party_type = 'Supplier'
- party = frappe.db.get_value('Supplier', party)
+ party_name = frappe.db.get_value('Supplier', party)
- if not party:
+ if not party_name:
frappe.throw(_("Not Found"), frappe.DoesNotExistError)
- context.party = frappe.get_doc(party_type, party)
+ context.party = frappe.get_doc(party_type, party_name)
context.party.onload()
@@ -31,7 +31,7 @@
address_name = frappe.get_value('Address', key)
if address_name:
address = frappe.get_doc('Address', address_name)
- address.gstin = value
+ address.gstin = value.upper()
address.save(ignore_permissions=True)
dirty = True