add document code
This commit is contained in:
@@ -27,10 +27,21 @@ package org.mustangproject.ZUGFeRD;
|
||||
* */
|
||||
|
||||
|
||||
import org.mustangproject.ZUGFeRD.model.DocumentCodeTypeConstants;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public interface IZUGFeRDExportableTransaction {
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return Code of Document
|
||||
*/
|
||||
default String getDocumentCode() {
|
||||
return DocumentCodeTypeConstants.INVOICE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Number, typically invoice number of the invoice
|
||||
*
|
||||
|
||||
@@ -209,6 +209,13 @@ public class ZUGFeRDImporter {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the document code
|
||||
*/
|
||||
public String getDocumentCode() {
|
||||
return extractString("//HeaderExchangedDocument/TypeCode");
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the sender's bank's BLZ code
|
||||
*/
|
||||
|
||||
@@ -94,7 +94,7 @@ class ZUGFeRDTransactionModelConverter {
|
||||
document.setIssueDateTime(issueDateTime);
|
||||
|
||||
DocumentCodeType documentCodeType = xmlFactory.createDocumentCodeType();
|
||||
documentCodeType.setValue(DocumentCodeTypeConstants.INVOICE);
|
||||
documentCodeType.setValue(trans.getDocumentCode());
|
||||
document.setTypeCode(documentCodeType);
|
||||
|
||||
TextType name = xmlFactory.createTextType();
|
||||
|
||||
Reference in New Issue
Block a user