Skip to content

Commit

Permalink
added optional method
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoika committed Nov 4, 2024
1 parent 2bb187c commit bc48e04
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,32 @@ private void readEInvoiceContent(FileData eInvoiceFileData,

}

/**
* This method resolves the content of a factur-x e-invocie file and extracts
* all invoice and customer fields.
*
* This is the variant without Mustang Project
*
*
* @param xmlData
* @return
* @throws PluginException
*/
private void readEInvoiceContentNativeXML(FileData eInvoiceFileData,
ItemCollection workitem) throws PluginException {
byte[] xmlData = readXMLContent(eInvoiceFileData);
logger.info("Autodetect e-invoice data...");

createXMLDoc(xmlData);

readItem(workitem, "//rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:ID", "text", "invoice.number");
readItem(workitem, "//rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString/text()", "date",
"invoice.date");
readItem(workitem, "//ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:GrandTotalAmount", "double",
"invoice.total");
readItem(workitem, "//ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:Name/text()", "text",
"cdtr.name");

}

}

0 comments on commit bc48e04

Please # to comment.