restructured erpnext and deleted unwanted

This commit is contained in:
nabinhait
2011-07-01 13:34:41 +05:30
parent c1c54c9400
commit ec097975d0
1280 changed files with 54494 additions and 88652 deletions

View File

@@ -0,0 +1,37 @@
report.customize_filters = function() {
this.hide_all_filters();
this.add_filter({fieldname:'approver', label:'Approver', fieldtype:'Link', options:'Profile', ignore : 1, parent:'Expense Voucher'});
this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'Approver'].df.in_first_page = 1;
this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'From Employee'].df.filter_hide = 0;
this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'Employee Name'].df.filter_hide = 0;
this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0;
this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'From Posting Date'].df.filter_hide = 0;
this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0;
this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'Company'].df.filter_hide = 0;
}
this.mytabs.items['Select Columns'].hide();
report.get_query = function(){
//get filter values
emp = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'From Employee'].get_value();
emp_nm = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'Employee Name'].get_value();
frm_start_date = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'From Posting Date'].get_value();
to_end_date = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'To Posting Date'].get_value();
fiscal_year = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'Fiscal Year'].get_value();
approver = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'Approver'].get_value();
company = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'Company'].get_value();
var cond = '';
if(emp) cond += ' AND `tabExpense Voucher`.employee = "'+emp+'"';
if(emp_nm) cond += ' AND `tabExpense Voucher`.employee_name = "'+emp_nm+'"';
if(frm_start_date) cond += ' AND `tabExpense Voucher`.posting_date >= "'+frm_start_date+'"';
if(to_end_date) cond += ' AND `tabExpense Voucher`.posting_date <= "'+to_end_date+'"';
if(fiscal_year !='') cond += ' AND `tabExpense Voucher`.fiscal_year = "'+fiscal_year+'"';
if(approver) cond += ' AND `tabExpense Voucher`.exp_approver = "'+approver+'"';
if(company) cond += ' AND `tabExpense Voucher`.company = "'+company+'"';
var q = 'SELECT DISTINCT `tabExpense Voucher`.name, `tabExpense Voucher`.employee, `tabExpense Voucher`.employee_name, `tabExpense Voucher`.posting_date,`tabExpense Voucher`.exp_approver, `tabExpense Voucher`.total_claimed_amount, `tabExpense Voucher`.total_sanctioned_amount FROM `tabExpense Voucher` WHERE `tabExpense Voucher`.approval_status= "Submitted"'+cond;
return q;
}

View File

@@ -0,0 +1,37 @@
[
{
'add_col': None,
'add_cond': None,
'add_tab': None,
'columns': '',
'creation': '2010-09-03 16:45:06',
'criteria_name': 'Pending Expense Vouchers',
'custom_query': '',
'description': None,
'dis_filters': None,
'disabled': None,
'doc_type': 'Expense Voucher',
'docstatus': 0,
'doctype': 'Search Criteria',
'filters': "{'Expense Voucher\x01Approval Status':'','Expense Voucher\x01Fiscal Year':''}",
'graph_series': None,
'graph_values': None,
'group_by': None,
'idx': None,
'modified': '2010-09-02 11:04:41',
'modified_by': 'Administrator',
'module': 'Payroll',
'name': 'pending_expense_vouchers',
'owner': 'ashwini@webnotestech.com',
'page_len': 50,
'parent': None,
'parent_doc_type': None,
'parentfield': None,
'parenttype': None,
'report_script': None,
'server_script': None,
'sort_by': '',
'sort_order': 'DESC',
'standard': 'Yes'
}
]