GSTR-1 minor fixes

This commit is contained in:
Nabin Hait 2018-08-30 16:16:35 +05:30
parent e3f855498f
commit 2390da647f
2 changed files with 3 additions and 2 deletions

View File

@ -82,7 +82,8 @@ def get_place_of_supply(out, doctype):
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)

View File

@ -198,7 +198,7 @@ class Gstr1Report(object):
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"])