UWVA#65182 Bewaartermijnen/automatische schoning in core

svn path=/Database/branches/DB40/; revision=52679
This commit is contained in:
Erik Groener
2021-08-11 14:26:05 +00:00
parent cc1dc047b7
commit 1945a75260
2 changed files with 18 additions and 0 deletions

View File

@@ -2261,6 +2261,15 @@ AS
FROM bes_bestelopdr_item
WHERE bes_bestelopdr_key = p_bes_opdr_key);
FOR ref_contract IN (SELECT cnt_contract_key
FROM cnt_contract
WHERE bes_bestelopdr_key = p_bes_opdr_key
)
LOOP
-- Verwijder contracten die aan deze bestelopdracht zitten.
cnt.remove(ref_contract.cnt_contract_key);
END LOOP;
DELETE FROM bes_bestelopdr
WHERE bes_bestelopdr_key = p_bes_opdr_key;

View File

@@ -553,6 +553,15 @@ CREATE OR REPLACE PACKAGE BODY cnt AS
flx.deleteflexbijlage (ref_bijlagen.fac_bijlagen_key);
END LOOP;
FOR ref_mldopdr IN (SELECT mld_opdr_key
FROM mld_opdr
WHERE cnt_contract_key = p_contract_key
)
LOOP
-- Verwijder melding-opdrachten die aan dit contract zitten.
mld.remove_opdr(ref_mldopdr.mld_opdr_key);
END LOOP;
DELETE FROM cnt_contract
WHERE cnt_contract_key = p_contract_key;