--
-- $Id$
--
-- Customer specific once-script RWSN62.
DEFINE thisfile = 'RWSN62.SQL'
DEFINE dbuser   = '^RWSN'

SET ECHO ON
SET DEFINE ON
COLUMN fcltlogfile NEW_VALUE fcltlogfile NOPRINT;
WHENEVER SQLERROR EXIT;
SELECT adm.scriptspoolfile('&dbuser', '&thisfile') AS fcltlogfile FROM DUAL;
WHENEVER SQLERROR CONTINUE;
SPOOL &fcltlogfile
SET DEFINE OFF

------ payload begin ------

-- RWSN#51878: Onboarding => Eigen tabel met de configuratie van de max. 10
--                          CUST-notificaties:
--                          - code = CUST11 t/m CUST20
--                          - omschrijving = afzender adres
--                          - prijs = #dagen na indienstdatum versturen
INSERT INTO fac_usrtab (fac_usrtab_key,
                        fac_usrtab_naam,
                        fac_usrtab_omschrijving)
    VALUES (5, 'OnboardingNoti', 'OnboardingNoti Configuration');
COMMIT;

INSERT INTO fac_usrdata (fac_usrtab_key, fac_usrdata_code, fac_usrdata_omschr, fac_usrdata_prijs) VALUES (5, 'CUST11', 'noreply@rws.nl', 0);
INSERT INTO fac_usrdata (fac_usrtab_key, fac_usrdata_code, fac_usrdata_omschr, fac_usrdata_prijs) VALUES (5, 'CUST12', 'noreply@rws.nl', 0);
INSERT INTO fac_usrdata (fac_usrtab_key, fac_usrdata_code, fac_usrdata_omschr, fac_usrdata_prijs) VALUES (5, 'CUST13', 'noreply@rws.nl', 0);
INSERT INTO fac_usrdata (fac_usrtab_key, fac_usrdata_code, fac_usrdata_omschr, fac_usrdata_prijs) VALUES (5, 'CUST14', 'noreply@rws.nl', 0);
INSERT INTO fac_usrdata (fac_usrtab_key, fac_usrdata_code, fac_usrdata_omschr, fac_usrdata_prijs) VALUES (5, 'CUST15', 'noreply@rws.nl', 0);
INSERT INTO fac_usrdata (fac_usrtab_key, fac_usrdata_code, fac_usrdata_omschr, fac_usrdata_prijs) VALUES (5, 'CUST16', 'noreply@rws.nl', 0);
INSERT INTO fac_usrdata (fac_usrtab_key, fac_usrdata_code, fac_usrdata_omschr, fac_usrdata_prijs) VALUES (5, 'CUST17', 'noreply@rws.nl', 0);
INSERT INTO fac_usrdata (fac_usrtab_key, fac_usrdata_code, fac_usrdata_omschr, fac_usrdata_prijs) VALUES (5, 'CUST18', 'noreply@rws.nl', 0);
INSERT INTO fac_usrdata (fac_usrtab_key, fac_usrdata_code, fac_usrdata_omschr, fac_usrdata_prijs) VALUES (5, 'CUST19', 'noreply@rws.nl', 0);
INSERT INTO fac_usrdata (fac_usrtab_key, fac_usrdata_code, fac_usrdata_omschr, fac_usrdata_prijs) VALUES (5, 'CUST20', 'noreply@rws.nl', 0);
COMMIT;

INSERT INTO fac_srtnotificatie (fac_srtnotificatie_code, fac_srtnotificatie_mode, fac_srtnotificatie_oms, fac_srtnotificatie_xmlnode, fac_srtnotificatie_url, fac_srtnotificatie_groep)
    VALUES ('CUST11', 2, 'Onboarding: ##AANT## dagen in dienst', 'perslid', NULL, 0);
INSERT INTO fac_srtnotificatie (fac_srtnotificatie_code, fac_srtnotificatie_mode, fac_srtnotificatie_oms, fac_srtnotificatie_xmlnode, fac_srtnotificatie_url, fac_srtnotificatie_groep)
    VALUES ('CUST12', 2, 'Onboarding: ##AANT## dagen in dienst', 'perslid', NULL, 0);
INSERT INTO fac_srtnotificatie (fac_srtnotificatie_code, fac_srtnotificatie_mode, fac_srtnotificatie_oms, fac_srtnotificatie_xmlnode, fac_srtnotificatie_url, fac_srtnotificatie_groep)
    VALUES ('CUST13', 2, 'Onboarding: ##AANT## dagen in dienst', 'perslid', NULL, 0);
INSERT INTO fac_srtnotificatie (fac_srtnotificatie_code, fac_srtnotificatie_mode, fac_srtnotificatie_oms, fac_srtnotificatie_xmlnode, fac_srtnotificatie_url, fac_srtnotificatie_groep)
    VALUES ('CUST14', 2, 'Onboarding: ##AANT## dagen in dienst', 'perslid', NULL, 0);
INSERT INTO fac_srtnotificatie (fac_srtnotificatie_code, fac_srtnotificatie_mode, fac_srtnotificatie_oms, fac_srtnotificatie_xmlnode, fac_srtnotificatie_url, fac_srtnotificatie_groep)
    VALUES ('CUST15', 2, 'Onboarding: ##AANT## dagen in dienst', 'perslid', NULL, 0);
INSERT INTO fac_srtnotificatie (fac_srtnotificatie_code, fac_srtnotificatie_mode, fac_srtnotificatie_oms, fac_srtnotificatie_xmlnode, fac_srtnotificatie_url, fac_srtnotificatie_groep)
    VALUES ('CUST16', 2, 'Onboarding: ##AANT## dagen in dienst', 'perslid', NULL, 0);
INSERT INTO fac_srtnotificatie (fac_srtnotificatie_code, fac_srtnotificatie_mode, fac_srtnotificatie_oms, fac_srtnotificatie_xmlnode, fac_srtnotificatie_url, fac_srtnotificatie_groep)
    VALUES ('CUST17', 2, 'Onboarding: ##AANT## dagen in dienst', 'perslid', NULL, 0);
INSERT INTO fac_srtnotificatie (fac_srtnotificatie_code, fac_srtnotificatie_mode, fac_srtnotificatie_oms, fac_srtnotificatie_xmlnode, fac_srtnotificatie_url, fac_srtnotificatie_groep)
    VALUES ('CUST18', 2, 'Onboarding: ##AANT## dagen in dienst', 'perslid', NULL, 0);
INSERT INTO fac_srtnotificatie (fac_srtnotificatie_code, fac_srtnotificatie_mode, fac_srtnotificatie_oms, fac_srtnotificatie_xmlnode, fac_srtnotificatie_url, fac_srtnotificatie_groep)
    VALUES ('CUST19', 2, 'Onboarding: ##AANT## dagen in dienst', 'perslid', NULL, 0);
INSERT INTO fac_srtnotificatie (fac_srtnotificatie_code, fac_srtnotificatie_mode, fac_srtnotificatie_oms, fac_srtnotificatie_xmlnode, fac_srtnotificatie_url, fac_srtnotificatie_groep)
    VALUES ('CUST20', 2, 'Onboarding: ##AANT## dagen in dienst', 'perslid', NULL, 0);
COMMIT;

INSERT INTO fac_notificatie_job (fac_notificatie_job_view, fac_notificatie_job_oms, fac_notificatie_job_mode, fac_notificatie_job_flags, fac_notificatie_job_interval, fac_notificatie_job_nextrun)
   SELECT 'RWSN_V_NOTI_ONBOARDING', 'Notificatie(s) naar nieuwe medewerker', 0, 1, 1, NULL
     FROM DUAL
    WHERE NOT EXISTS (SELECT 1 FROM fac_notificatie_job WHERE UPPER (fac_notificatie_job_view) = 'RWSN_V_NOTI_ONBOARDING');
COMMIT;

------ payload end   ------

SET DEFINE OFF
BEGIN adm.systrackscriptId ('$Id$', 1); END;
/

COMMIT;
SET ECHO OFF
SPOOL OFF
SET DEFINE ON
PROMPT Logfile of this upgrade is: &fcltlogfile

@@&custid
