no message
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
- correcly write charge reason codes also for non-Xrechnung
|
||||
- correctly import additional referenced documents into invoice/corrected setting of attachments from jackson
|
||||
- corrected parseException structure
|
||||
|
||||
2.15.1
|
||||
=======
|
||||
|
||||
@@ -21,10 +21,7 @@
|
||||
package org.mustangproject;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import org.mustangproject.ZUGFeRD.*;
|
||||
@@ -116,6 +113,16 @@ public class Invoice implements IExportableTransaction {
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
* setter in case e.g. jackson tries to map attachments (normal use embedFileInXML)
|
||||
* @param fileArr Array of FileAttachments
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Invoice setAdditionalReferencedDocuments(FileAttachment[] fileArr) {
|
||||
xmlEmbeddedFiles = new ArrayList<>(Arrays.asList(fileArr));
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDCashDiscount[] getCashDiscounts() {
|
||||
return cashDiscounts.toArray(new IZUGFeRDCashDiscount[0]);
|
||||
|
||||
@@ -136,11 +136,11 @@ public class XRTest extends TestCase {
|
||||
} catch (IOException e) {
|
||||
fail("IOException not expected");
|
||||
}
|
||||
List<FileAttachment> attachedFiles=zii.getFileAttachmentsXML();
|
||||
FileAttachment[] attachedFiles=readInvoice.getAdditionalReferencedDocuments();
|
||||
assertNotNull(attachedFiles);
|
||||
assertEquals(attachedFiles.size(), 1);
|
||||
assertEquals(attachedFiles.length, 1);
|
||||
|
||||
assertTrue(Arrays.equals(attachedFiles.get(0).getData(), b));
|
||||
assertTrue(Arrays.equals(attachedFiles[0].getData(), b));
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user