fix: syntax error

(cherry picked from commit 2f1e253e19)
This commit is contained in:
Mihir Kandoi
2025-02-20 15:28:13 +05:30
committed by Mergify
parent d0b8e0da8d
commit 1790bcc6d1

View File

@@ -327,9 +327,9 @@ class Project(Document):
"""select sum(base_net_amount)
from `tabSales Invoice Item` si_item
join `tabSales Invoice` si on si_item.parent = si.name
where (si_item.project = %s or (si_item.project is null and si.project = %s))
where (si_item.project = %(name)s or (si_item.project is null and si.project = %(name)s))
and si.docstatus = 1""",
self.name,
{"name": self.name},
)
self.total_billed_amount = total_billed_amount and total_billed_amount[0][0] or 0