KFSG#70107 Notijob/CUST04-notificatie naar besteller dat bestelling is binnengekomen
svn path=/Customer/trunk/; revision=54540
This commit is contained in:
@@ -4341,6 +4341,47 @@ AS
|
||||
res_ruimte_nr,
|
||||
res_status_fo_key;
|
||||
|
||||
-- KFSG#70107: BESOTV-notificatie, die standaard (bewust) staat uitgeschakeld,
|
||||
-- alsnog versturen als CUST04-notificatie voor sommige catalogi.
|
||||
CREATE OR REPLACE VIEW KFSG_V_NOTI_BESOTV
|
||||
(
|
||||
code,
|
||||
sender,
|
||||
receiver,
|
||||
text,
|
||||
key,
|
||||
xkey,
|
||||
xemail,
|
||||
xmobile
|
||||
)
|
||||
AS
|
||||
SELECT DISTINCT
|
||||
sn.fac_srtnotificatie_code,
|
||||
NULL,
|
||||
b.prs_perslid_key,
|
||||
REPLACE (sn.fac_srtnotificatie_oms, '##KEY##', TO_CHAR (b.bes_bestelling_key)),
|
||||
b.bes_bestelling_key,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
FROM fac_tracking t,
|
||||
bes_bestelling b,
|
||||
bes_bestelling_item bi,
|
||||
bes_srtdeel sd,
|
||||
bes_srtgroep sg,
|
||||
bes_disc_params dp,
|
||||
fac_notificatie_job nj,
|
||||
fac_srtnotificatie sn
|
||||
WHERE t.fac_srtnotificatie_key = 9 -- BESOTV
|
||||
AND t.fac_tracking_refkey = b.bes_bestelling_key
|
||||
AND b.bes_bestelling_key = bi.bes_bestelling_key
|
||||
AND bi.bes_srtdeel_key = sd.bes_srtdeel_key
|
||||
AND sd.bes_srtgroep_key = sg.bes_srtgroep_key
|
||||
AND sg.ins_discipline_key = dp.bes_ins_discipline_key
|
||||
AND dp.bes_disc_params_noti_dagen = 1
|
||||
AND nj.fac_notificatie_job_view = 'KFSG_V_NOTI_BESOTV'
|
||||
AND t.fac_tracking_datum > nj.fac_notificatie_job_lastrun
|
||||
AND sn.fac_srtnotificatie_code = 'CUST04';
|
||||
|
||||
------ payload end ------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user