From: miker Date: Fri, 29 Sep 2006 21:05:04 +0000 (+0000) Subject: bug fix, missing parameter X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=66257a7a6bf05cf51a6d83677473d184120d5896;p=Evergreen.git bug fix, missing parameter git-svn-id: svn://svn.open-ils.org/ILS/trunk@6266 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/reports/oils_rpt_builder.js b/Open-ILS/web/reports/oils_rpt_builder.js index 7682637a65..9cffb3183e 100644 --- a/Open-ILS/web/reports/oils_rpt_builder.js +++ b/Open-ILS/web/reports/oils_rpt_builder.js @@ -55,28 +55,19 @@ function oilsAddRptDisplayItem(path, name, tform, params) { /* add the selected columns to the report output */ name = (name) ? name : oilsRptPathCol(path); - var param = oilsRptNextParam(); + if( !tform ) tform = 'Bare'; /* add this item to the select blob */ var sel = { - relation:oilsRptPathRel(path), - alias:param + relation: oilsRptPathRel(path), + alias: name, + column: { transform: tform, colname: oilsRptPathCol(path) } }; - if( tform ) { - sel.column = {}; - if( params ) { - params.unshift(oilsRptPathCol(path)); - sel.column[tform] = params; - } else { - sel.column[tform] = oilsRptPathCol(path); - } - } else { sel.column = oilsRptPathCol(path); } - + if( params ) sel.column.params = params; oilsRpt.def.select.push(sel); mergeObjects( oilsRpt.def.from, oilsRptBuildFromClause(path)); - oilsRpt.params[param] = name; oilsRptDebug(); } @@ -105,7 +96,7 @@ function oilsRptBuildFromClause(path) { contains relevant info, plus a list of "fields", or column objects */ var node = oilsIDL[cls]; - var pkey = oilsRptFindField(node.pkey); + var pkey = oilsRptFindField(node, node.pkey); /* a "field" is a parsed version of a column from the IDL, contains datatype, column name, etc. */