PCHX#80577 Facturen niet verwerkt

svn path=/Customer/trunk/; revision=62341
This commit is contained in:
Sander Schepers
2023-10-25 21:03:01 +00:00
parent bc46a8bb67
commit cb75af65f6

View File

@@ -903,7 +903,7 @@ AS
lev_kpn,
administratie,
fin_factuur_key,
(SELECT fac_tracking_datum
(SELECT MAX(fac_tracking_datum)
FROM fac_tracking t, fac_srtnotificatie sn
WHERE t.fac_tracking_refkey = fin_factuur_key
AND t.fac_srtnotificatie_key = sn.fac_srtnotificatie_key
@@ -1623,10 +1623,18 @@ BEGIN
v_count := 1; -- dummy
IF v_count <> 0
THEN
THEN
--Header xml
IF v_bkstnr_cur <> v_bkstnr_prev
THEN
-- Footer xml
IF v_bkstnr_prev <> 'empty'
THEN
pchx.add_xml_row (v_bestand, '</GLEntry>');
pchx.add_xml_row (v_bestand, '</GLEntries>');
pchx.add_xml_row (v_bestand, '</eExact>');
END IF;
pchx.add_xml_row (
v_bestand,
'<?xml version="1.0" encoding="windows-1252"?>');
@@ -1741,13 +1749,6 @@ BEGIN
v_amount_sum := v_amount_sum + rec.bedrag;
v_amount_sum_incl := v_amount_sum_incl + rec.bedrag_incl;
-- Footer xml
IF v_bkstnr_cur <> v_bkstnr_prev
THEN
pchx.add_xml_row (v_bestand, '</GLEntry>');
pchx.add_xml_row (v_bestand, '</GLEntries>');
pchx.add_xml_row (v_bestand, '</eExact>');
END IF;
END IF;
END;
@@ -1755,6 +1756,13 @@ BEGIN
v_order_count := v_order_count + 1;
END LOOP;
-- Footer xml
IF v_bkstnr_prev <> 'empty'
THEN
pchx.add_xml_row (v_bestand, '</GLEntry>');
pchx.add_xml_row (v_bestand, '</GLEntries>');
pchx.add_xml_row (v_bestand, '</eExact>');
END IF;
fac.writelog (
p_applname,
@@ -1897,6 +1905,15 @@ BEGIN
--Header xml
IF v_bkstnr_cur <> v_bkstnr_prev
THEN
-- Footer xml
IF v_bkstnr_prev <> 'empty'
THEN
pchx.add_xml_row (v_bestand, '</GLEntry>');
pchx.add_xml_row (v_bestand, '</GLEntries>');
pchx.add_xml_row (v_bestand, '</eExact>');
END IF;
pchx.add_xml_row (
v_bestand,
'<?xml version="1.0" encoding="windows-1252"?>');
@@ -2002,13 +2019,9 @@ BEGIN
v_amount_sum := v_amount_sum + rec.bedrag;
v_amount_sum_incl := v_amount_sum_incl + rec.bedrag_incl;
--Footer xml
IF v_bkstnr_cur <> v_bkstnr_prev
THEN
pchx.add_xml_row (v_bestand, '</GLEntry>');
pchx.add_xml_row (v_bestand, '</GLEntries>');
pchx.add_xml_row (v_bestand, '</eExact>');
INSERT INTO fac_tracking (fac_tracking_refkey, fac_srtnotificatie_key, fac_tracking_oms)
SELECT rec.fin_factuur_key, fac_srtnotificatie_key, 'Verplichting verzonden naar Scansys'
FROM fac_srtnotificatie
@@ -2022,6 +2035,14 @@ BEGIN
v_order_count := v_order_count + 1;
END LOOP;
-- Footer xml
IF v_bkstnr_prev <> 'empty'
THEN
pchx.add_xml_row (v_bestand, '</GLEntry>');
pchx.add_xml_row (v_bestand, '</GLEntries>');
pchx.add_xml_row (v_bestand, '</eExact>');
END IF;
fac.writelog (
p_applname,
'S',