GSTR-1 minor fixes
diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py
index 9440aff..eccce2b 100644
--- a/erpnext/regional/india/utils.py
+++ b/erpnext/regional/india/utils.py
@@ -82,7 +82,8 @@
if address_name:
address = frappe.db.get_value("Address", address_name, ["gst_state", "gst_state_number"], as_dict=1)
- return cstr(address.gst_state_number) + "-" + cstr(address.gst_state)
+ if address.gst_state and address.gst_state_number:
+ return cstr(address.gst_state_number) + "-" + cstr(address.gst_state)
def get_regional_address_details(out, doctype, company):
out.place_of_supply = get_place_of_supply(out, doctype)
diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py
index 27390d4..edd5519 100644
--- a/erpnext/regional/report/gstr_1/gstr_1.py
+++ b/erpnext/regional/report/gstr_1/gstr_1.py
@@ -198,7 +198,7 @@
def get_gst_accounts(self):
self.gst_accounts = frappe._dict()
- gst_settings_accounts = frappe.get_list("GST Account",
+ gst_settings_accounts = frappe.get_all("GST Account",
filters={"parent": "GST Settings", "company": self.filters.company},
fields=["cgst_account", "sgst_account", "igst_account", "cess_account"])