FSN#35338 mld_srtdiscipline iets simpeler

svn path=/Website/trunk/; revision=28974
This commit is contained in:
Jos Groot Lipman
2016-04-17 13:08:42 +00:00
parent ebf82fd35a
commit 125b7f282c
2 changed files with 6 additions and 32 deletions

View File

@@ -82,13 +82,6 @@ function model_mld_srtdiscipline()
"label": L("ins_srtdiscipline_opmerking"),
"typ": "memo",
"translate": true
},
"ordertypes": {
"dbs": "ins_srtdiscipline.ins_srtdiscipline_key",
"label": L("mld_typeopdr_m"),
"typ": "varchar",
"hidden_fld": true,
"listfunction": fnshowOrdertypes
}
};
@@ -104,28 +97,5 @@ function model_mld_srtdiscipline()
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
this.REST_DELETE = generic_REST_DELETE(this);
function fnshowOrdertypes(oRs)
{
var res = [];
var srtdisc = oRs.Fields("ordertypes").Value;
var sql = "SELECT DISTINCT t.mld_typeopdr_omschrijving"
+ " , t.mld_typeopdr_upper"
+ " FROM mld_typeopdr t"
+ " , mld_typeopdr_srtdiscipline s"
+ " WHERE t.mld_typeopdr_key = s.mld_typeopdr_key"
+ " AND s.ins_srtdiscipline_key = " + srtdisc
+ " ORDER BY t.mld_typeopdr_upper ASC";
var oRs_t = Oracle.Execute(sql);
while (!oRs_t.eof)
{
res.push(safe.html(oRs_t("mld_typeopdr_omschrijving").Value));
oRs_t.MoveNext();
}
oRs_t.Close();
return res.join("<br>");
}
}
%>

View File

@@ -21,7 +21,11 @@ var this_model = new model_mld_srtdiscipline();
scaffolding(this_model,
{
"search": {
"autosearch": true
"autosearch": true,
"filters": [
"name",
"remark"
]
},
"list": {
"columns": [
@@ -31,7 +35,7 @@ scaffolding(this_model,
"locationdata",
"objectdata",
"orderdata",
"ordertypes"
"mld_opdrtypes.typeopdr_a"
]
},
"show": {