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

@@ -1,37 +0,0 @@
[
{
'add_col': None,
'add_cond': None,
'add_tab': None,
'columns': 'GL Entry\x01ID,GL Entry\x01Owner,GL Entry\x01Posting Date,GL Entry\x01Account,GL Entry\x01Cost Center,GL Entry\x01Against Voucher,GL Entry\x01Voucher Type,GL Entry\x01Voucher No,GL Entry\x01Remarks,GL Entry\x01Is Cancelled,GL Entry\x01Is Opening,GL Entry\x01Fiscal Year,GL Entry\x01Company,GL Entry\x01Lft,GL Entry\x01Rgt',
'creation': '2010-08-08 17:09:31',
'criteria_name': 'Account - Inputs (R.G. 23 A - PART II) Wrong One',
'custom_query': '',
'description': None,
'dis_filters': None,
'disabled': None,
'doc_type': 'GL Entry',
'docstatus': 0,
'doctype': 'Search Criteria',
'filters': "{'GL Entry\x01Voucher Type':'','GL Entry\x01Is Cancelled':'','GL Entry\x01Is Opening':'','GL Entry\x01Fiscal Year':'','GL Entry\x01Company':''}",
'graph_series': None,
'graph_values': None,
'group_by': None,
'idx': None,
'modified': '2010-03-20 17:02:13',
'modified_by': 'Administrator',
'module': 'Accounts',
'name': 'account_-_inputs_rg_23_a_-_part_ii_wrong_one',
'owner': 'jai@webnotestech.com',
'page_len': 50,
'parent': None,
'parent_doc_type': None,
'parentfield': None,
'parenttype': None,
'report_script': '',
'server_script': None,
'sort_by': 'ID',
'sort_order': 'DESC',
'standard': 'Yes'
}
]

View File

@@ -1,9 +0,0 @@
report.customize_filters = function() {
this.hide_all_filters();
this.add_filter({fieldname:'fiscal_year', label:'Fiscal Year', fieldtype:'Link', options:'Fiscal Year', report_default:sys_defaults.fiscal_year, parent:'Budget Detail'});
this.add_filter({fieldname:'company', label:'Company', fieldtype:'Link', options:'Company',report_default:sys_defaults.company, ignore : 1, parent:'Budget Detail'});
this.add_filter({fieldname:'period', label:'Period', fieldtype:'Select', options:'Monthly'+NEWLINE+'Quarterly'+NEWLINE+'Half Yearly'+NEWLINE+'Annual',report_default:'Quarterly',ignore : 1, parent:'Budget Detail'});
this.add_filter({fieldname:'cost_center', label:'Cost Center', fieldtype:'Link', options:'Cost Center', parent:'Budget Detail'});
this.add_filter({fieldname:'account_head', label:'Account', fieldtype:'Link', options:'Account', parent:'Budget Detail'});
}
this.mytabs.items['Select Columns'].hide()

View File

@@ -1,88 +0,0 @@
# use This in Query
# AND `tabAccount`.debit_or_credit = "Debit" AND `tabAccount`.`is_pl_account` = "Yes"
# validate Filters
if not filter_values.get('fiscal_year'):
msgprint("Please Select Fiscal Year")
raise Exception
if not filter_values.get('period'):
msgprint("Please Select Period")
raise Exception
# Get Values from fliters
fiscal_year = filter_values.get('fiscal_year')
period = filter_values.get('period')
mon_list = []
data = {'start_date':0, 'end_date':1}
def make_month_list(append_colnames, start_date, mon_list, period, colnames, coltypes, colwidths, coloptions, col_idx):
count = 1
if period == 'Quarterly' or period == 'Half Yearly' or period == 'Annual': mon_list.append([str(start_date)])
for m in range(12):
# get last date
last_date = str(sql("select LAST_DAY('%s')" % start_date)[0][0])
# make mon_list
if period == 'Monthly' :
mon_list.append([start_date, last_date])
# add months as Column names
month_name = sql("select MONTHNAME('%s')" % start_date)[0][0]
append_colnames(str(month_name)[:3], colnames, coltypes, colwidths, coloptions, col_idx)
# get start date
start_date = str(sql("select DATE_ADD('%s',INTERVAL 1 DAY)" % last_date)[0][0])
if period == 'Quarterly' and count % 3 == 0:
mon_list[len(mon_list) - 1 ].append(last_date)
# add Column names
append_colnames('Q '+ str(count / 3), colnames, coltypes, colwidths, coloptions, col_idx)
if count != 12: mon_list.append([start_date])
if period == 'Half Yearly' and count % 6 == 0 :
mon_list[len(mon_list) - 1 ].append(last_date)
# add Column Names
append_colnames('H'+str(count / 6), colnames, coltypes, colwidths, coloptions, col_idx)
if count != 12: mon_list.append([start_date])
if period == 'Annual' and count % 12 == 0:
mon_list[len(mon_list) - 1 ].append(last_date)
append_colnames('', colnames, coltypes, colwidths, coloptions, col_idx)
count = count +1
def append_colnames(name, colnames, coltypes, colwidths, coloptions, col_idx):
col = ['Budget', 'Actual', 'Variance']
for c in col:
colnames.append(str(c) + ' (' + str(name) +')' )
coltypes.append('Currency')
colwidths.append('150px')
coloptions.append('')
col_idx[str(c) + ' (' + str(name) +')' ] = len(colnames) - 1
col = ['Cost Center', 'Account', 'Budget Allocated', 'Distribution Id']
for c in col:
colnames.append(str(c))
coltypes.append((c=='Budget Allocated') and'Currency' or 'Link')
colwidths.append('150px')
coloptions.append((c=='Budget Allocated') and '' or (c == 'Distribution Id') and 'Budget Distribution' or c)
col_idx[str(c)] = len(colnames) - 1
start_date = get_value('Fiscal Year', fiscal_year, 'year_start_date')
if not start_date:
msgprint("Please Define Year Start Date for Fiscal Year " + str(fiscal_year))
raise Exception
start_date = start_date.strftime('%Y-%m-%d')
make_month_list(append_colnames, start_date, mon_list, period, colnames, coltypes, colwidths, coloptions, col_idx)
# Get Object Of GL Control
glc_obj = get_obj('GL Control')
bc_obj = get_obj('Budget Control')
for r in res:
count = 0
for idx in range(4, len(colnames), 3):
r.append(bc_obj.get_monthly_budget( r[3], fiscal_year, mon_list[count][data['start_date']], mon_list[count][data['end_date']], r[2]))
r.append(glc_obj.get_period_difference(r[1] + '~~~' + mon_list[count][data['start_date']] + '~~~' + mon_list[count][data['end_date']], r[0]))
r.append(r[idx] - r[idx + 1])
count = count +1

View File

@@ -1 +0,0 @@
select t2.name, t1.account, t1.budget_allocated, t1.distribution_id from `tabBudget Detail` t1, `tabCost Center` t2 where t1.fiscal_year = '%(fiscal_year)s' and t1.parent = t2.name and t2.name like '%(cost_center)s%%' and t1.account like '%(account_head)s%%' and t2.docstatus != 2

View File

@@ -1,37 +0,0 @@
[
{
'add_col': None,
'add_cond': None,
'add_tab': None,
'columns': 'Cost Center\x01ID,Budget Detail\x01Account,Budget Detail\x01Fiscal Year,Budget Detail\x01Budget Allocated,Budget Detail\x01Actual,Budget Detail\x01Distribution ID',
'creation': '2010-08-08 17:09:31',
'criteria_name': 'Budget Variance Report1',
'custom_query': None,
'description': None,
'dis_filters': None,
'disabled': None,
'doc_type': 'Budget Detail',
'docstatus': 0,
'doctype': 'Search Criteria',
'filters': "{'Budget Detail\x01Fiscal Year':''}",
'graph_series': None,
'graph_values': None,
'group_by': None,
'idx': None,
'modified': '2010-07-28 14:52:44',
'modified_by': 'Administrator',
'module': 'Accounts',
'name': 'budget_variance_report1',
'owner': 'jai@webnotestech.com',
'page_len': 50,
'parent': None,
'parent_doc_type': 'Cost Center',
'parentfield': None,
'parenttype': None,
'report_script': None,
'server_script': None,
'sort_by': '`tabCost Center`.`name`',
'sort_order': 'DESC',
'standard': 'Yes'
}
]