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})
|
||||
|
||||
if self.filters.get("type_of_business") == "B2B":
|
||||
conditions += " and invoice_type != 'Export' and is_return != 1 and customer in ('{0}')".\
|
||||
format("', '".join([frappe.db.escape(c.name) for c in customers]))
|
||||
conditions += """ and ifnull(invoice_type, '') != 'Export' and is_return != 1
|
||||
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"):
|
||||
b2c_limit = frappe.db.get_single_value('GSt Settings', 'b2c_limit')
|
||||
|
@ -84,7 +84,7 @@ class Gstr2Report(Gstr1Report):
|
||||
conditions += opts[1]
|
||||
|
||||
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":
|
||||
conditions += """ and is_return = 1 """
|
||||
|
Loading…
x
Reference in New Issue
Block a user