MARE#75564 Uitbreiding Contractmodule
svn path=/Customer/trunk/; revision=58770
This commit is contained in:
141
MARE/mare.sql
141
MARE/mare.sql
@@ -1169,6 +1169,147 @@ BEGIN
|
||||
END mare_update_insp_metrel;
|
||||
/
|
||||
|
||||
CREATE OR REPLACE VIEW MARE_V_NOTI_CNTREMINDER
|
||||
(
|
||||
CODE,
|
||||
SENDER,
|
||||
RECEIVER,
|
||||
TEXT,
|
||||
KEY,
|
||||
PAR1,
|
||||
PAR2,
|
||||
XKEY,
|
||||
XEMAIL,
|
||||
XMOBILE,
|
||||
FAC_SRTNOTIFICATIE_KEY,
|
||||
ATTACHMENTS,
|
||||
XSENDER,
|
||||
PRS_BEDRIJFADRES_KEY
|
||||
)
|
||||
AS
|
||||
SELECT '',
|
||||
'',
|
||||
c.prs_perslid_key_beh, -- Contractbeheerder
|
||||
'Rappel: Contract '
|
||||
|| c.cnt_contract_nummer_intern
|
||||
|| DECODE (cnt_contract_versie,
|
||||
NULL, '',
|
||||
'.' || cnt_contract_versie)
|
||||
|| ' ('
|
||||
|| c.cnt_contract_omschrijving
|
||||
|| ' '
|
||||
|| b.prs_bedrijf_naam
|
||||
|| ')'
|
||||
|| ' moet uiterlijk per '
|
||||
|| TO_CHAR (cnt.cnt_getopzegdatum (c.cnt_contract_key),
|
||||
'DD-MM-YYYY')
|
||||
|| ' worden verlengd of opgezegd.',
|
||||
c.cnt_contract_key,
|
||||
c.cnt_contract_nummer_intern,
|
||||
cnt.cnt_getopzegdatum (c.cnt_contract_key),
|
||||
NULL,
|
||||
NULL
|
||||
xemail,
|
||||
NULL
|
||||
xmobile,
|
||||
NULL
|
||||
fac_srtnotificatie_key,
|
||||
NULL
|
||||
attachments,
|
||||
NULL
|
||||
xsender,
|
||||
NULL
|
||||
prs_bedrijfadres_key
|
||||
FROM cnt_v_aanwezigcontract c, prs_bedrijf b
|
||||
WHERE b.prs_bedrijf_key = c.cnt_prs_bedrijf_key
|
||||
AND cnt_contract_verwijder IS NULL
|
||||
AND cnt_contract_status = 0
|
||||
AND (SYSDATE BETWEEN cnt.cnt_getrappeldatum (c.cnt_contract_key)
|
||||
AND cnt.cnt_getopzegdatum (c.cnt_contract_key))
|
||||
UNION ALL
|
||||
SELECT '',
|
||||
'',
|
||||
c.prs_perslid_key_eig, -- Eigenaar / verantwoordelijk manager
|
||||
'Rappel: Contract '
|
||||
|| c.cnt_contract_nummer_intern
|
||||
|| DECODE (cnt_contract_versie,
|
||||
NULL, '',
|
||||
'.' || cnt_contract_versie)
|
||||
|| ' ('
|
||||
|| c.cnt_contract_omschrijving
|
||||
|| ' '
|
||||
|| b.prs_bedrijf_naam
|
||||
|| ')'
|
||||
|| ' moet uiterlijk per '
|
||||
|| TO_CHAR (cnt.cnt_getopzegdatum (c.cnt_contract_key),
|
||||
'DD-MM-YYYY')
|
||||
|| ' worden verlengd of opgezegd.',
|
||||
c.cnt_contract_key,
|
||||
c.cnt_contract_nummer_intern,
|
||||
cnt.cnt_getopzegdatum (c.cnt_contract_key),
|
||||
NULL,
|
||||
NULL
|
||||
xemail,
|
||||
NULL
|
||||
xmobile,
|
||||
NULL
|
||||
fac_srtnotificatie_key,
|
||||
NULL
|
||||
attachments,
|
||||
NULL
|
||||
xsender,
|
||||
NULL
|
||||
prs_bedrijfadres_key
|
||||
FROM cnt_v_aanwezigcontract c, prs_bedrijf b
|
||||
WHERE b.prs_bedrijf_key = c.cnt_prs_bedrijf_key
|
||||
AND cnt_contract_verwijder IS NULL
|
||||
AND cnt_contract_status = 0
|
||||
AND c.prs_perslid_key_eig IS NOT NULL
|
||||
AND (SYSDATE BETWEEN cnt.cnt_getrappeldatum (c.cnt_contract_key)
|
||||
AND cnt.cnt_getopzegdatum (c.cnt_contract_key))
|
||||
UNION ALL
|
||||
SELECT '',
|
||||
'',
|
||||
c.prs_perslid_key_beh,
|
||||
'Rappel: Contract '
|
||||
|| c.cnt_contract_nummer_intern
|
||||
|| DECODE (cnt_contract_versie,
|
||||
NULL, '',
|
||||
'.' || cnt_contract_versie)
|
||||
|| ' ('
|
||||
|| c.cnt_contract_omschrijving
|
||||
|| ' '
|
||||
|| b.prs_bedrijf_naam
|
||||
|| ')'
|
||||
|| ' moet uiterlijk per '
|
||||
|| TO_CHAR (cnt.cnt_getopzegdatum (c.cnt_contract_key),
|
||||
'DD-MM-YYYY')
|
||||
|| ' worden verlengd of opgezegd.',
|
||||
c.cnt_contract_key,
|
||||
c.cnt_contract_nummer_intern,
|
||||
cnt.cnt_getopzegdatum (c.cnt_contract_key),
|
||||
NULL,
|
||||
NULL
|
||||
xemail,
|
||||
NULL
|
||||
xmobile,
|
||||
NULL
|
||||
fac_srtnotificatie_key,
|
||||
NULL
|
||||
attachments,
|
||||
NULL
|
||||
xsender,
|
||||
NULL
|
||||
prs_bedrijfadres_key
|
||||
FROM cnt_v_aanwezigcontract c, prs_bedrijf b, fac_gebruikersgroep mt
|
||||
WHERE b.prs_bedrijf_key = c.cnt_prs_bedrijf_key
|
||||
AND cnt_contract_verwijder IS NULL
|
||||
AND cnt_contract_status = 0
|
||||
AND c.cnt_contract_kosten >= 25000 -- MT leden enkel bij contractwaarde > <20>25000,-
|
||||
AND mt.fac_groep_key = 181 -- Autorisatiegroep Contractinzage MT
|
||||
AND (SYSDATE BETWEEN cnt.cnt_getrappeldatum (c.cnt_contract_key)
|
||||
AND cnt.cnt_getopzegdatum (c.cnt_contract_key));
|
||||
|
||||
------ payload end ------
|
||||
|
||||
SET DEFINE OFF
|
||||
|
||||
Reference in New Issue
Block a user