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

SET ECHO ON
SPOOL stph10.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 'INVOICESHARING', 'Factuur import van InvoiceSharing.com (UBL)', 'xsl/fin_factuur_invoicesharing.xsl', fac_functie_key, 'UTF-8', 'STPH'
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 'INVOICESHARING', 'Factuur import van InvoiceSharing.com (UBL)', '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 = 'INVOICESHARING';

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-INVOICESHARING', '_INVOICESHARING', 'DHAnllOhcNojFOE3u5t5dPMYbotllIH7'
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 = '_INVOICESHARING');
    
COMMIT;

BEGIN adm.systrackscriptId('$Id$'); END;
/

SPOOL OFF

@stph.sql
