fix: add validation for calculate ageing with filter for summary and other reports

This commit is contained in:
l0gesh29
2025-06-12 16:59:52 +05:30
parent 153a70cd70
commit c630aa9fe8

View File

@@ -49,7 +49,8 @@ class ReceivablePayableReport:
self.filters.report_date = getdate(self.filters.report_date or nowdate())
self.age_as_on = (
getdate(nowdate())
if self.filters.calculate_ageing_with == "Today Date"
if "calculate_ageing_with" not in self.filters
or self.filters.calculate_ageing_with == "Today Date"
else self.filters.report_date
)