mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
added format_currency and added options to all currency fields
This commit is contained in:
@@ -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>');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 = '-';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user