corrected reading of date
This commit is contained in:
@@ -721,7 +721,8 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
}
|
}
|
||||||
if((additionalChilds.item(additionalChildIndex).getLocalName() != null)
|
if((additionalChilds.item(additionalChildIndex).getLocalName() != null)
|
||||||
&& (additionalChilds.item(additionalChildIndex).getLocalName().equals("FormattedIssueDateTime"))) {
|
&& (additionalChilds.item(additionalChildIndex).getLocalName().equals("FormattedIssueDateTime"))) {
|
||||||
NodeList FormattedIssueDateTimeChilds = headerTradeAgreementChilds.item(agreementChildIndex).getChildNodes();
|
|
||||||
|
NodeList FormattedIssueDateTimeChilds = additionalChilds.item(additionalChildIndex).getChildNodes();
|
||||||
for (int dateChildIndex = 0; dateChildIndex < FormattedIssueDateTimeChilds.getLength(); dateChildIndex++){
|
for (int dateChildIndex = 0; dateChildIndex < FormattedIssueDateTimeChilds.getLength(); dateChildIndex++){
|
||||||
if((FormattedIssueDateTimeChilds.item(dateChildIndex).getLocalName() != null)
|
if((FormattedIssueDateTimeChilds.item(dateChildIndex).getLocalName() != null)
|
||||||
&& (FormattedIssueDateTimeChilds.item(dateChildIndex).getLocalName().equals("DateTimeString"))) {
|
&& (FormattedIssueDateTimeChilds.item(dateChildIndex).getLocalName().equals("DateTimeString"))) {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
@@ -178,7 +179,7 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
|
|||||||
hasExceptions = true;
|
hasExceptions = true;
|
||||||
}
|
}
|
||||||
assertFalse(hasExceptions);
|
assertFalse(hasExceptions);
|
||||||
SimpleDateFormat sdf=new SimpleDateFormat("YYYY-mm-dd");
|
SimpleDateFormat sdf=new SimpleDateFormat("YYYY-MM-dd");
|
||||||
// Reading ZUGFeRD
|
// Reading ZUGFeRD
|
||||||
assertEquals("4711", invoice.getZFItems()[0].getProduct().getSellerAssignedID());
|
assertEquals("4711", invoice.getZFItems()[0].getProduct().getSellerAssignedID());
|
||||||
assertEquals("9384", invoice.getSellerOrderReferencedDocumentID());
|
assertEquals("9384", invoice.getSellerOrderReferencedDocumentID());
|
||||||
@@ -188,6 +189,9 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
|
|||||||
assertEquals("recipient@test.org", invoice.getRecipient().getEmail());
|
assertEquals("recipient@test.org", invoice.getRecipient().getEmail());
|
||||||
assertEquals("28934", invoice.getBuyerOrderReferencedDocumentID());
|
assertEquals("28934", invoice.getBuyerOrderReferencedDocumentID());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user