Add new getter and classes
IExportableTransaction#getNotesWithSubjectCode IncludedNote SubjectCode
This commit is contained in:
42
library/src/main/java/org/mustangproject/IncludedNote.java
Normal file
42
library/src/main/java/org/mustangproject/IncludedNote.java
Normal file
@@ -0,0 +1,42 @@
|
||||
package org.mustangproject;
|
||||
|
||||
/**
|
||||
* A grouping of business terms to indicate accounting-relevant free texts including a qualification of these.
|
||||
*/
|
||||
public class IncludedNote {
|
||||
private final String content;
|
||||
private final SubjectCode subjectCode;
|
||||
|
||||
private IncludedNote(String content, SubjectCode subjectCode) {
|
||||
this.content = content;
|
||||
this.subjectCode = subjectCode;
|
||||
}
|
||||
|
||||
public static IncludedNote generalNote(String content) {
|
||||
return new IncludedNote(content, SubjectCode.AAI);
|
||||
}
|
||||
public static IncludedNote regulatoryNote(String content) {
|
||||
return new IncludedNote(content, SubjectCode.REG);
|
||||
}
|
||||
public static IncludedNote legalNote(String content) {
|
||||
return new IncludedNote(content, SubjectCode.ABL);
|
||||
}
|
||||
public static IncludedNote customsNote(String content) {
|
||||
return new IncludedNote(content, SubjectCode.CUS);
|
||||
}
|
||||
public static IncludedNote sellerNote(String content) {
|
||||
return new IncludedNote(content, SubjectCode.SUR);
|
||||
}
|
||||
public static IncludedNote taxNote(String content) {
|
||||
return new IncludedNote(content, SubjectCode.TXD);
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public SubjectCode getSubjectCode() {
|
||||
return subjectCode;
|
||||
}
|
||||
|
||||
}
|
||||
31
library/src/main/java/org/mustangproject/SubjectCode.java
Normal file
31
library/src/main/java/org/mustangproject/SubjectCode.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package org.mustangproject;
|
||||
|
||||
/**
|
||||
* the qualification of the free text on the invoice from BT-22
|
||||
*/
|
||||
public enum SubjectCode {
|
||||
/**
|
||||
* general information
|
||||
*/
|
||||
AAI,
|
||||
/**
|
||||
* seller notes
|
||||
*/
|
||||
SUR,
|
||||
/**
|
||||
* regulatory information
|
||||
*/
|
||||
REG,
|
||||
/**
|
||||
* legal information
|
||||
*/
|
||||
ABL,
|
||||
/**
|
||||
* tax information
|
||||
*/
|
||||
TXD,
|
||||
/**
|
||||
* Customs information
|
||||
*/
|
||||
CUS
|
||||
}
|
||||
@@ -29,8 +29,10 @@ package org.mustangproject.ZUGFeRD;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.mustangproject.FileAttachment;
|
||||
import org.mustangproject.IncludedNote;
|
||||
import org.mustangproject.ZUGFeRD.model.DocumentCodeTypeConstants;
|
||||
|
||||
/***
|
||||
@@ -80,10 +82,13 @@ public interface IExportableTransaction {
|
||||
/**
|
||||
* this should be the full sender institution name, details, manager and tax
|
||||
* registration. It is one of the few functions which may return null. e.g.
|
||||
* <p>
|
||||
* <p/>
|
||||
* Lieferant GmbH Lieferantenstraße 20 80333 München Deutschland
|
||||
* Geschäftsführer: Hans Muster Handelsregisternummer: H A 123
|
||||
* <p/>
|
||||
*
|
||||
* It is written as an includedNode with subjectCode {@link org.mustangproject.SubjectCode#REG}. See also
|
||||
* {@link #getNotesWithSubjectCode()}
|
||||
* @return null or full sender institution name, details, manager and tax
|
||||
* registration
|
||||
*/
|
||||
@@ -489,6 +494,13 @@ public interface IExportableTransaction {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A grouping of business terms to indicate accounting-relevant free texts including a qualification of these. <p/>
|
||||
* The information are written to the same xml nodes like {@link #getNotes()} but with explicit subjectCode.
|
||||
*/
|
||||
default List<IncludedNote> getNotesWithSubjectCode(){
|
||||
return null;
|
||||
}
|
||||
default String getSpecifiedProcuringProjectName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user