9
.gitignore
vendored
9
.gitignore
vendored
@@ -6,3 +6,12 @@ target/
|
|||||||
pom.xml.*
|
pom.xml.*
|
||||||
bin/
|
bin/
|
||||||
/.gradle/
|
/.gradle/
|
||||||
|
|
||||||
|
# ignore intelliJ foobar
|
||||||
|
*.iml
|
||||||
|
.idea
|
||||||
|
|
||||||
|
# ignore test files
|
||||||
|
ZUGFeRD-*-test
|
||||||
|
|
||||||
|
dependency-reduced-pom.xml
|
||||||
@@ -26,7 +26,7 @@ Migrated by Mustangproject XSLT
|
|||||||
<ram:LineID>1</ram:LineID>
|
<ram:LineID>1</ram:LineID>
|
||||||
</ram:AssociatedDocumentLineDocument>
|
</ram:AssociatedDocumentLineDocument>
|
||||||
<ram:SpecifiedTradeProduct>
|
<ram:SpecifiedTradeProduct>
|
||||||
<ram:Name>Künstlerische Gestaltung (Stunde): Einer Beispielrechnung</ram:Name>
|
<ram:Name>Künstlerische Gestaltung (Stunde): Einer Beispielrechnung</ram:Name>
|
||||||
<ram:Description/>
|
<ram:Description/>
|
||||||
</ram:SpecifiedTradeProduct>
|
</ram:SpecifiedTradeProduct>
|
||||||
<ram:SpecifiedLineTradeAgreement>
|
<ram:SpecifiedLineTradeAgreement>
|
||||||
@@ -90,7 +90,7 @@ Migrated by Mustangproject XSLT
|
|||||||
<ram:LineID>3</ram:LineID>
|
<ram:LineID>3</ram:LineID>
|
||||||
</ram:AssociatedDocumentLineDocument>
|
</ram:AssociatedDocumentLineDocument>
|
||||||
<ram:SpecifiedTradeProduct>
|
<ram:SpecifiedTradeProduct>
|
||||||
<ram:Name>Heiße Luft pro Liter</ram:Name>
|
<ram:Name>Heiße Luft pro Liter</ram:Name>
|
||||||
<ram:Description/>
|
<ram:Description/>
|
||||||
</ram:SpecifiedTradeProduct>
|
</ram:SpecifiedTradeProduct>
|
||||||
<ram:SpecifiedLineTradeAgreement>
|
<ram:SpecifiedLineTradeAgreement>
|
||||||
@@ -158,12 +158,14 @@ Migrated by Mustangproject XSLT
|
|||||||
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
|
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
|
||||||
<ram:SpecifiedTradeSettlementPaymentMeans>
|
<ram:SpecifiedTradeSettlementPaymentMeans>
|
||||||
<ram:TypeCode>42</ram:TypeCode>
|
<ram:TypeCode>42</ram:TypeCode>
|
||||||
<ram:Information>Überweisung</ram:Information>
|
<ram:Information>Überweisung</ram:Information>
|
||||||
<ram:PayeePartyCreditorFinancialAccount>
|
<ram:PayeePartyCreditorFinancialAccount>
|
||||||
<ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>
|
<ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>
|
||||||
|
<ram:ProprietaryID>44421800</ram:ProprietaryID>
|
||||||
</ram:PayeePartyCreditorFinancialAccount>
|
</ram:PayeePartyCreditorFinancialAccount>
|
||||||
<ram:PayeeSpecifiedCreditorFinancialInstitution>
|
<ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||||
<ram:BICID>COBADEFFXXX</ram:BICID>
|
<ram:BICID>COBADEFFXXX</ram:BICID>
|
||||||
|
<ram:GermanBankleitzahlID>41441604</ram:GermanBankleitzahlID>
|
||||||
<ram:Name>Commerzbank</ram:Name>
|
<ram:Name>Commerzbank</ram:Name>
|
||||||
</ram:PayeeSpecifiedCreditorFinancialInstitution>
|
</ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||||
</ram:SpecifiedTradeSettlementPaymentMeans>
|
</ram:SpecifiedTradeSettlementPaymentMeans>
|
||||||
|
|||||||
4
pom.xml
4
pom.xml
@@ -39,8 +39,8 @@
|
|||||||
<additionalparam>-Xdoclint:none</additionalparam>
|
<additionalparam>-Xdoclint:none</additionalparam>
|
||||||
<!-- Skip error check for javadoc -->
|
<!-- Skip error check for javadoc -->
|
||||||
<maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
|
<maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
|
||||||
<maven.compiler.source>1.7</maven.compiler.source>
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
<maven.compiler.target>1.7</maven.compiler.target>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- https://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE -->
|
<!-- https://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE -->
|
||||||
|
|||||||
@@ -83,7 +83,13 @@ public interface IZUGFeRDExportableTransaction {
|
|||||||
*/
|
*/
|
||||||
String getOwnBIC();
|
String getOwnBIC();
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
* BLZ of the sender
|
||||||
|
* @return the BLZ code of the recipient sender's bank
|
||||||
|
*/
|
||||||
|
String getOwnBLZ();
|
||||||
|
|
||||||
|
/***
|
||||||
* Bank name of the sender
|
* Bank name of the sender
|
||||||
* @return the name of the sender's bank
|
* @return the name of the sender's bank
|
||||||
*/
|
*/
|
||||||
@@ -95,7 +101,13 @@ public interface IZUGFeRDExportableTransaction {
|
|||||||
*/
|
*/
|
||||||
String getOwnIBAN();
|
String getOwnIBAN();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* IBAN of the sender
|
||||||
|
* @return the Account Number of the invoice sender's bank account
|
||||||
|
*/
|
||||||
|
String getOwnKto();
|
||||||
|
|
||||||
|
/**
|
||||||
* Tax ID (not VAT ID) of the sender
|
* Tax ID (not VAT ID) of the sender
|
||||||
* @return Tax ID (not VAT ID) of the sender
|
* @return Tax ID (not VAT ID) of the sender
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -344,9 +344,11 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
+ " <ram:Information>Überweisung</ram:Information>\n" //$NON-NLS-1$
|
+ " <ram:Information>Überweisung</ram:Information>\n" //$NON-NLS-1$
|
||||||
+ " <ram:PayeePartyCreditorFinancialAccount>\n" //$NON-NLS-1$
|
+ " <ram:PayeePartyCreditorFinancialAccount>\n" //$NON-NLS-1$
|
||||||
+ " <ram:IBANID>"+trans.getOwnIBAN()+"</ram:IBANID>\n" //$NON-NLS-1$ //$NON-NLS-2$
|
+ " <ram:IBANID>"+trans.getOwnIBAN()+"</ram:IBANID>\n" //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
+ " <ram:ProprietaryID>"+trans.getOwnKto()+"</ram:ProprietaryID>\n" //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
+ " </ram:PayeePartyCreditorFinancialAccount>\n" //$NON-NLS-1$
|
+ " </ram:PayeePartyCreditorFinancialAccount>\n" //$NON-NLS-1$
|
||||||
+ " <ram:PayeeSpecifiedCreditorFinancialInstitution>\n" //$NON-NLS-1$
|
+ " <ram:PayeeSpecifiedCreditorFinancialInstitution>\n" //$NON-NLS-1$
|
||||||
+ " <ram:BICID>"+trans.getOwnBIC()+"</ram:BICID>\n" //$NON-NLS-1$ //$NON-NLS-2$
|
+ " <ram:BICID>"+trans.getOwnBIC()+"</ram:BICID>\n" //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
+ " <ram:GermanBankleitzahlID>"+ trans.getOwnBLZ()+"</ram:GermanBankleitzahlID>\n" //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
// + " <ram:Name>"+trans.getOwnBankName()+"</ram:Name>\n" //$NON-NLS-1$ //$NON-NLS-2$
|
// + " <ram:Name>"+trans.getOwnBankName()+"</ram:Name>\n" //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
+ " </ram:PayeeSpecifiedCreditorFinancialInstitution>\n" //$NON-NLS-1$
|
+ " </ram:PayeeSpecifiedCreditorFinancialInstitution>\n" //$NON-NLS-1$
|
||||||
+ " </ram:SpecifiedTradeSettlementPaymentMeans>\n"; //$NON-NLS-1$
|
+ " </ram:SpecifiedTradeSettlementPaymentMeans>\n"; //$NON-NLS-1$
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ public class ZUGFeRDExporter implements Closeable {
|
|||||||
public static String getFilenameForVersion(int ver) {
|
public static String getFilenameForVersion(int ver) {
|
||||||
if (ver == 1) {
|
if (ver == 1) {
|
||||||
return "ZUGFeRD-invoice.xml";
|
return "ZUGFeRD-invoice.xml";
|
||||||
} else if (ver == 2)&&(isFacturX) {
|
} else if ((ver == 2) || (isFacturX)) {
|
||||||
return "factur-x.xml";
|
return "factur-x.xml";
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("Version not supported");
|
throw new IllegalArgumentException("Version not supported");
|
||||||
|
|||||||
@@ -63,8 +63,10 @@ public class ZUGFeRDImporter {
|
|||||||
private boolean containsMeta = false;
|
private boolean containsMeta = false;
|
||||||
/** @var the reference (i.e. invoice number) of the sender */
|
/** @var the reference (i.e. invoice number) of the sender */
|
||||||
private String foreignReference;
|
private String foreignReference;
|
||||||
|
private String BLZ;
|
||||||
private String BIC;
|
private String BIC;
|
||||||
private String IBAN;
|
private String IBAN;
|
||||||
|
private String KTO;
|
||||||
private String holder;
|
private String holder;
|
||||||
private String amount;
|
private String amount;
|
||||||
private String dueDate;
|
private String dueDate;
|
||||||
@@ -283,9 +285,12 @@ public class ZUGFeRDImporter {
|
|||||||
Node detail = bookingDetails.item(detailIndex);
|
Node detail = bookingDetails.item(detailIndex);
|
||||||
if ((detail.getLocalName() != null) && (detail.getLocalName().equals("IBANID"))) { //$NON-NLS-1$
|
if ((detail.getLocalName() != null) && (detail.getLocalName().equals("IBANID"))) { //$NON-NLS-1$
|
||||||
setIBAN(detail.getTextContent());
|
setIBAN(detail.getTextContent());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
if ((detail.getLocalName() != null) && (detail.getLocalName().equals("ProprietaryID"))) { //$NON-NLS-1$
|
||||||
|
setKTO(detail.getTextContent());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
ndList = document.getElementsByTagNameNS("*", "PayeeSpecifiedCreditorFinancialInstitution");// ZF1 //$NON-NLS-1$
|
ndList = document.getElementsByTagNameNS("*", "PayeeSpecifiedCreditorFinancialInstitution");// ZF1 //$NON-NLS-1$
|
||||||
@@ -299,6 +304,9 @@ public class ZUGFeRDImporter {
|
|||||||
if ((detail.getLocalName() != null) && (detail.getLocalName().equals("BICID"))) { //$NON-NLS-1$
|
if ((detail.getLocalName() != null) && (detail.getLocalName().equals("BICID"))) { //$NON-NLS-1$
|
||||||
setBIC(detail.getTextContent());
|
setBIC(detail.getTextContent());
|
||||||
}
|
}
|
||||||
|
if ((detail.getLocalName() != null) && (detail.getLocalName().equals("GermanBankleitzahlID"))) { //$NON-NLS-1$
|
||||||
|
setBLZ(detail.getTextContent());
|
||||||
|
}
|
||||||
if ((detail.getLocalName() != null) && (detail.getLocalName().equals("Name"))) { //$NON-NLS-1$
|
if ((detail.getLocalName() != null) && (detail.getLocalName().equals("Name"))) { //$NON-NLS-1$
|
||||||
setBankName(detail.getTextContent());
|
setBankName(detail.getTextContent());
|
||||||
}
|
}
|
||||||
@@ -393,6 +401,24 @@ public class ZUGFeRDImporter {
|
|||||||
this.foreignReference = foreignReference;
|
this.foreignReference = foreignReference;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return the sender's bank's BLZ code
|
||||||
|
*/
|
||||||
|
public String getBLZ() {
|
||||||
|
if (!parsed) {
|
||||||
|
throw new RuntimeException("use extract() before requesting a value");
|
||||||
|
}
|
||||||
|
if (BLZ==null) {
|
||||||
|
parse();
|
||||||
|
}
|
||||||
|
return BLZ;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setBLZ(String blz) {
|
||||||
|
this.BLZ = blz;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return the sender's bank's BIC code
|
* @return the sender's bank's BIC code
|
||||||
@@ -433,7 +459,21 @@ public class ZUGFeRDImporter {
|
|||||||
return IBAN;
|
return IBAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
|
* @return the sender's KTO
|
||||||
|
*/
|
||||||
|
public String getKTO() {
|
||||||
|
if (!parsed) {
|
||||||
|
throw new RuntimeException("use extract() before requesting a value");
|
||||||
|
}
|
||||||
|
if (KTO==null) {
|
||||||
|
parse();
|
||||||
|
}
|
||||||
|
return KTO;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
*
|
*
|
||||||
* @return the sender's bank name
|
* @return the sender's bank name
|
||||||
*/
|
*/
|
||||||
@@ -451,7 +491,11 @@ public class ZUGFeRDImporter {
|
|||||||
this.IBAN = IBAN;
|
this.IBAN = IBAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
private void setKTO(String KTO) {
|
||||||
|
this.KTO = KTO;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
*
|
*
|
||||||
* @return the name of the owner of the sender's bank account
|
* @return the name of the owner of the sender's bank account
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -363,6 +363,9 @@ class ZUGFeRDTransactionModelConverter {
|
|||||||
IDType iban = xmlFactory.createIDType();
|
IDType iban = xmlFactory.createIDType();
|
||||||
iban.setValue(trans.getOwnIBAN());
|
iban.setValue(trans.getOwnIBAN());
|
||||||
bankAccount.setIBANID(iban);
|
bankAccount.setIBANID(iban);
|
||||||
|
IDType kto = xmlFactory.createIDType();
|
||||||
|
kto.setValue(trans.getOwnKto());
|
||||||
|
bankAccount.setProprietaryID(kto);
|
||||||
paymentData.setPayeePartyCreditorFinancialAccount(bankAccount);
|
paymentData.setPayeePartyCreditorFinancialAccount(bankAccount);
|
||||||
|
|
||||||
CreditorFinancialInstitutionType bankData = xmlFactory
|
CreditorFinancialInstitutionType bankData = xmlFactory
|
||||||
@@ -373,6 +376,10 @@ class ZUGFeRDTransactionModelConverter {
|
|||||||
TextType bankName = xmlFactory.createTextType();
|
TextType bankName = xmlFactory.createTextType();
|
||||||
bankName.setValue(trans.getOwnBankName());
|
bankName.setValue(trans.getOwnBankName());
|
||||||
bankData.setName(bankName);
|
bankData.setName(bankName);
|
||||||
|
IDType blz = xmlFactory.createIDType();
|
||||||
|
blz.setValue(trans.getOwnBLZ());
|
||||||
|
bankData.setGermanBankleitzahlID(blz);
|
||||||
|
|
||||||
paymentData.setPayeeSpecifiedCreditorFinancialInstitution(bankData);
|
paymentData.setPayeeSpecifiedCreditorFinancialInstitution(bankData);
|
||||||
return paymentData;
|
return paymentData;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ public class IZUGFeRDExportableTransactionImpl implements IZUGFeRDExportableTran
|
|||||||
private IZUGFeRDAllowanceCharge[] zFLogisticsServiceCharges;
|
private IZUGFeRDAllowanceCharge[] zFLogisticsServiceCharges;
|
||||||
private IZUGFeRDExportableItem[] zFItems;
|
private IZUGFeRDExportableItem[] zFItems;
|
||||||
private IZUGFeRDExportableContact recipient;
|
private IZUGFeRDExportableContact recipient;
|
||||||
|
private String ownKto;
|
||||||
|
private String ownBLZ;
|
||||||
private String ownBIC;
|
private String ownBIC;
|
||||||
private String ownBankName;
|
private String ownBankName;
|
||||||
private String ownIBAN;
|
private String ownIBAN;
|
||||||
@@ -91,6 +93,16 @@ public class IZUGFeRDExportableTransactionImpl implements IZUGFeRDExportableTran
|
|||||||
return recipient;
|
return recipient;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getOwnKto() {
|
||||||
|
return ownKto;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getOwnBLZ() {
|
||||||
|
return ownBLZ;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getOwnBIC() {
|
public String getOwnBIC() {
|
||||||
return ownBIC;
|
return ownBIC;
|
||||||
@@ -211,6 +223,11 @@ public class IZUGFeRDExportableTransactionImpl implements IZUGFeRDExportableTran
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IZUGFeRDExportableTransactionImpl setOwnBLZ(String ownBLZ) {
|
||||||
|
this.ownBLZ = ownBLZ;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public IZUGFeRDExportableTransactionImpl setOwnBIC(String ownBIC) {
|
public IZUGFeRDExportableTransactionImpl setOwnBIC(String ownBIC) {
|
||||||
this.ownBIC = ownBIC;
|
this.ownBIC = ownBIC;
|
||||||
return this;
|
return this;
|
||||||
@@ -221,6 +238,11 @@ public class IZUGFeRDExportableTransactionImpl implements IZUGFeRDExportableTran
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IZUGFeRDExportableTransactionImpl setOwnKto(String ownKto) {
|
||||||
|
this.ownKto = ownKto;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public IZUGFeRDExportableTransactionImpl setOwnIBAN(String ownIBAN) {
|
public IZUGFeRDExportableTransactionImpl setOwnIBAN(String ownIBAN) {
|
||||||
this.ownIBAN = ownIBAN;
|
this.ownIBAN = ownIBAN;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -217,9 +217,11 @@ public class MustangReaderWriterCustomXMLTest extends TestCase {
|
|||||||
" <ram:Information>Überweisung</ram:Information>\n" +
|
" <ram:Information>Überweisung</ram:Information>\n" +
|
||||||
" <ram:PayeePartyCreditorFinancialAccount>\n" +
|
" <ram:PayeePartyCreditorFinancialAccount>\n" +
|
||||||
" <ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>\n" +
|
" <ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>\n" +
|
||||||
|
" <ram:ProprietaryID>44421800</ram:ProprietaryID>\n" +
|
||||||
" </ram:PayeePartyCreditorFinancialAccount>\n" +
|
" </ram:PayeePartyCreditorFinancialAccount>\n" +
|
||||||
" <ram:PayeeSpecifiedCreditorFinancialInstitution>\n" +
|
" <ram:PayeeSpecifiedCreditorFinancialInstitution>\n" +
|
||||||
" <ram:BICID>COBADEFFXXX</ram:BICID>\n" +
|
" <ram:BICID>COBADEFFXXX</ram:BICID>\n" +
|
||||||
|
" <ram:GermanBankleitzahlID>41441604</ram:GermanBankleitzahlID>\n" +
|
||||||
" <ram:Name>Commerzbank</ram:Name>\n" +
|
" <ram:Name>Commerzbank</ram:Name>\n" +
|
||||||
" </ram:PayeeSpecifiedCreditorFinancialInstitution>\n" +
|
" </ram:PayeeSpecifiedCreditorFinancialInstitution>\n" +
|
||||||
" </ram:SpecifiedTradeSettlementPaymentMeans>\n" +
|
" </ram:SpecifiedTradeSettlementPaymentMeans>\n" +
|
||||||
@@ -276,22 +278,28 @@ public class MustangReaderWriterCustomXMLTest extends TestCase {
|
|||||||
|
|
||||||
String amount = null;
|
String amount = null;
|
||||||
String bic = null;
|
String bic = null;
|
||||||
|
String blz = null;
|
||||||
String iban = null;
|
String iban = null;
|
||||||
|
String kto = null;
|
||||||
String holder = null;
|
String holder = null;
|
||||||
String ref = null;
|
String ref = null;
|
||||||
|
|
||||||
if (zi.canParse()) {
|
if (zi.canParse()) {
|
||||||
zi.parse();
|
zi.parse();
|
||||||
amount = zi.getAmount();
|
amount = zi.getAmount();
|
||||||
|
blz = zi.getBLZ();
|
||||||
bic = zi.getBIC();
|
bic = zi.getBIC();
|
||||||
iban = zi.getIBAN();
|
iban = zi.getIBAN();
|
||||||
|
kto = zi.getKTO();
|
||||||
holder = zi.getHolder();
|
holder = zi.getHolder();
|
||||||
ref = zi.getForeignReference();
|
ref = zi.getForeignReference();
|
||||||
}
|
}
|
||||||
|
|
||||||
assertEquals(amount, "571.04");
|
assertEquals(amount, "571.04");
|
||||||
|
assertEquals(blz, "41441604");
|
||||||
assertEquals(bic, "COBADEFFXXX");
|
assertEquals(bic, "COBADEFFXXX");
|
||||||
assertEquals(iban, "DE88 2008 0000 0970 3757 00");
|
assertEquals(iban, "DE88 2008 0000 0970 3757 00");
|
||||||
|
assertEquals(kto, "44421800");
|
||||||
assertEquals(holder, "Bei Spiel GmbH");
|
assertEquals(holder, "Bei Spiel GmbH");
|
||||||
assertEquals(ref, "RE-20171118/506");
|
assertEquals(ref, "RE-20171118/506");
|
||||||
}
|
}
|
||||||
@@ -350,9 +358,13 @@ public class MustangReaderWriterCustomXMLTest extends TestCase {
|
|||||||
+ "<ram:SpecifiedTradeSettlementPaymentMeans>\n" + "<ram:TypeCode>42</ram:TypeCode>\n"
|
+ "<ram:SpecifiedTradeSettlementPaymentMeans>\n" + "<ram:TypeCode>42</ram:TypeCode>\n"
|
||||||
+ "<ram:Information>Überweisung</ram:Information>\n" + "<ram:PayeePartyCreditorFinancialAccount>\n"
|
+ "<ram:Information>Überweisung</ram:Information>\n" + "<ram:PayeePartyCreditorFinancialAccount>\n"
|
||||||
+ "<ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>\n"
|
+ "<ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>\n"
|
||||||
|
+ "<ram:ProprietaryID>44421800</ram:ProprietaryID>\n"
|
||||||
+ "</ram:PayeePartyCreditorFinancialAccount>\n"
|
+ "</ram:PayeePartyCreditorFinancialAccount>\n"
|
||||||
+ "<ram:PayeeSpecifiedCreditorFinancialInstitution>\n" + "<ram:BICID>COBADEFFXXX</ram:BICID>\n"
|
+ "<ram:PayeeSpecifiedCreditorFinancialInstitution>\n"
|
||||||
+ "<ram:Name>Commerzbank</ram:Name>\n" + "</ram:PayeeSpecifiedCreditorFinancialInstitution>\n"
|
+ "<ram:BICID>COBADEFFXXX</ram:BICID>\n"
|
||||||
|
+ "<ram:GermanBankleitzahlID>41441604</ram:GermanBankleitzahlID>\n"
|
||||||
|
+ "<ram:Name>Commerzbank</ram:Name>\n"
|
||||||
|
+ "</ram:PayeeSpecifiedCreditorFinancialInstitution>\n"
|
||||||
+ "</ram:SpecifiedTradeSettlementPaymentMeans>\n" + "<ram:ApplicableTradeTax>\n"
|
+ "</ram:SpecifiedTradeSettlementPaymentMeans>\n" + "<ram:ApplicableTradeTax>\n"
|
||||||
+ "<ram:CalculatedAmount currencyID=\"EUR\">11.20</ram:CalculatedAmount>\n"
|
+ "<ram:CalculatedAmount currencyID=\"EUR\">11.20</ram:CalculatedAmount>\n"
|
||||||
+ "<ram:TypeCode>VAT</ram:TypeCode>\n"
|
+ "<ram:TypeCode>VAT</ram:TypeCode>\n"
|
||||||
@@ -467,7 +479,9 @@ public class MustangReaderWriterCustomXMLTest extends TestCase {
|
|||||||
|
|
||||||
String amount = null;
|
String amount = null;
|
||||||
String bic = null;
|
String bic = null;
|
||||||
|
String blz = null;
|
||||||
String iban = null;
|
String iban = null;
|
||||||
|
String kto = null;
|
||||||
String holder = null;
|
String holder = null;
|
||||||
String ref = null;
|
String ref = null;
|
||||||
|
|
||||||
@@ -475,14 +489,18 @@ public class MustangReaderWriterCustomXMLTest extends TestCase {
|
|||||||
zi.parse();
|
zi.parse();
|
||||||
amount = zi.getAmount();
|
amount = zi.getAmount();
|
||||||
bic = zi.getBIC();
|
bic = zi.getBIC();
|
||||||
|
blz = zi.getBLZ();
|
||||||
iban = zi.getIBAN();
|
iban = zi.getIBAN();
|
||||||
|
kto = zi.getKTO();
|
||||||
holder = zi.getHolder();
|
holder = zi.getHolder();
|
||||||
ref = zi.getForeignReference();
|
ref = zi.getForeignReference();
|
||||||
}
|
}
|
||||||
|
|
||||||
assertEquals(amount, "571.04");
|
assertEquals(amount, "571.04");
|
||||||
assertEquals(bic, "COBADEFFXXX");
|
assertEquals(bic, "COBADEFFXXX");
|
||||||
|
assertEquals(blz, "41441604");
|
||||||
assertEquals(iban, "DE88 2008 0000 0970 3757 00");
|
assertEquals(iban, "DE88 2008 0000 0970 3757 00");
|
||||||
|
assertEquals(kto, "44421800");
|
||||||
assertEquals(holder, "Bei Spiel GmbH");
|
assertEquals(holder, "Bei Spiel GmbH");
|
||||||
assertEquals(ref, "RE-20170509/505");
|
assertEquals(ref, "RE-20170509/505");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,18 @@ public class MustangReaderWriterEdgeTest extends TestCase implements IZUGFeRDExp
|
|||||||
return "RE-20170509/505";
|
return "RE-20170509/505";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getOwnKto()
|
||||||
|
{
|
||||||
|
return "44421800";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getOwnBLZ()
|
||||||
|
{
|
||||||
|
return "41441604";
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getOwnBIC()
|
public String getOwnBIC()
|
||||||
{
|
{
|
||||||
@@ -364,7 +376,7 @@ public class MustangReaderWriterEdgeTest extends TestCase implements IZUGFeRDExp
|
|||||||
// //////// TESTS //////////////////////////////////////////////////////////////////////////////////////////
|
// //////// TESTS //////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The importer test imports from ./src/test/MustangGnuaccountingBeispielRE-20151008_504.pdf to check the values.
|
* The importer test imports from ./src/test/MustangGnuaccountingBeispielRE-20170509_505.pdf to check the values.
|
||||||
* --> as only Name Ascending is supported for Test Unit sequence, I renamed the this test-A-Export to run before
|
* --> as only Name Ascending is supported for Test Unit sequence, I renamed the this test-A-Export to run before
|
||||||
* testZExport
|
* testZExport
|
||||||
*
|
*
|
||||||
@@ -379,7 +391,9 @@ public class MustangReaderWriterEdgeTest extends TestCase implements IZUGFeRDExp
|
|||||||
|
|
||||||
String amount = null;
|
String amount = null;
|
||||||
String bic = null;
|
String bic = null;
|
||||||
|
String blz = null;
|
||||||
String iban = null;
|
String iban = null;
|
||||||
|
String kto = null;
|
||||||
String holder = null;
|
String holder = null;
|
||||||
String ref = null;
|
String ref = null;
|
||||||
String dueDate = null;
|
String dueDate = null;
|
||||||
@@ -389,7 +403,9 @@ public class MustangReaderWriterEdgeTest extends TestCase implements IZUGFeRDExp
|
|||||||
zi.parse();
|
zi.parse();
|
||||||
amount = zi.getAmount();
|
amount = zi.getAmount();
|
||||||
bic = zi.getBIC();
|
bic = zi.getBIC();
|
||||||
|
blz = zi.getBLZ();
|
||||||
iban = zi.getIBAN();
|
iban = zi.getIBAN();
|
||||||
|
kto = zi.getKTO();
|
||||||
holder = zi.getHolder();
|
holder = zi.getHolder();
|
||||||
dueDate = zi.getDueDate();
|
dueDate = zi.getDueDate();
|
||||||
ref = zi.getForeignReference();
|
ref = zi.getForeignReference();
|
||||||
@@ -397,7 +413,9 @@ public class MustangReaderWriterEdgeTest extends TestCase implements IZUGFeRDExp
|
|||||||
|
|
||||||
assertEquals(amount, "571.04");
|
assertEquals(amount, "571.04");
|
||||||
assertEquals(bic, getOwnBIC());
|
assertEquals(bic, getOwnBIC());
|
||||||
|
assertEquals(blz, getOwnBLZ());
|
||||||
assertEquals(iban, getOwnIBAN());
|
assertEquals(iban, getOwnIBAN());
|
||||||
|
assertEquals(kto, getOwnKto());
|
||||||
assertEquals(holder, getOwnOrganisationName());
|
assertEquals(holder, getOwnOrganisationName());
|
||||||
|
|
||||||
assertEquals(dueDate, "20170530");
|
assertEquals(dueDate, "20170530");
|
||||||
@@ -439,7 +457,9 @@ public class MustangReaderWriterEdgeTest extends TestCase implements IZUGFeRDExp
|
|||||||
|
|
||||||
String amount = null;
|
String amount = null;
|
||||||
String bic = null;
|
String bic = null;
|
||||||
|
String blz = null;
|
||||||
String iban = null;
|
String iban = null;
|
||||||
|
String kto = null;
|
||||||
String holder = null;
|
String holder = null;
|
||||||
String ref = null;
|
String ref = null;
|
||||||
|
|
||||||
@@ -448,14 +468,18 @@ public class MustangReaderWriterEdgeTest extends TestCase implements IZUGFeRDExp
|
|||||||
zi.parse();
|
zi.parse();
|
||||||
amount = zi.getAmount();
|
amount = zi.getAmount();
|
||||||
bic = zi.getBIC();
|
bic = zi.getBIC();
|
||||||
|
blz = zi.getBLZ();
|
||||||
iban = zi.getIBAN();
|
iban = zi.getIBAN();
|
||||||
|
kto = zi.getKTO();
|
||||||
holder = zi.getHolder();
|
holder = zi.getHolder();
|
||||||
ref = zi.getForeignReference();
|
ref = zi.getForeignReference();
|
||||||
}
|
}
|
||||||
|
|
||||||
assertEquals(amount, "571.04");
|
assertEquals(amount, "571.04");
|
||||||
assertEquals(bic, getOwnBIC());
|
assertEquals(bic, getOwnBIC());
|
||||||
|
assertEquals(blz, getOwnBLZ());
|
||||||
assertEquals(iban, getOwnIBAN());
|
assertEquals(iban, getOwnIBAN());
|
||||||
|
assertEquals(kto, getOwnKto());
|
||||||
assertEquals(holder, getOwnOrganisationName());
|
assertEquals(holder, getOwnOrganisationName());
|
||||||
assertEquals(ref, getNumber());
|
assertEquals(ref, getNumber());
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,17 @@ public class MustangReaderWriterTest extends TestCase implements IZUGFeRDExporta
|
|||||||
return "RE-20171118/506";
|
return "RE-20171118/506";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
public String getOwnKto() {
|
||||||
|
return "44421800";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getOwnBLZ() {
|
||||||
|
return "41441604";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getOwnBIC() {
|
public String getOwnBIC() {
|
||||||
return "COBADEFFXXX";
|
return "COBADEFFXXX";
|
||||||
}
|
}
|
||||||
@@ -345,23 +355,29 @@ public class MustangReaderWriterTest extends TestCase implements IZUGFeRDExporta
|
|||||||
// Reading ZUGFeRD
|
// Reading ZUGFeRD
|
||||||
|
|
||||||
String amount = null;
|
String amount = null;
|
||||||
|
String blz = null;
|
||||||
String bic = null;
|
String bic = null;
|
||||||
String iban = null;
|
String iban = null;
|
||||||
|
String kto = null;
|
||||||
String holder = null;
|
String holder = null;
|
||||||
String ref = null;
|
String ref = null;
|
||||||
|
|
||||||
if (zi.canParse()) {
|
if (zi.canParse()) {
|
||||||
zi.parse();
|
zi.parse();
|
||||||
amount = zi.getAmount();
|
amount = zi.getAmount();
|
||||||
|
blz = zi.getBLZ();
|
||||||
bic = zi.getBIC();
|
bic = zi.getBIC();
|
||||||
iban = zi.getIBAN();
|
iban = zi.getIBAN();
|
||||||
|
kto = zi.getKTO();
|
||||||
holder = zi.getHolder();
|
holder = zi.getHolder();
|
||||||
ref = zi.getForeignReference();
|
ref = zi.getForeignReference();
|
||||||
}
|
}
|
||||||
// this resembles the data written in MustangReaderWriterCustomXMLTest
|
// this resembles the data written in MustangReaderWriterCustomXMLTest
|
||||||
assertEquals(amount, "571.04");
|
assertEquals(amount, "571.04");
|
||||||
assertEquals(bic, "COBADEFFXXX");
|
assertEquals(blz, "41441604");
|
||||||
|
assertEquals(bic, "COBADEFFXXX");
|
||||||
assertEquals(iban, "DE88 2008 0000 0970 3757 00");
|
assertEquals(iban, "DE88 2008 0000 0970 3757 00");
|
||||||
|
assertEquals(kto, "44421800");
|
||||||
assertEquals(holder, "Bei Spiel GmbH");
|
assertEquals(holder, "Bei Spiel GmbH");
|
||||||
assertEquals(ref, "RE-20170509/505");
|
assertEquals(ref, "RE-20170509/505");
|
||||||
|
|
||||||
@@ -514,6 +530,7 @@ public class MustangReaderWriterTest extends TestCase implements IZUGFeRDExporta
|
|||||||
String amount = null;
|
String amount = null;
|
||||||
String bic = null;
|
String bic = null;
|
||||||
String iban = null;
|
String iban = null;
|
||||||
|
String kto = null;
|
||||||
String holder = null;
|
String holder = null;
|
||||||
String ref = null;
|
String ref = null;
|
||||||
if (zi.canParse()) {
|
if (zi.canParse()) {
|
||||||
@@ -521,6 +538,7 @@ public class MustangReaderWriterTest extends TestCase implements IZUGFeRDExporta
|
|||||||
amount = zi.getAmount();
|
amount = zi.getAmount();
|
||||||
bic = zi.getBIC();
|
bic = zi.getBIC();
|
||||||
iban = zi.getIBAN();
|
iban = zi.getIBAN();
|
||||||
|
kto = zi.getKTO();
|
||||||
holder = zi.getHolder();
|
holder = zi.getHolder();
|
||||||
ref = zi.getForeignReference();
|
ref = zi.getForeignReference();
|
||||||
}
|
}
|
||||||
@@ -528,6 +546,7 @@ public class MustangReaderWriterTest extends TestCase implements IZUGFeRDExporta
|
|||||||
assertEquals(amount, "571.04");
|
assertEquals(amount, "571.04");
|
||||||
assertEquals(bic, getOwnBIC());
|
assertEquals(bic, getOwnBIC());
|
||||||
assertEquals(iban, getOwnIBAN());
|
assertEquals(iban, getOwnIBAN());
|
||||||
|
assertEquals(kto, getOwnKto());
|
||||||
assertEquals(holder, getOwnOrganisationName());
|
assertEquals(holder, getOwnOrganisationName());
|
||||||
assertEquals(ref, getNumber());
|
assertEquals(ref, getNumber());
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -77,9 +77,11 @@
|
|||||||
<ram:Information>Überweisung</ram:Information>
|
<ram:Information>Überweisung</ram:Information>
|
||||||
<ram:PayeePartyCreditorFinancialAccount>
|
<ram:PayeePartyCreditorFinancialAccount>
|
||||||
<ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>
|
<ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>
|
||||||
|
<ram:ProprietaryID>44421800</ram:ProprietaryID>
|
||||||
</ram:PayeePartyCreditorFinancialAccount>
|
</ram:PayeePartyCreditorFinancialAccount>
|
||||||
<ram:PayeeSpecifiedCreditorFinancialInstitution>
|
<ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||||
<ram:BICID>COBADEFFXXX</ram:BICID>
|
<ram:BICID>COBADEFFXXX</ram:BICID>
|
||||||
|
<ram:GermanBankleitzahlID>41441604</ram:GermanBankleitzahlID>
|
||||||
<ram:Name>Commerzbank</ram:Name>
|
<ram:Name>Commerzbank</ram:Name>
|
||||||
</ram:PayeeSpecifiedCreditorFinancialInstitution>
|
</ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||||
</ram:SpecifiedTradeSettlementPaymentMeans>
|
</ram:SpecifiedTradeSettlementPaymentMeans>
|
||||||
|
|||||||
@@ -77,9 +77,11 @@
|
|||||||
<ram:Information>Überweisung</ram:Information>
|
<ram:Information>Überweisung</ram:Information>
|
||||||
<ram:PayeePartyCreditorFinancialAccount>
|
<ram:PayeePartyCreditorFinancialAccount>
|
||||||
<ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>
|
<ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>
|
||||||
|
<ram:ProprietaryID>44421800</ram:ProprietaryID>
|
||||||
</ram:PayeePartyCreditorFinancialAccount>
|
</ram:PayeePartyCreditorFinancialAccount>
|
||||||
<ram:PayeeSpecifiedCreditorFinancialInstitution>
|
<ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||||
<ram:BICID>COBADEFFXXX</ram:BICID>
|
<ram:BICID>COBADEFFXXX</ram:BICID>
|
||||||
|
<ram:GermanBankleitzahlID>41441604</ram:GermanBankleitzahlID>
|
||||||
<ram:Name>Commerzbank</ram:Name>
|
<ram:Name>Commerzbank</ram:Name>
|
||||||
</ram:PayeeSpecifiedCreditorFinancialInstitution>
|
</ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||||
</ram:SpecifiedTradeSettlementPaymentMeans>
|
</ram:SpecifiedTradeSettlementPaymentMeans>
|
||||||
|
|||||||
@@ -177,9 +177,11 @@ Migrated by Mustangproject XSLT
|
|||||||
<ram:Information>Überweisung</ram:Information>
|
<ram:Information>Überweisung</ram:Information>
|
||||||
<ram:PayeePartyCreditorFinancialAccount>
|
<ram:PayeePartyCreditorFinancialAccount>
|
||||||
<ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>
|
<ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>
|
||||||
|
<ram:ProprietaryID>44421800</ram:ProprietaryID>
|
||||||
</ram:PayeePartyCreditorFinancialAccount>
|
</ram:PayeePartyCreditorFinancialAccount>
|
||||||
<ram:PayeeSpecifiedCreditorFinancialInstitution>
|
<ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||||
<ram:BICID>COBADEFFXXX</ram:BICID>
|
<ram:BICID>COBADEFFXXX</ram:BICID>
|
||||||
|
<ram:GermanBankleitzahlID>41441604</ram:GermanBankleitzahlID>
|
||||||
<ram:Name>Commerzbank</ram:Name>
|
<ram:Name>Commerzbank</ram:Name>
|
||||||
</ram:PayeeSpecifiedCreditorFinancialInstitution>
|
</ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||||
</ram:SpecifiedTradeSettlementPaymentMeans>
|
</ram:SpecifiedTradeSettlementPaymentMeans>
|
||||||
|
|||||||
Reference in New Issue
Block a user