MDUX#54919 Notificaties periodieke taken

svn path=/Customer/trunk/; revision=40321
This commit is contained in:
Sander Schepers
2018-12-20 15:33:56 +00:00
parent d936ad7fd2
commit 4278260f02

View File

@@ -3949,7 +3949,19 @@ AS
sc.ins_srtcontrole_omschrijving,
d.ins_deel_key,
d.ins_deel_omschrijving,
dsc.ins_deelsrtcontrole_plandatum,
COALESCE (
TRUNC (dsc.ins_deelsrtcontrole_plandatum),
TRUNC(COALESCE (
(SELECT MAX (dsc.ins_deelsrtcontrole_plandatum)
FROM ins_deelsrtcontrole dsc
WHERE dsc.ins_deel_key = d.ins_deel_key
AND sc.ins_srtcontrole_key =
dsc.ins_srtcontrole_key
AND dsc.ins_deelsrtcontrole_status IN (5, 6)),
TRUNC(fac.nextcyclusdatedeel (
d.ins_deel_key,
sc.ins_srtcontrole_key,
1))))) AS cpland,
(CASE
WHEN d.ins_alg_ruimte_type = 'R' THEN l.alg_locatie_key
WHEN d.ins_alg_ruimte_type = 'A' THEN a.prs_afdeling_key