| Line 43... |
Line 43... |
| 43 |
|
43 |
|
| 44 |
public void setEligibleSale(int eligibleSale) {
|
44 |
public void setEligibleSale(int eligibleSale) {
|
| 45 |
this.eligibleSale = eligibleSale;
|
45 |
this.eligibleSale = eligibleSale;
|
| 46 |
}
|
46 |
}
|
| 47 |
|
47 |
|
| - |
|
48 |
public String getAnyItemCriteriaString() {
|
| - |
|
49 |
return this.getItemCriteriaString().replaceAll("All", "");
|
| - |
|
50 |
}
|
| 48 |
private void addAchievementPayoutString(StringBuffer sb, ItemCriteriaPayout itemCriteriaPayout,
|
51 |
private void addAchievementPayoutString(StringBuffer sb, ItemCriteriaPayout itemCriteriaPayout,
|
| 49 |
PayoutSlab payoutSlab) {
|
52 |
PayoutSlab payoutSlab) {
|
| 50 |
this.addAchievementString(sb, itemCriteriaPayout);
|
53 |
this.addAchievementString(sb, itemCriteriaPayout);
|
| 51 |
sb.append(", Get ");
|
54 |
sb.append(", Get ");
|
| 52 |
this.addPayoutString(sb, itemCriteriaPayout, payoutSlab);
|
55 |
this.addPayoutString(sb, itemCriteriaPayout, payoutSlab);
|
| 53 |
}
|
56 |
}
|
| 54 |
|
57 |
|
| 55 |
private void addAchievementString(StringBuffer sb, ItemCriteriaPayout itemCriteriaPayout) {
|
58 |
private void addAchievementString(StringBuffer sb, ItemCriteriaPayout itemCriteriaPayout) {
|
| 56 |
if (this.getPayoutType().equals(AchievementType.QUANTITY)) {
|
59 |
if (this.getPayoutType().equals(AchievementType.QUANTITY)) {
|
| 57 |
sb.append(itemCriteriaPayout.getShortValue()).append(" more pc(s)");
|
60 |
sb.append(itemCriteriaPayout.getShortValue()).append(" more ");
|
| - |
|
61 |
if(this.baseCriteria) {
|
| - |
|
62 |
sb.append("of ").append(this.getAnyItemCriteriaString());
|
| - |
|
63 |
} else {
|
| - |
|
64 |
sb.append("pc(s) ");
|
| - |
|
65 |
}
|
| 58 |
} else if (this.getPayoutType().equals(AchievementType.VALUE)) {
|
66 |
} else if (this.getPayoutType().equals(AchievementType.VALUE)) {
|
| - |
|
67 |
if(this.baseCriteria) {
|
| - |
|
68 |
sb.append(this.getAnyItemCriteriaString());
|
| - |
|
69 |
} else {
|
| - |
|
70 |
sb.append("select models worth");
|
| - |
|
71 |
}
|
| 59 |
sb.append("items worth Rs.").append("<span class=\"currency\">").append(itemCriteriaPayout.getShortValue())
|
72 |
sb.append(" of Rs.").append("<span class=\"currency\">").append(itemCriteriaPayout.getShortValue())
|
| 60 |
.append("</span>");
|
73 |
.append("</span>");
|
| 61 |
}
|
74 |
}
|
| 62 |
}
|
75 |
}
|
| 63 |
|
76 |
|
| 64 |
private void addPayoutString(StringBuffer sb, ItemCriteriaPayout itemCriteriaPayout, PayoutSlab payoutSlab) {
|
77 |
private void addPayoutString(StringBuffer sb, ItemCriteriaPayout itemCriteriaPayout, PayoutSlab payoutSlab) {
|
| 65 |
if (itemCriteriaPayout.getAmountType().equals(AmountType.PERCENTAGE)) {
|
78 |
if (itemCriteriaPayout.getAmountType().equals(AmountType.PERCENTAGE)) {
|
| 66 |
sb.append(payoutSlab.getPayoutAmount()).append("% of total sale value");
|
79 |
sb.append(payoutSlab.getPayoutAmount()).append("% of sale of select models");
|
| 67 |
} else if (itemCriteriaPayout.getAmountType().equals(AmountType.FIXED)) {
|
80 |
} else if (itemCriteriaPayout.getAmountType().equals(AmountType.FIXED)) {
|
| 68 |
sb.append("Rs.").append("<span class=\"currency\">").append(payoutSlab.getPayoutAmount())
|
81 |
sb.append("Rs.").append("<span class=\"currency\">").append(payoutSlab.getPayoutAmount())
|
| 69 |
.append("</span> per pc");
|
82 |
.append("</span> per pc on select models");
|
| 70 |
} else {
|
83 |
} else {
|
| 71 |
sb.append("flat Rs.").append("<span class=\"currency\">").append(payoutSlab.getPayoutAmount())
|
84 |
sb.append("flat Rs.").append("<span class=\"currency\">").append(payoutSlab.getPayoutAmount())
|
| 72 |
.append("</span>");
|
85 |
.append("</span>");
|
| 73 |
}
|
86 |
}
|
| 74 |
}
|
87 |
}
|