refactor: filter for journal entries

(cherry picked from commit d01f0f2e96)
This commit is contained in:
ruthra kumar
2023-07-04 09:06:08 +05:30
committed by Mergify
parent c5080abd46
commit ab9da5281e

View File

@@ -92,6 +92,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}' "