PCHX#80577 Facturen niet verwerkt
svn path=/Customer/trunk/; revision=62338
This commit is contained in:
@@ -1923,16 +1923,16 @@ BEGIN
|
||||
pchx.add_xml_row (
|
||||
v_bestand,
|
||||
'<FinEntryLine number="'
|
||||
|| rec1.fin_factuurregel_nr
|
||||
|| rec.fin_factuurregel_nr
|
||||
|| '" subtype="T" type="N">');
|
||||
pchx.add_xml_element (
|
||||
v_bestand,
|
||||
'Date',
|
||||
COALESCE (rec1.afw_datum, rec1.datum));
|
||||
COALESCE (rec.afw_datum, rec.datum));
|
||||
pchx.add_xml_row (
|
||||
v_bestand,
|
||||
'<GLAccount code="'
|
||||
|| xml.char_to_html (rec1.reknr)
|
||||
|| xml.char_to_html (rec.reknr)
|
||||
|| '"/>');
|
||||
|
||||
IF pchx.get_user = 'PCHD'
|
||||
@@ -1940,27 +1940,27 @@ BEGIN
|
||||
pchx.add_xml_row (
|
||||
v_bestand,
|
||||
'<Project code="'
|
||||
|| rec1.projectnr
|
||||
|| rec.projectnr
|
||||
|| '" type="I" status="A">');
|
||||
pchx.add_xml_element (v_bestand,
|
||||
'Description',
|
||||
rec1.projectnaam);
|
||||
rec.projectnaam);
|
||||
pchx.add_xml_row (v_bestand, '</Project>');
|
||||
END IF;
|
||||
|
||||
pchx.add_xml_element (v_bestand,
|
||||
'Description',
|
||||
rec1.regel_oms25);
|
||||
rec.regel_oms25);
|
||||
|
||||
--Met PCHX#63945 wordt afwijkende kostenplaats gehaald vanuit de import en daarmee van de factuurregels.
|
||||
-- Voorheen kreeg PCHH altijd 0100, bij PCHA en PCHW werd dit gehaald uit projectcode en bij de overige omgeving werd kostenplaats van bestelling/contract/opdracht overgenomen.
|
||||
--Met PCHX#63945 moet dit dus, voor controledoeleinden in Exact, nu van de (door Exact aangeleverde) factuurregels. CASE
|
||||
IF rec1.afw_kostenplaats IS NOT NULL
|
||||
IF rec.afw_kostenplaats IS NOT NULL
|
||||
THEN
|
||||
pchx.add_xml_row (
|
||||
v_bestand,
|
||||
'<Costcenter code="'
|
||||
|| xml.char_to_html (rec1.afw_kostenplaats)
|
||||
|| xml.char_to_html (rec.afw_kostenplaats)
|
||||
|| '"/>');
|
||||
END IF;
|
||||
|
||||
@@ -1969,36 +1969,36 @@ BEGIN
|
||||
pchx.add_xml_row (
|
||||
v_bestand,
|
||||
'<Item code="'
|
||||
|| xml.char_to_html (rec1.itemcode)
|
||||
|| xml.char_to_html (rec.itemcode)
|
||||
|| '"/>');
|
||||
END IF;
|
||||
|
||||
pchx.add_xml_row (v_bestand, '<Amount>');
|
||||
pchx.add_xml_element (v_bestand, 'Debit', rec1.bedrag_txt);
|
||||
pchx.add_xml_element (v_bestand, 'Debit', rec.bedrag_txt);
|
||||
pchx.add_xml_row (
|
||||
v_bestand,
|
||||
'<VAT code="'
|
||||
|| xml.char_to_html (rec1.btw_code)
|
||||
|| xml.char_to_html (rec.btw_code)
|
||||
|| '"/>');
|
||||
pchx.add_xml_row (v_bestand, '</Amount>');
|
||||
pchx.add_xml_row (v_bestand, '<Payment>');
|
||||
pchx.add_xml_element (v_bestand,
|
||||
'Reference',
|
||||
rec1.betaalref);
|
||||
rec.betaalref);
|
||||
pchx.add_xml_element (v_bestand,
|
||||
'InvoiceNumber',
|
||||
rec1.bkstnr);
|
||||
rec.bkstnr);
|
||||
pchx.add_xml_row (v_bestand, '</Payment>');
|
||||
pchx.add_xml_row (v_bestand, '<FinReferences>');
|
||||
pchx.add_xml_element (v_bestand, 'YourRef', rec1.betaalref);
|
||||
pchx.add_xml_element (v_bestand, 'YourRef', rec.betaalref);
|
||||
pchx.add_xml_element (v_bestand,
|
||||
'DocumentDate',
|
||||
TO_CHAR (SYSDATE, 'YYYY-MM-DD'));
|
||||
pchx.add_xml_row (v_bestand, '</FinReferences>');
|
||||
pchx.add_xml_row (v_bestand, '</FinEntryLine>');
|
||||
--v_sub_count := v_sub_count + 1;
|
||||
v_amount_sum := v_amount_sum + rec1.bedrag;
|
||||
v_amount_sum_incl := v_amount_sum_incl + rec1.bedrag_incl;
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user