226 lines
8.0 KiB
Plaintext
226 lines
8.0 KiB
Plaintext
<%@language = "javascript" %>
|
|
<%
|
|
/* $Revision$
|
|
$Id$
|
|
|
|
File: alg_edit_gebouw.asp
|
|
Description: edit of toevoegen van een gebouw
|
|
Parameters: bld_key
|
|
|
|
|
|
Context:
|
|
Note:
|
|
|
|
*/ %>
|
|
<!--#include file="../Shared/common.inc" -->
|
|
<!--#include file="../Shared/iface.inc" -->
|
|
<!--#include file="../Shared/selector.inc" -->
|
|
|
|
<!--#include file="../Shared/plaatsselector.inc" -->
|
|
<!--#include file="../Shared/kostenplaatsselector.inc" -->
|
|
<!-- #include file="alg_flexkenmerk.inc" -->
|
|
<!-- #include file="alg.inc" -->
|
|
|
|
<%
|
|
FCLTHeader.Requires({plugins:["suggest","jQuery", "kenmerk"], js: []})
|
|
|
|
var bld_key = getQParamInt("bld_key");
|
|
|
|
var onrgoedlvl = "G";
|
|
var this_alg = alg.func_enabled(bld_key, onrgoedlvl);
|
|
user.auth_required_or_abort(this_alg.writeman || (bld_key>0&&this_alg.writeuse));
|
|
|
|
if (bld_key > 0)
|
|
{
|
|
sql = " select * "
|
|
+ " FROM ALG_GEBOUW "
|
|
+ " WHERE alg_gebouw_key = " + bld_key;
|
|
|
|
oRs = Oracle.Execute(sql);
|
|
if (oRs.Eof)
|
|
shared.record_not_found("<!--"+bld_key+"-->");
|
|
|
|
var bld_srtkey = oRs("ALG_SRTGEBOUW_KEY").value;
|
|
var bld_naam = oRs("ALG_GEBOUW_NAAM").value;
|
|
var bld_code = oRs("ALG_GEBOUW_CODE").value;
|
|
var bld_descr = oRs("ALG_GEBOUW_OMSCHRIJVING").value;
|
|
var bld_maak = oRs("ALG_GEBOUW_AANMAAK").value;
|
|
var bld_teken = oRs("ALG_GEBOUW_GETEKEND").value;
|
|
var bld_opp = oRs("ALG_GEBOUW_BRUTO_VLOEROPP").value;
|
|
var bld_omtrek = oRs("ALG_GEBOUW_OMTREK").value;
|
|
var bld_inhoud = oRs("ALG_GEBOUW_INHOUD").value;
|
|
var bld_opmerk = oRs("ALG_GEBOUW_OPMERKING").value;
|
|
var mld_adres = oRs("MLD_ADRES_KEY").value;
|
|
var prs_kstpl = oRs("PRS_KOSTENPLAATS_KEY").value;
|
|
var bld_ordrnr = oRs("ALG_GEBOUW_ORDERNR").value;
|
|
var bld_dwgx = oRs("ALG_GEBOUW_DWGX").value;
|
|
var bld_dwgy = oRs("ALG_GEBOUW_DWGY").value;
|
|
var bld_x = oRs("ALG_GEBOUW_X").value;
|
|
var bld_y = oRs("ALG_GEBOUW_Y").value;
|
|
var bld_bez = oRs("ALG_GEBOUW_BEZ").value;
|
|
var dienstniveau = oRs("mld_dienstniveau_key").value;
|
|
var beginuur = oRs("alg_gebouw_beginuur").value;
|
|
var einduur = oRs("alg_gebouw_einduur").value;
|
|
var werkdagen = oRs("alg_gebouw_werkdagen").value;
|
|
oRs.Close();
|
|
}
|
|
else
|
|
werkdagen = 1;
|
|
%>
|
|
|
|
<html>
|
|
<head>
|
|
<%
|
|
FCLTHeader.Generate();
|
|
%>
|
|
<script>
|
|
function alg_submit()
|
|
{
|
|
document.activeElement.blur(); // trigger laatste onChanges
|
|
if (!validateForm("u2"))
|
|
return false;
|
|
document.forms.u2.submit();
|
|
}
|
|
function alg_cancel()
|
|
{
|
|
FcltMgr.closeDetail(window, { cancel: true } );
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body id="editbody">
|
|
<%
|
|
var buttons = [ {title: L("lcl_submit"), action:"alg_submit()", icon: "opslaan.png" },
|
|
{title: L("lcl_cancel"), action:"alg_cancel()", icon: "undo.png" } ];
|
|
IFRAMER_HEADER(L("lcl_alg_gebouw_frame"), buttons);
|
|
%>
|
|
<div id="edit">
|
|
<form name="u2"
|
|
action="alg_edit_gebouw_save.asp?bld_key=<%=bld_key%>"
|
|
method="post"
|
|
target="hidFrameSubmit"
|
|
onSubmit="alg_submit();">
|
|
<%
|
|
if (this_alg.writeman)
|
|
manRWFIELD = RWFIELDTR;
|
|
else
|
|
manRWFIELD = function (a,b,c,d,e) { ROFIELDTR(b,c,d,e) }; // als geen USE of <self> dan zijn er veel readonly
|
|
|
|
BLOCK_START("algLoc1", "");
|
|
|
|
FCLTplaatsselector(this_alg.authparams("WEB_ALGMAN").ALGwritelevel, {
|
|
gebouwkey: bld_key,
|
|
startlevel: 2, //Locatie
|
|
eindlevel: 2, // Locatie
|
|
readonly: bld_key > 0,
|
|
required: true });
|
|
|
|
manRWFIELD("bld_naam", "fld", L("lcl_estate_gebouw_man_name"), bld_naam, {required: true, maxlength: 30});
|
|
|
|
sql = "SELECT alg_srtgebouw_key, "
|
|
+ " "+lcl.xsqla('alg_srtgebouw_omschrijving', 'alg_srtgebouw_key')
|
|
+ " FROM alg_srtgebouw "
|
|
+ " WHERE alg_srtgebouw_verwijder IS NULL "
|
|
+ "ORDER BY UPPER("+lcl.xsql('alg_srtgebouw_omschrijving', 'alg_srtgebouw_key')+")";
|
|
|
|
FCLTselector("bld_srtkey", sql,
|
|
{ label: L("lcl_estate_gebouw_srtgebouw"),
|
|
initKey: bld_srtkey,
|
|
emptyOption: "",
|
|
readonly: !this_alg.writeman
|
|
}
|
|
);
|
|
|
|
manRWFIELD("bld_code", "fld", L("lcl_estate_gebouw_man_code"), bld_code, {required: true, maxlength: 12});
|
|
manRWFIELD("bld_opmerk", "fld", L("lcl_estate_gebouw_man_opmerk"), bld_opmerk, {maxlength: 50});
|
|
|
|
FCLTkostenplaatsselector( "prs_kstpl",
|
|
"prs_kstpl",
|
|
user_key,
|
|
{ kostenplaatsKey: prs_kstpl,
|
|
label: L("lcl_prs_dept_kosten"),
|
|
filtercode: "G",
|
|
readonly: !this_alg.writeman
|
|
});
|
|
|
|
manRWFIELD("bld_ordrnr", "fld", L("lcl_estate_gebouw_ordernr"), bld_ordrnr, {maxlength: 30});
|
|
|
|
sql = "SELECT mld_dienstniveau_key, "
|
|
+ lcl.xsqla("mld_dienstniveau_omschr", "mld_dienstniveau_key")
|
|
+ " FROM mld_dienstniveau "
|
|
+ "ORDER BY UPPER("+lcl.xsql("mld_dienstniveau_omschr", "mld_dienstniveau_key")+")";
|
|
|
|
FCLTselector("dienstniveau", sql,
|
|
{ label: L("lcl_mld_dienst_niveau"),
|
|
initKey: dienstniveau,
|
|
emptyOption: "",
|
|
readonly: !this_alg.writeuse
|
|
});
|
|
|
|
BLOCK_END();
|
|
BLOCK_START("algLoc2", "");
|
|
|
|
manRWFIELD("bld_opp", "fld", L("lcl_estate_gebouw_man_bruto_vloeropp"), bld_opp, {maxlength: 15});
|
|
manRWFIELD("bld_omtrek", "fld", L("lcl_estate_gebouw_man_omtrek"), bld_omtrek, {maxlength: 15});
|
|
manRWFIELD("bld_inhoud", "fld", L("lcl_estate_gebouw_man_inhoud"), bld_inhoud, {maxlength: 15});
|
|
|
|
sql ="SELECT mld_adres_key, "
|
|
+ " mld_adres_naam "
|
|
+ " FROM mld_v_afleveradres "
|
|
+ "ORDER BY mld_adres_naam ";
|
|
|
|
FCLTselector("mld_adres", sql,
|
|
{ label: L("lcl_delivery_address"),
|
|
initKey: mld_adres,
|
|
emptyOption: "",
|
|
readonly: !this_alg.writeman
|
|
});
|
|
|
|
manRWFIELD("bld_x", "fld", L("lcl_geoxcoord"), bld_x, {maxlength: 25});
|
|
manRWFIELD("bld_y", "fld", L("lcl_geoycoord"), bld_y, {maxlength: 25});
|
|
if (this_alg.writeman)
|
|
CHECKBOXTR(L("lcl_estate_gebouw_bez"), "fldalgbez", "bld_bez", bld_bez==1)
|
|
|
|
var times = [];
|
|
for (i=0; i<24; i++)
|
|
{
|
|
sql = " SELECT " + String(i+0/4) + ", '" + String(i) + ":00' FROM DUAL"
|
|
+ " UNION ALL SELECT " + String(i+1/4) + ", '" + String(i) + ":15' FROM DUAL"
|
|
+ " UNION ALL SELECT " + String(i+2/4) + ", '" + String(i) + ":30' FROM DUAL"
|
|
+ " UNION ALL SELECT " + String(i+3/4) + ", '" + String(i) + ":45' FROM DUAL"
|
|
times.push(sql);
|
|
}
|
|
FCLTselector("bld_beginuur", times.join(" UNION ALL "),
|
|
{ label: L("lcl_estate_gebouw_beginuur"),
|
|
initKey: beginuur,
|
|
emptyOption: "",
|
|
readonly: !this_alg.writeman
|
|
}
|
|
);
|
|
FCLTselector("bld_einduur", times.join(" UNION ALL "),
|
|
{ label: L("lcl_estate_gebouw_einduur"),
|
|
initKey: einduur,
|
|
emptyOption: "",
|
|
readonly: !this_alg.writeman
|
|
}
|
|
);
|
|
if (this_alg.writeman)
|
|
CHECKBOXTR(L("lcl_estate_gebouw_werkdagen"), "fldalgwerk", "bld_werkdagen", werkdagen==1)
|
|
|
|
BLOCK_END();
|
|
|
|
generateFlexKenmerkBlock ({
|
|
onrgoed_key : bld_key,
|
|
onrgoed_niveau : onrgoedlvl,
|
|
reado : false,
|
|
flexcolumns : S("alg_flexcolumns"),
|
|
this_alg : this_alg
|
|
});
|
|
IFACE.FORM_END();
|
|
%>
|
|
</form>
|
|
<iframe src="../Shared/empty.html" name="hidFrameSubmit" style="display:none"></iframe>
|
|
</div>
|
|
</body>
|
|
</html>
|