Subversion Repositories SmartDukaan

Rev

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

Rev 25092 Rev 25093
Line 588... Line 588...
588
 
588
 
589
		Map<String, Object> map = orderService.getSaleHistory(loginDetails.getFofoId(), searchType, searchValue,
589
		Map<String, Object> map = orderService.getSaleHistory(loginDetails.getFofoId(), searchType, searchValue,
590
				startTime, endTime, offset, 100);
590
				startTime, endTime, offset, 100);
591
		List<FofoOrder> fofoOrders = (List<FofoOrder>)map.get("saleHistories");
591
		List<FofoOrder> fofoOrders = (List<FofoOrder>)map.get("saleHistories");
592
 
592
 
593
		final HttpHeaders headers = new HttpHeaders();
-
 
594
		if(fofoOrders.size() > 0) {
593
		if(fofoOrders.size() == 0) {
595
			throw new ProfitMandiBusinessException("Search criteria", "", "No orders found for criteria");
594
			throw new ProfitMandiBusinessException("Search criteria", "", "No orders found for criteria");
596
		}
595
		}
597
 
596
 
-
 
597
		final HttpHeaders headers = new HttpHeaders();
598
		headers.setContentType(MediaType.APPLICATION_PDF);
598
		headers.setContentType(MediaType.APPLICATION_PDF);
599
		headers.set("Content-disposition", "inline; filename=invoices.pdf");
599
		headers.set("Content-disposition", "inline; filename=invoices.pdf");
600
		ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
600
		ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
601
		List<PdfModel> pdfModels = new ArrayList<>();
601
		List<PdfModel> pdfModels = new ArrayList<>();
602
		for(FofoOrder fofoOrder : fofoOrders) {
602
		for(FofoOrder fofoOrder : fofoOrders) {