merged deprecate account balance

This commit is contained in:
Anand Doshi
2012-10-01 11:30:00 +05:30
52 changed files with 3540 additions and 2997 deletions

View File

@@ -122,8 +122,8 @@ erpnext.AccountsChart = Class.extend({
+encodeURIComponent(data.value)+'">Edit</a>');
}
if (data.expandable) {
if (wn.boot.profile.can_create.indexOf(this.ctype) !== -1 ||
wn.boot.profile.in_create.indexOf(this.ctype) !== -1) {
if((wn.boot.profile.can_create.indexOf(this.ctype) !== -1) ||
(wn.boot.profile.in_create.indexOf(this.ctype) !== -1)) {
node_links.push('<a onclick="erpnext.account_chart.new_node();">Add Child</a>');
}
} else if (this.ctype === 'Account' && wn.boot.profile.can_read.indexOf("GL Entry") !== -1) {

View File

@@ -1,6 +1,7 @@
from __future__ import unicode_literals
import webnotes
from webnotes.utils import get_defaults, cstr
from webnotes.utils import get_defaults, fmt_money
from accounts.utils import get_balance_on
@webnotes.whitelist()
def get_companies():
@@ -49,16 +50,7 @@ def get_children():
if ctype == 'Account':
currency = webnotes.conn.sql("select default_currency from `tabCompany` where name = %s", company)[0][0]
for each in acc:
bal = webnotes.conn.sql("select balance from `tabAccount Balance` \
where account = %s and period = %s", (each.get('value'), get_defaults('fiscal_year')))
bal = bal and bal[0][0] or 0
each['balance'] = currency + ' ' + cstr(bal)
bal = get_balance_on(each.get("value"))
each['balance'] = currency + ' ' + fmt_money(bal)
return acc
@webnotes.whitelist()
def get_account_balance():
args = webnotes.form_dict
acc = args['acc']
return 'Rs. 100'

View File

@@ -58,11 +58,6 @@
title="Clear your P/L account and balance your Balance Sheets"
href="#!List/Period Closing Voucher">Close Period Entry</a>
</div>
<div class="section-item">
<a class="section-link"
title="Export multiple Account Ledgers (GL) to spreadsheet (csv)"
href="#!Form/Multi Ledger Report/Multi Ledger Report">Export Multiple Ledgers (GL)</a>
</div>
<div class="section-item">
<a class="section-link"
title = "Helper for managing return of goods (sales or purchase)"