SGSF#85300 -- SGSF Implementatie, inrichting email notificatie catering
svn path=/Customer/trunk/; revision=68801
This commit is contained in:
@@ -29,7 +29,6 @@ SET DEFINE OFF
|
||||
------ payload begin ------
|
||||
CREATE OR REPLACE VIEW SGSF_V_CATERING_NOTI
|
||||
(
|
||||
res_key,
|
||||
key,
|
||||
code,
|
||||
sender,
|
||||
@@ -39,40 +38,50 @@ CREATE OR REPLACE VIEW SGSF_V_CATERING_NOTI
|
||||
xemail,
|
||||
xmobile
|
||||
)
|
||||
AS
|
||||
SELECT distinct rrr.res_reservering_key res_key,
|
||||
rrr.res_rsv_ruimte_key key,
|
||||
'CUST01' code,
|
||||
NULL sender,
|
||||
NULL receiver,
|
||||
'Catering voor reservering '||res_reservering_key||'/'||rrr.res_rsv_ruimte_volgnr||'.' text,
|
||||
NULL xkey,
|
||||
g.alg_gebouw_email xemail,
|
||||
NULL xmobile
|
||||
FROM res_rsv_ruimte rrr,
|
||||
res_rsv_artikel rra,
|
||||
res_artikel ra,
|
||||
res_ruimte_opstelling rro,
|
||||
res_ruimte rr,
|
||||
res_alg_ruimte rar,
|
||||
alg_v_onroerendgoed_gegevens a,
|
||||
alg_gebouw g,
|
||||
fac_notificatie_job fnj
|
||||
WHERE rrr.res_rsv_ruimte_key = rra.res_rsv_ruimte_key
|
||||
AND ra.res_artikel_key = rra.res_artikel_key
|
||||
AND rrr.res_ruimte_opstel_key = rro.res_ruimte_opstel_key
|
||||
AND rr.res_ruimte_key = rro.res_ruimte_key
|
||||
AND rar.res_ruimte_key = rr.res_ruimte_key
|
||||
AND a.alg_ruimte_key = rar.alg_ruimte_key
|
||||
AND g.alg_gebouw_key = a.alg_gebouw_key
|
||||
AND g.alg_gebouw_email IS NOT NULL
|
||||
AND rrr.res_status_fo_key=2
|
||||
AND rrr.res_rsv_ruimte_verwijder IS NULL
|
||||
AND rrr.res_rsv_ruimte_dirtlevel=0
|
||||
AND fnj.fac_notificatie_job_view='SGSF_V_CATERING_NOTI'
|
||||
AND COALESCE(rra.res_rsv_artikel_mutatie, rra.res_rsv_artikel_aanmaak)
|
||||
BETWEEN fnj.fac_notificatie_job_lastrun
|
||||
AND fnj.fac_notificatie_job_nextrun;
|
||||
AS
|
||||
SELECT key,
|
||||
code,
|
||||
sender,
|
||||
receiver,
|
||||
text,
|
||||
xkey,
|
||||
xemail,
|
||||
xmobile
|
||||
FROM (
|
||||
SELECT distinct rrr.res_reservering_key res_key,
|
||||
rrr.res_rsv_ruimte_key key,
|
||||
'CUST01' code,
|
||||
NULL sender,
|
||||
NULL receiver,
|
||||
'Catering voor reservering '||res_reservering_key||'/'||rrr.res_rsv_ruimte_volgnr||'.' text,
|
||||
NULL xkey,
|
||||
g.alg_gebouw_email xemail,
|
||||
NULL xmobile
|
||||
FROM res_rsv_ruimte rrr,
|
||||
res_rsv_artikel rra,
|
||||
res_artikel ra,
|
||||
res_ruimte_opstelling rro,
|
||||
res_ruimte rr,
|
||||
res_alg_ruimte rar,
|
||||
alg_v_onroerendgoed_gegevens a,
|
||||
alg_gebouw g,
|
||||
fac_notificatie_job fnj
|
||||
WHERE rrr.res_rsv_ruimte_key = rra.res_rsv_ruimte_key
|
||||
AND ra.res_artikel_key = rra.res_artikel_key
|
||||
AND rrr.res_ruimte_opstel_key = rro.res_ruimte_opstel_key
|
||||
AND rr.res_ruimte_key = rro.res_ruimte_key
|
||||
AND rar.res_ruimte_key = rr.res_ruimte_key
|
||||
AND a.alg_ruimte_key = rar.alg_ruimte_key
|
||||
AND g.alg_gebouw_key = a.alg_gebouw_key
|
||||
AND g.alg_gebouw_email IS NOT NULL
|
||||
AND rrr.res_status_fo_key=2
|
||||
AND rrr.res_rsv_ruimte_verwijder IS NULL
|
||||
AND rrr.res_rsv_ruimte_dirtlevel=0
|
||||
AND fnj.fac_notificatie_job_view='SGSF_V_CATERING_NOTI'
|
||||
AND COALESCE(rra.res_rsv_artikel_mutatie, rra.res_rsv_artikel_aanmaak)
|
||||
BETWEEN fnj.fac_notificatie_job_lastrun
|
||||
AND fnj.fac_notificatie_job_nextrun
|
||||
);
|
||||
|
||||
|
||||
CREATE OR REPLACE VIEW SGSF_V_KOPPELZALEN_NL
|
||||
|
||||
Reference in New Issue
Block a user