mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
moved directory structure
This commit is contained in:
@@ -0,0 +1 @@
|
||||
from __future__ import unicode_literals
|
||||
@@ -0,0 +1,39 @@
|
||||
// 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
report.customize_filters = function() {
|
||||
this.hide_all_filters();
|
||||
|
||||
this.filter_fields_dict['GL Entry'+FILTER_SEP +'Cost Center'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['GL Entry'+FILTER_SEP +'Company'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Posting Date'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['GL Entry'+FILTER_SEP +'Account'].df.filter_hide = 0;
|
||||
|
||||
this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Posting Date'].df.in_first_page = 1;
|
||||
this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1;
|
||||
this.filter_fields_dict['GL Entry'+FILTER_SEP +'Account'].df.in_first_page = 1;
|
||||
this.filter_fields_dict['GL Entry'+FILTER_SEP +'Cost Center'].df.in_first_page = 1;
|
||||
this.filter_fields_dict['GL Entry'+FILTER_SEP +'Company'].df.in_first_page = 1;
|
||||
|
||||
|
||||
this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
|
||||
this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
|
||||
this.filter_fields_dict['GL Entry'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
|
||||
|
||||
}
|
||||
this.mytabs.items['Select Columns'].hide();
|
||||
this.mytabs.items['More Filters'].hide();
|
||||
@@ -0,0 +1,30 @@
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Add columns
|
||||
# -----------
|
||||
from __future__ import unicode_literals
|
||||
row_list = [['Cost Center','Data','160px'],
|
||||
['Account','Data','160px'],
|
||||
['Debit','Currency','120px'],
|
||||
['Credit','Currency','120px'],
|
||||
['Expense','Currency','120px']]
|
||||
|
||||
for r in row_list:
|
||||
colnames.append(r[0])
|
||||
coltypes.append(r[1])
|
||||
colwidths.append(r[2])
|
||||
col_idx[r[0]] = len(colnames)-1
|
||||
@@ -0,0 +1,20 @@
|
||||
SELECT
|
||||
`tabGL Entry`.`cost_center`,
|
||||
`tabAccount`.`parent_account`,
|
||||
sum(ifnull(`tabGL Entry`.`debit`, 0)),
|
||||
sum(ifnull(`tabGL Entry`.`credit`, 0)),
|
||||
sum(ifnull(`tabGL Entry`.`debit`,0))-sum(ifnull(`tabGL Entry`.`credit`, 0))
|
||||
FROM
|
||||
`tabGL Entry`,`tabAccount`
|
||||
WHERE
|
||||
`tabGL Entry`.`account`=`tabAccount`.`name`
|
||||
AND ifnull(`tabGL Entry`.`is_cancelled`,'No')='No'
|
||||
AND `tabAccount`.is_pl_account='Yes'
|
||||
AND `tabAccount`.debit_or_credit='Debit'
|
||||
AND `tabGL Entry`.`posting_date`>='%(posting_date)s'
|
||||
AND `tabGL Entry`.`posting_date`<='%(posting_date1)s'
|
||||
AND `tabGL Entry`.`company` LIKE '%(company)s%%'
|
||||
AND `tabAccount`.`parent_account` LIKE '%(account)s%%'
|
||||
AND `tabGL Entry`.`cost_center` LIKE '%(cost_center)s%%'
|
||||
GROUP BY
|
||||
`tabGL Entry`.`cost_center` , `tabAccount`.`parent_account`
|
||||
@@ -0,0 +1,33 @@
|
||||
# Search Criteria, cost_center_wise_expense
|
||||
[
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-04-03 12:49:50',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-04-03 12:49:50',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'swarnalata@webnotestech.com'
|
||||
},
|
||||
|
||||
# These values are common for all Search Criteria
|
||||
{
|
||||
'criteria_name': u'Cost Center wise Expense',
|
||||
'dis_filters': u'fiscal_year',
|
||||
'doc_type': u'GL Entry',
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': u"{'GL Entry\x01Voucher Type':'','GL Entry\x01Is Cancelled':'','GL Entry\x01Fiscal Year':'','GL Entry\x01Company':''}",
|
||||
'module': u'Accounts',
|
||||
'name': '__common__',
|
||||
'page_len': 50,
|
||||
'sort_by': u'`tabGL Entry`.`name`',
|
||||
'sort_order': u'DESC',
|
||||
'standard': u'Yes'
|
||||
},
|
||||
|
||||
# Search Criteria, cost_center_wise_expense
|
||||
{
|
||||
'doctype': 'Search Criteria',
|
||||
'name': u'cost_center_wise_expense'
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user