corrected zf2pullprovider, re-applied changes on v1

This commit is contained in:
Jochen Stärk
2020-08-06 12:18:35 +02:00
parent a404307ab0
commit 662307c0ba
6 changed files with 10 additions and 3 deletions

View File

@@ -225,7 +225,10 @@ public class ZUGFeRD1PullProvider implements IXMLProvider, IProfileProvider {
+ XMLTools.encodeXML(trans.getSubjectNote())+ "</ram:Content>\n" + XMLTools.encodeXML(trans.getSubjectNote())+ "</ram:Content>\n"
+ "</ram:IncludedNote>\n"; + "</ram:IncludedNote>\n";
} }
String typecode="380";
if (trans.getDocumentCode()!=null) {
typecode=trans.getDocumentCode();
}
String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ "<rsm:CrossIndustryDocument xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:rsm=\"urn:ferd:CrossIndustryDocument:invoice:1p0\"" + "<rsm:CrossIndustryDocument xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:rsm=\"urn:ferd:CrossIndustryDocument:invoice:1p0\""
@@ -245,7 +248,7 @@ public class ZUGFeRD1PullProvider implements IXMLProvider, IProfileProvider {
+ " <rsm:HeaderExchangedDocument>\n" + " <rsm:HeaderExchangedDocument>\n"
+ " <ram:ID>" + XMLTools.encodeXML(trans.getNumber()) + "</ram:ID>\n" //$NON-NLS-2$ + " <ram:ID>" + XMLTools.encodeXML(trans.getNumber()) + "</ram:ID>\n" //$NON-NLS-2$
+ " <ram:Name>RECHNUNG</ram:Name>\n" + " <ram:Name>RECHNUNG</ram:Name>\n"
+ " <ram:TypeCode>380</ram:TypeCode>\n" + " <ram:TypeCode>"+typecode+"</ram:TypeCode>\n"
+ " <ram:IssueDateTime><udt:DateTimeString format=\"102\">" + " <ram:IssueDateTime><udt:DateTimeString format=\"102\">"
+ zugferdDateFormat.format(trans.getIssueDate()) + "</udt:DateTimeString></ram:IssueDateTime>\n" // date + zugferdDateFormat.format(trans.getIssueDate()) + "</udt:DateTimeString></ram:IssueDateTime>\n" // date
// format // format

View File

@@ -227,6 +227,10 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider {
+ "</ram:IncludedNote>\n"; + "</ram:IncludedNote>\n";
} }
String typecode="380";
if (trans.getDocumentCode()!=null) {
typecode=trans.getDocumentCode();
}
String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" //$NON-NLS-1$ String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" //$NON-NLS-1$
+ "<rsm:CrossIndustryInvoice xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\"" + "<rsm:CrossIndustryInvoice xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\""
@@ -247,7 +251,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider {
+ " <ram:ID>" + XMLTools.encodeXML(trans.getNumber()) + "</ram:ID>\n" //$NON-NLS-1$ //$NON-NLS-2$ + " <ram:ID>" + XMLTools.encodeXML(trans.getNumber()) + "</ram:ID>\n" //$NON-NLS-1$ //$NON-NLS-2$
// + " <ram:Name>RECHNUNG</ram:Name>\n" //$NON-NLS-1$ // + " <ram:Name>RECHNUNG</ram:Name>\n" //$NON-NLS-1$
// + " <ram:TypeCode>380</ram:TypeCode>\n" //$NON-NLS-1$ // + " <ram:TypeCode>380</ram:TypeCode>\n" //$NON-NLS-1$
+ " <ram:TypeCode>" + XMLTools.encodeXML(trans.getDocumentCode()) + "</ram:TypeCode>\n" //$NON-NLS-1$ + " <ram:TypeCode>" + typecode + "</ram:TypeCode>\n" //$NON-NLS-1$
+ " <ram:IssueDateTime><udt:DateTimeString format=\"102\">" //$NON-NLS-1$ + " <ram:IssueDateTime><udt:DateTimeString format=\"102\">" //$NON-NLS-1$
+ zugferdDateFormat.format(trans.getIssueDate()) + "</udt:DateTimeString></ram:IssueDateTime>\n" // date //$NON-NLS-1$ + zugferdDateFormat.format(trans.getIssueDate()) + "</udt:DateTimeString></ram:IssueDateTime>\n" // date //$NON-NLS-1$
// format // format