If the interface is implemented correctly, ZF2EdgeTest now already writes a BT-17 incl Date

This commit is contained in:
jstaerk
2025-10-15 12:41:24 +02:00
parent ecc667c597
commit 882d509580
3 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
package org.mustangproject.ZUGFeRD;
import java.util.Date;
public interface IDatedReference {
public String getID();
default Date getDate() {
return null;
}
}

View File

@@ -214,6 +214,15 @@ public interface IExportableTransaction {
return null;
}
/**
* BT-17 tender or lot reference
*
* @return mandatory ID, optional Date
*/
default IDatedReference getTenderReference() {
return null;
}
/**
* own name
*

View File

@@ -144,6 +144,25 @@ public class ZF2EdgeTest extends MustangReaderTestCase {
return "DE";
}
@Override
public IDatedReference getTenderReference() {
return new IDatedReference() {
@Override
public String getID() {
return "983-jk-787 (obsolete)";
}
@Override
public Date getDate() {
SimpleDateFormat sdf=new SimpleDateFormat("YYYY-mm-dd");
try {
return sdf.parse("2025-10-12");
} catch (ParseException e) {
// wont happen, I promise :-)
}
}
};
}
@Override
public String getOwnLocation() {
return "Stadthausen";