| Line 4393... |
Line 4393... |
| 4393 |
public BigDecimal getSuggestedLimit(double investmentValue) {
|
4393 |
public BigDecimal getSuggestedLimit(double investmentValue) {
|
| 4394 |
double percentageValue = discountMap.ceilingEntry(investmentValue).getValue();
|
4394 |
double percentageValue = discountMap.ceilingEntry(investmentValue).getValue();
|
| 4395 |
return this.getSuggestedAmount(investmentValue, percentageValue);
|
4395 |
return this.getSuggestedAmount(investmentValue, percentageValue);
|
| 4396 |
|
4396 |
|
| 4397 |
}
|
4397 |
}
|
| - |
|
4398 |
private static final BigDecimal FIFTEEN_LAC = BigDecimal.valueOf(1500000);
|
| 4398 |
|
4399 |
|
| 4399 |
private BigDecimal getSuggestedAmount(double investmentValue, double percentageValue) {
|
4400 |
private BigDecimal getSuggestedAmount(double investmentValue, double percentageValue) {
|
| 4400 |
return BigDecimal.valueOf(investmentValue * percentageValue);
|
4401 |
return BigDecimal.valueOf(investmentValue * percentageValue).min(FIFTEEN_LAC);
|
| 4401 |
}
|
4402 |
}
|
| 4402 |
|
- |
|
| 4403 |
/*private static List<Integer> hundredPercentLimitPartnerIds = Arrays.asList(175139630,
|
4403 |
/*private static List<Integer> hundredPercentLimitPartnerIds = Arrays.asList(175139630,
|
| 4404 |
175139815,
|
4404 |
175139815,
|
| 4405 |
175139844,
|
4405 |
175139844,
|
| 4406 |
175140101
|
4406 |
175140101
|
| 4407 |
);*/
|
4407 |
);*/
|
| Line 4416... |
Line 4416... |
| 4416 |
if (creditAccount == null || creditAccount.getGateway().equals(Gateway.SDDIRECT)) {
|
4416 |
if (creditAccount == null || creditAccount.getGateway().equals(Gateway.SDDIRECT)) {
|
| 4417 |
|
4417 |
|
| 4418 |
if (partnerDailyInvestment != null) {
|
4418 |
if (partnerDailyInvestment != null) {
|
| 4419 |
if (hundredPercentLimitPartnerIds.contains(partnerDailyInvestment.getFofoId())) {
|
4419 |
if (hundredPercentLimitPartnerIds.contains(partnerDailyInvestment.getFofoId())) {
|
| 4420 |
suggestedAmount = getSuggestedAmount(partnerDailyInvestment.getTotalInvestment() - utilization, 1);
|
4420 |
suggestedAmount = getSuggestedAmount(partnerDailyInvestment.getTotalInvestment() - utilization, 1);
|
| 4421 |
suggestedAmount = suggestedAmount.min(BigDecimal.valueOf(1500000));
|
4421 |
suggestedAmount = suggestedAmount.min(FIFTEEN_LAC);
|
| 4422 |
} else {
|
4422 |
} else {
|
| 4423 |
suggestedAmount = getSuggestedLimit(partnerDailyInvestment.getTotalInvestment() - utilization);
|
4423 |
suggestedAmount = getSuggestedLimit(partnerDailyInvestment.getTotalInvestment() - utilization);
|
| 4424 |
}
|
4424 |
}
|
| 4425 |
}
|
4425 |
}
|
| 4426 |
if (suggestedAmount.doubleValue() < 0) {
|
4426 |
if (suggestedAmount.doubleValue() < 0) {
|