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

@aaxx.sql;

SPOOL xgulu.lst
SET ECHO ON

-- export overrules
-- exact verkoop
CREATE OR REPLACE VIEW gulu_v_export_exact_verkoop    (RESULT, result_order) AS SELECT RESULT, result_order FROM aaxx_v_export_exact_verkoop;
CREATE OR REPLACE PROCEDURE gulu_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 gulu_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 gulu_v_export_exact_verkoop_vj    (RESULT, result_order) AS SELECT RESULT, result_order FROM aaxx_v_export_exact_verkoop;
CREATE OR REPLACE PROCEDURE gulu_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 gulu_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 gulu_v_export_exact_uren (result, result_order)
AS SELECT result, result_order FROM aaxx_v_export_exact_uren_xml;
CREATE OR REPLACE PROCEDURE gulu_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 gulu_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;
/

--------------------------------
-- import contractorders
--------------------------------
CREATE OR REPLACE PROCEDURE gulu_import_contract (
  p_import_key IN NUMBER
) IS
BEGIN
    aaxx_import_contract (p_import_key);
END gulu_import_contract;
/

CREATE OR REPLACE PROCEDURE gulu_update_contract (p_import_key IN NUMBER)
AS
BEGIN
    aaxx_update_contract (p_import_key);
END gulu_update_contract;
/

CREATE OR REPLACE PROCEDURE gulu_import_ruimte (p_import_key IN NUMBER)
AS
BEGIN
  aaxx_import_ruimte(p_import_key);
END;
/

CREATE OR REPLACE PROCEDURE gulu_update_ruimte (p_import_key IN NUMBER)
AS
BEGIN
  aaxx_update_ruimte(p_import_key);
END;
/



BEGIN adm.systrackscriptId('$Id$', 0); END;
/


BEGIN fac.registercustversion('GULU', 2); END;
/

COMMIT;

SPOOL OFF


