tests pass again

This commit is contained in:
Jochen Stärk
2020-09-10 21:35:21 +02:00
parent fd63a79ced
commit 78dd1b2121
9 changed files with 82 additions and 42 deletions

View File

@@ -195,7 +195,11 @@ public interface IExportableTransaction {
* @return the sender's organisation name
*/
default String getOwnOrganisationName() {
return null;
if (getSender()!=null) {
return getSender().getName();
} else {
return null;
}
}
@@ -205,7 +209,11 @@ public interface IExportableTransaction {
* @return sender street address
*/
default String getOwnStreet() {
return null;
if (getSender()!=null) {
return getSender().getStreet();
} else {
return null;
}
}
@@ -215,7 +223,12 @@ public interface IExportableTransaction {
* @return sender postal code
*/
default String getOwnZIP() {
return null;
if (getSender()!=null) {
return getSender().getZIP();
} else {
return null;
}
}
@@ -225,7 +238,12 @@ public interface IExportableTransaction {
* @return the invoice sender's city
*/
default String getOwnLocation() {
return null;
if (getSender()!=null) {
return getSender().getLocation();
} else {
return null;
}
}
@@ -235,7 +253,12 @@ public interface IExportableTransaction {
* @return the invoice senders two character country iso code
*/
default String getOwnCountry() {
return null;
if (getSender()!=null) {
return getSender().getCountry();
} else {
return null;
}
}

View File

@@ -351,7 +351,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider {
xml = xml + " <ram:GlobalID schemeID=\"" + XMLTools.encodeXML(trans.getSender().getGlobalIDScheme()) + "\">"
+ XMLTools.encodeXML(trans.getSender().getGlobalID()) + "</ram:GlobalID>\n";
}
xml = xml + " <ram:Name>" + XMLTools.encodeXML(trans.getOwnOrganisationName()) + "</ram:Name>\n"; //$NON-NLS-2$
xml = xml + " <ram:Name>" + XMLTools.encodeXML(trans.getSender().getName()) + "</ram:Name>\n"; //$NON-NLS-2$
if ((trans.getOwnVATID()!=null)&&(trans.getOwnOrganisationName()!=null)) {