--
-- $Id$
--
-- Update kostensoort van facturen 111265, 111003 en 111264 naar CF CONS AUT 2.1.10.3 (=key 5)

DEFINE thisfile = 'AAAH#39357.SQL'
DEFINE dbuser   = '^AAAH'
DEFINE custid   = 'AAAH'

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 ------

UPDATE fin_factuur
   SET prs_kostensoort_key = 5
 WHERE fin_factuur_key IN (111265, 111003, 111264);


INSERT INTO fac_tracking (fac_tracking_datum,
                          fac_srtnotificatie_key,
                          fac_tracking_refkey,
                          fac_tracking_oms)
   SELECT SYSDATE,
          89,
          fin_factuur_key,
          'Kostensoort op verzoek van AAFM aanpepast naar CF CONS AUT 2.1.10.3'
     FROM fin_factuur
    WHERE fin_factuur_key IN (111265, 111003, 111264);

------ 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

-- @@ &custid