moved directory structure

This commit is contained in:
Rushabh Mehta
2012-09-24 19:13:42 +05:30
parent e47a6779e9
commit 2fa2f7178d
1637 changed files with 47 additions and 11450 deletions

View File

@@ -0,0 +1 @@
from __future__ import unicode_literals

View File

@@ -0,0 +1,31 @@
<div class="layout_wrapper">
<div id="fs_header"></div>
<!-- table.statement td { vertical-align: middle; } table.statement td select { width: 100px; } table.stmt_table { table-layout: fixed; border-collapse: collapse; } table.stmt_table td { vertical-align: middle; padding: 2px; } td.stmt_level0 { font-weight: bold; font-size: 14px; border-bottom: 1px solid #AAA; } td.stmt_level1 { font-weight: bold; font-size: 12px; } td.stmt_level2 { font-size: 11px; } td.stmt_level3 { font-size: 11px; } td.stmt_level4 { font-size: 12px; font-weight: bold; border-bottom: 1px solid #000; } td.stmt_level5 { color: BLUE; font-size: 11px; } --> <!--
<div style="border: 1px solid #cccccc; padding: 4px; margin-top: 8px; background-color: #eeeeee; width: 98%;">
<table class="statement" border="0" cellspacing="2px">
<tbody>
<tr>
<td>Statement:</td>
<td style="padding-right: 8px;" mce_style="padding-right: 8px;"><select id="stmt_type"></select></td>
<td>Company:</td>
<td style="padding-right: 8px;" mce_style="padding-right: 8px;"><select id="stmt_company"></select></td>
<td>Period Type:</td>
<td style="padding-right: 8px;" mce_style="padding-right: 8px;"><select id="stmt_period"></select></td>
<td>Fiscal Year:</td>
<td style="padding-right: 8px;" mce_style="padding-right: 8px;"><select id="stmt_fiscal_year"></select></td>
<td style="padding-right: 8px;" mce_style="padding-right: 8px;">
<div id="stmt_new"></div>
</td>
</tr>
</tbody>
</table>
</div>
--> <!--
<div style="margin:10px 0px 10px 0px" mce_style="margin:10px 0px 10px 0px"><button class="button" onclick="pscript.print_statement();">Print</button></div>
-->
<div id="print_html">
<div id="stmt_title1" style="margin:16px 0px 4px 0px; font-size: 16px; font-weight: bold; color: #888;"></div>
<div id="stmt_title2" style="margin:0px 0px 8px 0px; font-size: 16px; font-weight: bold;"></div>
<div id="stmt_tree" style="margin: 0px 0px 16px; overflow: auto; display: none; width: 100%;"></div>
</div>
</div>

View File

@@ -0,0 +1,163 @@
// 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/>.
pscript['onload_Financial Statements'] = function() {
// header and toolbar
var h = new PageHeader('fs_header','Financial Statements','Profit & Loss and Balance Sheet Builder across multiple years');
//$y(h.toolbar_area,{padding:'8px'});
var dv = $a(h.toolbar_area,'div','',{margin:'4px 0px'});
var t = make_table(dv,1,4,'640px', [], {padding:'4px', width:'160px'});
var sel = $a($td(t,0,0),'select','',{width:'160px'});
sel.id = 'stmt_type';
var sel = $a($td(t,0,1),'select','',{width:'160px'});
sel.id = 'stmt_company';
var sel = $a($td(t,0,2),'select','',{width:'160px'});
sel.id = 'stmt_period';
var sel = $a($td(t,0,3),'select','',{width:'160px'});
sel.id = 'stmt_fiscal_year';
h.add_button('Create',function(){ pscript.stmt_new(); },0,'ui-icon-document');
h.add_button('Print', function(){ _p.go($i('print_html').innerHTML); }, 0, 'ui-icon-print');
/*
var btn = $a($td(t,1,0),'button');
btn.onclick = function(){ pscript.stmt_new(); }
btn.innerHTML = 'Create';
var btn = $a($td(t,1,1),'button');
btn.onclick = function(){ alert('print'); }
btn.innerHTML = 'Print';
//Button to create new
var btn = $a('stmt_new', 'button');
btn.onclick = function() { pscript.stmt_new(); }
btn.innerHTML = 'Create';*/
// select for statement
add_sel_options($i('stmt_type'), ['Select Statement...','Balance Sheet','Profit & Loss']);
// select for companies
add_sel_options($i('stmt_company'), ['Loading Companies...']);
// load companies
$c_obj('MIS Control','get_comp','', function(r,rt) {
// company
empty_select($i('stmt_company'));
add_sel_options($i('stmt_company'), add_lists(['Select Company...'], r.message.company), 'Select Company...');
// period
empty_select($i('stmt_period'));
//add_sel_options($i('stmt_period'), add_lists(['Select Period...'], r.message.period), 'Select period...');
add_sel_options($i('stmt_period'), add_lists(['Select Period...'], ['Annual', 'Quarterly', 'Monthly']), 'Select period...');
// fiscal-year
empty_select($i('stmt_fiscal_year'));
add_sel_options($i('stmt_fiscal_year'), add_lists(['Select Year...'], r.message.fiscal_year), 'Select fiscal year...');
});
}
pscript.stmt_new = function(stmt,company_name,level,period,year) {
$i('stmt_tree').innerHTML = 'Refreshing....';
$i('stmt_tree').style.display = 'block';
var arg = {
statement:sel_val($i('stmt_type'))
,company:sel_val($i('stmt_company'))
,period:sel_val($i('stmt_period'))
,year:sel_val($i('stmt_fiscal_year'))
}
$c_obj('MIS Control', 'get_statement', docstring(arg), function(r,rt) {
var nl = r.message;
var t = $i('stmt_tree');
var stmt_type = sel_val($i('stmt_type'));
t.innerHTML = '';
var tab = $a($a(t, 'div'),'table','stmt_table');
tab.style.tableLayout = 'fixed';
tab.style.width = '100%';
$i('stmt_title1').innerHTML = sel_val($i('stmt_company'));
$i('stmt_title2').innerHTML = sel_val($i('stmt_type')) + ' - ' + sel_val($i('stmt_fiscal_year'));
for(i=0;i<nl.length;i++) {
tab.insertRow(i);
tab.rows[i].style.height = '20px';
// heads
var per = tab.rows[i].insertCell(0);
// var acc_width = (sel_val($i('stmt_period'))=='Monthly')? 12 : 20;
// per.style.width = acc_width+'%';
per.style.width = '150px';
per.innerHTML = pscript.space_reqd(nl[i][0])+cstr(nl[i][1]);
per.className = 'stmt_level' + nl[i][0];
// Make Title Bold
if(nl[i][0] == 0 || nl[i][0] == 1 || nl[i][0] == 4){
per.innerHTML = (pscript.space_reqd(nl[i][0])+cstr(nl[i][1])+'').bold();
per.style.fontSize = '12px';
}
for(j=2;j<nl[i].length;j++){
var per = tab.rows[i].insertCell(j-1);
// per.style.width = (100-acc_width)/(nl[i].length-2) +'%';
per.style.width = '150px';
per.style.textAlign = "right";
per.className = 'stmt_level' + nl[i][0];
if (i==0) {
per.style.fontSize = '14px';
per.style.textAlign = "right";
}
if (nl[i][0]==5) {
if(flt(nl[i][j])<0.0) per.style.color = "RED";
else per.style.color = "GREEN";
}
if(nl[i][0] != 0){
if(nl[i][j]) {
if (i==0) per.innerHTML = (nl[i][j]+'').bold();
else if(nl[i][0] == 1 || nl[i][0] == 4) per.innerHTML = (cstr(fmt_money(nl[i][j]))+'').bold();
else per.innerHTML = fmt_money(nl[i][j])
} else
per.innerHTML = '-';
}
}
}
});
$i('stmt_tree').style.display = 'block';
}
//printing statement
pscript.print_statement = function(){
print_go($i('print_html').innerHTML);
}
//determine space to be given
pscript.space_reqd = function(val){
if(val == 1) return ' ';
else if(val == 2) return ' ';
else if(val == 3) return ' ';
else return '';
}

View File

@@ -0,0 +1,58 @@
# Page, Financial Statements
[
# These values are common in all dictionaries
{
'creation': '2010-10-12 15:19:32',
'docstatus': 0,
'modified': '2011-01-03 17:32:30',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
# These values are common for all Page
{
'doctype': 'Page',
'module': 'Accounts',
'name': '__common__',
'page_name': 'Financial Statements',
'show_in_menu': 0,
'standard': 'Yes'
},
# These values are common for all Page Role
{
'doctype': 'Page Role',
'name': '__common__',
'parent': 'Financial Statements',
'parentfield': 'roles',
'parenttype': 'Page'
},
# Page, Financial Statements
{
'doctype': 'Page',
'name': 'Financial Statements'
},
# Page Role
{
'doctype': 'Page Role',
'idx': 1,
'role': 'Accounts User'
},
# Page Role
{
'doctype': 'Page Role',
'idx': 2,
'role': 'Administrator'
},
# Page Role
{
'doctype': 'Page Role',
'idx': 3,
'role': 'Accounts Manager'
}
]