fix(UAE VAT 201): fix helper

This commit is contained in:
Mohammad Hasnain 2020-10-29 00:07:52 +05:30
parent 08846f6b11
commit bf261a6c39

View File

@ -235,9 +235,9 @@ def get_reverse_charge_recoverable_tax(filters):
def get_conditions_join(filters): def get_conditions_join(filters):
"""The conditions to be used to filter data to calculate the total vat.""" """The conditions to be used to filter data to calculate the total vat."""
conditions = "" conditions = ""
for opts in (("company", " and `tabPurchase Invoice`.company=%(company)s"), for opts in (("company", " and p.company=%(company)s"),
("from_date", " and `tabPurchase Invoice`.posting_date>=%(from_date)s"), ("from_date", " and p.posting_date>=%(from_date)s"),
("to_date", " and `tabPurchase Invoice`.posting_date<=%(to_date)s")): ("to_date", " and p.posting_date<=%(to_date)s")):
if filters.get(opts[0]): if filters.get(opts[0]):
conditions += opts[1] conditions += opts[1]
return conditions return conditions