ZLMV#89387 -- Inrichting MJOB module tbv import oPrognose bestanden. Nu met BTW tarief.

svn path=/Customer/trunk/; revision=70156
This commit is contained in:
Norbert Wassink
2025-08-29 11:14:39 +00:00
parent ef7bf99ae2
commit 9dc9c75602

View File

@@ -1222,6 +1222,7 @@ IS
v_ins_srtcontroledl_xcp_periode VARCHAR2 (255); --NUMBER(6,2) v_ins_srtcontroledl_xcp_periode VARCHAR2 (255); --NUMBER(6,2)
v_ins_srtcontroledl_xcp_perc VARCHAR2 (255); --NUMBER(3) v_ins_srtcontroledl_xcp_perc VARCHAR2 (255); --NUMBER(3)
v_ins_srtcontroledl_xcp_eenh VARCHAR2 (255); v_ins_srtcontroledl_xcp_eenh VARCHAR2 (255);
v_ins_srtcontrole_btw VARCHAR2 (255);
v_file_index NUMBER; v_file_index NUMBER;
@@ -1261,6 +1262,7 @@ BEGIN
fac.imp_getfield (v_newline, c_delim, v_ins_srtcontroledl_xcp_periode); fac.imp_getfield (v_newline, c_delim, v_ins_srtcontroledl_xcp_periode);
fac.imp_getfield (v_newline, c_delim, v_ins_srtcontroledl_xcp_perc); fac.imp_getfield (v_newline, c_delim, v_ins_srtcontroledl_xcp_perc);
fac.imp_getfield (v_newline, c_delim, v_ins_srtcontroledl_xcp_eenh); fac.imp_getfield (v_newline, c_delim, v_ins_srtcontroledl_xcp_eenh);
fac.imp_getfield (v_newline, c_delim, v_ins_srtcontrole_btw);
v_aanduiding := v_aanduiding :=
'[' '['
@@ -1288,6 +1290,8 @@ BEGIN
AND UPPER (v_ins_srtcontroledl_xcp_startdat) = 'SRTCONTROLE_STARTJAAR' AND UPPER (v_ins_srtcontroledl_xcp_startdat) = 'SRTCONTROLE_STARTJAAR'
AND UPPER (v_ins_srtcontroledl_xcp_periode) = 'SRTCONTROLE_PERIODE' AND UPPER (v_ins_srtcontroledl_xcp_periode) = 'SRTCONTROLE_PERIODE'
AND UPPER (v_ins_srtcontroledl_xcp_perc) = 'SRTCONTROLE_PERCENTAGE' AND UPPER (v_ins_srtcontroledl_xcp_perc) = 'SRTCONTROLE_PERCENTAGE'
AND UPPER (v_ins_srtcontroledl_xcp_eenh) = 'SRTCONTROLE_EENHEID'
AND UPPER (v_ins_srtcontrole_btw) = 'SRTCONTROLE_BTW'
THEN THEN
header_is_valid := 1; header_is_valid := 1;
ELSE ELSE
@@ -1444,7 +1448,8 @@ BEGIN
fac_imp_csv_col09, fac_imp_csv_col09,
fac_imp_csv_col10, fac_imp_csv_col10,
fac_imp_csv_col11, fac_imp_csv_col11,
fac_imp_csv_col12) fac_imp_csv_col12,
fac_imp_csv_col13)
VALUES ( p_import_key, VALUES ( p_import_key,
v_file_index, v_file_index,
SUBSTR(v_alg_gebouw_code,1,12), SUBSTR(v_alg_gebouw_code,1,12),
@@ -1458,7 +1463,8 @@ BEGIN
v_ins_srtcontroledl_xcp_periode, v_ins_srtcontroledl_xcp_periode,
FAC.safe_to_number(v_ins_srtcontroledl_xcp_perc), FAC.safe_to_number(v_ins_srtcontroledl_xcp_perc),
v_ins_srtcontroledl_xcp_eenh, v_ins_srtcontroledl_xcp_eenh,
SUBSTR(v_alg_locatie_code,1,12)); SUBSTR(v_alg_locatie_code,1,12),
v_ins_srtcontrole_btw);
COMMIT; COMMIT;
v_count_import := v_count_import + 1; v_count_import := v_count_import + 1;
@@ -1540,7 +1546,8 @@ IS
fac_imp_csv_col09 ins_srtcontroledl_xcp_periode, fac_imp_csv_col09 ins_srtcontroledl_xcp_periode,
fac_imp_csv_col10 ins_srtcontroledl_xcp_perc, fac_imp_csv_col10 ins_srtcontroledl_xcp_perc,
fac_imp_csv_col11 ins_srtcontroledl_xcp_eenh, fac_imp_csv_col11 ins_srtcontroledl_xcp_eenh,
fac_imp_csv_col12 alg_locatie_code fac_imp_csv_col12 alg_locatie_code,
fac_imp_csv_col13 ins_srtcontrole_btw
FROM fac_imp_csv FROM fac_imp_csv
WHERE fac_import_key=p_import_key; WHERE fac_import_key=p_import_key;
@@ -1564,6 +1571,7 @@ IS
v_ins_srtcontroledl_xcp_startdat DATE; v_ins_srtcontroledl_xcp_startdat DATE;
v_ins_srtcontroledl_xcp_aantal NUMBER; v_ins_srtcontroledl_xcp_aantal NUMBER;
v_ins_srtcontroledl_xcp_perc NUMBER; v_ins_srtcontroledl_xcp_perc NUMBER;
v_srtcontrole_btw_key NUMBER;
v_refdate DATE; v_refdate DATE;
BEGIN BEGIN
@@ -1655,9 +1663,29 @@ BEGIN
END; END;
END IF; END IF;
BEGIN
SELECT btw.fin_btwtabelwaarde_key
INTO v_srtcontrole_btw_key
FROM fin_btwtabel bt,
fin_btwtabelwaarde btw
WHERE bt.fin_btwtabel_omschrijving='NL standaard'
AND btw.fin_btwtabel_key = bt.fin_btwtabel_key
AND btw.fin_btwtabelwaarde_code=rec.ins_srtcontrole_btw
AND btw.fin_btwtabelwaarde_verwijder IS NULL;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
v_srtcontrole_btw_key:=NULL;
END;
-- kijk of de srtcontrole al bestaat -- kijk of de srtcontrole al bestaat
v_errormsg := 'Kijk of de taak al bestaat'; v_errormsg := 'Kijk of de taak al bestaat';
BEGIN BEGIN
SELECT ins_srtcontrole_key SELECT ins_srtcontrole_key
INTO v_ins_srtcontrole_key INTO v_ins_srtcontrole_key
FROM ins_srtcontrole FROM ins_srtcontrole
@@ -1681,7 +1709,8 @@ BEGIN
ins_srtcontrole_eenheid, ins_srtcontrole_eenheid,
ins_srtcontrole_level, ins_srtcontrole_level,
ins_srtcontrole_materiaal, ins_srtcontrole_materiaal,
ins_srtcontrole_percentage) ins_srtcontrole_percentage,
fin_btwtabelwaarde_key)
VALUES (v_ins_srtdeel_key, VALUES (v_ins_srtdeel_key,
'S', 'S',
SUBSTR(v_ins_srtdeel_code || ' - ' || rec.ins_srtcontrole_omschrijving, 1, 60), SUBSTR(v_ins_srtdeel_code || ' - ' || rec.ins_srtcontrole_omschrijving, 1, 60),
@@ -1690,7 +1719,8 @@ BEGIN
4, -- standaard jaar voor MJOB 4, -- standaard jaar voor MJOB
rec.ins_srtcontrole_level, rec.ins_srtcontrole_level,
0, -- kosten worden in het xcp record vermeld. 0, -- kosten worden in het xcp record vermeld.
100) 100,
v_srtcontrole_btw_key) -- BTW tarief zoals vermeld op de oPrognose taak.
RETURNING ins_srtcontrole_key INTO v_ins_srtcontrole_key; RETURNING ins_srtcontrole_key INTO v_ins_srtcontrole_key;
END; END;