Skip to content

Commit

Permalink
improve cashdiscount
Browse files Browse the repository at this point in the history
  • Loading branch information
jstaerk committed Jan 18, 2025
1 parent 11e36da commit deea7c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions History.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- #689
- be able to set detailedDeliveryPeriodFrom, detailedDeliveryPeriodTo MS188
- updated verapdf from 1.26.1 to 1.26.2
- cashDiscount JSON now corrently ignores values for cii and xr methods

2.16.0
=======
Expand Down
3 changes: 3 additions & 0 deletions library/src/main/java/org/mustangproject/CashDiscount.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -63,6 +64,7 @@ public CashDiscount setDays(Integer days) {
/***
* @return this particular cash discount as cross industry invoice XML
*/
@JsonIgnore
public String getAsCII() {
return "<ram:SpecifiedTradePaymentTerms>"+
"<ram:Description>Cash Discount</ram:Description>"+
Expand All @@ -78,6 +80,7 @@ public String getAsCII() {
* 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";
}
Expand Down

0 comments on commit deea7c0

Please sign in to comment.