CONN#13102
svn path=/Customer/trunk/; revision=13351
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
|
||||
|
||||
alter table conn_exp_contractmutatie ADD (status VARCHAR2(1), exportdatum DATE);
|
||||
|
||||
CREATE OR REPLACE VIEW conn_v_export_contractmutatie as
|
||||
SELECT
|
||||
bedrijfsnummer
|
||||
@@ -12,13 +16,13 @@ CREATE OR REPLACE VIEW conn_v_export_contractmutatie as
|
||||
|| ';' ||
|
||||
eenheidsnummer
|
||||
|| ';' ||
|
||||
ingangsdatum
|
||||
to_char(ingangsdatum, 'yyyymmdd')
|
||||
|| ';' ||
|
||||
factuurdebiteur
|
||||
|| ';' ||
|
||||
prolongatietermijn
|
||||
|| ';' ||
|
||||
indexeringsdatum
|
||||
to_char(indexeringsdatum, 'yyyymmdd')
|
||||
|| ';' ||
|
||||
indexeringscode
|
||||
|| ';' ||
|
||||
@@ -26,17 +30,18 @@ CREATE OR REPLACE VIEW conn_v_export_contractmutatie as
|
||||
|| ';' ||
|
||||
tarieftype
|
||||
|| ';' ||
|
||||
aantal
|
||||
replace(to_char(aantal),'.',',')
|
||||
|| ';' ||
|
||||
tarief
|
||||
replace(to_char(tarief),'.',',')
|
||||
|| ';' ||
|
||||
totaal result,
|
||||
null result_order
|
||||
replace(to_char(totaal),'.',',') result,
|
||||
mutatienummer result_order
|
||||
FROM (SELECT *
|
||||
FROM CONN_EXP_CONTRACTMUTATIE
|
||||
WHERE NOT (UPPER(eenheidsnummer) LIKE '%CXX%'
|
||||
WHERE NOT (UPPER(eenheidsnummer) LIKE '%CXX GEEN CONTRACT%'
|
||||
OR tarief = 0
|
||||
OR aantal = 0));
|
||||
OR aantal = 0)
|
||||
AND exportdatum IS NULL);
|
||||
/
|
||||
|
||||
|
||||
@@ -54,7 +59,7 @@ END;
|
||||
/
|
||||
|
||||
|
||||
-- Procedure voor de exporteren gegevens SpoBilo
|
||||
-- Procedure voor de exporteren gegevens contractmutatie
|
||||
CREATE OR REPLACE PROCEDURE conn_export_contractmutatie (
|
||||
p_applname IN VARCHAR2,
|
||||
p_applrun IN VARCHAR2,
|
||||
@@ -70,8 +75,8 @@ AS
|
||||
BEGIN
|
||||
|
||||
v_errormsg := 'Geen akties';
|
||||
-- Exportregels zijn weggesschreven. De exporttabel moet weer geleegd worden om dubbele export te voorkomen.
|
||||
delete from CONN_EXP_CONTRACTMUTATIE;
|
||||
-- Exportregels zijn weggesschreven. De status in de exporttabel wordt op 'E' gezet en de exportdatu ingevuld om dubbele export te voorkomen.
|
||||
UPDATE CONN_EXP_CONTRACTMUTATIE SET exportdatum = sysdate, STATUS='E' WHERE exportdatum IS NULL;
|
||||
|
||||
EXCEPTION
|
||||
WHEN OTHERS
|
||||
|
||||
Reference in New Issue
Block a user