refactor: filter for journal entries

This commit is contained in:
ruthra kumar 2023-07-04 09:06:08 +05:30
parent 86bac2cf52
commit d01f0f2e96

View File

@ -93,6 +93,9 @@ class PaymentReconciliation(Document):
def get_jv_entries(self):
condition = self.get_conditions()
if self.payment_name:
condition += f" and t1.name like '%%{self.payment_name}%%'"
if self.get("cost_center"):
condition += f" and t2.cost_center = '{self.cost_center}' "