| Line 11... |
Line 11... |
| 11 |
import java.util.HashMap;
|
11 |
import java.util.HashMap;
|
| 12 |
import java.util.HashSet;
|
12 |
import java.util.HashSet;
|
| 13 |
import java.util.List;
|
13 |
import java.util.List;
|
| 14 |
import java.util.Map;
|
14 |
import java.util.Map;
|
| 15 |
import java.util.Set;
|
15 |
import java.util.Set;
|
| - |
|
16 |
import java.util.stream.Collectors;
|
| 16 |
|
17 |
|
| 17 |
import javax.servlet.http.HttpServletRequest;
|
18 |
import javax.servlet.http.HttpServletRequest;
|
| 18 |
import javax.transaction.Transactional;
|
19 |
import javax.transaction.Transactional;
|
| 19 |
|
20 |
|
| 20 |
import org.apache.logging.log4j.LogManager;
|
21 |
import org.apache.logging.log4j.LogManager;
|
| Line 45... |
Line 46... |
| 45 |
import com.spice.profitmandi.dao.entity.catalog.Scheme;
|
46 |
import com.spice.profitmandi.dao.entity.catalog.Scheme;
|
| 46 |
import com.spice.profitmandi.dao.entity.catalog.TagListing;
|
47 |
import com.spice.profitmandi.dao.entity.catalog.TagListing;
|
| 47 |
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
|
48 |
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
|
| 48 |
import com.spice.profitmandi.dao.entity.fofo.SchemeItem;
|
49 |
import com.spice.profitmandi.dao.entity.fofo.SchemeItem;
|
| 49 |
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
|
50 |
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
|
| - |
|
51 |
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
|
| 50 |
import com.spice.profitmandi.dao.model.CreateOfferRequest;
|
52 |
import com.spice.profitmandi.dao.model.CreateOfferRequest;
|
| 51 |
import com.spice.profitmandi.dao.model.CreateSchemeRequest;
|
53 |
import com.spice.profitmandi.dao.model.CreateSchemeRequest;
|
| 52 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
54 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
| 53 |
import com.spice.profitmandi.dao.repository.catalog.SchemeRepository;
|
55 |
import com.spice.profitmandi.dao.repository.catalog.SchemeRepository;
|
| 54 |
import com.spice.profitmandi.dao.repository.catalog.StateGstRateRepository;
|
56 |
import com.spice.profitmandi.dao.repository.catalog.StateGstRateRepository;
|
| Line 352... |
Line 354... |
| 352 |
schemes = schemeService.selectSchemeByPartnerType(partnerType, date, searchItem, isAdmin, offset, limit);
|
354 |
schemes = schemeService.selectSchemeByPartnerType(partnerType, date, searchItem, isAdmin, offset, limit);
|
| 353 |
model.addAttribute("schemes", schemes);
|
355 |
model.addAttribute("schemes", schemes);
|
| 354 |
if (schemes.size() == 0) {
|
356 |
if (schemes.size() == 0) {
|
| 355 |
return "schemes";
|
357 |
return "schemes";
|
| 356 |
}
|
358 |
}
|
| - |
|
359 |
//For 7720(HR) remove investment
|
| - |
|
360 |
if(fofoStoreRepository.getWarehousePartnerMap().get(7720).stream().filter(x->x.getId()==loginDetails.getFofoId()).count() > 0) {
|
| - |
|
361 |
schemes = schemes.stream().filter(x->!x.getType().equals(SchemeType.INVESTMENT)).collect(Collectors.toList());
|
| 357 |
|
362 |
}
|
| 358 |
for (Scheme scheme : schemes) {
|
363 |
for (Scheme scheme : schemes) {
|
| 359 |
if (scheme.getAmountType().equals(AmountType.PERCENTAGE)) {
|
364 |
if (scheme.getAmountType().equals(AmountType.PERCENTAGE)) {
|
| 360 |
if (tagListing != null) {
|
365 |
if (tagListing != null) {
|
| 361 |
float taxRate = stateGstRateRepository.getIgstTaxRate(Arrays.asList(searchItem)).get(searchItem);
|
366 |
float taxRate = stateGstRateRepository.getIgstTaxRate(Arrays.asList(searchItem)).get(searchItem);
|
| 362 |
float taxableSellingPrice = tagListing.getSellingPrice() / (1 + taxRate / 100);
|
367 |
float taxableSellingPrice = tagListing.getSellingPrice() / (1 + taxRate / 100);
|