Added getIncludedNote() and to ZUGFeRDImporter.java
Added Test
This commit is contained in:
@@ -414,6 +414,23 @@ public class ZUGFeRDImporter {
|
|||||||
return extractString("//BuyerTradeParty//SpecifiedTaxRegistration//ID");
|
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
|
* @return the BuyerTradeParty Name
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -224,6 +224,7 @@ public class ZF2Test extends MustangReaderTestCase {
|
|||||||
assertEquals(zi.getSellerTradePartyGlobalID(), "");
|
assertEquals(zi.getSellerTradePartyGlobalID(), "");
|
||||||
assertEquals(zi.getBuyerTradePartyID(), "DE999999999");
|
assertEquals(zi.getBuyerTradePartyID(), "DE999999999");
|
||||||
assertEquals(zi.getBuyertradePartySpecifiedTaxRegistrationID(), "DE999999999");
|
assertEquals(zi.getBuyertradePartySpecifiedTaxRegistrationID(), "DE999999999");
|
||||||
|
assertEquals(zi.getIncludedNote(), "");
|
||||||
assertEquals(zi.getHolder(), getOwnOrganisationName());
|
assertEquals(zi.getHolder(), getOwnOrganisationName());
|
||||||
assertEquals(zi.getDocumentCode(),"380");
|
assertEquals(zi.getDocumentCode(),"380");
|
||||||
assertEquals(zi.getReference(),"AB321");
|
assertEquals(zi.getReference(),"AB321");
|
||||||
|
|||||||
Reference in New Issue
Block a user