Subversion Repositories SmartDukaan

Rev

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

Rev 34788 Rev 34813
Line 1224... Line 1224...
1224
            int saleQty = 0;
1224
            int saleQty = 0;
1225
            int purchaseQty = 0;
1225
            int purchaseQty = 0;
1226
            double income = 0;
1226
            double income = 0;
1227
 
1227
 
1228
            if (modelWiseSchemeInMarginsMap.containsKey(catalogItemId)) {
1228
            if (modelWiseSchemeInMarginsMap.containsKey(catalogItemId)) {
1229
                income += modelWiseSchemeInMarginsMap.get(catalogItemId).getAmount() + modelWiseSchemeInMarginsMap.get(catalogItemId).getPendingSaleAmount();
1229
                income += (modelWiseSchemeInMarginsMap.get(catalogItemId).getAmount()) + modelWiseSchemeInMarginsMap.get(catalogItemId).getPendingSaleAmount();
1230
                purchaseQty += modelWiseSchemeInMarginsMap.get(catalogItemId).getQty();
1230
                purchaseQty += modelWiseSchemeInMarginsMap.get(catalogItemId).getQty();
1231
            }
1231
            }
1232
            if (modelWiseSchemeOutMarginsMap.containsKey(catalogItemId)) {
1232
            if (modelWiseSchemeOutMarginsMap.containsKey(catalogItemId)) {
1233
                income += modelWiseSchemeOutMarginsMap.get(catalogItemId).getAmount() + modelWiseSchemeOutMarginsMap.get(catalogItemId).getPendingSaleAmount();
1233
                income += modelWiseSchemeOutMarginsMap.get(catalogItemId).getAmount() + modelWiseSchemeOutMarginsMap.get(catalogItemId).getPendingSaleAmount();
1234
            }
1234
            }
Line 1267... Line 1267...
1267
        return "monthly-brand-wise-income";
1267
        return "monthly-brand-wise-income";
1268
 
1268
 
1269
    }
1269
    }
1270
 
1270
 
1271
    @RequestMapping(value = "/monthWisePartnerIncome/{yearMonth}", method = RequestMethod.GET)
1271
    @RequestMapping(value = "/monthWisePartnerIncome/{yearMonth}", method = RequestMethod.GET)
1272
    public String publishedOffersOnMonthBefore(HttpServletRequest request, @PathVariable int yearMonth, Model model)
1272
    public String publishedOffersOnMonthBefore(HttpServletRequest request, @RequestParam(required = false) boolean partnerTask, @PathVariable int yearMonth, Model model)
1273
            throws ProfitMandiBusinessException {
1273
            throws ProfitMandiBusinessException {
1274
        LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
1274
        LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
1275
 
1275
 
1276
        LocalDateTime startOfMonth = LocalDate.now().minusMonths(yearMonth).withDayOfMonth(1).atStartOfDay();
1276
        LocalDateTime startOfMonth = LocalDate.now().minusMonths(yearMonth).withDayOfMonth(1).atStartOfDay();
1277
        LocalDateTime lastMonthEnd = startOfMonth.plusMonths(1);
1277
        LocalDateTime lastMonthEnd = startOfMonth.plusMonths(1);
Line 1358... Line 1358...
1358
        model.addAttribute("month", yearMonth);
1358
        model.addAttribute("month", yearMonth);
1359
        model.addAttribute("lastMonthCategoryUpgradeMarginMap", lastMonthCategoryUpgradeMarginMap);
1359
        model.addAttribute("lastMonthCategoryUpgradeMarginMap", lastMonthCategoryUpgradeMarginMap);
1360
        LOGGER.info("totalAmountMap {}", totalAmountMap);
1360
        LOGGER.info("totalAmountMap {}", totalAmountMap);
1361
        LOGGER.info("lastMonthSaleMarginMap {}", lastMonthSaleMarginMap);
1361
        LOGGER.info("lastMonthSaleMarginMap {}", lastMonthSaleMarginMap);
1362
 
1362
 
-
 
1363
        if (partnerTask) {
-
 
1364
            return "monthly-credited-income";
1363
        return "last-month-credited-income";
1365
        } else return "last-month-credited-income";
1364
    }
1366
    }
1365
 
1367
 
1366
    @RequestMapping(value = "/schemes/downloadPage", method = RequestMethod.GET)
1368
    @RequestMapping(value = "/schemes/downloadPage", method = RequestMethod.GET)
1367
    public String downloadPage(HttpServletRequest request, Model model) {
1369
    public String downloadPage(HttpServletRequest request, Model model) {
1368
        return "schemes-download";
1370
        return "schemes-download";