--
-- $Id$
--
-- Update kostensoort van facturen 149796 en 150366 naar COR VAR VENDING (=key 209)

DEFINE thisfile = 'AADO#39525.SQL'
DEFINE dbuser   = '^AADO'
DEFINE custid   = 'AADO'

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 = 209
 WHERE fin_factuur_key IN (149796, 150366);


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 COR VAR VENDING'
     FROM fin_factuur
    WHERE fin_factuur_key IN (149796, 150366);

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