If the interface is implemented correctly, ZF2EdgeTest now already writes a BT-17 incl Date
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package org.mustangproject.ZUGFeRD;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public interface IDatedReference {
|
||||
public String getID();
|
||||
default Date getDate() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
*
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user