|
|
|
|
@@ -60,6 +60,7 @@ var xcp_vervaldatum = null;
|
|
|
|
|
var xcp_opmerk;
|
|
|
|
|
var xcp_aantal;
|
|
|
|
|
var xcp_aanteh;
|
|
|
|
|
var xcp_key=-1;
|
|
|
|
|
var periodereartext = "";
|
|
|
|
|
var opmerk;
|
|
|
|
|
if (srtcont_key > 0)
|
|
|
|
|
@@ -115,6 +116,7 @@ if (srtcont_key > 0)
|
|
|
|
|
+ " , xcp.ins_srtcontroledl_xcp_opmerk"
|
|
|
|
|
+ " , xcp.ins_srtcontroledl_xcp_aantal"
|
|
|
|
|
+ " , xcp.ins_srtcontroledl_xcp_aanteh"
|
|
|
|
|
+ " , xcp.ins_srtcontroledl_xcp_key"
|
|
|
|
|
+ " , xcp.ins_scenario_key"
|
|
|
|
|
+ " , isc.ins_srtcontrole_opmerking"
|
|
|
|
|
+ " FROM ins_srtcontroledl_xcp xcp"
|
|
|
|
|
@@ -141,6 +143,7 @@ if (srtcont_key > 0)
|
|
|
|
|
xcp_opmerk = oRs("ins_srtcontroledl_xcp_opmerk").Value;
|
|
|
|
|
xcp_aantal = oRs("ins_srtcontroledl_xcp_aantal").Value;
|
|
|
|
|
xcp_aanteh = oRs("ins_srtcontroledl_xcp_aanteh").Value;
|
|
|
|
|
xcp_key = oRs("ins_srtcontroledl_xcp_key").Value;
|
|
|
|
|
opmerk = oRs("ins_srtcontrole_opmerking").Value;
|
|
|
|
|
}
|
|
|
|
|
oRs.Close();
|
|
|
|
|
@@ -427,12 +430,15 @@ if (srtcont_key > 0)
|
|
|
|
|
function onChangeSrtControle()
|
|
|
|
|
{
|
|
|
|
|
$("#periode").val(getSrtControleValue("periode_xcp"));
|
|
|
|
|
$("#periode").attr("placeholder", getSrtControleValue("periode_std"));
|
|
|
|
|
$("#periode").prop("title", getSrtControleValue("periode_std"));
|
|
|
|
|
$("#stdperiode").text( getSrtControleValue("periode_std")? " [" + getSrtControleValue("periode_std") + "]" : "");
|
|
|
|
|
|
|
|
|
|
$("#aantal").val(getSrtControleValue("aantal_xcp"));
|
|
|
|
|
$("#aantal").attr("placeholder", getSrtControleValue("aantal_std"));
|
|
|
|
|
$("#stdaantal").text( getSrtControleValue("aantal_std")? " [" + getSrtControleValue("aantal_std") + "]" : "");
|
|
|
|
|
$("#aanteh").val(getSrtControleValue("aanteh_xcp"));
|
|
|
|
|
$("#aanteh").attr("placeholder", getSrtControleValue("aanteh_std"));
|
|
|
|
|
$("#stdaanteh").text( getSrtControleValue("aanteh_std")? " [" + getSrtControleValue("aanteh_std") + "]" : "");
|
|
|
|
|
|
|
|
|
|
isMJOB = getSrtControleValue("ismjob") == 1;
|
|
|
|
|
@@ -453,24 +459,31 @@ if (srtcont_key > 0)
|
|
|
|
|
onChangeEenheid();
|
|
|
|
|
|
|
|
|
|
$("#kosten1").val(getSrtControleAmountValue("kosten_xcp1"));
|
|
|
|
|
$("#kosten1").attr("placeholder", getSrtControleValue("kosten_std1"));
|
|
|
|
|
$("#stdkosten1").text( getSrtControleValue("kosten_std1")? " [" + getSrtControleValue("kosten_std1") + "]" : "");
|
|
|
|
|
|
|
|
|
|
$("#kosten2").val(getSrtControleAmountValue("kosten_xcp2"));
|
|
|
|
|
$("#kosten2").attr("placeholder", getSrtControleValue("kosten_std2"));
|
|
|
|
|
$("#stdkosten2").text( getSrtControleValue("kosten_std2")? " [" + getSrtControleValue("kosten_std2") + "]" : "");
|
|
|
|
|
|
|
|
|
|
$("#kosten3").val(getSrtControleAmountValue("kosten_xcp3"));
|
|
|
|
|
$("#kosten3").attr("placeholder", getSrtControleValue("kosten_std3"));
|
|
|
|
|
$("#stdkosten3").text( getSrtControleValue("kosten_std3")? " [" + getSrtControleValue("kosten_std3") + "]" : "");
|
|
|
|
|
|
|
|
|
|
$("#uren").val(getSrtControleAmountValue("uren_xcp"));
|
|
|
|
|
$("#uren").attr("placeholder", getSrtControleValue("uren_std"));
|
|
|
|
|
$("#stduren").text( getSrtControleValue("uren_std")? " [" + getSrtControleValue("uren_std") + "]" : "");
|
|
|
|
|
|
|
|
|
|
$("#materiaal").val(getSrtControleAmountValue("materiaal_xcp"));
|
|
|
|
|
$("#materiaal").attr("placeholder", getSrtControleValue("materiaal_std"));
|
|
|
|
|
$("#stdmateriaal").text( getSrtControleValue("materiaal_std")? " [" + getSrtControleValue("materiaal_std") + "]" : "");
|
|
|
|
|
|
|
|
|
|
$("#perc").val(getSrtControleValue("perc_xcp"));
|
|
|
|
|
$("#perc").attr("placeholder", getSrtControleValue("perc_std"));
|
|
|
|
|
$("#stdperc").text( getSrtControleValue("perc_std")? " [" + getSrtControleValue("perc_std") + "]" : "");
|
|
|
|
|
|
|
|
|
|
$("#groep").val(getSrtControleValue("groep_xcp"));
|
|
|
|
|
$("#groep").attr("placeholder", getSrtControleValue("groep_std"));
|
|
|
|
|
$("#stdgroep").text( getSrtControleValue("groep_std")? " [" + getSrtControleValue("groep_std") + "]" : "");
|
|
|
|
|
|
|
|
|
|
var vervaldatum_std_dag = getSrtControleValue("eind_std_dag");
|
|
|
|
|
@@ -484,6 +497,7 @@ if (srtcont_key > 0)
|
|
|
|
|
// Zet de vervaldatum
|
|
|
|
|
$("#show_vervaldatum").datepicker("setDate", (vervaldatum_xcp === ""? "" : vervaldatum_xcp));
|
|
|
|
|
$("#stdvervaldatum").text(vervaldatum_std === ""? "" : " [" + toDateString(vervaldatum_std) + "]");
|
|
|
|
|
$("#show_vervaldatum").attr("placeholder", toDateString(vervaldatum_std));
|
|
|
|
|
|
|
|
|
|
$("#opmerk").val(getSrtControleValue("opmerk_xcp"));
|
|
|
|
|
// De standaard opmerking kan lang zijn en daarom niet tonen na het label.
|
|
|
|
|
@@ -526,7 +540,7 @@ if (srtcont_key > 0)
|
|
|
|
|
if ($("#kosten" + number).val() != '' && !isNaN(kosten))
|
|
|
|
|
{
|
|
|
|
|
$("#kosten" + number).val(num2currEditable(kosten));
|
|
|
|
|
var paantal_std = <%=aantal%>;
|
|
|
|
|
var paantal_std = '<%=aantal%>';
|
|
|
|
|
var paantal_xcp = $("#aantal").val().replace(',', '.');
|
|
|
|
|
var paantal = paantal_xcp? paantal_xcp : paantal_std;
|
|
|
|
|
if (paantal > 1)
|
|
|
|
|
@@ -578,6 +592,7 @@ if (srtcont_key > 0)
|
|
|
|
|
<form name="u2" action="ins_xcp_save.asp?ins_key=<%=ins_key%><%=transitParam%>" method="post">
|
|
|
|
|
<input type="hidden" id="mode" name="mode" value="1">
|
|
|
|
|
<input type="hidden" id="scen_key" name="scen_key" value="<%=scen_key%>">
|
|
|
|
|
<input type="hidden" id="xcp_key" name="xcp_key" value="<%=xcp_key%>">
|
|
|
|
|
<% sql = "SELECT ins_scenario_omschrijving"
|
|
|
|
|
+ " FROM ins_scenario"
|
|
|
|
|
+ " WHERE ins_scenario_key = " + scen_key;
|
|
|
|
|
@@ -753,9 +768,7 @@ if (srtcont_key > 0)
|
|
|
|
|
+ ", , , "
|
|
|
|
|
+ ", , "
|
|
|
|
|
});
|
|
|
|
|
%>
|
|
|
|
|
<input type="hidden" id="xcp_key" name="xcp_key" value="-1">
|
|
|
|
|
<%
|
|
|
|
|
|
|
|
|
|
sql = "SELECT 0, " + safe.quoted_sql(L("lcl_ins_controle_uurlijks")) + " FROM DUAL"
|
|
|
|
|
+ " UNION SELECT 1, " + safe.quoted_sql(L("lcl_ins_controle_dagelijks")) + " FROM DUAL"
|
|
|
|
|
+ " UNION SELECT 2, " + safe.quoted_sql(L("lcl_ins_controle_wekelijks")) + " FROM DUAL"
|
|
|
|
|
@@ -763,7 +776,7 @@ if (srtcont_key > 0)
|
|
|
|
|
+ " UNION SELECT 4, " + safe.quoted_sql(L("lcl_ins_controle_jaarlijks")) + " FROM DUAL";
|
|
|
|
|
FCLTselector("eenheid",
|
|
|
|
|
sql,
|
|
|
|
|
{ label: L("lcl_ins_controle_eenheid") + " " + L("lcl_ins_controle").toLowerCase() + "<span id='stdeenheid'></span>",
|
|
|
|
|
{ label: L("lcl_ins_controle_eenheid") + " " + L("lcl_ins_controle").toLowerCase() + "<span class='stdmjb' id='stdeenheid'></span>",
|
|
|
|
|
emptyOption: isMJOB? null : "",
|
|
|
|
|
initKey: isMJOB? 4 : xcp_eenheid,
|
|
|
|
|
required: false,
|
|
|
|
|
@@ -774,7 +787,7 @@ if (srtcont_key > 0)
|
|
|
|
|
});
|
|
|
|
|
RWFIELDTR("periode",
|
|
|
|
|
"fldshort",
|
|
|
|
|
L("lcl_ins_controle_period") + "<span id='stdperiode'></span>",
|
|
|
|
|
L("lcl_ins_controle_period") + "<span class='stdmjb' id='stdperiode'></span>",
|
|
|
|
|
xcp_periode,
|
|
|
|
|
{ datatype: "number",
|
|
|
|
|
//required: true,
|
|
|
|
|
@@ -874,7 +887,7 @@ if (srtcont_key > 0)
|
|
|
|
|
<%
|
|
|
|
|
RWFIELDTR("aantal",
|
|
|
|
|
"fldshort",
|
|
|
|
|
L("lcl_amount") + "<span id='stdaantal'></span>",
|
|
|
|
|
L("lcl_amount") + "<span class='stdmjb' id='stdaantal'></span>",
|
|
|
|
|
xcp_aantal,
|
|
|
|
|
{ datatype: "currency",
|
|
|
|
|
html: "onBlur='calcKosten(1);calcKosten(2);calcKosten(3);'",
|
|
|
|
|
@@ -884,7 +897,7 @@ if (srtcont_key > 0)
|
|
|
|
|
|
|
|
|
|
RWFIELDTR("aanteh",
|
|
|
|
|
"fldaanteh",
|
|
|
|
|
L("ins_srtcontrole_eenheid") + " " + L("lcl_amount").toLowerCase() + "<span id='stdaanteh'></span>",
|
|
|
|
|
L("ins_srtcontrole_eenheid") + " " + L("lcl_amount").toLowerCase() + "<span class='stdmjb' id='stdaanteh'></span>",
|
|
|
|
|
xcp_aanteh,
|
|
|
|
|
{ datatype: "text",
|
|
|
|
|
readonly: !this_ins.canChangeXcp && !this_ins.hasAnyWriteXcp,
|
|
|
|
|
@@ -894,7 +907,7 @@ if (srtcont_key > 0)
|
|
|
|
|
if (ins_xcp_active_cost & 1)
|
|
|
|
|
RWFIELDTR("kosten1",
|
|
|
|
|
"fldshort",
|
|
|
|
|
L("ins_srtcontrole_kosten") + " (" + (S("currency_pref")).replace(/^\s+|\s+$/gm,'') + ")<span id='stdkosten1'></span>",
|
|
|
|
|
L("ins_srtcontrole_kosten") + " (" + (S("currency_pref")).replace(/^\s+|\s+$/gm,'') + ")<span class='stdmjb' id='stdkosten1'></span>",
|
|
|
|
|
xcp_kosten,
|
|
|
|
|
{ datatype: "currency",
|
|
|
|
|
html: "onBlur='calcKosten(1)'",
|
|
|
|
|
@@ -905,7 +918,7 @@ if (srtcont_key > 0)
|
|
|
|
|
if (ins_xcp_active_cost & 2)
|
|
|
|
|
RWFIELDTR("kosten2",
|
|
|
|
|
"fldshort",
|
|
|
|
|
L("ins_srtcontrole_kosten2") + " (" + S("currency_pref").replace(/^\s+|\s+$/gm,'') + ")<span id='stdkosten2'></span>",
|
|
|
|
|
L("ins_srtcontrole_kosten2") + " (" + S("currency_pref").replace(/^\s+|\s+$/gm,'') + ")<span class='stdmjb' id='stdkosten2'></span>",
|
|
|
|
|
xcp_kosten2,
|
|
|
|
|
{ datatype: "currency",
|
|
|
|
|
html: "onBlur='calcKosten(2)'",
|
|
|
|
|
@@ -916,7 +929,7 @@ if (srtcont_key > 0)
|
|
|
|
|
if (ins_xcp_active_cost & 4)
|
|
|
|
|
RWFIELDTR("kosten3",
|
|
|
|
|
"fldshort",
|
|
|
|
|
L("ins_srtcontrole_kosten3") + " (" + S("currency_pref").replace(/^\s+|\s+$/gm,'') + ")<span id='stdkosten3'></span>",
|
|
|
|
|
L("ins_srtcontrole_kosten3") + " (" + S("currency_pref").replace(/^\s+|\s+$/gm,'') + ")<span class='stdmjb' id='stdkosten3'></span>",
|
|
|
|
|
xcp_kosten3,
|
|
|
|
|
{ datatype: "currency",
|
|
|
|
|
html: "onBlur='calcKosten(3)'",
|
|
|
|
|
@@ -927,7 +940,7 @@ if (srtcont_key > 0)
|
|
|
|
|
if (ins_xcp_active_cost & 8)
|
|
|
|
|
RWFIELDTR("materiaal",
|
|
|
|
|
"fldshort",
|
|
|
|
|
L("ins_srtcontrole_materiaal") + " (" + S("currency_pref").replace(/^\s+|\s+$/gm,'') + ")<span id='stdmateriaal'></span>",
|
|
|
|
|
L("ins_srtcontrole_materiaal") + " (" + S("currency_pref").replace(/^\s+|\s+$/gm,'') + ")<span class='stdmjb' id='stdmateriaal'></span>",
|
|
|
|
|
xcp_materiaal,
|
|
|
|
|
{ datatype: "currency",
|
|
|
|
|
html: "onBlur='calcMateriaal()'",
|
|
|
|
|
@@ -937,7 +950,7 @@ if (srtcont_key > 0)
|
|
|
|
|
});
|
|
|
|
|
RWFIELDTR("uren",
|
|
|
|
|
"fldshort",
|
|
|
|
|
L("ins_srtcontrole_uren") + "<span id='stduren'></span>",
|
|
|
|
|
L("ins_srtcontrole_uren") + "<span class='stdmjb' id='stduren'></span>",
|
|
|
|
|
xcp_uren,
|
|
|
|
|
{ datatype: "currency",
|
|
|
|
|
html: "onBlur='calcUren()'",
|
|
|
|
|
@@ -946,7 +959,7 @@ if (srtcont_key > 0)
|
|
|
|
|
});
|
|
|
|
|
RWFIELDTR("perc",
|
|
|
|
|
"fldshort",
|
|
|
|
|
L("ins_srtcontrole_percentage") + "<span id='stdperc'></span>",
|
|
|
|
|
L("ins_srtcontrole_percentage") + "<span class='stdmjb' id='stdperc'></span>",
|
|
|
|
|
xcp_perc,
|
|
|
|
|
{ datatype: "number",
|
|
|
|
|
readonly: !this_ins.canChangeXcp && !this_ins.hasAnyWriteXcp,
|
|
|
|
|
@@ -955,7 +968,7 @@ if (srtcont_key > 0)
|
|
|
|
|
//RWFIELDTR("bits", "fldshort trbits3", L("lcl_ins_controle_bits"), "", {trclass: "trbits", datatype: "number" });
|
|
|
|
|
RWFIELDTR("groep",
|
|
|
|
|
"fldgroep",
|
|
|
|
|
L("lcl_ins_controle_groep") + "<span id='stdgroep'></span>",
|
|
|
|
|
L("lcl_ins_controle_groep") + "<span class='stdmjb' id='stdgroep'></span>",
|
|
|
|
|
xcp_groep,
|
|
|
|
|
{ datatype: "text",
|
|
|
|
|
readonly: !this_ins.canChangeXcp && !this_ins.hasAnyWriteXcp,
|
|
|
|
|
@@ -970,14 +983,14 @@ if (srtcont_key > 0)
|
|
|
|
|
});
|
|
|
|
|
FCLTcalendar("vervaldatum",
|
|
|
|
|
{ datum: xcp_vervaldatum,
|
|
|
|
|
label : L("lcl_ins_vervaldatum") + "<span id='stdvervaldatum'></span>",
|
|
|
|
|
label : L("lcl_ins_vervaldatum") + "<span class='stdmjb' id='stdvervaldatum'></span>",
|
|
|
|
|
initEmpty: xcp_vervaldatum == null,
|
|
|
|
|
readonly: !this_ins.canChangeXcp && !this_ins.hasAnyWriteXcp,
|
|
|
|
|
suppressEmpty: !this_ins.canChangeXcp && !this_ins.hasAnyWriteXcp
|
|
|
|
|
});
|
|
|
|
|
RWTEXTAREATR("opmerk",
|
|
|
|
|
"fldremark",
|
|
|
|
|
L("ins_srtcontrole_opmerking") + "<span id='stdopmerk' title='" + opmerk + "'></span>",
|
|
|
|
|
L("ins_srtcontrole_opmerking") + "<span class='stdmjb' id='stdopmerk' title='" + opmerk + "'></span>",
|
|
|
|
|
xcp_opmerk,
|
|
|
|
|
{ readonly: !this_ins.canChangeXcp && !this_ins.hasAnyWriteXcp,
|
|
|
|
|
suppressEmpty: !this_ins.canChangeXcp && !this_ins.hasAnyWriteXcp
|
|
|
|
|
|