SZDB#75972 -- Inrichten beleef-o-theek
svn path=/Customer/trunk/; revision=60887
This commit is contained in:
@@ -40,6 +40,8 @@ AS
|
||||
p_nr IN NUMBER
|
||||
) RETURN VARCHAR2;
|
||||
|
||||
PROCEDURE res_after_insert (p_res_rsv_ruimte_key IN NUMBER);
|
||||
|
||||
END;
|
||||
/
|
||||
|
||||
@@ -228,6 +230,54 @@ AS
|
||||
RETURN v_return_str;
|
||||
END;
|
||||
|
||||
PROCEDURE res_after_insert (p_res_rsv_ruimte_key IN NUMBER)
|
||||
AS
|
||||
v_count NUMBER;
|
||||
v_onderwerp VARCHAR2(100);
|
||||
BEGIN
|
||||
SELECT COUNT (*)
|
||||
INTO v_count
|
||||
FROM fac_tracking t, fac_srtnotificatie sn
|
||||
WHERE t.fac_tracking_refkey = p_res_rsv_ruimte_key
|
||||
AND t.fac_srtnotificatie_key = sn.fac_srtnotificatie_key
|
||||
AND sn.fac_srtnotificatie_code = 'RES2BO';
|
||||
|
||||
IF v_count = 0
|
||||
THEN
|
||||
|
||||
SELECT 'Nieuwe reservering (' || rrr.res_reservering_key || '/' || rrr.res_rsv_ruimte_volgnr || ') ' || rd.res_deel_omschrijving || ' op ' || to_char(res_rsv_ruimte_van, 'dd-mm-yyyy')
|
||||
INTO v_onderwerp
|
||||
FROM res_rsv_ruimte rrr, res_rsv_deel rrd, res_deel rd
|
||||
WHERE rrr.res_rsv_ruimte_key = rrd.res_rsv_ruimte_key
|
||||
AND rrd.res_deel_key = rd.res_deel_key
|
||||
AND rrr.res_rsv_ruimte_key = p_res_rsv_ruimte_key
|
||||
AND rrr.res_activiteit_key = 30 -- Beleef-o-theek
|
||||
AND ROWNUM = 1;
|
||||
|
||||
fac.trackaction ('RES2BO',
|
||||
p_res_rsv_ruimte_key,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
fac.putnotificationsrtprio (NULL,
|
||||
10981, -- Notificatie user beleef-o-theek
|
||||
'RES2BO',
|
||||
p_res_rsv_ruimte_key,
|
||||
v_onderwerp,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
2,
|
||||
NULL);
|
||||
END IF;
|
||||
EXCEPTION WHEN NO_DATA_FOUND
|
||||
THEN
|
||||
-- dan was het geen reservering van de Beleef-o-theek
|
||||
NULL;
|
||||
END;
|
||||
|
||||
END;
|
||||
/
|
||||
|
||||
@@ -1804,7 +1854,7 @@ SELECT alg_gebouw_code,
|
||||
-- View voor de afhandeling van speel-o-theek atributen
|
||||
CREATE OR REPLACE VIEW szdb_v_rap_bo_beleefotheek
|
||||
AS
|
||||
SELECT res_reservering_key || '/' || res_rsv_ruimte_volgnr nummer,
|
||||
SELECT res_reservering_key || '/' || res_rsv_ruimte_volgnr nummer,
|
||||
DECODE (FLX.getflex ('RES', 1, rrr.res_rsv_ruimte_key), NULL, 'Uitgeven', 'Innemen') actie,
|
||||
rrr.res_rsv_ruimte_key,
|
||||
rrr.res_rsv_ruimte_omschrijving,
|
||||
@@ -1815,17 +1865,14 @@ AS
|
||||
alg_gebouw_naam,
|
||||
alg_verdieping_volgnr,
|
||||
alg_ruimte_nr,
|
||||
alg_ruimte_omschrijving
|
||||
alg_ruimte_omschrijving, FLX.getflex ('RES', 1, rrr.res_rsv_ruimte_key) inf , FLX.getflex ('RES', 2, rrr.res_rsv_ruimte_key) uit
|
||||
FROM res_rsv_ruimte rrr,
|
||||
res_rsv_deel rrd,
|
||||
res_deel rd,
|
||||
prs_v_perslid_fullnames pf,
|
||||
alg_v_ruimte_gegevens rg
|
||||
WHERE rrr.res_activiteit_key = 30
|
||||
AND ( rrr.res_rsv_ruimte_van < TRUNC (SYSDATE + 1)
|
||||
AND COALESCE (FLX.getflex ('RES', 1, rrr.res_rsv_ruimte_key), '0') <> '1'
|
||||
OR rrr.res_rsv_ruimte_tot < TRUNC (SYSDATE + 1)
|
||||
AND COALESCE (FLX.getflex ('RES', 2, rrr.res_rsv_ruimte_key), '0') <> '1')
|
||||
AND COALESCE (FLX.getflex ('RES', 2, rrr.res_rsv_ruimte_key), '0') <> '1'
|
||||
AND rrr.res_rsv_ruimte_host_key = pf.prs_perslid_key
|
||||
AND rrr.res_rsv_ruimte_key = rrd.res_rsv_ruimte_key
|
||||
AND rrd.res_deel_key = rd.res_deel_key
|
||||
|
||||
Reference in New Issue
Block a user