mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
[merge conflict]
This commit is contained in:
1
accounts/page/accounts_browser/README.md
Normal file
1
accounts/page/accounts_browser/README.md
Normal file
@@ -0,0 +1 @@
|
||||
Tree view browser for Chart of Accounts and Chart of Cost Centers
|
||||
@@ -1,18 +0,0 @@
|
||||
<div class="layout-wrapper layout-wrapper-background">
|
||||
<div class="appframe-area"></div>
|
||||
<div class="layout-main">
|
||||
<div class="tree-area"></div>
|
||||
<hr>
|
||||
<div class="well">
|
||||
<h4>Quick Help</h4>
|
||||
<ol>
|
||||
<li>To add child nodes, explore tree and click on the node under which you want to add more nodes.
|
||||
<li>Accounting Entries can be made against leaf nodes, called <b>Ledgers</b>. Entries against <b>Groups</b> are not allowed.
|
||||
<li>Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.
|
||||
<li><b>To create a Bank Account:</b> Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts) and create a new Account Ledger (by clicking on Add Child) of type "Bank or Cash"
|
||||
<li><b>To create a Tax Account:</b> Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties) and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.
|
||||
</ol>
|
||||
<p>Please setup your chart of accounts before you start Accounting Entries</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -21,9 +21,37 @@
|
||||
// see ledger
|
||||
|
||||
pscript['onload_Accounts Browser'] = function(wrapper){
|
||||
wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'));
|
||||
wrapper.appframe.add_home_breadcrumb()
|
||||
wrapper.appframe.add_module_breadcrumb("Accounts")
|
||||
wn.ui.make_app_page({
|
||||
parent: wrapper,
|
||||
single_column: true
|
||||
})
|
||||
|
||||
wrapper.appframe.add_module_icon("Accounts");
|
||||
|
||||
var main = $(wrapper).find(".layout-main"),
|
||||
chart_area = $("<div>")
|
||||
.css({"margin-bottom": "15px"})
|
||||
.appendTo(main),
|
||||
help_area = $('<div class="well">\
|
||||
<h4>Quick Help</h4>\
|
||||
<ol>\
|
||||
<li>To add child nodes, explore tree and click on the node under which you \
|
||||
want to add more nodes.\
|
||||
<li>Accounting Entries can be made against leaf nodes, called <b>Ledgers</b>.\
|
||||
Entries against <b>Groups</b> are not allowed.\
|
||||
<li>Please do NOT create Account (Ledgers) for Customers and Suppliers. \
|
||||
They are created directly from the Customer / Supplier masters.\
|
||||
<li><b>To create a Bank Account:</b> Go to the appropriate group \
|
||||
(usually Application of Funds > Current Assets > Bank Accounts)\
|
||||
and create a new Account Ledger (by clicking on Add Child) of \
|
||||
type "Bank or Cash"\
|
||||
<li><b>To create a Tax Account:</b> Go to the appropriate group \
|
||||
(usually Source of Funds > Current Liabilities > Taxes and Duties) \
|
||||
and create a new Account Ledger (by clicking on Add Child) of type\
|
||||
"Tax" and do mention the Tax rate.\
|
||||
</ol>\
|
||||
<p>Please setup your chart of accounts before you start Accounting Entries</p>\
|
||||
</div>').appendTo(main);
|
||||
|
||||
if (wn.boot.profile.can_create.indexOf("Company") !== -1) {
|
||||
wrapper.appframe.add_button('New Company', function() { newdoc('Company'); },
|
||||
@@ -35,13 +63,13 @@ pscript['onload_Accounts Browser'] = function(wrapper){
|
||||
}, 'icon-refresh');
|
||||
|
||||
// company-select
|
||||
wrapper.$company_select = $('<select class="accbrowser-company-select"></select>')
|
||||
wrapper.$company_select = wrapper.appframe.add_select("Company", [])
|
||||
.change(function() {
|
||||
var ctype = wn.get_route()[1] || 'Account';
|
||||
erpnext.account_chart = new erpnext.AccountsChart(ctype, $(this).val(), wrapper);
|
||||
erpnext.account_chart = new erpnext.AccountsChart(ctype, $(this).val(),
|
||||
chart_area.get(0));
|
||||
pscript.set_title(wrapper, ctype, $(this).val());
|
||||
})
|
||||
.appendTo(wrapper.appframe.$w.find('.appframe-toolbar'));
|
||||
|
||||
// load up companies
|
||||
wn.call({
|
||||
@@ -77,7 +105,7 @@ pscript['onshow_Accounts Browser'] = function(wrapper){
|
||||
|
||||
erpnext.AccountsChart = Class.extend({
|
||||
init: function(ctype, company, wrapper) {
|
||||
$(wrapper).find('.tree-area').empty();
|
||||
$(wrapper).empty();
|
||||
var me = this;
|
||||
me.ctype = ctype;
|
||||
me.can_create = wn.model.can_create(this.ctype);
|
||||
@@ -87,7 +115,7 @@ erpnext.AccountsChart = Class.extend({
|
||||
|
||||
me.company = company;
|
||||
this.tree = new wn.ui.Tree({
|
||||
parent: $(wrapper).find('.tree-area'),
|
||||
parent: $(wrapper),
|
||||
label: company,
|
||||
args: {ctype: ctype, comp: company},
|
||||
method: 'accounts.page.accounts_browser.accounts_browser.get_children',
|
||||
|
||||
@@ -25,7 +25,7 @@ wn.pages['financial-analytics'].onload = function(wrapper) {
|
||||
erpnext.trial_balance = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics');
|
||||
|
||||
wrapper.appframe.add_home_breadcrumb()
|
||||
wrapper.appframe.add_module_breadcrumb("Accounts")
|
||||
wrapper.appframe.add_module_icon("Accounts")
|
||||
wrapper.appframe.add_breadcrumb("icon-bar-chart")
|
||||
}
|
||||
|
||||
|
||||
@@ -1,28 +1,5 @@
|
||||
<div class="layout_wrapper">
|
||||
<div class="appframe col col-lg-12">
|
||||
<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>
|
||||
|
||||
@@ -24,7 +24,7 @@ wn.pages['general-ledger'].onload = function(wrapper) {
|
||||
erpnext.general_ledger = new erpnext.GeneralLedger(wrapper);
|
||||
|
||||
wrapper.appframe.add_home_breadcrumb()
|
||||
wrapper.appframe.add_module_breadcrumb("Accounts")
|
||||
wrapper.appframe.add_module_icon("Accounts")
|
||||
wrapper.appframe.add_breadcrumb("icon-bar-chart")
|
||||
|
||||
}
|
||||
|
||||
@@ -59,6 +59,6 @@ wn.pages['trial-balance'].onload = function(wrapper) {
|
||||
erpnext.trial_balance = new TrialBalance(wrapper, 'Trial Balance');
|
||||
|
||||
wrapper.appframe.add_home_breadcrumb()
|
||||
wrapper.appframe.add_module_breadcrumb("Accounts")
|
||||
wrapper.appframe.add_module_icon("Accounts")
|
||||
wrapper.appframe.add_breadcrumb("icon-bar-chart")
|
||||
}
|
||||
Reference in New Issue
Block a user