Subversion Repositories SmartDukaan

Rev

Rev 29785 | Rev 30670 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 29785 Rev 30651
Line 1... Line 1...
1
package com.spice.profitmandi.dao.model;
1
package com.spice.profitmandi.dao.model;
2
 
2
 
3
import java.util.List;
-
 
4
 
-
 
5
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
3
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
6
import com.spice.profitmandi.service.offers.ItemCriteria;
4
import com.spice.profitmandi.service.offers.ItemCriteria;
7
import com.spice.profitmandi.service.offers.PayoutSlab;
5
import com.spice.profitmandi.service.offers.PayoutSlab;
8
 
6
 
-
 
7
import java.util.List;
-
 
8
 
9
public class ItemCriteriaPayout {
9
public class ItemCriteriaPayout {
10
	private AmountType amountType;
10
	private AmountType amountType;
11
    private ItemCriteria itemCriteria;
11
	private ItemCriteria itemCriteria;
12
    private List<PayoutSlab> payoutSlabs;
12
	private List<PayoutSlab> payoutSlabs;
13
    private String itemCriteriaString;
13
	private String itemCriteriaString;
14
    private long achievedValue;
14
	private long achievedValue;
15
    private long shortValue;
15
	private long shortValue;
16
    private PayoutSlab currentSlab;
16
	private PayoutSlab currentSlab;
17
    private PayoutSlab nextSlab;
17
	private PayoutSlab nextSlab;
-
 
18
 
-
 
19
	public String getCurretPayoutString() {
-
 
20
		String templateString = null;
-
 
21
		if (this.getAmountType().equals(AmountType.FIXED)) {
-
 
22
			templateString = "Rs. %f per pc";
-
 
23
		} else if (this.getAmountType().equals(AmountType.PERCENTAGE)) {
-
 
24
			templateString = "%f %%";
-
 
25
		} else {
-
 
26
			templateString = "%f %%";
-
 
27
		}
-
 
28
		return String.format(templateString, this.getCurrentSlab().getPayoutAmount());
-
 
29
	}
18
 
30
 
19
    public long getShortValue() {
31
	public long getShortValue() {
20
		return shortValue;
32
		return shortValue;
21
	}
33
	}
22
 
34
 
23
 
35
 
24
	public void setShortValue(long shortValue) {
36
	public void setShortValue(long shortValue) {