Merge branch 'ZUGFeRD:master' into master
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package org.mustangproject;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import org.mustangproject.ZUGFeRD.IZUGFeRDCashDiscount;
|
||||
@@ -63,6 +64,7 @@ public class CashDiscount implements IZUGFeRDCashDiscount {
|
||||
/***
|
||||
* @return this particular cash discount as cross industry invoice XML
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String getAsCII() {
|
||||
return "<ram:SpecifiedTradePaymentTerms>"+
|
||||
"<ram:Description>Cash Discount</ram:Description>"+
|
||||
@@ -78,6 +80,7 @@ public class CashDiscount implements IZUGFeRDCashDiscount {
|
||||
* XRechnung CIUS defined it's own proprietary format for a freetext field
|
||||
* @return this particular cash discount in proprietary xrechnung format
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String getAsXRechnung() {
|
||||
return "#SKONTO#TAGE="+days+"#PROZENT="+XMLTools.nDigitFormat(percent,2)+"#\n";
|
||||
}
|
||||
|
||||
@@ -783,11 +783,20 @@ public class Invoice implements IExportableTransaction {
|
||||
return detailedDeliveryDateStart;
|
||||
}
|
||||
|
||||
public Invoice setDetailedDeliveryPeriodFrom(Date dt) {
|
||||
detailedDeliveryDateStart=dt;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getDetailedDeliveryPeriodTo() {
|
||||
return detailedDeliveryPeriodEnd;
|
||||
}
|
||||
|
||||
public Invoice setDetailedDeliveryPeriodTo(Date dt) {
|
||||
detailedDeliveryPeriodEnd=dt;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* adds a free text paragraph, which will become an includedNote element
|
||||
|
||||
@@ -288,8 +288,8 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
||||
final String allowanceChargeStr = "<ram:AppliedTradeAllowanceCharge><ram:ChargeIndicator><udt:Indicator>" +
|
||||
chargeIndicator + "</udt:Indicator></ram:ChargeIndicator>" + percentage +
|
||||
"<ram:ActualAmount>" + priceFormat(allowance.getTotalAmount(item)) + "</ram:ActualAmount>" +
|
||||
reason +
|
||||
reasonCode +
|
||||
reason +
|
||||
"</ram:AppliedTradeAllowanceCharge>";
|
||||
return allowanceChargeStr;
|
||||
}
|
||||
@@ -323,8 +323,8 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
||||
final String itemTotalAllowanceChargeStr = "<ram:SpecifiedTradeAllowanceCharge><ram:ChargeIndicator><udt:Indicator>" +
|
||||
chargeIndicator + "</udt:Indicator></ram:ChargeIndicator>" + percentage +
|
||||
"<ram:ActualAmount>" + currencyFormat(allowance.getTotalAmount(item)) + "</ram:ActualAmount>" +
|
||||
reason +
|
||||
reasonCode +
|
||||
reason +
|
||||
"</ram:SpecifiedTradeAllowanceCharge>";
|
||||
return itemTotalAllowanceChargeStr;
|
||||
}
|
||||
@@ -744,12 +744,12 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
||||
"<udt:Indicator>true</udt:Indicator>" +
|
||||
"</ram:ChargeIndicator>" +
|
||||
"<ram:ActualAmount>" + currencyFormat(charge.getTotalAmount(calc)) + "</ram:ActualAmount>";
|
||||
if (charge.getReason() != null) {
|
||||
xml += "<ram:Reason>" + XMLTools.encodeXML(charge.getReason()) + "</ram:Reason>";
|
||||
}
|
||||
if (charge.getReasonCode() != null) {
|
||||
xml += "<ram:ReasonCode>" + charge.getReasonCode() + "</ram:ReasonCode>";
|
||||
}
|
||||
if (charge.getReason() != null) {
|
||||
xml += "<ram:Reason>" + XMLTools.encodeXML(charge.getReason()) + "</ram:Reason>";
|
||||
}
|
||||
xml += "<ram:CategoryTradeTax>" +
|
||||
"<ram:TypeCode>VAT</ram:TypeCode>" +
|
||||
"<ram:CategoryCode>" + charge.getCategoryCode() + "</ram:CategoryCode>";
|
||||
|
||||
Reference in New Issue
Block a user