-- Customer specific once-script VGLD.
--
-- (c) 2016 Facilitor bv 
-- $Revision$ 
-- $Id$
--
-- Support: +31 53 4800700

SET ECHO ON
SPOOL vgld10.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_OD', 'Factuur import van Office Depot (xml)', 'xsl/fin_factuur_od.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_OD', 'Factuur import van Office Depot (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_OD';

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-OFFICEDEPOT', '_OFFICEDEPOT', 'acsrKoxyvTCQjplaOzKRhKkqlqkhHdoq'
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 = '_OFFICEDEPOT');
    
COMMIT;


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

SPOOL OFF

@vgld.sql
