updated user documentation (ZugferdDev), added developer documentation(MustangDev), added java sample file, added organisation information plaintext "REG" field, changed version numbers to 1.2.0
This commit is contained in:
@@ -10,7 +10,6 @@ package org.mustangproject.ZUGFeRD;
|
||||
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public interface IZUGFeRDExportableTransaction {
|
||||
@@ -27,6 +26,19 @@ public interface IZUGFeRDExportableTransaction {
|
||||
*/
|
||||
Date getIssueDate();
|
||||
|
||||
/**
|
||||
* this should be the full sender institution name, details, manager and tax registration like.
|
||||
* It is one of the few functions which may return null.
|
||||
*
|
||||
Lieferant GmbH
|
||||
Lieferantenstraße 20
|
||||
80333 München
|
||||
Deutschland
|
||||
Geschäftsführer: Hans Muster
|
||||
Handelsregisternummer: H A 123
|
||||
* @return
|
||||
*/
|
||||
String getOwnOrganisationFullPlaintextInfo();
|
||||
|
||||
/**
|
||||
* when the invoice is to be paid
|
||||
|
||||
@@ -66,7 +66,6 @@ public class ZUGFeRDExporter {
|
||||
|
||||
private class LineCalc {
|
||||
private IZUGFeRDExportableItem currentItem=null;
|
||||
private BigDecimal priceGross;
|
||||
private BigDecimal totalGross;
|
||||
private BigDecimal itemTotalNetAmount;
|
||||
private BigDecimal itemTotalVATAmount;
|
||||
@@ -74,17 +73,12 @@ public class ZUGFeRDExporter {
|
||||
public LineCalc(IZUGFeRDExportableItem currentItem) {
|
||||
this.currentItem=currentItem;
|
||||
BigDecimal multiplicator=currentItem.getProduct().getVATPercent().divide(new BigDecimal(100)).add(new BigDecimal(1));
|
||||
priceGross=currentItem.getPrice().multiply(multiplicator);
|
||||
// priceGross=currentItem.getPrice().multiply(multiplicator);
|
||||
totalGross=currentItem.getPrice().multiply(multiplicator).multiply(currentItem.getQuantity());
|
||||
itemTotalNetAmount=currentItem.getQuantity().multiply(currentItem.getPrice()).setScale(2,BigDecimal.ROUND_HALF_UP);
|
||||
itemTotalVATAmount=totalGross.subtract(itemTotalNetAmount);
|
||||
}
|
||||
/* public BigDecimal getPriceGross() {
|
||||
return priceGross;
|
||||
}
|
||||
public BigDecimal getTotalGross() {
|
||||
return totalGross;
|
||||
}*/
|
||||
|
||||
public BigDecimal getItemTotalNetAmount() {
|
||||
return itemTotalNetAmount;
|
||||
}
|
||||
@@ -271,6 +265,17 @@ public class ZUGFeRDExporter {
|
||||
if (isTest) {
|
||||
testBooleanStr="true";
|
||||
|
||||
}
|
||||
String senderReg="";
|
||||
if (trans.getOwnOrganisationFullPlaintextInfo()!=null) {
|
||||
senderReg=""
|
||||
+ "<ram:IncludedNote>\n"
|
||||
+ " <ram:Content>\n"
|
||||
+ trans.getOwnOrganisationFullPlaintextInfo()
|
||||
+ " </ram:Content>\n"
|
||||
+ "<ram:SubjectCode>REG</ram:SubjectCode>\n"
|
||||
+ "</ram:IncludedNote>\n";
|
||||
|
||||
}
|
||||
String xml= "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" //$NON-NLS-1$
|
||||
|
||||
@@ -289,6 +294,7 @@ public class ZUGFeRDExporter {
|
||||
+ " <ram:Name>RECHNUNG</ram:Name>\n" //$NON-NLS-1$
|
||||
+ " <ram:TypeCode>380</ram:TypeCode>\n" //$NON-NLS-1$
|
||||
+ " <ram:IssueDateTime><udt:DateTimeString format=\"102\">"+zugferdDateFormat.format(trans.getIssueDate())+"</udt:DateTimeString></ram:IssueDateTime>\n" //date format was 20130605 //$NON-NLS-1$ //$NON-NLS-2$
|
||||
+ senderReg
|
||||
// + " <IncludedNote>\n"
|
||||
// + " <Content>\n"
|
||||
// + "Rechnung gemäß Bestellung Nr. 2013-471331 vom 01.03.2013.\n"
|
||||
|
||||
Reference in New Issue
Block a user