FSN#31698 Rapportgenerator aanscherping
svn path=/Website/trunk/; revision=24414
This commit is contained in:
@@ -168,11 +168,14 @@ function model_reports(fac_usrrap_key)
|
||||
for (var i = 0; i < usrrap.columns.length; i++)
|
||||
{
|
||||
var field = { dbs: usrrap.columns[i].name,
|
||||
label: usrrap.columns[i].caption,
|
||||
typ: usrrap.columns[i].datatype.id,
|
||||
group: usrrap.columns[i].group,
|
||||
label: safe.html(usrrap.columns[i].caption), // (lcl) Labels worden altijd geacht html-safe te zijn
|
||||
typ: usrrap.columns[i].datatype.id, // Voor overulen van gewone LCL's ligt de verantwoordelijkheid
|
||||
group: usrrap.columns[i].group, // bij een beheerder maar rapportages wordt misschien wel fe
|
||||
visible: usrrap.columns[i].visible.id
|
||||
};
|
||||
if (field.typ == "integer" && field.dbs.match(/_key$/i)) // Vooral de FCLT_3D filters
|
||||
field.typ = "key";
|
||||
|
||||
if (usrrap.columns[i].filter)
|
||||
{
|
||||
if (usrrap.columns[i].filter.id == "A")
|
||||
|
||||
@@ -79,6 +79,18 @@ function scaffolding_m_list(model, scf_params)
|
||||
var xxx_params = { filter : scf_params.filter || api2.qs2json(), columns: scf_params.list.columns, groupby: scf_params.list.groups };
|
||||
var xxx_array = model.REST_GET(xxx_params);
|
||||
|
||||
function fnHeader(oRs)
|
||||
{
|
||||
var fld = scf_params.list.columns[0];
|
||||
var field = model.fields[fld];
|
||||
return ResultsetTable.formatValue(oRs.Fields(fld).Value, { datatype: field.typ});;
|
||||
};
|
||||
function fnDetail(oRs)
|
||||
{
|
||||
var fld = scf_params.list.columns[1];
|
||||
var field = model.fields[fld];
|
||||
return ResultsetTable.formatValue(oRs.Fields(fld).Value, { datatype: field.typ});;
|
||||
};
|
||||
function fnSubheader(oRs)
|
||||
{
|
||||
var subs = [];
|
||||
@@ -90,7 +102,8 @@ function scaffolding_m_list(model, scf_params)
|
||||
+ ResultsetTable.formatValue(oRs.Fields(fld).Value, { datatype: field.typ})
|
||||
+ "</td>");
|
||||
}
|
||||
return "<div class='listbodykop'><table><tr>" + subs.join("</tr><tr>") + "</tr></table></div>";
|
||||
// Geen listbodykop?
|
||||
return "<div class='listbodytext'><table><tr>" + subs.join("</tr><tr>") + "</tr></table></div>";
|
||||
};
|
||||
|
||||
function fncolLink(oRs, processParams)
|
||||
@@ -103,8 +116,8 @@ function scaffolding_m_list(model, scf_params)
|
||||
keyColumn: ("id" in model.fields?"id":null),
|
||||
ID: model.table,
|
||||
title: model.records_title,
|
||||
headerColumn: scf_params.list.columns[0],
|
||||
detailColumn: scf_params.list.columns[1],
|
||||
headerColumn: fnHeader,
|
||||
detailColumn: scf_params.list.columns.length > 1?fnDetail:null,
|
||||
subheaderColumn: scf_params.list.columns.length > 2?fnSubheader:null,
|
||||
//groupColumn: "gebouw",
|
||||
linkColumn: "fncolLink" in scf_params.list?scf_params.list.fncolLink:fncolLink,
|
||||
|
||||
Reference in New Issue
Block a user