Skip to content

Commit 9aa49d1

Browse files
committed
corrected UBL import
1 parent a60ff92 commit 9aa49d1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,8 @@ public Invoice extractInto(Invoice zpp) throws XPathExpressionException, ParseEx
610610
String tenderReference = extractString("/*[local-name()=\"Invoice\" or local-name()=\"CreditNote\"]/*[local-name()=\"OriginatorDocumentReference\"]/*[local-name()=\"ID\"]").trim();
611611
String tenderReferenceDate = extractString("/*[local-name()=\"Invoice\" or local-name()=\"CreditNote\"]/*[local-name()=\"OriginatorDocumentReference\"]/*[local-name()=\"ID\"]").trim();
612612
//if (tenderReference!=null) zpp... @todo bt-17 create a ubl with a date and set up an according xpath and if only tenderReference!=null only set that but if tenderReference!=null&&date!=null set both in zpp
613-
if(tenderReference != null){
614-
if(tenderReferenceDate != null){
613+
if((tenderReference != null)&&(!tenderReference.isEmpty())){
614+
if((tenderReferenceDate != null)&&(!tenderReferenceDate.isEmpty())){
615615
zpp.setTenderReferencedDocument(new DatedReference(tenderReference, parseDate(tenderReferenceDate, "yyyy-MM-dd")));
616616
} else {
617617
zpp.setTenderReferencedDocument(tenderReference);

0 commit comments

Comments
 (0)