HCAS#39141: Urgentie d.m.v. kleurcodering periodiek onderhoud.
svn path=/Website/branches/v2016.3/; revision=32653
This commit is contained in:
@@ -478,7 +478,7 @@ function ins_list (pautfunction, params)
|
|||||||
if (ins_deelsrtcontrole_plandatum == null)
|
if (ins_deelsrtcontrole_plandatum == null)
|
||||||
var dt = new Date(oRs("inspectie_next").Value);
|
var dt = new Date(oRs("inspectie_next").Value);
|
||||||
else
|
else
|
||||||
var dt = new Date(oRs("ins_deelsrtcontrole_plandatum").Value);
|
var dt = new Date(ins_deelsrtcontrole_plandatum);
|
||||||
dt.setHours(0,0,0,0); // trunc datum
|
dt.setHours(0,0,0,0); // trunc datum
|
||||||
var dtsoon = new Date;
|
var dtsoon = new Date;
|
||||||
dtsoon.setDate(dtsoon.getDate() + S("ins_inspect_soon_days"));
|
dtsoon.setDate(dtsoon.getDate() + S("ins_inspect_soon_days"));
|
||||||
@@ -486,15 +486,16 @@ function ins_list (pautfunction, params)
|
|||||||
var dtlate = new Date(new Date().setHours(0,0,0,0));
|
var dtlate = new Date(new Date().setHours(0,0,0,0));
|
||||||
|
|
||||||
// Als het een eerste controle(1) is, dan staat "Onbekend/Undetermined" in beeld. Dan ook rood weergeven.
|
// Als het een eerste controle(1) is, dan staat "Onbekend/Undetermined" in beeld. Dan ook rood weergeven.
|
||||||
|
// Als de eerste controle is ingepland (en eventueel gestart) dan staat de plandatum in beeld en is undetermined false.
|
||||||
var nonext = oRs("nonext").Value == 1;
|
var nonext = oRs("nonext").Value == 1;
|
||||||
var ctr_controle_type = oRs("ctr_controle_type").Value;
|
var ctr_controle_type = oRs("ctr_controle_type").Value;
|
||||||
var undetermined = (nonext && ctr_controle_type == 1); // Eerste Controle(1).
|
var undetermined = (nonext && ctr_controle_type == 1 && ins_deelsrtcontrole_plandatum == null); // Eerste Controle(1) nog niet ingepland en uitgevoerd.
|
||||||
|
|
||||||
if (dt >= dtsoon && !undetermined)
|
if (dt >= dtsoon && !undetermined)
|
||||||
return lclass; // meer dan S("ins_inspect_soon_days") dagen in de toekomst
|
return lclass; // meer dan S("ins_inspect_soon_days") dagen in de toekomst
|
||||||
|
|
||||||
if (dt >= dtlate && !undetermined)
|
if (dt >= dtlate && !undetermined)
|
||||||
return lclass + " expired1"; // Binnenkort
|
return lclass + " expired1"; // Binnenkort
|
||||||
|
|
||||||
return lclass + " expired2"; // Te laat
|
return lclass + " expired2"; // Te laat
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user