FSN#36262: twee bevindingen op inspecties inplannen.

svn path=/Website/branches/v2016.1/; revision=29319
This commit is contained in:
Maykel Geerdink
2016-05-09 08:57:29 +00:00
parent 11900dff69
commit 1a4a22e9c9
2 changed files with 5 additions and 3 deletions

View File

@@ -163,7 +163,8 @@ var authparams = user.checkAutorisation("WEB_INSUSE");
+ " AND idsc.ins_deelsrtcontrole_key = (SELECT MAX(idsc2.ins_deelsrtcontrole_key)"
+ " FROM ins_deelsrtcontrole idsc2"
+ " WHERE idsc2.ins_deel_key = di.ins_deel_key"
+ " AND idsc2.ins_srtcontrole_key = di.ins_srtcontrole_key))";
+ " AND idsc2.ins_srtcontrole_key = di.ins_srtcontrole_key"
+ " AND idsc2.ins_deelsrtcontrole_status IN (5, 6)))";
var sql = "SELECT *"
+ " FROM (WITH defined_inspect AS (SELECT id.ins_srtdeel_key srtdeel_key"

View File

@@ -522,7 +522,8 @@ function ins_list (pautfunction, params)
+ " AND idsc.ins_deelsrtcontrole_key = (SELECT MAX(idsc2.ins_deelsrtcontrole_key)"
+ " FROM ins_deelsrtcontrole idsc2"
+ " WHERE idsc2.ins_deel_key = di.ins_deel_key"
+ " AND idsc2.ins_srtcontrole_key = di.ins_srtcontrole_key))";
+ " AND idsc2.ins_srtcontrole_key = di.ins_srtcontrole_key"
+ " AND idsc2.ins_deelsrtcontrole_status IN (5, 6)))";
// Eerstvolgende inspectie
var sqlNext = "SELECT ins_deel_key"
@@ -1512,7 +1513,7 @@ function ins_list (pautfunction, params)
var dtsoon = new Date;
dtsoon.setDate(dtsoon.getDate() + S("ins_inspect_soon_days"));
dtsoon.setHours(0,0,0,0); // trunc datum
var dtlate = new Date().setHours(0,0,0,0);
var dtlate = new Date(new Date().setHours(0,0,0,0));
if (dt >= dtsoon)
return lclass; // meer dan S("ins_inspect_soon_days") dagen in de toekomst