Changes on discount
- Changed type of discounts from int to Integer - added i18n for defaultDiscount - changed defaultOrder for Condition to number asc
This commit is contained in:
@@ -18,6 +18,7 @@ brand=Marke
|
||||
condition=Zustand
|
||||
size=Gr<EFBFBD><EFBFBD>e
|
||||
discountedSellPrice=Preisvorschlag
|
||||
defaultDiscount=Standardrabatt
|
||||
|
||||
articleCount=Anzahl Artikel
|
||||
originalPriceSum=Summe Originalpreise
|
||||
|
||||
@@ -11,8 +11,6 @@ import com.yourcompany.babydatenbank.actions.*;
|
||||
import java.math.*;
|
||||
import java.time.*;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Entity
|
||||
@View(members=
|
||||
"name;" +
|
||||
@@ -92,8 +90,8 @@ public class Article {
|
||||
|
||||
@Stereotype("PERCENTAGE")
|
||||
@Range(min=0, max=100)
|
||||
@DisplaySize(value=8)
|
||||
private int discount;
|
||||
@Column(length=12)
|
||||
private Integer discount;
|
||||
|
||||
public String getOid() {
|
||||
return oid;
|
||||
@@ -207,11 +205,11 @@ public class Article {
|
||||
this.sellDate = sellDate;
|
||||
}
|
||||
|
||||
public int getDiscount() {
|
||||
public Integer getDiscount() {
|
||||
return discount;
|
||||
}
|
||||
|
||||
public void setDiscount(int discount) {
|
||||
public void setDiscount(Integer discount) {
|
||||
this.discount = discount;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
package com.yourcompany.babydatenbank.model;
|
||||
|
||||
import java.math.*;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.validator.constraints.*;
|
||||
import org.openxava.annotations.*;
|
||||
|
||||
@Entity
|
||||
@Tab(properties="number, description, defaultDiscount")
|
||||
@Tab(properties="number, description, defaultDiscount", defaultOrder="${number} asc")
|
||||
public class Condition {
|
||||
@Id
|
||||
@Hidden
|
||||
@@ -28,7 +25,7 @@ public class Condition {
|
||||
@Range(min=0, max=100)
|
||||
@Stereotype("PERCENTAGE")
|
||||
@DisplaySize(value=8)
|
||||
private int defaultDiscount;
|
||||
private Integer defaultDiscount;
|
||||
|
||||
public String getOid() {
|
||||
return oid;
|
||||
@@ -54,11 +51,11 @@ public class Condition {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public int getDefaultDiscount() {
|
||||
public Integer getDefaultDiscount() {
|
||||
return defaultDiscount;
|
||||
}
|
||||
|
||||
public void setDefaultDiscount(int defaultDiscount) {
|
||||
public void setDefaultDiscount(Integer defaultDiscount) {
|
||||
this.defaultDiscount = defaultDiscount;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user