From ed8157354511ce20dc94088f41708aefd33cfbad Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 6 Nov 2012 15:28:15 +0530 Subject: [PATCH] gross profit report fix --- selling/search_criteria/gross_profit/gross_profit.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selling/search_criteria/gross_profit/gross_profit.sql b/selling/search_criteria/gross_profit/gross_profit.sql index 91b7ea6302..ce176c2ca9 100644 --- a/selling/search_criteria/gross_profit/gross_profit.sql +++ b/selling/search_criteria/gross_profit/gross_profit.sql @@ -8,7 +8,8 @@ WHERE dn_item.parent = dn.name AND dn.docstatus = 1 AND dn.name like '%(name)s%%' - AND dn_item.item_code like '%(item_code)s%%' + AND ifnull(dn_item.item_code, '') like '%(item_code)s%%' + AND ifnull(dn.project_name, '') like '%(project_name)s%%' AND dn.posting_date >= '%(posting_date)s' AND dn.posting_date <= '%(posting_date1)s' ORDER BY dn.name DESC \ No newline at end of file