added format_currency and added options to all currency fields

This commit is contained in:
Rushabh Mehta
2013-01-23 19:39:51 +05:30
parent 6382a42dbe
commit 597d470e63
96 changed files with 804 additions and 604 deletions

View File

@@ -112,9 +112,8 @@ erpnext.AccountsChart = Class.extend({
if (ctype == 'Account') {
var bal = treenode.data && treenode.data.balance.split(' ') || ['',''];
if (bal && flt(bal[1])) {
treenode.parent.append('<span class="balance-area">\
<span style="color: #aaa">'+ bal[0] + '</span> '
+ fmt_money(bal[1]) + '</span>');
treenode.parent.append('<span class="balance-area">'
+ format_currency(bal[1], bal[0]) + '</span>');
}
}
}

View File

@@ -1,6 +1,6 @@
from __future__ import unicode_literals
import webnotes
from webnotes.utils import get_defaults, fmt_money
from webnotes.utils import get_defaults
from accounts.utils import get_balance_on
@webnotes.whitelist()

View File

@@ -83,9 +83,11 @@ pscript.stmt_new = function(stmt,company_name,level,period,year) {
$i('stmt_tree').innerHTML = 'Refreshing....';
$i('stmt_tree').style.display = 'block';
var company = sel_val($i('stmt_company'))
var arg = {
statement:sel_val($i('stmt_type'))
,company:sel_val($i('stmt_company'))
,company:company,
,period:sel_val($i('stmt_period'))
,year:sel_val($i('stmt_fiscal_year'))
}
@@ -136,9 +138,12 @@ pscript.stmt_new = function(stmt,company_name,level,period,year) {
}
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])
if (i==0)
per.innerHTML = (nl[i][j]+'').bold();
else if(nl[i][0] == 1 || nl[i][0] == 4)
per.innerHTML = format_currency(nl[i][j], erpnext.get_currency(company)).bold();
else
per.innerHTML = format_currency(nl[i][j], erpnext.get_currency(company))
} else
per.innerHTML = '-';
}