-- Script containing customer specific configuration sql statements for Gemeente Nijmegen: Arcadis Aqumen Facility Management
-- (c) 2005-2007 SG facilitor bv
-- $Revision$
-- $Id$
--
-- Support: +31 53 4800700

@aaxx.sql;

SPOOL xaagn.lst
SET ECHO ON


-- export overrules
-- exact
-- Leverancier overrulles


-- exact verkoop
CREATE OR REPLACE VIEW aagn_v_export_exact_verkoop    (RESULT, result_order) AS SELECT RESULT, result_order FROM aaxx_v_export_exact_verkoop;
CREATE OR REPLACE PROCEDURE aagn_select_exact_verkoop (
   p_applname   IN   VARCHAR2,
   p_applrun    IN   VARCHAR2
)
AS
BEGIN
  aaxx_select_exact_verkoop(p_applname, p_applrun, to_char(sysdate, 'yyyy'));
END;
/
CREATE OR REPLACE PROCEDURE aagn_export_exact_verkoop (
   p_applname   IN   VARCHAR2,
   p_applrun    IN   VARCHAR2,
   p_filedir    IN   VARCHAR2,
   p_filename   IN   VARCHAR2
)
AS
BEGIN
  aaxx_export_exact_verkoop(p_applname, p_applrun, p_filedir, p_filename, to_char(sysdate, 'yyyy'));
END;
/

-- exact verkoop over het vorige jaar
CREATE OR REPLACE VIEW aagn_v_export_exact_verkoop_vj    (RESULT, result_order) AS SELECT RESULT, result_order FROM aaxx_v_export_exact_verkoop;
CREATE OR REPLACE PROCEDURE aagn_select_exact_verkoop_vj (
   p_applname   IN   VARCHAR2,
   p_applrun    IN   VARCHAR2
)
AS
BEGIN
  aaxx_select_exact_verkoop(p_applname, p_applrun, to_char(to_number(to_char(sysdate, 'yyyy'))-1));
END;
/
CREATE OR REPLACE PROCEDURE aagn_export_exact_verkoop_vj (
   p_applname   IN   VARCHAR2,
   p_applrun    IN   VARCHAR2,
   p_filedir    IN   VARCHAR2,
   p_filename   IN   VARCHAR2
)
AS
BEGIN
  aaxx_export_exact_verkoop(p_applname, p_applrun, p_filedir, p_filename, to_char(to_number(to_char(sysdate, 'yyyy'))-1));
END;
/

-- exact projecturen (XML)
CREATE OR REPLACE VIEW aagn_v_export_exact_uren (result, result_order)
AS SELECT result, result_order FROM aaxx_v_export_exact_uren_xml;
CREATE OR REPLACE PROCEDURE aagn_select_exact_uren (
   p_applname   IN   VARCHAR2,
   p_applrun    IN   VARCHAR2
)
AS
BEGIN
  aaxx_select_exact_uren_xml(p_applname, p_applrun, '');
END;
/

-- verwerk exact projecturen (XML)
CREATE OR REPLACE PROCEDURE aagn_export_verwerk_exact_uren (
   p_applname   IN   VARCHAR2,
   p_applrun    IN   VARCHAR2,
   p_filedir    IN   VARCHAR2,
   p_filename   IN   VARCHAR2
)
AS
BEGIN
  aaxx_export_verwerk_exact_uren(p_applname, p_applrun, p_filedir, p_filename, '');
END;
/



-- bundel catering
CREATE OR REPLACE VIEW aagn_v_export_bundel_catering    (RESULT, result_order) AS SELECT RESULT, result_order FROM aaxx_v_export_bundel_catering;
CREATE OR REPLACE PROCEDURE aagn_export_bundel_catering (
   p_applname   IN   VARCHAR2,
   p_applrun    IN   VARCHAR2,
   p_filedir    IN   VARCHAR2,
   p_filename   IN   VARCHAR2
)
AS
BEGIN
  aaxx_export_bundel_catering(p_applname, p_applrun, p_filedir, p_filename);
END;
/

BEGIN adm.systrackscriptId('$Id$'); END;
/
BEGIN fac.registercustversion('AAGN', 3); END;
/
COMMIT;
SPOOL OFF
