svn path=/Website/trunk/; revision=23656

This commit is contained in:
Erik Groener
2014-12-11 14:34:53 +00:00
parent 2c090271d9
commit ae11cf90cc
2 changed files with 62 additions and 5 deletions

View File

@@ -17,6 +17,7 @@
<!-- #include file="../Shared/discx3d.inc" -->
<!-- #include file="../mld/mld.inc" -->
<!-- #include file="model_issueobjects.inc"-->
<!-- #include file="model_notes.inc"-->
<!-- #include file="model_orders.inc"-->
<%
@@ -24,6 +25,7 @@ model_issues =
{
module: "MLD",
table: "mld_melding",
// aliasprefix: "", // Deze prefix wordt voor fields.name gezet.
primary: "mld_melding_key",
records_name: "issues",
record_name: "issue",
@@ -37,6 +39,7 @@ model_issues =
{ name: "description", dbs: "mld_melding_omschrijving", typ: "varchar", track: L("lcl_descr"), filter: "like" },
{ name: "remark", dbs: "mld_melding_opmerking", typ: "varchar", track: L("lcl_remark")},
{ name: "status", dbs: "mld_melding_status", typ: "key", foreign: mld.getmldstatustext, track: L("lcl_status"), filter: "exact" },
{ name: "flag", dbs: "mld_melding_flag", typ: "key", /* geen echte key, wel key-gedrag */ track: L("lcl_mld_flags"), filter: "exact" },
{ name: "account", dbs: "prs_kostenplaats_key", typ: "key", foreign: "prs_kostenplaats", track: L("lcl_account"), filter: "exact" },
{ name: "handler", dbs: "mld_melding_behandelaar_key", typ: "key", foreign: "prs_perslid", track: L("lcl_mld_behandelaar"), filter: "exact" },
{ name: "location", dbs: "mld_alg_locatie_key", typ: "key", foreign: "alg_locatie", track: L("lcl_location"), filter: "exact" },
@@ -60,6 +63,15 @@ model_issues =
/* gaat uit dat die wordt geimplementeerd met een view fac_v_notes (module, key, columns....) */
return "(module='MLD' OR module IS NULL) AND fac_v_notes.parent_key(+) = mld_melding.mld_melding_key";
}
},
"orders": {
model: model_orders,
joinfield: "mld_melding_key",
single_only: false,
joinfunction: function (params)
{
return " mld_melding.mld_melding_key = mld_opdr.mld_melding_key(+) ";
}
}
},
@@ -78,7 +90,7 @@ model_issues =
if (scope == "fe")
{
query.wheres.push("prs_perslid_key=" + user_key);
query.wheres.push("mld_melding.prs_perslid_key=" + user_key);
}
if (!params.filter.id)
@@ -106,7 +118,7 @@ model_issues =
query.wheres.push("ins_tab_discipline.ins_srtdiscipline_key = ins_srtdiscipline.ins_srtdiscipline_key");
query.tables.push("alg_v_allonroerendgoed");
query.wheres.push("mld_alg_onroerendgoed_keys = alg_v_allonroerendgoed.alg_onroerendgoed_keys(+)");
query.wheres.push("mld_melding.mld_alg_onroerendgoed_keys = alg_v_allonroerendgoed.alg_onroerendgoed_keys(+)");
if (params.authparams.ALGreadlevel > -1)
{
@@ -114,7 +126,7 @@ model_issues =
alg3d = true;
__Log("ALGreadlevel="+params.authparams.ALGreadlevel);
query.tables.push("alg_locatie"); /* opletten: outerjoin denk ik? */
query.wheres.push("mld_alg_onroerendgoed_keys = alg_locatie.alg_locatie_key(+)");
query.wheres.push("mld_melding.mld_alg_onroerendgoed_keys = alg_locatie.alg_locatie_key(+)");
query.tables.push("alg_district");
query.wheres.push("alg_locatie.alg_district_key = alg_district.alg_district_key(+)");
}