This commit is contained in:
parent
4a2f0f8c36
commit
b394a25904
@ -1,18 +0,0 @@
|
|||||||
<div class="appframe col col-lg-12">
|
|
||||||
<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
|
// see ledger
|
||||||
|
|
||||||
pscript['onload_Accounts Browser'] = function(wrapper){
|
pscript['onload_Accounts Browser'] = function(wrapper){
|
||||||
wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'));
|
wn.ui.make_app_page({
|
||||||
wrapper.appframe.add_home_breadcrumb()
|
parent: wrapper,
|
||||||
wrapper.appframe.add_module_icon("Accounts")
|
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) {
|
if (wn.boot.profile.can_create.indexOf("Company") !== -1) {
|
||||||
wrapper.appframe.add_button('New Company', function() { newdoc('Company'); },
|
wrapper.appframe.add_button('New Company', function() { newdoc('Company'); },
|
||||||
@ -35,13 +63,13 @@ pscript['onload_Accounts Browser'] = function(wrapper){
|
|||||||
}, 'icon-refresh');
|
}, 'icon-refresh');
|
||||||
|
|
||||||
// company-select
|
// company-select
|
||||||
wrapper.$company_select = $('<select class="accbrowser-company-select"></select>')
|
wrapper.$company_select = wrapper.appframe.add_select("Company", [])
|
||||||
.change(function() {
|
.change(function() {
|
||||||
var ctype = wn.get_route()[1] || 'Account';
|
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());
|
pscript.set_title(wrapper, ctype, $(this).val());
|
||||||
})
|
})
|
||||||
.appendTo(wrapper.appframe.$w.find('.appframe-toolbar'));
|
|
||||||
|
|
||||||
// load up companies
|
// load up companies
|
||||||
wn.call({
|
wn.call({
|
||||||
@ -77,7 +105,7 @@ pscript['onshow_Accounts Browser'] = function(wrapper){
|
|||||||
|
|
||||||
erpnext.AccountsChart = Class.extend({
|
erpnext.AccountsChart = Class.extend({
|
||||||
init: function(ctype, company, wrapper) {
|
init: function(ctype, company, wrapper) {
|
||||||
$(wrapper).find('.tree-area').empty();
|
$(wrapper).empty();
|
||||||
var me = this;
|
var me = this;
|
||||||
me.ctype = ctype;
|
me.ctype = ctype;
|
||||||
me.can_create = wn.model.can_create(this.ctype);
|
me.can_create = wn.model.can_create(this.ctype);
|
||||||
@ -87,7 +115,7 @@ erpnext.AccountsChart = Class.extend({
|
|||||||
|
|
||||||
me.company = company;
|
me.company = company;
|
||||||
this.tree = new wn.ui.Tree({
|
this.tree = new wn.ui.Tree({
|
||||||
parent: $(wrapper).find('.tree-area'),
|
parent: $(wrapper),
|
||||||
label: company,
|
label: company,
|
||||||
args: {ctype: ctype, comp: company},
|
args: {ctype: ctype, comp: company},
|
||||||
method: 'accounts.page.accounts_browser.accounts_browser.get_children',
|
method: 'accounts.page.accounts_browser.accounts_browser.get_children',
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
#activity-list .label {
|
#page-activity .label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
margin-right: 7px;
|
margin-right: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#activity-list .label-info {
|
#page-activity .label-info {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#activity-list .user-info {
|
#page-activity .user-info {
|
||||||
float: right;
|
float: right;
|
||||||
color: #777;
|
color: #777;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#activity-list .date-sep {
|
#page-activity .date-sep {
|
||||||
margin-bottom: 11px;
|
margin-bottom: 11px;
|
||||||
padding: 5px 0px;
|
padding: 5px 0px;
|
||||||
border-bottom: 1px solid #aaa;
|
border-bottom: 1px solid #aaa;
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
<div class="appframe col col-lg-12">
|
|
||||||
<div class="layout-appframe"></div>
|
|
||||||
<div class="layout-main">
|
|
||||||
<div id="activity-list">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,13 +1,15 @@
|
|||||||
wn.pages['activity'].onload = function(wrapper) {
|
wn.pages['activity'].onload = function(wrapper) {
|
||||||
wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.layout-appframe'));
|
wn.ui.make_app_page({
|
||||||
wrapper.appframe.add_home_breadcrumb();
|
parent: wrapper,
|
||||||
wrapper.appframe.add_breadcrumb(wn.modules["Activity"].icon);
|
title: "Activity",
|
||||||
wrapper.appframe.title('Activity');
|
single_column: true
|
||||||
|
})
|
||||||
|
wrapper.appframe.add_module_icon("Activity");
|
||||||
|
|
||||||
var list = new wn.ui.Listing({
|
var list = new wn.ui.Listing({
|
||||||
appframe: wrapper.appframe,
|
appframe: wrapper.appframe,
|
||||||
method: 'home.page.activity.activity.get_feed',
|
method: 'home.page.activity.activity.get_feed',
|
||||||
parent: $('#activity-list'),
|
parent: $(wrapper).find(".layout-main"),
|
||||||
render_row: function(row, data) {
|
render_row: function(row, data) {
|
||||||
new erpnext.ActivityFeed(row, data);
|
new erpnext.ActivityFeed(row, data);
|
||||||
}
|
}
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
<div class="appframe col col-lg-12">
|
|
||||||
<div class="appframe-area"></div>
|
|
||||||
<div class="layout-main-section">
|
|
||||||
<div class="tree-area"></div>
|
|
||||||
</div>
|
|
||||||
<div class="layout-side-section">
|
|
||||||
<div class="help">To add child nodes, explore tree and click on the node under which you want to add more nodes.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
|
@ -15,14 +15,22 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
pscript['onload_Sales Browser'] = function(wrapper){
|
pscript['onload_Sales Browser'] = function(wrapper){
|
||||||
wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'));
|
wn.ui.make_app_page({
|
||||||
wrapper.appframe.add_home_breadcrumb()
|
parent: wrapper,
|
||||||
|
})
|
||||||
|
|
||||||
wrapper.appframe.add_module_icon("Selling")
|
wrapper.appframe.add_module_icon("Selling")
|
||||||
|
|
||||||
wrapper.appframe.add_button('Refresh', function() {
|
wrapper.appframe.add_button('Refresh', function() {
|
||||||
wrapper.make_tree();
|
wrapper.make_tree();
|
||||||
}, 'icon-refresh');
|
}, 'icon-refresh');
|
||||||
|
|
||||||
|
|
||||||
|
$(wrapper)
|
||||||
|
.find(".layout-side-section")
|
||||||
|
.html('<div class="text-muted">Click on a link to get options to expand \
|
||||||
|
get options Add / Edit / Delete.</div>')
|
||||||
|
|
||||||
wrapper.make_tree = function() {
|
wrapper.make_tree = function() {
|
||||||
var ctype = wn.get_route()[1] || 'Territory';
|
var ctype = wn.get_route()[1] || 'Territory';
|
||||||
wn.call({
|
wn.call({
|
||||||
@ -30,7 +38,13 @@ pscript['onload_Sales Browser'] = function(wrapper){
|
|||||||
args: {ctype: ctype},
|
args: {ctype: ctype},
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
var root = r.message[0]["value"];
|
var root = r.message[0]["value"];
|
||||||
erpnext.sales_chart = new erpnext.SalesChart(ctype, root, wrapper);
|
erpnext.sales_chart = new erpnext.SalesChart(ctype, root,
|
||||||
|
$(wrapper)
|
||||||
|
.find(".layout-main-section")
|
||||||
|
.css({
|
||||||
|
"min-height": "300px",
|
||||||
|
"padding-bottom": "25px"
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -50,12 +64,12 @@ pscript['onshow_Sales Browser'] = function(wrapper){
|
|||||||
};
|
};
|
||||||
|
|
||||||
erpnext.SalesChart = Class.extend({
|
erpnext.SalesChart = Class.extend({
|
||||||
init: function(ctype, root, wrapper) {
|
init: function(ctype, root, parent) {
|
||||||
$(wrapper).find('.tree-area').empty();
|
$(parent).empty();
|
||||||
var me = this;
|
var me = this;
|
||||||
me.ctype = ctype;
|
me.ctype = ctype;
|
||||||
this.tree = new wn.ui.Tree({
|
this.tree = new wn.ui.Tree({
|
||||||
parent: $(wrapper).find('.tree-area'),
|
parent: $(parent),
|
||||||
label: root,
|
label: root,
|
||||||
args: {ctype: ctype},
|
args: {ctype: ctype},
|
||||||
method: 'selling.page.sales_browser.sales_browser.get_children',
|
method: 'selling.page.sales_browser.sales_browser.get_children',
|
||||||
|
Loading…
Reference in New Issue
Block a user