FCLT#89443: Wijzigingen en verbeteringsvoorstellen MJOB module (Punt 7).

svn path=/Website/trunk/; revision=70561
This commit is contained in:
Maykel Geerdink
2025-10-07 16:25:41 +00:00
parent 3fbce15049
commit 8e8249ce1e
2 changed files with 14 additions and 2 deletions

View File

@@ -5409,12 +5409,14 @@ ins = {checkAutLevel:
+ " FROM ins_deelsrtcontrole idsc"
+ " WHERE idsc.ins_deel_key = cv.ins_deel_key"
+ " AND idsc.ins_srtcontrole_key = cv.ins_srtcontrole_key"
+ " AND idsc.ins_scenario_key = 1"
+ " AND idsc.ins_deelsrtcontrole_status = 2"
+ " AND EXTRACT(YEAR FROM idsc.ins_deelsrtcontrole_freezedate) = CV.vervangingsjaar) freezed"
+ " , (SELECT COUNT(idsc.ins_deel_key)"
+ " FROM ins_deelsrtcontrole idsc"
+ " WHERE idsc.ins_deel_key = cv.ins_deel_key"
+ " AND idsc.ins_srtcontrole_key = cv.ins_srtcontrole_key"
+ " AND idsc.ins_scenario_key = 1"
+ " AND idsc.ins_deelsrtcontrole_status = 3"
+ " AND EXTRACT(YEAR FROM idsc.ins_deelsrtcontrole_freezedate) = CV.vervangingsjaar) execute"
+ " , (SELECT idsc.ins_deelsrtcontrole_key"
@@ -6027,7 +6029,14 @@ ins = {checkAutLevel:
+ " AND idsc2.ins_srtcontrole_key = xcp.ins_srtcontrole_key"
+ " AND idsc2.ins_scenario_key = xcp.ins_scenario_key)"
+ " AND (idsc1.ins_deelsrtcontrole_status = 0"
+ " OR (idsc1.ins_deelsrtcontrole_status = 6 AND EXTRACT(YEAR FROM idsc1.ins_deelsrtcontrole_freezedate) != EXTRACT(YEAR FROM SYSDATE))))"
+ " OR (idsc1.ins_deelsrtcontrole_status = 6 AND EXTRACT(YEAR FROM idsc1.ins_deelsrtcontrole_freezedate) != EXTRACT(YEAR FROM SYSDATE)))"
+ " AND NOT EXISTS (SELECT idsc2.ins_deelsrtcontrole_key"
+ " FROM ins_deelsrtcontrole idsc2"
+ " WHERE idsc2.ins_deel_key = xcp.ins_deel_key"
+ " AND idsc2.ins_srtcontrole_key = xcp.ins_srtcontrole_key"
+ " AND idsc2.ins_scenario_key = xcp.ins_scenario_key"
+ " AND idsc2.ins_deelsrtcontrole_status IN (2, 3))"
+ " )"
+ " OR NOT EXISTS"
+ " (SELECT idsc2.ins_deelsrtcontrole_key"
+ " FROM ins_deelsrtcontrole idsc2"

View File

@@ -200,7 +200,10 @@ if (freeze && groupby < 9)
oRs.Close();
freeze_sql += " END;"
Oracle.Execute(freeze_sql);
if (ingesloten.length)
{
Oracle.Execute(freeze_sql);
}
for (var i = 0; i < ingesloten.length; i++)
{