From 8cf9934b93a835ae9663cf3bfb9d1cad8792cabf Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 4 May 2012 12:52:56 +0530 Subject: [PATCH] Trend analyzer issue fixed --- .../search_criteria/trend_analyzer/trend_analyzer.js | 8 +------- .../search_criteria/trend_analyzer/trend_analyzer.py | 8 +------- .../search_criteria/trend_analyzer/trend_analyzer.txt | 6 +++--- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.js b/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.js index dd3e75082b..53de71cb21 100644 --- a/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.js +++ b/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.js @@ -80,14 +80,8 @@ report.get_query = function() { add_col = ''; add_tables = ''; sp_cond = ''; - if(trans == 'Sales Invoice') trans = 'Sales Invoice'; - else if(trans == 'Purchase Invoice') trans = 'Purchase Invoice'; - trans_det = trans+' Detail' - - if(trans == 'Sales Invoice') trans_det = 'Sales Invoice Item'; - else if(trans == 'Purchase Invoice') trans_det = 'Purchase Invoice Item'; - else if(trans == 'Purchase Order') trans_det = 'Purchase Order Item'; + trans_det = trans+' Item' if(order_type != '') add_code += ' AND t1.order_type = '+order_type; diff --git a/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.py b/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.py index 278cfd6c78..4a7d0939c6 100644 --- a/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.py +++ b/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.py @@ -39,14 +39,8 @@ project = filter_values.get('project') # ********************************************* SET DEFAULTS ************************************************** # Details Table # -------------- -if trans == 'Sales Invoice': trans = 'Sales Invoice' -elif trans == 'Purchase Invoice': trans = 'Purchase Invoice' -trans_det = trans+' Detail' - -if trans == 'Sales Invoice': trans_det = 'Sales Invoice Item' -elif trans == 'Purchase Invoice': trans_det = 'Purchase Invoice Item' -elif trans == 'Purchase Order': trans_det = 'Purchase Order Item' +trans_det = trans+' Item' col_names, query_val = get_obj('Trend Analyzer Control').get_single_year_query_value(fiscal_year, period, trans, trans_det) query_val += 'SUM(t2.qty), SUM(t2.amount)' diff --git a/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.txt b/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.txt index 93a60e05c2..a1cf3e4ae1 100644 --- a/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.txt +++ b/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-04-03 12:49:53', + 'creation': '2012-04-23 12:46:00', 'docstatus': 0, - 'modified': '2012-04-03 12:49:53', + 'modified': '2012-05-04 12:49:43', 'modified_by': u'Administrator', 'owner': u'saumil@webnotestech.com' }, @@ -30,4 +30,4 @@ 'doctype': 'Search Criteria', 'name': u'trend_analyzer' } -] +] \ No newline at end of file