-- Customer specific once-script VGLD.
--
-- (c) 2011 SG|facilitor bv 
-- $Revision$ 
-- $Id$
--
-- Support: +31 53 4800700

SET ECHO ON
SPOOL vgld05.lst
SET DEFINE OFF

INSERT INTO fac_import_app (fac_import_app_code, fac_import_app_oms, fac_import_app_xsl, fac_functie_key, fac_import_app_charset, fac_import_app_prefix)
SELECT 'FIN_FACTUUR_DELIXL', 'Factuur import van DeliXL (xml)', 'xsl/fin_factuur_delixl.xsl', fac_functie_key, 'UTF-8', 'VGLD'
FROM fac_functie
WHERE fac_functie_code = 'WEB_FINFOF';

INSERT INTO fac_api(fac_api_name, fac_api_omschrijving, fac_api_filepath, fac_import_app_key, fac_api_options_json)
SELECT 'FIN_FACTUUR_DELIXL', 'Factuur import van DeliXL (xml)', 'appl/API/api_gen_import.asp', fac_import_app_key, '{"import_app_key":' || fac_import_app_key || '}'
FROM fac_import_app
WHERE fac_import_app_code = 'FIN_FACTUUR_DELIXL';

INSERT INTO prs_perslid(prs_perslid_module, prs_srtperslid_key, prs_afdeling_key, prs_perslid_naam, prs_perslid_oslogin, prs_perslid_apikey)
SELECT 'PRS', 1, prs_afdeling_key, 'SYSTEM-DELIXL', '_DELIXL', 'GOMQeoCMbdmYHfxtgKFcdPppTSWyiugy'
FROM prs_perslid where prs_perslid_oslogin = '_FACILITOR';

DELETE FROM fac_gebruikersgroep
WHERE prs_perslid_key = (select prs_perslid_key FROM  prs_perslid WHERE prs_perslid_oslogin = '_DELIXL');


-- Kenmerken voor de facturen
    
INSERT INTO fin_kenmerk (fin_kenmerk_volgnr, fin_kenmerk_omschrijving, fin_kenmerk_type, fin_kenmerk_kenmerktype)
VALUES (10, 'Factuurbijlage', 'F', 'X');
    
COMMIT;


BEGIN adm.systrackscript('$Workfile: vgld05.sql $', '$Revision$', 1); END;
/

SPOOL OFF

@vgld.sql
