VLKC#54124 Float default naar 2 indien data_scale niet in DB aanwezig, SUM(currency) en AVG(currency) moeten currency blijven

svn path=/Website/branches/v2018.1/; revision=38632
This commit is contained in:
2018-07-25 09:07:10 +00:00
parent 541cec23b9
commit 7e66317fcd
2 changed files with 6 additions and 3 deletions

View File

@@ -427,7 +427,7 @@ function report_GET(params)
field.sql = "SUM(" + field_expression + ")";
if (!field.fixedlabel)
field.label = L("lcl_usrrap_label_SUM").format(field.label);
field.newtyp = "float";
field.newtyp = field.typ == "currency" ? "currency" : "float";
field.total = true;
break;
case "C":
@@ -442,7 +442,7 @@ function report_GET(params)
if (!field.fixedlabel)
field.label = L("lcl_usrrap_label_AVG").format(field.label);
field.total = false;
field.newtyp = "float";
field.newtyp = field.typ == "currency" ? "currency" : "float";
break;
case "H":
if (field.typ == "date" || field.typ == "datetime")

View File

@@ -431,7 +431,10 @@ function scaffolding_list(model, scf_params)
if (field.iscurrency)
field.decimals = 2;
else
field.decimals = fnfndbcol(model.table, field.dbs).decimals || 2; // Float default naar 2
{
field.decimals = fnfndbcol(model.table, field.dbs).decimals;
if (field.decimals === null) field.decimals = 2; // Float default naar 2
}
var coldata = { caption: field.orglabel? field.orglabel: field.label,
content: fld,