<%@language = "javascript" %> <% /* $Revision$ $Id$ File: ins_srtdeel_search_list.asp Description: Vangt de parameters van ins_srtdeel_search op en verwerkt die Parameters: Alle zoek-criteria van ins_srtdeel_search.asp Context: Note: */ %> <% var srtdeel = getQParam("srtdeel", ""); // Identificatie var disc_key = getQParamInt("disc_key", -1); var srtgroep_key = getQParamInt("srtgroep_key", -1); var srtdeel_key = getQParamInt("srtdeel_key", -1); var outputmode = getQParamInt("outputmode", 0); // 0 = screen, 1 = print, 2 = excel etc var showall = getQParamInt("showall", 0) == 1; var authparams = user.checkAutorisation("WEB_INSMGT"); var transitParam = buildTransitParam(["disc_key", "srtgroep_key"]); %>
<% FCLTHeader.Generate({ outputmode: outputmode }); %>
<% var sql = " SELECT " + lcl.xsqla('d.ins_discipline_omschrijving', 'd.ins_discipline_key') + " , " + lcl.xsqla('sg.ins_srtgroep_omschrijving', 'sg.ins_srtgroep_key') + " , s.ins_srtdeel_key" + " , " + lcl.xsqla('s.ins_srtdeel_omschrijving', 's.ins_srtdeel_key') + " , s.ins_srtdeel_code" + " , s.ins_srtdeel_vervaldatum" + " , sg.ins_srtgroep_key" + " , (SELECT count(*)" + " FROM ins_v_aanwezigdeel id" + " WHERE id.ins_srtdeel_key = s.ins_srtdeel_key) aantal" + " FROM ins_v_aanwezigsrtdeel s" + " , ins_v_aanwezigsrtgroep sg" + " , ins_v_aanwezigdiscipline d" + " WHERE s.ins_srtgroep_key = sg.ins_srtgroep_key" + " AND d.ins_discipline_key = sg.ins_discipline_key" // De sleutelsets/cilinderssets niet tonen. + " AND sg.ins_discipline_key = d.ins_discipline_key" + " AND d.ins_discipline_module = 'INS'" + " AND sg.ins_srtgroep_key NOT IN (" + S("sle_ins_srt_groep_key") + ", " + S("cil_ins_srt_groep_key") + ")"; if (disc_key>0) sql += " AND sg.ins_discipline_key = " + disc_key; if (srtgroep_key>0) sql += " AND sg.ins_srtgroep_key = " + srtgroep_key; if (srtdeel_key>0) sql += " AND s.ins_srtdeel_key = " + srtdeel_key; if (srtdeel) sql += " AND (s.ins_srtdeel_code_upper LIKE " + safe.quoted_sql_wild("%" + srtdeel + "%") + " OR s.ins_srtdeel_upper LIKE " + safe.quoted_sql_wild("%" + srtdeel + "%") + ")" sql += " ORDER BY ins_srtdeel_code, ins_srtdeel_omschrijving, ins_discipline_omschrijving, ins_srtgroep_omschrijving"; /********************************** * Callback functies ResultsetTable *********************************/ var addurl = "appl/ins/ins_srtdeel.asp?srtdeel_key=-1" + transitParam; var addButton = []; if (authparams.ALGwritelevel < 9) { addButton = [{ icon: "plus.png", title: L("lcl_add"), action: "FcltMgr.openDetail('" + addurl + "', L('lcl_add'))" }] } /*************************************************** * End callback functies ResultsetTable for FO en BO **************************************************/ var rst = new ResultsetTable({ keyColumn: "ins_srtdeel_key", sql: sql, ID: "insdeeltable", //flexModule: "INS", //flexId: "ins_srtdeel_key", outputmode: outputmode, title: L("lcl_obj_sort"), showAll: showall, buttons: addButton }); // Kolommen rst.addColumn(new Column({caption: L("lcl_obj_srtdeel_code"), content: "ins_srtdeel_code"})); rst.addColumn(new Column({caption: L("lcl_descr"), content: "ins_srtdeel_omschrijving"})); rst.addColumn(new Column({caption: L("lcl_discipline"), content: "ins_discipline_omschrijving"})); rst.addColumn(new Column({caption: L("lcl_obj_group"), content: "ins_srtgroep_omschrijving"})); rst.addColumn(new Column({caption: L("lcl_ins_srtdeel_count"), content: "aantal"})); rst.addColumn(new Column({caption: L("lcl_ins_vervaldatum"), content: "ins_srtdeel_vervaldatum"})); // Acties rst.addAction({ action: "srtEdit", caption: L("lcl_change"), isDefault: true}); var count = rst.processResultset(); %>