Subversion Repositories SmartDukaan

Rev

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

Rev 29671 Rev 29672
Line 2436... Line 2436...
2436
				}
2436
				}
2437
 
2437
 
2438
				int grnStockQty = grnPendingQty + inStockQty;
2438
				int grnStockQty = grnPendingQty + inStockQty;
2439
				int totalQty = processingQty + grnPendingQty + inStockQty;
2439
				int totalQty = processingQty + grnPendingQty + inStockQty;
2440
 
2440
 
2441
				if (totalQty < minQty) {
2441
			
2442
 
2442
 
2443
					int shortageQty = minQty - totalQty;
2443
					int shortageQty = minQty - totalQty;
2444
					List<Item> item = itemRepository.selectAllByCatalogItemId(entry.getKey());
2444
					List<Item> item = itemRepository.selectAllByCatalogItemId(entry.getKey());
2445
					FofoStore fofoStore = fofoStoreRepository.selectByRetailerId(fofoId);
2445
					FofoStore fofoStore = fofoStoreRepository.selectByRetailerId(fofoId);
2446
 
2446
 
Line 2490... Line 2490...
2490
					fm.setAvailabitiy(allColorNetAvailability);
2490
					fm.setAvailabitiy(allColorNetAvailability);
2491
 
2491
 
2492
					focusedModelShortageList.add(fm);
2492
					focusedModelShortageList.add(fm);
2493
				}
2493
				}
2494
 
2494
 
2495
			}
2495
			
2496
 
2496
 
2497
			/*
2497
			/*
2498
			 * if (!focusedModelShortageList.isEmpty()) { String subject = "Stock Alert";
2498
			 * if (!focusedModelShortageList.isEmpty()) { String subject = "Stock Alert";
2499
			 * String messageText = this.getMessage(focusedModelShortageList);
2499
			 * String messageText = this.getMessage(focusedModelShortageList);
2500
			 * 
2500
			 * 
Line 2555... Line 2555...
2555
				try {
2555
				try {
2556
					baos = FileUtil.getCSVByteStream(headers, entry.getValue());
2556
					baos = FileUtil.getCSVByteStream(headers, entry.getValue());
2557
				} catch (Exception e2) {
2557
				} catch (Exception e2) {
2558
					e2.printStackTrace();
2558
					e2.printStackTrace();
2559
				}
2559
				}
2560
				String[] sendToArray = new String[] { "tejbeer.kaur@shop2020.in" };
2560
				String[] sendToArray = new String[] { entry.getKey() };
2561
 
2561
 
2562
				try {
2562
				try {
2563
					Utils.sendMailWithAttachment(googleMailSender, sendToArray, null, "Stock Alert", "PFA", fileName,
2563
					Utils.sendMailWithAttachment(googleMailSender, sendToArray, null, "Stock Alert", "PFA", fileName,
2564
							new ByteArrayResource(baos.toByteArray()));
2564
							new ByteArrayResource(baos.toByteArray()));
2565
				} catch (Exception e1) { // TODO Auto-generated catch block
2565
				} catch (Exception e1) { // TODO Auto-generated catch block