FSN#31475 Huurcontracten zijn obsolete geraakt

svn path=/Website/trunk/; revision=33160
This commit is contained in:
Peter Feij
2017-03-15 16:18:17 +00:00
parent 067d093e04
commit 26e7a50336

View File

@@ -109,10 +109,10 @@ var subject = L("lcl_cnt_contract") + " " + cnt_info.nummer_intern+ (cnt_info.ve
ROFIELD ("flddep", L("lcl_cnt_afdeling"), cnt_info.afdeling_naam, {suppressEmpty: true});
}
else
{
{
ROFIELD ("fld", L("lcl_cnt_company"), cnt_info.bedrijf_naam, {suppressEmpty: true});
ROFIELD ("fld", L("lcl_person"), cnt_info.perslid_naam, {suppressEmpty: true});
}
}
ROFIELD ("flddate", L("lcl_cnt_looptijd"), toDateString(cnt_info.looptijd_van)+ " " +L("lcl_tot")+" "+ toDateString(cnt_info.looptijd_tot));
@@ -214,60 +214,7 @@ var subject = L("lcl_cnt_contract") + " " + cnt_info.nummer_intern+ (cnt_info.ve
+ " ORDER BY 3";
scopetext = L("lcl_cnt_objects");
break;
case 2: // Huur van ruimte of terreinsector: deze werden eigenlijk niet direct als scope getoond geloof ik
sql = " SELECT NULL code"
+ ", plaatsaanduiding scope"
+ ", NULL gewicht"
+ ", type type"
+ ", totaal_opp"
+ ", alg_onrgoed_key plaats_key"
+ " FROM"
+ " (SELECT rm.alg_ruimte_aanduiding plaatsaanduiding"
+ ", co.alg_onrgoed_key"
+ ", (SELECT fac.safe_to_number(alg_onrgoedkenmerk_waarde)"
+ " FROM alg_onrgoedkenmerk"
+ " WHERE alg_onrgoed_key = co.alg_onrgoed_key"
+ " AND alg_kenmerk_key = " + S("alg_ruimte_comm_opp_key") + ") totaal_opp"
+ ", 'R' type"
+ " FROM alg_v_ruimte_gegevens rm"
+ ", cnt_contract_onrgoed co"
+ ", alg_srtruimte sr"
+ " WHERE co.alg_onrgoed_niveau = 'R'"
+ " AND co.alg_onrgoed_key = rm.ALG_RUIMTE_KEY"
+ " AND sr.alg_srtruimte_key = co.alg_srtonrgoed_key"
+ " AND co.cnt_mld_melding_key IS NULL"
+ " AND co.cnt_contract_key = " + cnt_key + ""
+ " UNION"
+ " SELECT lc.alg_locatie_code || ' - ' || alg_terreinsector_omschrijving plaatsaanduiding"
+ ", co.alg_onrgoed_key"
+ ", (SELECT fac.safe_to_number(alg_onrgoedkenmerk_waarde) from alg_onrgoedkenmerk"
+ " WHERE alg_onrgoed_key = co.alg_onrgoed_key"
+ " AND alg_kenmerk_key = " + S("alg_terrein_comm_opp_key") + ") totaal_opp"
+ ", 'T' type"
+ " FROM alg_terreinsector tr"
+ ", cnt_contract_onrgoed co"
+ ", alg_srtterreinsector sr"
+ ", alg_locatie lc"
+ " WHERE co.alg_onrgoed_niveau = 'T'"
+ " AND co.alg_onrgoed_key = tr.alg_terreinsector_key"
+ " AND sr.alg_srtterreinsector_key = co.alg_srtonrgoed_key"
+ " AND lc.alg_locatie_key = tr.alg_locatie_key"
+ " AND co.cnt_mld_melding_key IS NULL"
+ " AND co.cnt_contract_key = " + cnt_key + ""
+ " UNION"
+ " SELECT " + safe.quoted_sql(L("lcl_location")) + " plaatsaanduiding"
+ ", co.alg_onrgoed_key"
+ ", null totaal_opp"
+ ", 'L' type"
+ " FROM alg_locatie lc"
+ ", cnt_contract_onrgoed co"
+ ", alg_srtruimte sr"
+ " WHERE co.alg_onrgoed_niveau = 'L'"
+ " AND co.alg_onrgoed_key = lc.alg_locatie_key"
+ " AND sr.alg_srtruimte_key = co.alg_srtonrgoed_key"
+ " AND co.cnt_mld_melding_key IS NULL"
+ " AND co.cnt_contract_key = " + cnt_key
+ ")";
case 2: // DEPRECATED
break;
case 3: // onderhoud op objectsoorten en/of plaats
case 5: // onderhoud op plaats
@@ -393,16 +340,16 @@ var subject = L("lcl_cnt_contract") + " " + cnt_info.nummer_intern+ (cnt_info.ve
}
var tsql = "SELECT COUNT(*) FROM cnt_contract_note n WHERE n.cnt_contract_key = " + cnt_key;
toRs = Oracle.Execute(tsql);
toRs = Oracle.Execute(tsql);
BUTTON(L("lcl_cnt_frame_notes")+" ("+toRs(0).value+")", {linkid: "./notitie.asp?node=contract&key="+cnt_key, dataicon: "comment", dataajax: 'false'});
toRs.close();
if (cnt_info.srtcontract_type == 6)
{
var csql = "SELECT COUNT(*) FROM cnt_contract "
+ " WHERE cnt_contract_verwijder is null"
+ " and cnt_contract_status = 0"
+ " and cnt_contract_status = 0"
+ " and cnt_contract_looptijd_van < trunc(sysdate)"
+ " and cnt_contract_looptijd_tot > trunc(sysdate)"
+ " and cnt_contract_looptijd_tot > trunc(sysdate)"
+ " and cnt_contract_mantel_key = " + cnt_key
coRs = Oracle.Execute(csql);
BUTTON(L("lcl_cnt_child_contracts") +" ("+coRs(0).value+")", {linkid: "./cnt_list.asp?mantel_key="+cnt_key, dataicon: "comment", dataajax: 'false'});