mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-09 16:12:53 +00:00
restructured erpnext and deleted unwanted
This commit is contained in:
47
selling/search_criteria/follow_up_report/follow_up_report.js
Normal file
47
selling/search_criteria/follow_up_report/follow_up_report.js
Normal file
@@ -0,0 +1,47 @@
|
||||
report.customize_filters = function() {
|
||||
this.mytabs.items['Select Columns'].hide()
|
||||
this.mytabs.items['More Filters'].hide()
|
||||
|
||||
this.hide_all_filters();
|
||||
this.add_filter({fieldname:'follow_up_on', label:'Follow up on', fieldtype:'Select', options:''+NEWLINE+'Lead'+NEWLINE+'Enquiry'+NEWLINE+'Quotation',ignore : 1,parent:'Follow up', in_first_page : 1, single_select :1});
|
||||
this.add_filter({fieldname:'lead_name', label:'Lead', fieldtype:'Link', options:'Lead', report_default:'', ignore : 1, parent:'Follow up', in_first_page : 1});
|
||||
this.add_filter({fieldname:'enq_name', label:'Enquiry', fieldtype:'Link', options:'Enquiry', report_default:'', ignore : 1, parent:'Follow up', in_first_page : 1});
|
||||
this.add_filter({fieldname:'qtn_name', label:'Quotation', fieldtype:'Link', options:'Quotation', report_default:'', ignore : 1, parent:'Follow up', in_first_page : 1});
|
||||
|
||||
this.get_filter('Follow up', 'Follow up type').set_as_single();
|
||||
this.set_filter_properties('Follow up', 'Follow up by', {filter_hide:0, in_first_page : 1});
|
||||
this.set_filter_properties('Follow up', 'Follow up type', {filter_hide:0, in_first_page : 1});
|
||||
this.set_filter_properties('Follow up', 'From Date', {filter_hide:0, in_first_page : 1});
|
||||
this.set_filter_properties('Follow up', 'To Date', {filter_hide:0, in_first_page : 1});
|
||||
|
||||
this.orig_sort_list = [['Date','`tabFollow up`.`date`'],['Document Type','`tabFollow up`.`parenttype`'],['Document','`tabFollow up`.`parent`'],['Follow Up By','`tabFollow up`.`follow_up_by`'],['Follow Up Type','`tabFollow up`.`follow_up_type`']];
|
||||
}
|
||||
|
||||
|
||||
report.get_query = function() {
|
||||
var lead_id = this.filter_fields_dict['Follow up'+FILTER_SEP+'Lead'].get_value();
|
||||
var enq_id = this.filter_fields_dict['Follow up'+FILTER_SEP+'Enquiry'].get_value();
|
||||
var quo_id = this.filter_fields_dict['Follow up'+FILTER_SEP+'Quotation'].get_value();
|
||||
|
||||
var follow_up_on = this.filter_fields_dict['Follow up'+FILTER_SEP+'Follow up on'].get_value();
|
||||
var follow_up_by = this.filter_fields_dict['Follow up'+FILTER_SEP+'Follow up by'].get_value();
|
||||
|
||||
var on_type = this.filter_fields_dict['Follow up'+FILTER_SEP+'Follow up type'].get_value();
|
||||
var from_date = this.filter_fields_dict['Follow up'+FILTER_SEP+'From Date'].get_value();
|
||||
var to_date = this.filter_fields_dict['Follow up'+FILTER_SEP+'To Date'].get_value();
|
||||
|
||||
var cond = 'parenttype IN ("Lead","Enquiry","Quotation")';
|
||||
if(follow_up_on) cond = 'parenttype = "'+follow_up_on+'"';
|
||||
|
||||
if((follow_up_on == 'Lead' && lead_id) || (lead_id && !follow_up_on)) cond +=' AND parent = "'+lead_id+'"';
|
||||
if((follow_up_on == 'Enquiry' && enq_id) || (enq_id && !follow_up_on)) cond +=' AND parent = "'+enq_id+'"';
|
||||
if((follow_up_on == 'Quotation' && quo_id) || (quo_id && !follow_up_on)) cond +=' AND parent = "'+quo_id+'"';
|
||||
|
||||
if(on_type) cond += ' AND follow_up_type ="'+on_type+'"';
|
||||
if(from_date) cond += ' AND date >="'+from_date+'"';
|
||||
if(to_date) cond += ' AND date <="'+to_date+'"';
|
||||
if(follow_up_by) cond += ' AND follow_up_by = "'+follow_up_by+'"';
|
||||
|
||||
var q ='SELECT distinct `tabFollow up`.`parenttype`, `tabFollow up`.`parent`, `tabFollow up`.`date`, `tabFollow up`.`notes`, `tabFollow up`.`follow_up_type`, `tabFollow up`.`follow_up_by` FROM `tabFollow up` WHERE '+cond+' ORDER BY '+sel_val(this.dt.sort_sel)+' '+this.dt.sort_order;
|
||||
return q;
|
||||
}
|
||||
16
selling/search_criteria/follow_up_report/follow_up_report.py
Normal file
16
selling/search_criteria/follow_up_report/follow_up_report.py
Normal file
@@ -0,0 +1,16 @@
|
||||
follow_up_on = filter_values.get('follow_up_on')
|
||||
|
||||
cols = [['Document Type', 'Data', '150px', '']
|
||||
,['Document', 'Link', '150px', follow_up_on]
|
||||
,['Follow Up Date', 'Date', '150px', '']
|
||||
,['Description','Data','300px','']
|
||||
,['Follow Up Type','Data','150px','']
|
||||
,['Follow Up By','Link','150px','Sales Person']
|
||||
]
|
||||
|
||||
for c in cols:
|
||||
colnames.append(c[0])
|
||||
coltypes.append(c[1])
|
||||
colwidths.append(c[2])
|
||||
coloptions.append(c[3])
|
||||
col_idx[c[0]] = len(colnames)-1
|
||||
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
'add_col': None,
|
||||
'add_cond': None,
|
||||
'add_tab': None,
|
||||
'columns': 'Lead\x01ID,Follow up\x01Date,Follow up\x01Notes,Follow up\x01Follow up type',
|
||||
'creation': '2010-08-13 11:09:21',
|
||||
'criteria_name': 'Follow-up Report',
|
||||
'custom_query': '',
|
||||
'description': None,
|
||||
'dis_filters': None,
|
||||
'disabled': None,
|
||||
'doc_type': 'Follow up',
|
||||
'docstatus': 0,
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Lead\x01Status':'','Lead\x01Source':'','Lead\x01Lead Type':'','Lead\x01Rating':'','Lead\x01Market Segment':'','Lead\x01Fiscal Year':''}",
|
||||
'graph_series': None,
|
||||
'graph_values': None,
|
||||
'group_by': None,
|
||||
'idx': None,
|
||||
'modified': '2010-08-12 16:33:19',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'CRM',
|
||||
'name': 'follow-up_report',
|
||||
'owner': 'ashwini@webnotestech.com',
|
||||
'page_len': 50,
|
||||
'parent': None,
|
||||
'parent_doc_type': 'Lead',
|
||||
'parentfield': None,
|
||||
'parenttype': None,
|
||||
'report_script': None,
|
||||
'server_script': None,
|
||||
'sort_by': '`tabLead`.`name`',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user