UWVA#13548

svn path=/Database/trunk/; revision=9740
This commit is contained in:
Peter Feij
2008-02-27 12:53:38 +00:00
parent 53f09ee979
commit 5426001bd6

View File

@@ -1,7 +1,7 @@
#ifdef BEZ // 03-11-2000 PF
/* $Revision: 27 $
* $Modtime: 13-02-08 13:11 $
/* $Revision: 28 $
* $Modtime: 27-02-08 14:33 $
*/
#include "comsql.h"
@@ -211,13 +211,12 @@ BEGIN
lbezoek bez_bezoekers.bez_afspraak_naam%TYPE;
lreceiver prs_perslid.prs_perslid_key%TYPE;
lreceiver2 prs_perslid.prs_perslid_key%TYPE;
lsenderkey prs_perslid.prs_perslid_key%TYPE;
lalglocatiekey bez_afspraak.alg_locatie_key%TYPE;
lsender fac_notificatie.fac_notificatie_sender_email%TYPE;
ldatum DATE;
BEGIN
SELECT bez_afspraak_host_key, bez_afspraak_contact_key, bez_afspraak_datum, prs_perslid_key, alg_locatie_key
INTO lreceiver, lreceiver2, ldatum, lsenderkey, lalglocatiekey
SELECT bez_afspraak_host_key, bez_afspraak_contact_key, bez_afspraak_datum, alg_locatie_key
INTO lreceiver, lreceiver2, ldatum, lalglocatiekey
FROM bez_afspraak
WHERE bez_afspraak_key = :NEW.bez_afspraak_key;
@@ -293,15 +292,16 @@ BEGIN
lsender := NULL;
END;
-- Prevent sending these messages to self
IF soms IS NOT NULL AND lsenderkey != lreceiver
-- We would like to prevent notifications if we are the one that causes this
-- But we do not know what user we are, so we do not prevent it.
IF soms IS NOT NULL
THEN
fac.putnotificationsrtprio (lsenderkey, lreceiver, scode, :NEW.bez_afspraak_key, soms, NULL, NULL, NULL, NULL, 2, lsender);
fac.putnotificationsrtprio (NULL, lreceiver, scode, :NEW.bez_afspraak_key, soms, NULL, NULL, NULL, NULL, 2, lsender);
END IF;
IF soms2 IS NOT NULL AND lsenderkey != lreceiver2
IF soms2 IS NOT NULL
THEN
fac.putnotificationsrtprio (lsenderkey, lreceiver2, scode2, :NEW.bez_afspraak_key, soms2, NULL, NULL, NULL, NULL, 2, lsender);
fac.putnotificationsrtprio (NULL, lreceiver2, scode2, :NEW.bez_afspraak_key, soms2, NULL, NULL, NULL, NULL, 2, lsender);
END IF;
END IF;
END;