fix: payment reconciliation tool consider cost_center for JV

We need to consider cost center in all four cases of get_conditions. I have removed check in if statement for get_invoices, get_payments, get_return_invoices as it is not required.
This commit is contained in:
Maharshi Patel
2022-09-25 23:24:59 +05:30
parent 09cd480c81
commit 9f988910b5

View File

@@ -332,7 +332,7 @@ class PaymentReconciliation(Document):
def get_conditions(self, get_invoices=False, get_payments=False, get_return_invoices=False):
condition = " and company = '{0}' ".format(self.company)
if self.get("cost_center") and (get_invoices or get_payments or get_return_invoices):
if self.get("cost_center"):
condition = " and cost_center = '{0}' ".format(self.cost_center)
if get_invoices: