<%@language = "javascript" %> <% /* $Revision$ $Id$ File: prj_edit_scenario.asp Description: Muteerscherm voor verhuisscenario's Parameters: prj_key Scenario key (REQUIRED) verynew optional Context: Note: Submit naar prj_edit_scenario_save.asp */ %> <% FCLTHeader.Requires({ plugins:["jQuery", "kenmerk"], js: ["../PRJ/prj_edit_scenario.js", "num2curr.js"] }); /***** Get webform parameters *****/ var prj_key = getQParamInt("prj_key", -1); /***** End get webform parameters *****/ var autfunction = "WEB_PRJBOF"; var authparams = user.checkAutorisation(autfunction); if (prj_key > 0) { // Bestaand verhuisscenario sql = "SELECT s.prj_scenario_omschrijving" + ", s.mld_melding_key" + ", prj_scenario_datum" + ", s.prj_scenario_status" + ", s.prj_scenario_raming" + ", s.prj_scenario_opmerking" + ", " + S("prs_pers_string") + " naam" + ", s.prj_scenario_aanmaak" + ", s.prs_perslid_key" + ", rx.alg_verdieping_key" + " FROM prj_scenario s" + ", prs_perslid p" + ", mld_melding m" + ", mld_stdmelding stdm" + ", prj_ruimte rx" + " WHERE s.prs_perslid_key = p.prs_perslid_key(+)" + " AND s.mld_melding_key = m.mld_melding_key(+)" + " AND m.mld_stdmelding_key = stdm.mld_stdmelding_key(+)" + " AND s.prj_scenario_key = rx.prj_scenario_key(+)" + " AND s.prj_scenario_key = " + prj_key; oRs = Oracle.Execute(sql); if (!oRs.eof) { prj_omschr = oRs("prj_scenario_omschrijving").value; mld_key = oRs("mld_melding_key").value; if (!mld_key) mld_key = -1; //prj_verhuisaanvraag = oRs("verhuisaanvraag").value; prj_datum = new Date(oRs("prj_scenario_datum").value); prj_status = oRs("prj_scenario_status").value; prj_raming = oRs("prj_scenario_raming").value; prj_opm = oRs("prj_scenario_opmerking").value; prj_name = oRs("naam").value; prj_aanmaak = oRs("prj_scenario_aanmaak").value; prj_perslidkey = oRs("prs_perslid_key").value; prj_verdieping = oRs("alg_verdieping_key").value; if (!prj_verdieping) prj_verdieping = -1; } } else { // Nieuw verhuisscenario prj_omschr = ""; mld_key = -1; //prj_verhuisaanvraag = oRs("verhuisaanvraag").value; prj_datum = new Date(); prj_status = ""; prj_raming = 0; prj_opm = ""; prj_name = user.naam(); prj_aanmaak = new Date(); prj_perslidkey = user_key; prj_verdieping = -1; if (!prj_verdieping) prj_verdieping = -1; } %>
<% FCLTHeader.Generate(); %>
<% var buttons = [ {title: L("lcl_submit"), icon: "opslaan.png", action: "mld_submit()"}, {title: L("lcl_cancel"), icon: "undo.png", action: "mld_cancel()"} ]; IFRAMER_HEADER(L("lcl_prj_frame_algemeen"), buttons); %>
<% BLOCK_START("prjInfo", L("lcl_prj_scenario") + (prj_key > 0? " " + prj_key : ""), true); RWFIELDTR("prj_omschr", "fldoms", L("lcl_descr"), prj_omschr, {maxlength: 30, required: true}); FCLTcalendar("prjdate", { datum: prj_datum, label : L("lcl_prj_geplande_aanvang"), initEmpty: prj_key<0 }); sql = "SELECT mld_melding_key" + ", m.mld_melding_key || '-' || "+lcl.xsqla('stdm.mld_stdmelding_omschrijving','stdm.mld_stdmelding_key') + " FROM mld_melding m" + ", mld_stdmelding stdm" + " WHERE stdm.mld_stdmelding_key = m.mld_stdmelding_key" + ((authparams.ALGreadlevel > -1) ? " AND mld_alg_locatie_key IN" + " (SELECT alg_locatie_key" + " FROM fac_v_my_locations" + " WHERE prs_perslid_key = " + user_key + " AND niveau = " + authparams.ALGreadlevel + ")" : "") + " AND stdm.mld_ins_discipline_key = " + S("prj_discipline_key") + " AND (m.mld_melding_status IN (4,7) OR mld_melding_key = " + mld_key + ")" + " ORDER BY 1"; FCLTselector("mld_key", sql, { initKey: mld_key, label: L("lcl_prj_verhuisaanvraag"), trclass:"primsearch", emptyOption: "", initEmpty: true }); RWFIELDTR("prj_status", "fldprjstatus", L("lcl_status"), prj_status, {maxlength: 30}); BLOCK_END(); BLOCK_START("prjKosten", L("lcl_prj_kosten"), true); %> <% RWFIELDTR("prj_raming", "fldprjraming", "" + L("lcl_prj_cost") + "", prj_raming, {maxlength: 10, datatype: "currency"}); BLOCK_END(); BLOCK_START("prjOpmerking", L("lcl_txt")); // Opmerking RWTEXTAREATR("prj_opm", "fldremark", L("lcl_remark"), prj_opm, {html: "rows='3'", maxlength: 2000}); BLOCK_END(); IFACE.FORM_END(); %>