Added getIncludedNote() and to ZUGFeRDImporter.java

Added Test
This commit is contained in:
Alexander Berndt
2020-06-18 12:15:30 +02:00
parent 7084f12b8f
commit 62f367e70d
2 changed files with 18 additions and 0 deletions

View File

@@ -414,6 +414,23 @@ public class ZUGFeRDImporter {
return extractString("//BuyerTradeParty//SpecifiedTaxRegistration//ID");
}
/**
* @return the IncludedNote
*/
public String getIncludedNote() {
try {
if (getVersion() == 1) {
return extractString("//HeaderExchangedDocument//IncludedNote");
} else {
return extractString("//ExchangedDocument//IncludedNote");
}
} catch (Exception e) {
e.printStackTrace();
return "";
}
}
/**
* @return the BuyerTradeParty Name
*/

View File

@@ -224,6 +224,7 @@ public class ZF2Test extends MustangReaderTestCase {
assertEquals(zi.getSellerTradePartyGlobalID(), "");
assertEquals(zi.getBuyerTradePartyID(), "DE999999999");
assertEquals(zi.getBuyertradePartySpecifiedTaxRegistrationID(), "DE999999999");
assertEquals(zi.getIncludedNote(), "");
assertEquals(zi.getHolder(), getOwnOrganisationName());
assertEquals(zi.getDocumentCode(),"380");
assertEquals(zi.getReference(),"AB321");