| Line 626... |
Line 626... |
| 626 |
for (PriceCircularItemModel pc : priceCircular.getPriceCircularItemModels()) {
|
626 |
for (PriceCircularItemModel pc : priceCircular.getPriceCircularItemModels()) {
|
| 627 |
LOGGER.info("Slabs {}", pc.getSlabPayouts());
|
627 |
LOGGER.info("Slabs {}", pc.getSlabPayouts());
|
| 628 |
Long totalScheme = pc.getBasePayout() + pc.getCashDiscount()
|
628 |
Long totalScheme = pc.getBasePayout() + pc.getCashDiscount()
|
| 629 |
+ pc.getUpfrontMargin()
|
629 |
+ pc.getUpfrontMargin()
|
| 630 |
+ pc.getTertiaryPayout()
|
630 |
+ pc.getTertiaryPayout()
|
| - |
|
631 |
+ pc.getUpgradeOffer()
|
| 631 |
+ pc.getHygienePayout() + pc.getCategoryPayout() + pc.getInvestmentPayout() + pc.getModelSpecfic()
|
632 |
+ pc.getHygienePayout() + pc.getCategoryPayout() + pc.getInvestmentPayout() + pc.getModelSpecfic()
|
| 632 |
+ (pc.getSlabPayouts()==null ? 0l:pc.getSlabPayouts().stream().filter(x->x!=null).collect(Collectors.summingLong(x->x.entrySet().stream().findFirst().get().getValue())));
|
633 |
+ (pc.getSlabPayouts()==null ? 0l:pc.getSlabPayouts().stream().filter(x->x!=null).collect(Collectors.summingLong(x->x.entrySet().stream().findFirst().get().getValue())));
|
| 633 |
pc.setTotalScheme(totalScheme);
|
634 |
pc.setTotalScheme(totalScheme);
|
| 634 |
long netprice = pc.getSellingPrice() - pc.getTotalScheme();
|
635 |
long netprice = pc.getSellingPrice() - pc.getTotalScheme();
|
| 635 |
pc.setNetPrice(netprice);
|
636 |
pc.setNetPrice(netprice);
|
| Line 644... |
Line 645... |
| 644 |
}
|
645 |
}
|
| 645 |
|
646 |
|
| 646 |
FofoStore fs = fofoStoreRepository.selectByRetailerId(loginDetails.getFofoId());
|
647 |
FofoStore fs = fofoStoreRepository.selectByRetailerId(loginDetails.getFofoId());
|
| 647 |
model.addAttribute("priceCircular", priceCircular.getPriceCircularItemModels());
|
648 |
model.addAttribute("priceCircular", priceCircular.getPriceCircularItemModels());
|
| 648 |
model.addAttribute("offers", priceCircular.getOffers());
|
649 |
model.addAttribute("offers", priceCircular.getOffers());
|
| - |
|
650 |
model.addAttribute("upgradeOffer", priceCircular.isUpgradeOffer());
|
| 649 |
model.addAttribute("partnerCode", fs.getCode());
|
651 |
model.addAttribute("partnerCode", fs.getCode());
|
| 650 |
return "price-circular-detail";
|
652 |
return "price-circular-detail";
|
| 651 |
}
|
653 |
}
|
| 652 |
|
654 |
|
| 653 |
@RequestMapping(value = "/selectPriceDropStatus", method = RequestMethod.GET)
|
655 |
@RequestMapping(value = "/selectPriceDropStatus", method = RequestMethod.GET)
|