Subversion Repositories SmartDukaan

Rev

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

Rev 29788 Rev 29793
Line 623... Line 623...
623
		partnerTypes.add(partnerType);
623
		partnerTypes.add(partnerType);
624
		partnerTypes.add(PartnerType.ALL);
624
		partnerTypes.add(PartnerType.ALL);
625
		PriceCircularModel priceCircular = priceCircularService.getPriceCircularByOffer(loginDetails.getFofoId(), brand);
625
		PriceCircularModel priceCircular = priceCircularService.getPriceCircularByOffer(loginDetails.getFofoId(), brand);
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() + pc.getTertiaryPayout()
628
			Long totalScheme = pc.getBasePayout() + pc.getCashDiscount() 
-
 
629
					+  pc.getUpfrontMargin()
-
 
630
					+  pc.getTertiaryPayout()
629
					+ pc.getHygienePayout() + pc.getCategoryPayout() + pc.getInvestmentPayout() + pc.getModelSpecfic()
631
					+ pc.getHygienePayout() + pc.getCategoryPayout() + pc.getInvestmentPayout() + pc.getModelSpecfic()
630
					+ (pc.getSlabPayouts()==null ? 0l:pc.getSlabPayouts().stream().filter(x->x!=null).collect(Collectors.summingLong(x->x.entrySet().stream().findFirst().get().getValue())));
632
					+ (pc.getSlabPayouts()==null ? 0l:pc.getSlabPayouts().stream().filter(x->x!=null).collect(Collectors.summingLong(x->x.entrySet().stream().findFirst().get().getValue())));
631
			pc.setTotalScheme(totalScheme);
633
			pc.setTotalScheme(totalScheme);
632
			long netprice = pc.getSellingPrice() - pc.getTotalScheme();
634
			long netprice = pc.getSellingPrice() - pc.getTotalScheme();
633
			pc.setNetPrice(netprice);
635
			pc.setNetPrice(netprice);