RABO#64875 -- Compliance Verklaring inspecties - Aanpassing ivm demarcatie

svn path=/Customer/trunk/; revision=49763
This commit is contained in:
Jos Migo
2021-02-10 13:34:48 +00:00
parent 58817c350f
commit e09af03c35

View File

@@ -1713,7 +1713,14 @@ AS -- Uitgevoerd t/m datum van uitdraai...
aantal_x_uitgevoerd_tot,
CASE
WHEN INSTR (LOWER (x.ins_srtcontroledl_xcp_groep), 'nee') > 0
AND LOWER (dc.ins_deelsrtcontrole_status) NOT IN (6) -- 6 = voltooid
AND (
LOWER (dc.ins_deelsrtcontrole_status) NOT IN (6) -- 6 = voltooid
OR
(LOWER (dc.ins_deelsrtcontrole_status) IN (6)
AND TO_NUMBER(TO_CHAR(dc.ins_deelsrtcontrole_datum, 'YYYY')) < TO_NUMBER(TO_CHAR(sysdate,'YYYY')-1)
AND TO_NUMBER(TO_CHAR(fac.nextcyclusdatedeel (d.ins_deel_key, sc.ins_srtcontrole_key,1),'YYYY')) = TO_NUMBER(TO_CHAR(sysdate,'YYYY')-1)
)
)
THEN
'nvt'
WHEN INSTR (LOWER (x.ins_srtcontroledl_xcp_groep), 'nee') = 0
@@ -1844,7 +1851,12 @@ AS -- Uitgevoerd t/m datum van uitdraai...
periode,
0 aantal_x_uitgevoerd,
0 aantal_x_uitgevoerd_c,
'-1' actie,
CASE
WHEN INSTR (LOWER (x.ins_srtcontroledl_xcp_groep), 'nee') > 0
THEN 'nvt'
ELSE '-1'
END
actie,
x.ins_srtcontroledl_xcp_groep demarcatie,
NULL
opmerking_uitvoer,