diff --git a/APPL/API2/model_ctr_disc_params.inc b/APPL/API2/model_ctr_disc_params.inc index a45cd3c7fd..3b754b548b 100644 --- a/APPL/API2/model_ctr_disc_params.inc +++ b/APPL/API2/model_ctr_disc_params.inc @@ -45,7 +45,7 @@ model_ctr_disc_params = "dbs": "ctr_disc_params_ismjob", "label": L("ctr_ismjob"), "typ": "check0", - "required": true + "readonly": S("mjb_enabled") != 1 } } } diff --git a/APPL/API2/model_ins_srtcontrole.inc b/APPL/API2/model_ins_srtcontrole.inc index 36552e1230..9f71440f92 100644 --- a/APPL/API2/model_ins_srtcontrole.inc +++ b/APPL/API2/model_ins_srtcontrole.inc @@ -189,7 +189,7 @@ function model_ins_srtcontrole() "label": L("ins_srtcontrole_percentage"), "typ": "float" }, - "btw": { + "vat": { "dbs": "fin_btwtabelwaarde_key", "label": L("ins_srtcontrole_btw"), "typ": "key", diff --git a/APPL/INS/ins_edit_deel.asp b/APPL/INS/ins_edit_deel.asp index 3047665c5c..53d7be524e 100644 --- a/APPL/INS/ins_edit_deel.asp +++ b/APPL/INS/ins_edit_deel.asp @@ -682,6 +682,10 @@ var ins_deel_aantal = 1; }); if (S("ins_explode_objects") == 0) RWFIELDTR("count", "fldshort", L("lcl_count"), ins_deel_aantal, {datatype: "number", readonly: !this_ins.canChangeAlg, required: true}); + else if(ins_key < 0 || isNext > 0 ) + { + RWFIELDTR("count", "fldshort", L("lcl_count"), 1, {datatype: "number", readonly: !this_ins.canChangeAlg}); + } RWFIELDTR("opmerk", "fld", L("lcl_ins_opmerking"), opmerk, {maxlength: 320, readonly: !this_ins.canChangeAlg}); %> diff --git a/APPL/INS/ins_xcp_save.asp b/APPL/INS/ins_xcp_save.asp index 7ba705f47b..3f438e509d 100644 --- a/APPL/INS/ins_xcp_save.asp +++ b/APPL/INS/ins_xcp_save.asp @@ -178,7 +178,7 @@ else // Deactiveren of alle parameter waarden zijn identiek aan de standaard waarden en er is geen groep ingevuld. if (xcp_key < 0) // Nieuwe inspectie. { // Geen nieuw record aanmaken. - var result = { success: true, srtcontroledl_xcp_key: xcp_key, warning: L("lcl_ins_controle_identical_values") }; + var result = { success: true, srtcontroledl_xcp_key: xcp_key, toaster: L("lcl_ins_controle_identical_values") }; } else { // Dan kan het record verwijderd worden. diff --git a/APPL/MGT/ctr_discipline.asp b/APPL/MGT/ctr_discipline.asp index 8c1e56c4b8..3eddb96b3a 100644 --- a/APPL/MGT/ctr_discipline.asp +++ b/APPL/MGT/ctr_discipline.asp @@ -26,11 +26,15 @@ scaffolding(this_model, "list": { "columns": [ "id", - "name" + "name", + "inspection_type", + "ismjob" ] }, - "edit": { - "modal": true - } + "wrap": { + "frames": [{ url: "fac_functie.asp?mode=list&ins_discipline={0}", + autfunction: "WEB_PRSSYS" + }] + } }); %> diff --git a/APPL/MGT/ins_srtcontrole.asp b/APPL/MGT/ins_srtcontrole.asp index 04399c3869..b26a5a17b1 100644 --- a/APPL/MGT/ins_srtcontrole.asp +++ b/APPL/MGT/ins_srtcontrole.asp @@ -28,7 +28,6 @@ scaffolding(this_model, "requires": { "js": [ "../mgt/srtinstallatieselector.js", - "../mgt/ins_srtcontrole.js", "../mgt/mgt_tools.js" ] } diff --git a/APPL/MGT/ins_srtcontrole.js b/APPL/MGT/ins_srtcontrole.js index e69e614d1a..009d86cf1b 100644 --- a/APPL/MGT/ins_srtcontrole.js +++ b/APPL/MGT/ins_srtcontrole.js @@ -1,3 +1,8 @@ +/* + $Revision$ + $Id$ +*/ + var changed_bits = 0; var changed_mode = 0; @@ -8,16 +13,12 @@ $(document).ready(function () { function init_srtcontrole() { - $("#inspection_mode").change(function() {change_mode(); }); - $("#unit").change(function() {change_unit(); }); - $("#_moment").click(function() {SelectBits(); }); - $("#ctr_discipline").change(function() {change_ctr_discipline(); }); + $("#inspection_mode").change(change_mode); + $("#unit").change(change_unit); + $("#_moment").click(SelectBits); + $("#ctr_discipline").change(change_ctr_discipline); - var controlemode = $("#inspection_mode").val() == 0; - if (!controlemode) - { - $("#_moment").parent().parent().hide(); - } + change_ctr_discipline(); // initieel goed zetten. } function change_mode() @@ -37,18 +38,19 @@ function change_unit() function callback_ctr_info(data, textStatus) { - if (textStatus == "success") - { if (data.ismjob) { $("#unit").val(4); // Jaarlijks. - $("#unit").attr('disabled', true); + $("#unit").prop('disabled', true); + $("#inspection_mode").val(1); // Interval + $("#inspection_mode").prop('disabled', true); } else - $("#unit").attr('disabled', false); - } - else - alert("callback_ctr_info: " + textStatus); + { + $("#unit").prop('disabled', false); + $("#inspection_mode").prop('disabled', false); + } + change_mode(); } function change_ctr_discipline() @@ -65,7 +67,7 @@ function SelectBits() var proturl = "../ins/ins_bitsform.asp" + "?eenheid=" + $("#unit").val() + "&bits=" + $("#bits").val(); - parent.FcltMgr.openModalDetail(proturl, "Select moment", + parent.FcltMgr.openModalDetail(proturl, L("ins_srtcontrole_moment"), { callback: function (data) { if (data.eenheid >= 0) {