BLCC#79037 FACT-export/Ourref
svn path=/Customer/trunk/; revision=61187
This commit is contained in:
179
BLCC/blcc.sql
179
BLCC/blcc.sql
@@ -9555,7 +9555,8 @@ AS
|
||||
SUBSTR (sk.cnt_srtkenmerk_omschrijving, 1, 1))
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'01' sortering,
|
||||
'Rent' regel,
|
||||
@@ -9700,7 +9701,8 @@ AS
|
||||
UNION ALL -- CFF alleen als niet '0', tot Aanpassingsdatum en nooit BTW!
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'02' sortering,
|
||||
'CFF-Subsidy' regel,
|
||||
@@ -9795,7 +9797,8 @@ AS
|
||||
UNION ALL -- FES alleen als vinkje gezet en tot Aanpassingsdatum !
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'03' sortering,
|
||||
'FES-Subsidy' regel,
|
||||
@@ -9949,7 +9952,8 @@ AS
|
||||
UNION ALL -- Advance Payment Property Tax
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'04' sortering,
|
||||
'Advance Payment Property Tax' regel,
|
||||
@@ -10075,7 +10079,8 @@ AS
|
||||
UNION ALL -- Advance Payment Collective Services
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'05' sortering,
|
||||
'Advance Payment Collective Services' regel,
|
||||
@@ -10214,7 +10219,8 @@ AS
|
||||
UNION ALL -- Advance Payment Utilities
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'07' sortering,
|
||||
'Advance Payment Utilities' regel,
|
||||
@@ -10353,7 +10359,8 @@ AS
|
||||
UNION ALL -- CISPRO Fee/Environmental Permit Fee/Security/Parking/Public Amenities
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
DECODE (aantal.cnt_kenmerk_key,
|
||||
471, '11', -- #Med. Parking
|
||||
@@ -10466,7 +10473,8 @@ AS
|
||||
UNION ALL -- Surcharge Service Costs/2GV/3GV
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
DECODE (jbw.cnt_kenmerk_key,
|
||||
680, '06', -- Surcharge Service Costs
|
||||
@@ -10588,7 +10596,8 @@ AS
|
||||
AND vvo.alg_onrgoed_niveau = 'R')
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'01' sortering,
|
||||
'Rent' regel,
|
||||
@@ -10729,7 +10738,8 @@ AS
|
||||
UNION ALL -- CFF alleen als niet '0', tot Aanpassingsdatum en nooit BTW!
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'02' sortering,
|
||||
'CFF-Subsidy' regel,
|
||||
@@ -10809,7 +10819,8 @@ AS
|
||||
UNION ALL -- FES alleen als vinkje gezet en tot Aanpassingsdatum !
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'03' sortering,
|
||||
'FES-Subsidy' regel,
|
||||
@@ -10942,7 +10953,8 @@ AS
|
||||
UNION ALL -- Advance Payment Property Tax
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'04' sortering,
|
||||
'Advance Payment Property Tax' regel,
|
||||
@@ -11064,7 +11076,8 @@ AS
|
||||
UNION ALL -- Advance Payment Collective Services
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'05' sortering,
|
||||
'Advance Payment Collective Services' regel,
|
||||
@@ -11158,7 +11171,8 @@ AS
|
||||
UNION ALL -- Advance Payment Utilities
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'07' sortering,
|
||||
'Advance Payment Utilities' regel,
|
||||
@@ -11237,7 +11251,8 @@ AS
|
||||
UNION ALL -- CISPRO Fee/Environmental Permit Fee/Security/Parking/Public Amenities
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
DECODE (aantal.cnt_kenmerk_key,
|
||||
470, '11', -- #Med. Parking
|
||||
@@ -11346,7 +11361,8 @@ AS
|
||||
UNION ALL -- Surcharge Service Costs/2GV/3GV
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
DECODE (jbw.cnt_kenmerk_key,
|
||||
630, '13', -- 2GV
|
||||
@@ -11439,7 +11455,8 @@ AS
|
||||
UNION ALL -- Advance Payment SLA Facility Services
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'15' sortering,
|
||||
--'SLA Facility Services' regel,
|
||||
@@ -11541,7 +11558,8 @@ AS
|
||||
AND vvo.alg_onrgoed_niveau = 'R')
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'01' sortering,
|
||||
'Rent' regel,
|
||||
@@ -11684,7 +11702,8 @@ AS
|
||||
UNION ALL -- CFF alleen als niet '0', tot Aanpassingsdatum en nooit BTW!
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'02' sortering,
|
||||
'CFF-Subsidy' regel,
|
||||
@@ -11770,7 +11789,8 @@ AS
|
||||
UNION ALL -- Advance Payment Property Tax
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'03' sortering,
|
||||
'Advance Payment Property Tax' regel,
|
||||
@@ -11898,7 +11918,8 @@ AS
|
||||
UNION ALL -- Advance Payment Collective Services
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'04' sortering,
|
||||
'Advance Payment Collective Services' regel,
|
||||
@@ -11983,7 +12004,8 @@ AS
|
||||
UNION ALL -- Advance Payment Utilities
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'05' sortering,
|
||||
'Advance Payment Utilities' regel,
|
||||
@@ -12068,7 +12090,8 @@ AS
|
||||
UNION ALL -- CISPRO Fee/Environmental Permit Fee/Security/Parking/Public Amenities
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
DECODE (aantal.cnt_kenmerk_key,
|
||||
469, '09', -- #Med. Parking
|
||||
@@ -12188,7 +12211,8 @@ AS
|
||||
FROM fin_verkoopfactuur)
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'01' sortering,
|
||||
'Rent Facilities' regel, -- Rent Facilities
|
||||
@@ -12273,7 +12297,8 @@ AS
|
||||
FROM fin_verkoopfactuur)
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'01' sortering,
|
||||
'Rent' regel,
|
||||
@@ -12372,7 +12397,8 @@ AS
|
||||
UNION ALL
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'02' sortering,
|
||||
'Property Tax' regel,
|
||||
@@ -12451,7 +12477,8 @@ AS
|
||||
UNION ALL -- Alleen als niet '0', tot 'Aanpassingsdatum' en nooit BTW!
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'03' sortering,
|
||||
'CFF-Subsidy' regel,
|
||||
@@ -12535,7 +12562,8 @@ AS
|
||||
UNION ALL
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'04' sortering,
|
||||
'FES-Subsidy' regel,
|
||||
@@ -12628,7 +12656,8 @@ AS
|
||||
UNION ALL
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'05' sortering,
|
||||
'Collective Services' regel,
|
||||
@@ -12724,7 +12753,8 @@ AS
|
||||
UNION ALL
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'06' sortering,
|
||||
'Utilities' regel,
|
||||
@@ -12812,7 +12842,8 @@ AS
|
||||
UNION ALL
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'07' sortering,
|
||||
'Security' regel,
|
||||
@@ -12901,7 +12932,8 @@ AS
|
||||
UNION ALL -- TODO:Afhankelijk van Rent of Collective Services?
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'08' sortering,
|
||||
'Parking' regel,
|
||||
@@ -12988,7 +13020,8 @@ AS
|
||||
UNION ALL -- TODO:Afhankelijk van Rent of Collective Services?
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'09' sortering,
|
||||
'Public Amenities' regel,
|
||||
@@ -13080,7 +13113,8 @@ AS
|
||||
FROM fin_verkoopfactuur)
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'01' sortering,
|
||||
'Rent' regel,
|
||||
@@ -13179,7 +13213,8 @@ AS
|
||||
UNION ALL -- Alleen als niet '0', tot 'Aanpassingsdatum' en nooit BTW!
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'02' sortering,
|
||||
'CFF-Subsidy' regel,
|
||||
@@ -13263,7 +13298,8 @@ AS
|
||||
UNION ALL
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'03' sortering,
|
||||
'FES-Subsidy' regel,
|
||||
@@ -13361,7 +13397,8 @@ AS
|
||||
FROM fin_verkoopfactuur)
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'01' sortering,
|
||||
'Rent Landlease' regel, -- Rent Landlease
|
||||
@@ -13446,7 +13483,8 @@ AS
|
||||
FROM fin_verkoopfactuur)
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
DECODE (jbw.cnt_kenmerk_key,
|
||||
663, '01',
|
||||
@@ -13537,7 +13575,8 @@ AS
|
||||
FROM fin_verkoopfactuur)
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
DECODE (jbw.cnt_kenmerk_key,
|
||||
512, '01',
|
||||
@@ -13626,7 +13665,8 @@ AS
|
||||
FROM fin_verkoopfactuur)
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
DECODE (jbw.cnt_kenmerk_key,
|
||||
522, '01',
|
||||
@@ -13727,7 +13767,8 @@ AS
|
||||
FROM fin_verkoopfactuur)
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'01' sortering,
|
||||
'Monthly Fee CGZ' regel, -- Monthly Fee CGZ
|
||||
@@ -13809,7 +13850,8 @@ AS
|
||||
FROM fin_verkoopfactuur)
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'01' sortering,
|
||||
'Managed Connectivity' regel, -- Managed Connectivity
|
||||
@@ -13894,7 +13936,8 @@ AS
|
||||
FROM fin_verkoopfactuur)
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
DECODE (jbw.cnt_kenmerk_key,
|
||||
535, '01',
|
||||
@@ -13985,7 +14028,8 @@ AS
|
||||
FROM fin_verkoopfactuur)
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
DECODE (jbw.cnt_kenmerk_key,
|
||||
641, '01',
|
||||
@@ -14082,7 +14126,8 @@ AS
|
||||
FROM fin_verkoopfactuur)
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'01' sortering,
|
||||
'Fixed fee steam facility' regel, -- Fixed fee steam facility
|
||||
@@ -14167,7 +14212,8 @@ AS
|
||||
FROM fin_verkoopfactuur)
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'01' sortering,
|
||||
ro.cnt_kenmerkcontract_waarde regel, -- Regelomschrijving
|
||||
@@ -14261,7 +14307,8 @@ AS
|
||||
FROM fin_verkoopfactuur)
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'01' sortering,
|
||||
ro.cnt_kenmerkcontract_waarde regel, -- Regelomschrijving
|
||||
@@ -14357,7 +14404,8 @@ AS
|
||||
AND fin_verkoopfactuur_n2 IS NOT NULL) -- Onderscheid ADDD vs. FACT; als NOT NULL, dan FACT!
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (x.cnt_contract_nummer) po_nr, -- Yourref
|
||||
TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
--TRIM (x.cnt_contract_omschrijving) ourref, -- Ourref
|
||||
x.cnt_contract_nummer_intern || '.' || COALESCE (x.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
TRIM (x.cnt_contract_document) omschrijving, -- Contract scope
|
||||
'01' sortering,
|
||||
'Monthly Fee Analytical Services' regel,
|
||||
@@ -14435,7 +14483,8 @@ CREATE OR REPLACE VIEW blcc_v_fact_correctie
|
||||
AS
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (SUBSTR (vf.fin_verkoopfactuur_omschr, 1, INSTR (vf.fin_verkoopfactuur_omschr, '/=', -1) - 1)) po_nr, -- Yourref
|
||||
vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
--vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
c.cnt_contract_nummer_intern || '.' || COALESCE (c.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
vf.fin_verkoopfactuur_c2 omschrijving, -- Contract scope
|
||||
'01' sortering,
|
||||
TRIM (ro.waarde) regel,
|
||||
@@ -14518,7 +14567,8 @@ AS
|
||||
UNION ALL
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (SUBSTR (vf.fin_verkoopfactuur_omschr, 1, INSTR (vf.fin_verkoopfactuur_omschr, '/=', -1) - 1)) po_nr, -- Yourref
|
||||
vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
--vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
c.cnt_contract_nummer_intern || '.' || COALESCE (c.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
vf.fin_verkoopfactuur_c2 omschrijving, -- Contract scope
|
||||
'02' sortering,
|
||||
TRIM (ro.waarde) regel,
|
||||
@@ -14601,7 +14651,8 @@ AS
|
||||
UNION ALL
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (SUBSTR (vf.fin_verkoopfactuur_omschr, 1, INSTR (vf.fin_verkoopfactuur_omschr, '/=', -1) - 1)) po_nr, -- Yourref
|
||||
vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
--vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
c.cnt_contract_nummer_intern || '.' || COALESCE (c.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
vf.fin_verkoopfactuur_c2 omschrijving, -- Contract scope
|
||||
'03' sortering,
|
||||
TRIM (ro.waarde) regel,
|
||||
@@ -14684,7 +14735,8 @@ AS
|
||||
UNION ALL
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (SUBSTR (vf.fin_verkoopfactuur_omschr, 1, INSTR (vf.fin_verkoopfactuur_omschr, '/=', -1) - 1)) po_nr, -- Yourref
|
||||
vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
--vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
c.cnt_contract_nummer_intern || '.' || COALESCE (c.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
vf.fin_verkoopfactuur_c2 omschrijving, -- Contract scope
|
||||
'04' sortering,
|
||||
TRIM (ro.waarde) regel,
|
||||
@@ -14767,7 +14819,8 @@ AS
|
||||
UNION ALL
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (SUBSTR (vf.fin_verkoopfactuur_omschr, 1, INSTR (vf.fin_verkoopfactuur_omschr, '/=', -1) - 1)) po_nr, -- Yourref
|
||||
vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
--vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
c.cnt_contract_nummer_intern || '.' || COALESCE (c.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
vf.fin_verkoopfactuur_c2 omschrijving, -- Contract scope
|
||||
'05' sortering,
|
||||
TRIM (ro.waarde) regel,
|
||||
@@ -14850,7 +14903,8 @@ AS
|
||||
UNION ALL
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (SUBSTR (vf.fin_verkoopfactuur_omschr, 1, INSTR (vf.fin_verkoopfactuur_omschr, '/=', -1) - 1)) po_nr, -- Yourref
|
||||
vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
--vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
c.cnt_contract_nummer_intern || '.' || COALESCE (c.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
vf.fin_verkoopfactuur_c2 omschrijving, -- Contract scope
|
||||
'06' sortering,
|
||||
TRIM (ro.waarde) regel,
|
||||
@@ -14933,7 +14987,8 @@ AS
|
||||
UNION ALL
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (SUBSTR (vf.fin_verkoopfactuur_omschr, 1, INSTR (vf.fin_verkoopfactuur_omschr, '/=', -1) - 1)) po_nr, -- Yourref
|
||||
vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
--vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
c.cnt_contract_nummer_intern || '.' || COALESCE (c.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
vf.fin_verkoopfactuur_c2 omschrijving, -- Contract scope
|
||||
'07' sortering,
|
||||
TRIM (ro.waarde) regel,
|
||||
@@ -15016,7 +15071,8 @@ AS
|
||||
UNION ALL
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (SUBSTR (vf.fin_verkoopfactuur_omschr, 1, INSTR (vf.fin_verkoopfactuur_omschr, '/=', -1) - 1)) po_nr, -- Yourref
|
||||
vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
--vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
c.cnt_contract_nummer_intern || '.' || COALESCE (c.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
vf.fin_verkoopfactuur_c2 omschrijving, -- Contract scope
|
||||
'08' sortering,
|
||||
TRIM (ro.waarde) regel,
|
||||
@@ -15099,7 +15155,8 @@ AS
|
||||
UNION ALL
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (SUBSTR (vf.fin_verkoopfactuur_omschr, 1, INSTR (vf.fin_verkoopfactuur_omschr, '/=', -1) - 1)) po_nr, -- Yourref
|
||||
vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
--vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
c.cnt_contract_nummer_intern || '.' || COALESCE (c.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
vf.fin_verkoopfactuur_c2 omschrijving, -- Contract scope
|
||||
'09' sortering,
|
||||
TRIM (ro.waarde) regel,
|
||||
@@ -15182,7 +15239,8 @@ AS
|
||||
UNION ALL
|
||||
SELECT '*CONCEPT*' fin_verkoopfactuur_id,
|
||||
TRIM (SUBSTR (vf.fin_verkoopfactuur_omschr, 1, INSTR (vf.fin_verkoopfactuur_omschr, '/=', -1) - 1)) po_nr, -- Yourref
|
||||
vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
--vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
c.cnt_contract_nummer_intern || '.' || COALESCE (c.cnt_contract_versie, '0') ourref, -- Ourref
|
||||
vf.fin_verkoopfactuur_c2 omschrijving, -- Contract scope
|
||||
'10' sortering,
|
||||
TRIM (ro.waarde) regel,
|
||||
@@ -15309,7 +15367,8 @@ CREATE OR REPLACE VIEW blcc_v_factv2_frozen
|
||||
AS
|
||||
SELECT vf.fin_verkoopfactuur_id,
|
||||
TRIM (SUBSTR (vf.fin_verkoopfactuur_omschr, 1, INSTR (vf.fin_verkoopfactuur_omschr, '/=', -1) - 1)) po_nr,
|
||||
vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
--vf.fin_verkoopfactuur_c1 ourref, -- Ourref
|
||||
c.cnt_contract_nummer_intern || '.' || COALESCE (c.cnt_contract_versie, '0') ourref,
|
||||
vf.fin_verkoopfactuur_c2 omschrijving, -- Contract scope
|
||||
SUBSTR (vf.fin_verkoopfactuur_omschr, INSTR (vf.fin_verkoopfactuur_omschr, '/=', -1) + 2, 2) sortering,
|
||||
SUBSTR (vf.fin_verkoopfactuur_omschr, INSTR (vf.fin_verkoopfactuur_omschr, '/=', -1) + 4) regel,
|
||||
@@ -27191,7 +27250,7 @@ AS
|
||||
p.prs_perslid_tussenvoegsel,
|
||||
NULL, '',
|
||||
p.prs_perslid_tussenvoegsel || ' ')
|
||||
|| prs_perslid_naam
|
||||
|| prs_perslid_naam
|
||||
financial_cont_naam_friendly,
|
||||
deb_nr.debiteurnummer
|
||||
FROM prs_perslid p,
|
||||
|
||||
Reference in New Issue
Block a user