From 1790bcc6d1901e8f52b3efbcd80801efb876019c Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 20 Feb 2025 15:28:13 +0530 Subject: [PATCH] fix: syntax error (cherry picked from commit 2f1e253e19109cd12d25a3e7d643344663bcf340) --- erpnext/projects/doctype/project/project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index be3190ec00d..8c762be5f6c 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -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