Versie 5.4.3 Gold A patches
svn path=/Database/trunk/; revision=23297
This commit is contained in:
@@ -28,7 +28,7 @@ CREATE OR REPLACE PACKAGE res AS
|
||||
FUNCTION res_deel_in_scope (pres_deel_key IN NUMBER, palg_ruimte_key IN NUMBER) RETURN BOOLEAN;
|
||||
FUNCTION res_artikel_in_scope (pres_artikel_key IN NUMBER, palg_ruimte_key IN NUMBER) RETURN BOOLEAN;
|
||||
FUNCTION getalg_ruimte_key (pres_rsv_ruimte_key IN NUMBER) RETURN NUMBER;
|
||||
FUNCTION getruimteprijs (pres_rsv_ruimte_key IN NUMBER) RETURN NUMBER;
|
||||
FUNCTION getruimteprijs (pres_rsv_ruimte_key IN NUMBER, ignoretotaal IN NUMBER DEFAULT NULL) RETURN NUMBER;
|
||||
FUNCTION getdeelprijs (pres_rsv_deel_key IN NUMBER) RETURN NUMBER;
|
||||
FUNCTION getartikelprijs (pres_rsv_artikel_key IN NUMBER) RETURN NUMBER;
|
||||
FUNCTION getdeelresprijs (pres_rsv_ruimte_key IN NUMBER) RETURN NUMBER;
|
||||
@@ -1018,7 +1018,7 @@ AS
|
||||
|
||||
RETURN alg_ruimte_key;
|
||||
END;
|
||||
FUNCTION getruimteprijs (pres_rsv_ruimte_key IN NUMBER)
|
||||
FUNCTION getruimteprijs (pres_rsv_ruimte_key IN NUMBER, ignoretotaal IN NUMBER DEFAULT NULL)
|
||||
RETURN NUMBER IS
|
||||
room_price res_ruimte.res_ruimte_prijs%TYPE;
|
||||
room_price_fixed res_ruimte.res_ruimte_prijs_vast%TYPE;
|
||||
@@ -1027,6 +1027,7 @@ AS
|
||||
price_evening res_ruimte.res_ruimte_prijs_avond%TYPE;
|
||||
price_allday res_ruimte.res_ruimte_prijs_dag%TYPE;
|
||||
room_price_total res_rsv_ruimte.res_rsv_ruimte_prijs%TYPE;
|
||||
afgesprokentotaal res_rsv_ruimte.res_rsv_ruimte_totaal%TYPE;
|
||||
prs_kostenplaats_extern prs_kostenplaats.prs_kostenplaats_extern%TYPE;
|
||||
ruimte_prijsfactor_intern res_ruimte.res_ruimte_prijsfactor_intern%TYPE;
|
||||
|
||||
@@ -1055,9 +1056,11 @@ AS
|
||||
BEGIN
|
||||
-- Is de reservering verwijderd
|
||||
SELECT rrr.res_rsv_ruimte_verwijder,
|
||||
rrr.res_status_fo_key
|
||||
rrr.res_status_fo_key,
|
||||
res_rsv_ruimte_totaal
|
||||
INTO verwijderdatum,
|
||||
statusfokey
|
||||
statusfokey,
|
||||
afgesprokentotaal
|
||||
FROM res_rsv_ruimte rrr
|
||||
WHERE rrr.res_rsv_ruimte_key = pres_rsv_ruimte_key;
|
||||
|
||||
@@ -1090,6 +1093,11 @@ AS
|
||||
RETURN 0;
|
||||
END IF;
|
||||
|
||||
IF afgesprokentotaal IS NOT NULL AND ignoretotaal IS NULL
|
||||
THEN
|
||||
return afgesprokentotaal; -- dit is simpel
|
||||
END IF;
|
||||
|
||||
-- Als Uitgevoerd/verwerkt, dan is de prijs al geregistreerd en bekend
|
||||
BEGIN
|
||||
SELECT res_rsv_ruimte_prijs
|
||||
@@ -1544,7 +1552,6 @@ AS
|
||||
artikelprijs NUMBER := 0;
|
||||
deelprijs NUMBER := 0;
|
||||
korting res_rsv_ruimte.res_rsv_ruimte_korting%TYPE;
|
||||
totaal res_rsv_ruimte.res_rsv_ruimte_totaal%TYPE;
|
||||
verwijderdatum res_rsv_ruimte.res_rsv_ruimte_verwijder%TYPE;
|
||||
statusfokey res_rsv_ruimte.res_status_fo_key%TYPE;
|
||||
CURSOR cartikel
|
||||
@@ -1563,12 +1570,10 @@ AS
|
||||
-- Is de reservering verwijderd
|
||||
SELECT rrr.res_rsv_ruimte_verwijder,
|
||||
rrr.res_status_fo_key,
|
||||
COALESCE(res_rsv_ruimte_korting, 0),
|
||||
res_rsv_ruimte_totaal
|
||||
COALESCE(res_rsv_ruimte_korting, 0)
|
||||
INTO verwijderdatum,
|
||||
statusfokey,
|
||||
korting,
|
||||
totaal
|
||||
korting
|
||||
FROM res_rsv_ruimte rrr
|
||||
WHERE rrr.res_rsv_ruimte_key = pres_rsv_ruimte_key;
|
||||
|
||||
@@ -1576,11 +1581,7 @@ AS
|
||||
IF verwijderdatum IS NOT NULL AND statusfokey != 4 -- Verwijderde reservering met FO status die niet is vervallen: 0% korting doorberekenen.
|
||||
THEN
|
||||
korting := 0;
|
||||
ELSE -- Actuele reservering of verwijderde reservering met FO status is vervallen: 100% korting doorberekenen
|
||||
IF totaal IS NOT NULL
|
||||
THEN
|
||||
return totaal; -- dit is simpel
|
||||
END IF;
|
||||
-- ELSE -- Actuele reservering of verwijderde reservering met FO status is vervallen: 100% korting doorberekenen
|
||||
END IF;
|
||||
|
||||
ruimteprijs := res.getruimteprijs(pres_rsv_ruimte_key);
|
||||
|
||||
Reference in New Issue
Block a user