Null issue fixed in gstr reports
This commit is contained in:
parent
9d7fe1f7cd
commit
f620dae8ca
@ -109,8 +109,8 @@ class Gstr1Report(object):
|
|||||||
customers = frappe.get_all("Customer", filters={"customer_type": self.customer_type})
|
customers = frappe.get_all("Customer", filters={"customer_type": self.customer_type})
|
||||||
|
|
||||||
if self.filters.get("type_of_business") == "B2B":
|
if self.filters.get("type_of_business") == "B2B":
|
||||||
conditions += " and invoice_type != 'Export' and is_return != 1 and customer in ('{0}')".\
|
conditions += """ and ifnull(invoice_type, '') != 'Export' and is_return != 1
|
||||||
format("', '".join([frappe.db.escape(c.name) for c in customers]))
|
and customer in ('{0}')""".format("', '".join([frappe.db.escape(c.name) for c in customers]))
|
||||||
|
|
||||||
if self.filters.get("type_of_business") in ("B2C Large", "B2C Small"):
|
if self.filters.get("type_of_business") in ("B2C Large", "B2C Small"):
|
||||||
b2c_limit = frappe.db.get_single_value('GSt Settings', 'b2c_limit')
|
b2c_limit = frappe.db.get_single_value('GSt Settings', 'b2c_limit')
|
||||||
|
@ -84,7 +84,7 @@ class Gstr2Report(Gstr1Report):
|
|||||||
conditions += opts[1]
|
conditions += opts[1]
|
||||||
|
|
||||||
if self.filters.get("type_of_business") == "B2B":
|
if self.filters.get("type_of_business") == "B2B":
|
||||||
conditions += "and invoice_type != 'Export' and is_return != 1 "
|
conditions += "and ifnull(invoice_type, '') != 'Export' and is_return != 1 "
|
||||||
|
|
||||||
elif self.filters.get("type_of_business") == "CDNR":
|
elif self.filters.get("type_of_business") == "CDNR":
|
||||||
conditions += """ and is_return = 1 """
|
conditions += """ and is_return = 1 """
|
||||||
|
Loading…
x
Reference in New Issue
Block a user