| Line 1457... |
Line 1457... |
| 1457 |
inventoryService.getItemAvailabilityAndIndent();
|
1457 |
inventoryService.getItemAvailabilityAndIndent();
|
| 1458 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
1458 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
| 1459 |
return "response";
|
1459 |
return "response";
|
| 1460 |
}
|
1460 |
}
|
| 1461 |
|
1461 |
|
| - |
|
1462 |
// AJAX endpoint for the main-dashboard "Warehouse Wise Report" brand filter.
|
| - |
|
1463 |
// Returns the tbody fragment for the selected brand(s); empty brand = all brands (same numbers as the default page load).
|
| - |
|
1464 |
@RequestMapping(value = "/getWarehouseStockByBrand", method = RequestMethod.GET)
|
| - |
|
1465 |
public String getWarehouseStockByBrand(HttpServletRequest request,
|
| - |
|
1466 |
@RequestParam(name = "brand", required = false) List<String> brands,
|
| - |
|
1467 |
Model model) throws Exception {
|
| - |
|
1468 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| - |
|
1469 |
LinkedHashMap<Integer, WarehouseWiseStockModel> stockMap =
|
| - |
|
1470 |
adminUser.getWarehouseStockMap(loginDetails.getEmailId(), brands);
|
| - |
|
1471 |
// Same shape adminPanel uses so the Total Values row (key 0) renders its label.
|
| - |
|
1472 |
LinkedHashMap<Integer, String> warehouseMap = new LinkedHashMap<>(ProfitMandiConstants.WAREHOUSE_MAP);
|
| - |
|
1473 |
warehouseMap.put(0, "Total Values");
|
| - |
|
1474 |
model.addAttribute("warehouseStockMap", stockMap);
|
| - |
|
1475 |
model.addAttribute("warehouseMap", warehouseMap);
|
| - |
|
1476 |
return "warehouse_wise_stock_rows";
|
| - |
|
1477 |
}
|
| - |
|
1478 |
|
| 1462 |
@RequestMapping(value = "/getWarehouseWiseBrandAndCategory", method = RequestMethod.GET)
|
1479 |
@RequestMapping(value = "/getWarehouseWiseBrandAndCategory", method = RequestMethod.GET)
|
| 1463 |
public String getWarehouseWiseBrandAndCategory(HttpServletRequest request, Model
|
1480 |
public String getWarehouseWiseBrandAndCategory(HttpServletRequest request, Model
|
| 1464 |
model, @RequestParam List<Integer> warehouseId, @RequestParam List<String> brands, @RequestParam String
|
1481 |
model, @RequestParam List<Integer> warehouseId, @RequestParam List<String> brands, @RequestParam String
|
| 1465 |
category) throws Exception {
|
1482 |
category) throws Exception {
|
| 1466 |
|
1483 |
|