Subversion Repositories SmartDukaan

Rev

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

Rev 22275 Rev 22277
Line 265... Line 265...
265
			fofoDetails = cookiesProcessor.getCookiesObject(request);
265
			fofoDetails = cookiesProcessor.getCookiesObject(request);
266
		} catch (ProfitMandiBusinessException e) {
266
		} catch (ProfitMandiBusinessException e) {
267
			model.addAttribute("loginResponse", mvcResponseSender.createResponseString("RTLR_1009", false, "/login"));
267
			model.addAttribute("loginResponse", mvcResponseSender.createResponseString("RTLR_1009", false, "/login"));
268
			return "response";
268
			return "response";
269
		}
269
		}
-
 
270
		try{
270
		FofoOrder fofoOrder = fofoOrderRepository.selectByFofoIdAndOrderId(fofoDetails.getFofoId(), orderId);
271
			FofoOrder fofoOrder = fofoOrderRepository.selectByFofoIdAndOrderId(fofoDetails.getFofoId(), orderId);
271
		List<FofoLineItem> fofoLineItems = fofoLineItemRepository.selectByOrderId(fofoOrder.getId());
272
			List<FofoLineItem> fofoLineItems = fofoLineItemRepository.selectByOrderId(fofoOrder.getId());
272
		CustomerAddress customerAddress = customerAddressRepository.selectById(fofoOrder.getCustomerAddressId());
273
			CustomerAddress customerAddress = customerAddressRepository.selectById(fofoOrder.getCustomerAddressId());
273
		List<PaymentOption> paymentOptions = paymentOptionRepository.selectByOrderId(fofoOrder.getId());
274
			List<PaymentOption> paymentOptions = paymentOptionRepository.selectByOrderId(fofoOrder.getId());
274
		List<InsurancePolicy> insurancePolicies = insurancePolicyRepository.selectByInvoiceNumber(fofoOrder.getInvoiceNumber());
275
			List<InsurancePolicy> insurancePolicies = insurancePolicyRepository.selectByInvoiceNumber(fofoOrder.getInvoiceNumber());
275
		model.addAttribute("fofoOrder", fofoOrder);
276
			model.addAttribute("fofoOrder", fofoOrder);
276
		model.addAttribute("fofoLineItems", fofoLineItems);
277
			model.addAttribute("fofoLineItems", fofoLineItems);
277
		model.addAttribute("customerBillingAddress", getBillingAddress(customerAddress));
278
			model.addAttribute("customerBillingAddress", getBillingAddress(customerAddress));
278
		model.addAttribute("customerBillingAddressObj", customerAddress);
279
			model.addAttribute("customerBillingAddressObj", customerAddress);
279
		model.addAttribute("paymentOptions", paymentOptions);
280
			model.addAttribute("paymentOptions", paymentOptions);
280
		model.addAttribute("insurancePolicies", insurancePolicies);
281
			model.addAttribute("insurancePolicies", insurancePolicies);
281
		return "order-details";
282
			return "order-details";
-
 
283
		}catch (Exception e) {
-
 
284
			LOGGER.error("Unable to get Order details...", e);
-
 
285
			return "error";
-
 
286
		}
282
	}
287
	}
283
	
288
	
284
	
289
	
285
	@RequestMapping(value = "/saleDetails", method = RequestMethod.GET)
290
	@RequestMapping(value = "/saleDetails", method = RequestMethod.GET)
286
	public String getSaleDetails(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.ORDER_ID) int orderId, Model model) throws ProfitMandiBusinessException, Exception{
291
	public String getSaleDetails(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.ORDER_ID) int orderId, Model model) throws ProfitMandiBusinessException, Exception{