diff --git a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.js b/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.js deleted file mode 100644 index 8bcfa158b4..0000000000 --- a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.js +++ /dev/null @@ -1,34 +0,0 @@ -// ERPNext - web based ERP (http://erpnext.com) -// Copyright (C) 2012 Web Notes Technologies Pvt Ltd -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -report.customize_filters = function() { - this.hide_all_filters(); - this.add_filter({fieldname:'show_group_balance', label:'Show Group Balance', fieldtype:'Select', options:NEWLINE+'Yes'+NEWLINE+'No',ignore : 1, parent:'Account'}); - this.add_filter({fieldname:'level', label:'Level', fieldtype:'Data', default:3,ignore : 1, parent:'Account'}); - - this.add_filter({fieldname:'from_date', label:'Date', fieldtype:'Date', parent:'Account'}); - - - this.filter_fields_dict['Account'+FILTER_SEP +'Company'].df.filter_hide = 0; - //this.filter_fields_dict['Account'+FILTER_SEP +'From Date'].df.filter_hide = 0; - //this.filter_fields_dict['Account'+FILTER_SEP +'To Date'].df.filter_hide = 0; - - //this.large_report = 1; -} - -report.aftertableprint = function(t) { - $yt(t,'*',1,{whiteSpace:'pre'}); -} \ No newline at end of file diff --git a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.sql b/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.sql deleted file mode 100644 index 381e8de591..0000000000 --- a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.sql +++ /dev/null @@ -1,9 +0,0 @@ -SELECT - DISTINCT node.name AS name - FROM tabAccount AS node, tabAccount AS parent - WHERE node.lft BETWEEN parent.lft AND parent.rgt - AND node.company = '%(company)s' - AND node.is_pl_account = 'No' - AND node.level=%(level)s - AND ifnull(node.account_type,'') != 'Bank or Cash' - ORDER BY node.lft diff --git a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.txt b/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.txt deleted file mode 100644 index a9e748e098..0000000000 --- a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.txt +++ /dev/null @@ -1,33 +0,0 @@ -# Search Criteria, cash_flow_statement -[ - - # These values are common in all dictionaries - { - 'creation': '2012-04-11 17:36:48', - 'docstatus': 0, - 'modified': '2012-04-18 12:17:52', - 'modified_by': u'Administrator', - 'owner': u'Administrator' - }, - - # These values are common for all Search Criteria - { - 'columns': u'Account\x01ID', - 'criteria_name': u'Cash Flow Statement', - 'dis_filters': u'fiscal_year', - 'doc_type': u'Account', - 'doctype': 'Search Criteria', - 'filters': u"{'Account\x01Group or Ledger':'Ledger','Account\x01Is PL Account':'','Account\x01Is Active':'','Account\x01Account Type':'','Account\x01Company':'','Account\x01Fiscal Year':'','Account\x01Show Group Balance':'','Account\x01Level':'2'}", - 'module': u'Accounts', - 'name': '__common__', - 'sort_by': u'`tabAccount`.`name`', - 'sort_order': u'DESC', - 'standard': u'Yes' - }, - - # Search Criteria, cash_flow_statement - { - 'doctype': 'Search Criteria', - 'name': u'cash_flow_statement' - } -] \ No newline at end of file diff --git a/erpnext/patches/august_2012/remove_cash_flow_statement.py b/erpnext/patches/august_2012/remove_cash_flow_statement.py new file mode 100644 index 0000000000..a1243b807d --- /dev/null +++ b/erpnext/patches/august_2012/remove_cash_flow_statement.py @@ -0,0 +1,3 @@ +def execute(): + import webnotes + webnotes.conn.sql("delete from `tabSearch Criteria` where name = 'cash_flow_statement'") \ No newline at end of file diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index c7df34c155..64c190f28c 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -561,4 +561,8 @@ patch_list = [ 'patch_module': 'patches.august_2012', 'patch_file': 'repost_billed_amt', }, + { + 'patch_module': 'patches.august_2012', + 'patch_file': 'remove_cash_flow_statement', + }, ] \ No newline at end of file diff --git a/public/js/all-app.js b/public/js/all-app.js index 081a800a0b..d0264689cb 100644 --- a/public/js/all-app.js +++ b/public/js/all-app.js @@ -1700,7 +1700,7 @@ d.cur_frm=f;d.dn=dn;d.table_form=f.meta.istable;f.refresh(dn);$(f.page_layout.wr */ _f.FrmHeader=Class.extend({init:function(parent,frm){this.appframe=new wn.ui.AppFrame(parent) this.$w=this.appframe.$w;},refresh:function(){if(cur_frm.cscript.set_breadcrumbs){this.appframe.clear_breadcrumbs();cur_frm.cscript.set_breadcrumbs();}else{wn.views.breadcrumbs(this.appframe,cur_frm.meta.module,cur_frm.meta.name,cur_frm.docname);} -this.refresh_labels();this.refresh_toolbar();},refresh_labels:function(){var labinfo={0:['Saved','label-success'],1:['Submitted','label-info'],2:['Cancelled','label-important']}[cint(cur_frm.doc.docstatus)];if(labinfo[0]=='Saved'&&cur_frm.meta.is_submittable){labinfo[0]='Saved, to Submit';} +this.refresh_labels();this.refresh_toolbar();},refresh_labels:function(){cur_frm.doc=get_local(cur_frm.doc.doctype,cur_frm.doc.name);var labinfo={0:['Saved','label-success'],1:['Submitted','label-info'],2:['Cancelled','label-important']}[cint(cur_frm.doc.docstatus)];if(labinfo[0]=='Saved'&&cur_frm.meta.is_submittable){labinfo[0]='Saved, to Submit';} if(cur_frm.doc.__unsaved||cur_frm.doc.__islocal){labinfo[0]='Not Saved';labinfo[1]='label-warning'} this.set_label(labinfo);if(cur_frm.doc.__unsaved&&cint(cur_frm.doc.docstatus)==1&&this.appframe.buttons['Update']){this.appframe.buttons['Update'].toggle(true);}},set_label:function(labinfo){this.$w.find('.label').remove();$(repl('\ %(lab_status)s',{lab_status:labinfo[0],lab_class:labinfo[1]})).insertBefore(this.$w.find('.breadcrumb-area'))},refresh_toolbar:function(){if(cur_frm.meta.hide_toolbar){$('.appframe-toolbar').toggle(false);return;}