AAXX#91083 Contract notificatie houdt geen rekening met fiatteren
svn path=/Database/trunk/; revision=70621
This commit is contained in:
@@ -39,7 +39,7 @@ CREATE OR REPLACE PACKAGE BODY cnt AS
|
|||||||
AS
|
AS
|
||||||
currentstatus cnt_contract.cnt_contract_status%TYPE;
|
currentstatus cnt_contract.cnt_contract_status%TYPE;
|
||||||
newstatus cnt_contract.cnt_contract_status%TYPE;
|
newstatus cnt_contract.cnt_contract_status%TYPE;
|
||||||
eventcode fac_srtnotificatie.fac_srtnotificatie_code%TYPE;
|
eventcode VARCHAR(7); -- fac_srtnotificatie.fac_srtnotificatie_code%TYPE is te klein voor '@CNTNEW'
|
||||||
BEGIN
|
BEGIN
|
||||||
SELECT cnt_contract_status
|
SELECT cnt_contract_status
|
||||||
INTO currentstatus
|
INTO currentstatus
|
||||||
@@ -52,11 +52,12 @@ CREATE OR REPLACE PACKAGE BODY cnt AS
|
|||||||
IF currentstatus IS NULL
|
IF currentstatus IS NULL
|
||||||
THEN
|
THEN
|
||||||
newstatus := pstatus;
|
newstatus := pstatus;
|
||||||
eventcode := 'CNTNEW';
|
eventcode := 'CNTNEW'; -- direct ook notificeren
|
||||||
ELSIF currentstatus = 2 OR currentstatus = 3 -- Het kan ook zijn dat er geen fiattering nodig is.
|
ELSIF currentstatus = 2 OR currentstatus = 3 -- Het kan ook zijn dat er geen fiattering nodig is.
|
||||||
THEN
|
THEN
|
||||||
newstatus := pstatus;
|
newstatus := pstatus;
|
||||||
eventcode := 'CNTFIT';
|
eventcode := 'CNTFIT';
|
||||||
|
fac.notifytrackingbedrijven('CNTNEW', pcontractkey); -- Nu alsnog notificeren, we zijn helemaal klaar met fiatteren
|
||||||
END IF;
|
END IF;
|
||||||
WHEN 1 -- Gesloten
|
WHEN 1 -- Gesloten
|
||||||
THEN
|
THEN
|
||||||
@@ -70,7 +71,7 @@ CREATE OR REPLACE PACKAGE BODY cnt AS
|
|||||||
IF currentstatus IS NULL
|
IF currentstatus IS NULL
|
||||||
THEN
|
THEN
|
||||||
newstatus := pstatus;
|
newstatus := pstatus;
|
||||||
eventcode := 'CNTNEW';
|
eventcode := '@CNTNEW'; -- nog niet notificeren
|
||||||
ELSIF currentstatus = 3
|
ELSIF currentstatus = 3
|
||||||
THEN
|
THEN
|
||||||
newstatus := pstatus;
|
newstatus := pstatus;
|
||||||
|
|||||||
@@ -21314,7 +21314,7 @@ AS
|
|||||||
v_count_tot NUMBER;
|
v_count_tot NUMBER;
|
||||||
v_count_cntnew NUMBER;
|
v_count_cntnew NUMBER;
|
||||||
v_count_cntupd NUMBER;
|
v_count_cntupd NUMBER;
|
||||||
v_srtnoti_code VARCHAR2(6);
|
v_srtnoti_code VARCHAR2(7); -- ook ruimte voor '@' prefix
|
||||||
v_scope_code VARCHAR2(1);
|
v_scope_code VARCHAR2(1);
|
||||||
v_scope_key NUMBER(10);
|
v_scope_key NUMBER(10);
|
||||||
v_scope_err VARCHAR2(100);
|
v_scope_err VARCHAR2(100);
|
||||||
@@ -21979,8 +21979,10 @@ BEGIN
|
|||||||
IF fac.getSetting('cnt_contract_approval') = 1 AND rec.bedrag > fac.getSetting('cnt_contract_limit1')
|
IF fac.getSetting('cnt_contract_approval') = 1 AND rec.bedrag > fac.getSetting('cnt_contract_limit1')
|
||||||
THEN
|
THEN
|
||||||
v_cnt_status := 2;
|
v_cnt_status := 2;
|
||||||
|
v_srtnoti_code := '@CNTNEW'; -- nog niet direct versturen
|
||||||
ELSE
|
ELSE
|
||||||
v_cnt_status := 0;
|
v_cnt_status := 0;
|
||||||
|
v_srtnoti_code := 'CNTNEW';
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
INSERT INTO cnt_contract
|
INSERT INTO cnt_contract
|
||||||
@@ -22041,7 +22043,6 @@ BEGIN
|
|||||||
RETURNING cnt_contract_key
|
RETURNING cnt_contract_key
|
||||||
INTO v_contract_key;
|
INTO v_contract_key;
|
||||||
|
|
||||||
v_srtnoti_code := 'CNTNEW';
|
|
||||||
v_count_cntnew := v_count_cntnew + 1;
|
v_count_cntnew := v_count_cntnew + 1;
|
||||||
ELSE -- Contract bestaat al --> bijwerken.
|
ELSE -- Contract bestaat al --> bijwerken.
|
||||||
SELECT c.cnt_contract_key
|
SELECT c.cnt_contract_key
|
||||||
|
|||||||
Reference in New Issue
Block a user