PCHD#33161: Extra filtervelden XD contractbeheer.

svn path=/Website/trunk/; revision=26137
This commit is contained in:
Maykel Geerdink
2015-08-31 12:34:21 +00:00
parent bce86be761
commit fe76fe3c70

View File

@@ -39,7 +39,7 @@ model_contracts =
"department" : { dbs: "prs_afdeling_key_eig", typ: "key", foreign: "prs_afdeling", track: true, label: L("lcl_cnt_owner"), filter: "exact" },
"service" : { dbs: "prs_dienst_key", typ: "key", foreign: "prs_dienst", track: true, label: L("lcl_prs_companies_dienst"), filter: "exact" },
"contracttype" : { dbs: "ins_discipline_key", typ: "key", foreign: "cnt_discipline", track: true, label: L("lcl_cnt_srttype"), filter: "exact" },
// MGE: TODO: locatie_key kan via de tabel cnt_contract_plaats, cnt_contract_object of cnt_contract_onrgoed gekoppeld zijn. Onderstande regel is dus nog niet helemaal goed.
// LET OP: De locatie (of gebouw, terrein of ruimte) kan naast de tabel cnt_contract_plaats ook via de tabellen cnt_contract_object of cnt_contract_onrgoed gekoppeld zijn.
"location" : { dbs: "cnt_contract_plaats.cnt_alg_plaats_key",
typ: "key", foreign: "alg_locatie", track: true, label: L("lcl_location"), filter: cnt.getLocationSql }
},
@@ -76,7 +76,7 @@ model_contracts =
if (!(params.filter.startdate || params.filter.reminderdate || params.filter.canceldate || params.filter.enddate))
{
/* Limitation: if no date filters, then default to the active contracts */
query.wheres.push("SYSDATE BETWEEN cnt_contract_looptijd_van AND cnt_contract_looptijd_tot");
query.wheres.push("TRUNC(SYSDATE) BETWEEN cnt_contract_looptijd_van AND cnt_contract_looptijd_tot");
}
}
@@ -85,7 +85,7 @@ model_contracts =
query.wheres.push("cnt_contract_plaats.cnt_contract_plaats_verwijder IS NULL");
if (params.filter.location)
{
query.wheres.push("cnt_contract_plaats.cnt_alg_plaats_code = 'L'");
query.wheres.push("cnt_contract_plaats.cnt_alg_plaats_code IN ('L', 'G', 'T')");
//query.wheres.push("cnt_contract_plaats.cnt_alg_plaats_key IN (" + params.filter.location + ")");
//query.wheres.push("c.cnt_contract_key IN"
// + " (SELECT cnt_contract_key FROM cnt_v_aanwezigcontract_plaats"