The Debit/Credit field for XML invoices
Note that there is a separate topic for the debit/credit field in connection with paper or image-based invoices.
XML documents may contain text that indicates whether it is a document or a credit note, such as "Invoice" or "Credit", to which the field can be mapped, but more often, for example, the value 380 is used to indicate a document and any other value determines that the document is a credit note.
Learning the Debit/Credit field for XML documents in Optimize
To specify if an XML document is a debit document or a credit note:
-
Map
the
Invoice credit field to the correct XML element/attribute
using standard rules. See image.
- Translate the value found to one Kofax ReadSoft Entrance understands using an advanced rule such as this one. See additional examples below.
Note that different XML standards may require different rules to extract the correct value. From Kofax ReadSoft Entrance' perspective, it suffices to say that if the resulting value is 1, the XML document is interpreted to be a credit document, and if it turns out to be anything else, the document is interpreted to be a debit document. Use the example in step two above and the additional examples below for inspiration when new XML document profiles are created or the existing ones need to be adjusted.
Once the field has been mapped and the values are found and interpreted correctly, the status of the field is automatically set to Completewhen XML documents are processed.
Additional examples for mapping the Debit/Credit field in different XML standards:
e2b standard
- First map the field to the XML element found at /InvoiceType using standard rules.
-
Then create an advanced rule with these conditions:
No condition: Matches both true and false
Value (Node[/InvoiceType]) =="380"
- Select the second condition in step 2, and add these rules:
- First map the field to the XML element found at /InvoiceDetails/InvoiceTypeCode using standard rules.
-
Then create an advanced rule with these conditions:
No condition: Matches both true and false Value(Node[/InvoiceDetails/InvoiceTypeCode]) =="INV01" AND Value(Node[/InvoiceDetails/invoiceTotalVatIncludedAmount]) >"0"
-
Select the second condition in step 2, and add these rules:
if((Value(Node[/InvoiceDetails/InvoiceTypeCode]) =="INV01" AND Value(Node[/InvoiceDetails/invoiceTotalVatIncludedAmount]) >"0" ==true) { Field.FieldValue = "0"; return; } if((Value(Node[/InvoiceDetails/InvoiceTypeCode]) =="INV01" AND Value(Node[/InvoiceDetails/invoiceTotalVatIncludedAmount]) >"0" ==false) { Field.FieldValue ="1"; return; }
if((Value(Node[/InvoiceType]) =="380") == true
{
Field.FieldValue = "0";
return;
}
if((Value(Node[/InvoiceType]) =="380") == false)
{
Field.FieldValue ="1";
return;
}
Finvoice standard
For Finvoice, you also need to check if the value is greater than 0: