--
-- $Id$
--
-- Aanmaken import tabel om factuurschema's in te lezen.

DEFINE thisfile = 'AAIT#37411.SQL'
DEFINE dbuser   = '^AA|^ASMS|^GULU|^NMMS|^RABO|^ZKHM'


SET ECHO ON
SET DEFINE ON
COLUMN fcltlogfile NEW_VALUE fcltlogfile NOPRINT;
WHENEVER SQLERROR EXIT;
SELECT adm.scriptspoolfile('&dbuser', '&thisfile') AS fcltlogfile FROM DUAL;
WHENEVER SQLERROR CONTINUE;
SPOOL &fcltlogfile
SET DEFINE OFF

------ payload begin ------

CREATE TABLE aaxx_imp_factuurschema
(
   cnt_contract_key              NUMBER (10),
   cnt_factuurschema_bedrag      NUMBER (11, 2),
   cnt_factuurschema_boekmaand   VARCHAR2 (7),
   cnt_factuurschema_opmerking   VARCHAR2 (320),
   cnt_contract_nr               VARCHAR2 (100),
   prs_bedrijf_naam              VARCHAR2 (60)
);

INSERT INTO fac_import_app (fac_import_app_code,
                            fac_import_app_oms,
                            fac_functie_key,
                            fac_import_app_prefix,
                            fac_import_app_action)
   SELECT 'FACTUURSCHEMA',
          'AAXX: Importeren contracttermijnen',
          fac_functie_key,
          'AAXX',
          'ORACLE'
     FROM fac_functie
    WHERE fac_functie_code = 'WEB_IMPORT';

------ payload end   ------

SET DEFINE OFF
BEGIN adm.systrackscriptId ('$Id$', 1); END;
/

COMMIT;
SET ECHO OFF
SPOOL OFF
SET DEFINE ON
PROMPT Logfile of this upgrade is: &fcltlogfile

