[minor] fixes #3127
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.js b/erpnext/accounts/page/accounts_browser/accounts_browser.js
index 59258ea..9c9b037 100644
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.js
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.js
@@ -49,8 +49,8 @@
});
wrapper.page.set_primary_action(__('New'), function() {
- erpnext.account_chart && erpnext.account_chart.new_account();
- });
+ erpnext.account_chart && erpnext.account_chart.make_new();
+ });
// company-select
wrapper.$company_select = wrapper.page.add_select("Company", [])
@@ -118,11 +118,7 @@
condition: function(node) { return !node.root && node.expandable; },
label: __("Add Child"),
click: function() {
- if(me.ctype=='Account') {
- me.new_account();
- } else {
- me.new_cost_center();
- }
+ me.make_new()
}
},
{
@@ -180,6 +176,15 @@
wrapper.page.set_title(chart_str);
}
},
+
+ make_new: function() {
+ if(this.ctype=='Account') {
+ this.new_account();
+ } else {
+ this.new_cost_center();
+ }
+ },
+
new_account: function() {
var me = this;
@@ -197,7 +202,8 @@
{fieldtype:'Data', fieldname:'account_name', label:__('New Account Name'), reqd:true,
description: __("Name of new Account. Note: Please don't create accounts for Customers and Suppliers, they are created automatically from the Customer and Supplier master")},
{fieldtype:'Select', fieldname:'group_or_ledger', label:__('Group or Ledger'),
- options:'Group\nLedger', description: __('Further accounts can be made under Groups, but entries can be made against Ledger')},
+ options:'Group\nLedger', "default": "Ledger",
+ description: __('Further accounts can be made under Groups, but entries can be made against Ledger')},
{fieldtype:'Select', fieldname:'account_type', label:__('Account Type'),
options: ['', 'Bank', 'Cash', 'Warehouse', 'Receivable', 'Payable',
'Equity', 'Cost of Goods Sold', 'Fixed Asset', 'Expense Account',