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


SET ECHO ON
SPOOL SUTF08.lst
SET DEFINE OFF

INSERT INTO fac_import_app
            (fac_import_app_code, fac_import_app_oms,
             fac_functie_key, fac_import_app_prefix,
             fac_import_app_xsl, fac_import_app_charset
             )
   SELECT 'E_INVOICE', 'Import e-invoice (UBL) bestand',
          fac_functie_key, 'SUTF', 'xsl/fclt_import_e_invoice_ubl.xsl', 'UTF-8'
     FROM fac_functie
    WHERE fac_functie_code = 'WEB_FINFOF';


INSERT INTO fac_api 
(FAC_API_NAME, 
 FAC_API_OMSCHRIJVING,
 FAC_API_LOGLEVEL,
 FAC_API_FILEPATH,
 FAC_IMPORT_APP_KEY,
 FAC_API_OPTIONS_JSON
)
SELECT  'E-INVOICE',
        'Import van (UBL)facturen',
        1, 
        '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 = 'E_INVOICE';

INSERT INTO PRS_PERSLID (prs_perslid_module, prs_srtperslid_key, prs_afdeling_key, prs_perslid_naam, prs_perslid_oslogin, prs_perslid_apikey)
SELECT prs_perslid_module, prs_srtperslid_key, prs_afdeling_key, 'fclt_sys_import_invoices', '_fclt_sys_import_invoices', 'ZnzHqvsdvUynvxLsDQuSuiIzrnkJHGmj' 
FROM prs_perslid
WHERE prs_perslid_key = 4;


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

commit;

SPOOL OFF

@sutf.sql
