[fixes][currency symbol] fieldtype in report
This commit is contained in:
parent
b780ef5ff3
commit
4d783036ff
3 changed files with 4 additions and 6 deletions
|
|
@ -942,9 +942,9 @@ CurrencyField.prototype.get_field_currency = function() {
|
|||
};
|
||||
|
||||
CurrencyField.prototype.get_formatted = function(val) {
|
||||
if(this.not_in_form)
|
||||
if(!this.doctype)
|
||||
return val;
|
||||
|
||||
|
||||
return format_currency(val, this.get_field_currency());
|
||||
}
|
||||
CurrencyField.prototype.set_disp = function(val) {
|
||||
|
|
|
|||
|
|
@ -247,7 +247,8 @@ _f.Grid.prototype.set_cell_value = function(cell) {
|
|||
// variations
|
||||
if(cell.cellIndex) {
|
||||
$(cell.div).html(wn.format(v, hc.df, {for_print:
|
||||
((doc && doc.docstatus==0 && !cint(hc.df ? hc.df.read_only : 1)) ? true : false)}));
|
||||
((doc && doc.docstatus==0 && !cint(hc.df ? hc.df.read_only : 1))
|
||||
? true : false)}, doc));
|
||||
} else {
|
||||
// Index column
|
||||
cell.div.style.padding = '2px';
|
||||
|
|
|
|||
|
|
@ -127,7 +127,6 @@ $.extend(wn.meta, {
|
|||
|
||||
get_field_currency: function(df, doc) {
|
||||
var currency = wn.boot.sysdefaults.currency;
|
||||
|
||||
if(!doc && cur_frm)
|
||||
doc = cur_frm.doc;
|
||||
|
||||
|
|
@ -145,8 +144,6 @@ $.extend(wn.meta, {
|
|||
}
|
||||
} else if(doc && doc[df.options]) {
|
||||
currency = doc[df.options];
|
||||
} else if(cur_frm && cur_frm.doc[df.options]) {
|
||||
currency = cur_frm.doc[df.options];
|
||||
}
|
||||
}
|
||||
return currency;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue