PIVP#74972 -- Fase 2 implementatie

svn path=/Customer/trunk/; revision=59301
This commit is contained in:
Norbert Wassink
2023-02-23 16:46:21 +00:00
parent 0f96c952b3
commit 0651b7e066

View File

@@ -3588,9 +3588,9 @@ BEGIN
v_bestand:= 'EXM_MLD';
*/
-- PUUR OM EENVOUDIGER TE KUNNEN TESTEN
v_startDate:=TO_DATE('01-01-2022','DD-MM-YYYY');
v_endDate:=TO_DATE('31-12-2022','DD-MM-YYYY');
v_startDate:=TO_DATE('01-01-2022','DD-MM-YYYY');
v_endDate:=TO_DATE(SYSDATE,'DD-MM-YYYY');
v_bestand:= 'EXM_MLD';
FOR rec in mld(v_startDate, v_endDate)
LOOP
v_count:=v_count+1;
@@ -3639,30 +3639,30 @@ BEGIN
END IF;
pivp.add_xml_row (v_bestand, '<InvoiceLine lineNo="' || v_sub_count || '" type="N" subtype="N">');
IF LENGTH(rec_regel.ponummer)>0 THEN
pivp.add_xml_element (v_bestand, 'LineYourRef', 'Uw referentie: '||rec_regel.ponummer);
pivp.add_xml_element (v_bestand, 'LineYourRef', 'Uw referentie: '||rec_regel.ponummer);
END IF;
IF LENGTH(rec_regel.factuurinfo)>0 THEN
v_factuurregel:= rec_regel.melding_key||' - '||rec_regel.factuurinfo;
v_factuurregel:= rec_regel.melding_key||' - '||rec_regel.factuurinfo;
ELSE
IF LENGTH(rec_regel.onderwerp)>0 THEN
v_factuurregel:= rec_regel.melding_key||'('||rec_regel.dienstencode||')-'||rec_regel.onderwerp;
ELSE
v_factuurregel:= rec_regel.melding_key||'-'||rec_regel.vagroep;
END IF;
END IF;
END IF;
pivp.add_xml_element (v_bestand, 'Description', SUBSTR(v_factuurregel,0,60));
pivp.add_xml_row (v_bestand, '<Item code="' || rec_regel.dienstencode || '"/>');
pivp.add_xml_element (v_bestand, 'Quantity', '1' );
pivp.add_xml_row (v_bestand, '<Price>');
pivp.add_xml_row (v_bestand, '<Currency code="EUR"/>');
pivp.add_xml_element (v_bestand, 'Value', rec_regel.factuurbedrag);
pivp.add_xml_row (v_bestand, '<Currency code="EUR"/>');
pivp.add_xml_element (v_bestand, 'Value', rec_regel.factuurbedrag);
pivp.add_xml_row (v_bestand, '</Price>');
pivp.add_xml_row (v_bestand, '<Delivery>');
pivp.add_xml_element (v_bestand, 'Date', TO_CHAR(rec_regel.afmelddatum, 'YYYY-MM-DD') );
pivp.add_xml_row (v_bestand, '</Delivery>');
pivp.add_xml_row (v_bestand, '</InvoiceLine>');
/* pivp.add_xml_row (v_bestand, '<FinEntryLine number="' || v_sub_count || '" type="N" subtype="N">');
pivp.add_xml_row (v_bestand, '<GLAccount code="' || SUBSTR(rec_regel.dienstencode,3) || '"/>');
pivp.add_xml_element (v_bestand, 'Description', rec_regel.melding_key||' - '||rec_regel.onderwerp);
@@ -3680,11 +3680,10 @@ BEGIN
pivp.add_xml_element (v_bestand, 'YourRef', 'PO Nummer klant');
pivp.add_xml_element (v_bestand, 'DocumentDate', TO_CHAR(rec_regel.afmelddatum, 'YYYY-MM-DD') );
pivp.add_xml_row (v_bestand, '</FinReferences>'); */
pivp.add_xml_row (v_bestand, '</InvoiceLine>');
END LOOP;
IF v_sub_count>0 THEN
IF v_sub_count>0 THEN
pivp.add_xml_row (v_bestand, '</Invoice>');
END IF;
@@ -3888,8 +3887,7 @@ BEGIN
END LOOP;
IF v_sub_count>=1 THEN
pivp.add_xml_element (v_bestand, 'Resource', v_sub_count);
IF v_sub_count>=1 THEN
pivp.add_xml_row (v_bestand, '</Invoice>');
END IF;
v_sub_count:=0;
@@ -4009,9 +4007,7 @@ BEGIN
pivp.add_xml_row (v_bestand, '<FreeYesNo number="10" label="Student/PhD">0</FreeYesNo>');
pivp.add_xml_row (v_bestand, '</FreeYesNo>');
pivp.add_xml_row (v_bestand, '</FreeFields>');
pivp.add_xml_row (v_bestand, '</Contact>');
pivp.add_xml_row (v_bestand, '</Contact>');
v_relatie_code := rec.debiteurnr;
-- UPDATE mld_melding set MLD_MELDING_EXTERNSYNCDATE=SYSDATE WHERE mld_melding_key=rec.mld_melding_key;