diff --git a/ARBO/arbo.sql b/ARBO/arbo.sql index 371064e44..8e94dba24 100644 --- a/ARBO/arbo.sql +++ b/ARBO/arbo.sql @@ -2092,6 +2092,29 @@ AS AND (fac.safe_to_date (ckc.cnt_kenmerkcontract_waarde, 'DD-MM-YYYY') BETWEEN TRUNC (SYSDATE) AND TRUNC (SYSDATE+6)); +CREATE OR REPLACE PROCEDURE arbo_pre_putorders +AS +BEGIN + -- Verwijder de notificaties van 1241 Catering en 1841 Geschenken Deze notificaties komen al via Absoluta. Melding ARBO#66539 vraagt + -- om een structurele oplossing. + DELETE fac_notificatie WHERE fac_notificatie_key IN ( + SELECT DISTINCT fac_notificatie_key + FROM fac_notificatie n, + fac_srtnotificatie sn, + bes_bestelling_item bi, + bes_srtdeel sd, + bes_srtgroep sg + WHERE n.fac_srtnotificatie_key = sn.fac_srtnotificatie_key + AND sn.fac_srtnotificatie_xmlnode = 'bestelling' + AND n.fac_notificatie_refkey = 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 IN (1241, 1841)); + +END arbo_pre_putorders; +/ + + ------ payload end ------ SET DEFINE OFF