
SET ECHO ON
SPOOL HSLE_ICT_RFC.lst
SET DEFINE OFF


-- Wijzig de gebruikte key 402 in de vakgroep-key die in productie is aangemaakt.
-- Dit is de vakgroep 'ICT Change Management' onder vakgroeptype 'ICT Change Management'

UPDATE mld_stdmelding
SET mld_stdmelding_freetext = 2,
mld_stdmelding_afmeldtext = 2,
ins_srtinst_key = 41,
ins_srtinst_niveau='G',
ins_srtinst_verplicht=0,
alg_onrgoed_obj_niveau='L',
mld_stdmelding_kanverwijzen = 128
WHERE mld_stdmelding_verwijder is NULL
AND mld_ins_discipline_key IN  (select ins_discipline_key  from mld_discipline 
where ins_srtdiscipline_key = (select max(ins_srtdiscipline_key)  from ins_srtdiscipline));

-- 0 = nooit, 1 = altijd, 2= afh van melding
UPDATE mld_disc_params
SET mld_disc_params_notify = 2,
mld_disc_params_startdatum = 1
WHERE mld_ins_discipline_key IN  (select ins_discipline_key  from mld_discipline 
where ins_srtdiscipline_key = (select max(ins_srtdiscipline_key)  from ins_srtdiscipline));

-- Kostenplaats verplicht
UPDATE mld_discipline
SET ins_discipline_kpnverplicht = 0
WHERE ins_discipline_key IN  (select ins_discipline_key  from mld_discipline 
where ins_srtdiscipline_key = (select max(ins_srtdiscipline_key)  from ins_srtdiscipline));

-- Kostenplaats kosten klant default aan
-- Alleen locatie zichtbaar 
-- De huidige Meldingen-vakgroeptypen tot en met key 2 hiervan uitsluiten.
UPDATE ins_srtdiscipline
SET ins_srtdiscipline_kostenklant = 2,
    ins_srtdiscipline_alg = 7
WHERE ins_srtdiscipline_key = (select max(ins_srtdiscipline_key) from ins_srtdiscipline);


UPDATE fac_locale_xsl
SET fac_locale_xsl_cust = 'Planning Start'
WHERE fac_locale_xsl_label = 'lcl_mld_startdate'
AND fac_locale_xsl_lang = 'NL'
AND fac_locale_xsl_module = 'ASP';



-- Nieuwe type opdracht 'Uitveoringsopdracht', deze koppelen aan vakgroeptype 'Melding'
insert into mld_typeopdr
(mld_typeopdr_omschrijving,
mld_typeopdr_module,
mld_typeopdr_decentraal,
mld_typeopdr_afmelden_extern,
mld_typeopdr_kosten,
mld_typeopdr_sluitmelding,
mld_typeopdr_matchtype,
mld_typeopdr_afmeldmarge,
mld_typeopdr_zichtbaarfe,
mld_typeopdr_isofferte,
mld_typeopdr_contract,
mld_typeopdr_afhandeling,
mld_typeopdr_gvs,
mld_typeopdr_kosten_verplicht)
values
('RFC Opdracht',
'MLD',
1,
2,
0,
0,
4,
0,
0,
0,
2,
1,
999999,
0
);

insert into mld_typeopdr_srtdiscipline
(mld_typeopdr_key, ins_srtdiscipline_key)
select
(select max(mld_typeopdr_key) from mld_typeopdr),
(select max(ins_srtdiscipline_key) from ins_srtdiscipline)
from dual;



--SQL Statement which produced this data:
--
--  select * from fac_locale
--  where fac_locale_key > 6
--
Insert into FAC_LOCALE
   (fac_localeitems_key, fac_locale_dialect_key, fac_locale_lang, fac_locale_tekst)
 SELECT
   181,(select max(ins_srtdiscipline_key) from ins_srtdiscipline), 'NL', 'Planning Start' from dual;
Insert into FAC_LOCALE
   (fac_localeitems_key, fac_locale_dialect_key, fac_locale_lang, fac_locale_tekst)
 SELECT
   86,(select max(ins_srtdiscipline_key) from ins_srtdiscipline), 'NL', 'CAB Verslag' from dual;
Insert into FAC_LOCALE
   (fac_localeitems_key, fac_locale_dialect_key, fac_locale_lang, fac_locale_tekst)
 SELECT
   81,(select max(ins_srtdiscipline_key) from ins_srtdiscipline), 'NL', 'Planning Eind' from dual;
Insert into FAC_LOCALE
   (fac_localeitems_key, fac_locale_dialect_key, fac_locale_lang, fac_locale_tekst)
 SELECT
   13,(select max(ins_srtdiscipline_key) from ins_srtdiscipline), 'NL', 'Aanvrager' from dual;
Insert into FAC_LOCALE
   (fac_localeitems_key, fac_locale_dialect_key, fac_locale_lang, fac_locale_tekst)
 SELECT
   54,(select max(ins_srtdiscipline_key) from ins_srtdiscipline), 'NL', 'Eigenaar' from dual;
Insert into FAC_LOCALE
   (fac_localeitems_key, fac_locale_dialect_key, fac_locale_lang, fac_locale_tekst)
 SELECT
   96,(select max(ins_srtdiscipline_key) from ins_srtdiscipline), 'NL', 'Eigenaar is nu onbekend' from dual;
Insert into FAC_LOCALE
   (fac_localeitems_key, fac_locale_dialect_key, fac_locale_lang, fac_locale_tekst)
 SELECT
   158,(select max(ins_srtdiscipline_key) from ins_srtdiscipline), 'NL', 'Deelnemer' from dual;
Insert into FAC_LOCALE
   (fac_localeitems_key, fac_locale_dialect_key, fac_locale_lang, fac_locale_tekst)
 SELECT
   179,(select max(ins_srtdiscipline_key) from ins_srtdiscipline), 'NL', 'Selecteer een deelnemer...' from dual;
Insert into FAC_LOCALE
   (fac_localeitems_key, fac_locale_dialect_key, fac_locale_lang, fac_locale_tekst)
 SELECT
   43,(select max(ins_srtdiscipline_key) from ins_srtdiscipline), 'NL', 'Deelnemer' from dual;
Insert into FAC_LOCALE
   (fac_localeitems_key, fac_locale_dialect_key, fac_locale_lang, fac_locale_tekst)
 SELECT
   225,(select max(mld_typeopdr_key) from mld_typeopdr), 'NL', 'Deelnemer' from dual;
Insert into FAC_LOCALE
   (fac_localeitems_key, fac_locale_dialect_key, fac_locale_lang, fac_locale_tekst)
 SELECT
   234,(select max(mld_typeopdr_key) from mld_typeopdr), 'NL', 'Eigenaar' from dual;
Insert into FAC_LOCALE
   (fac_localeitems_key, fac_locale_dialect_key, fac_locale_lang, fac_locale_tekst)
 SELECT
   293,(select max(mld_typeopdr_key) from mld_typeopdr), 'NL', 'Deelnemer' from dual;
Insert into FAC_LOCALE
   (fac_localeitems_key, fac_locale_dialect_key, fac_locale_lang, fac_locale_tekst)
 SELECT
   201,(select max(mld_typeopdr_key) from mld_typeopdr), 'NL', 'Aanvrager' from dual;
Insert into FAC_LOCALE
   (fac_localeitems_key, fac_locale_dialect_key, fac_locale_lang, fac_locale_tekst)
 SELECT
   29,(select max(ins_srtdiscipline_key) from ins_srtdiscipline), 'NL', 'Onderwerp' from dual;
Insert into FAC_LOCALE
   (fac_localeitems_key, fac_locale_dialect_key, fac_locale_lang, fac_locale_tekst)
 SELECT
   90,(select max(ins_srtdiscipline_key) from ins_srtdiscipline), 'NL', 'Onderwerp' from dual;
Insert into FAC_LOCALE
   (fac_localeitems_key, fac_locale_dialect_key, fac_locale_lang, fac_locale_tekst)
 SELECT
   188,(select max(ins_srtdiscipline_key) from ins_srtdiscipline), 'NL', 'Onderwerp' from dual;
COMMIT;




commit;


SPOOl OFF
