Subversion Repositories SmartDukaan

Rev

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

Rev 22277 Rev 22279
Line 294... Line 294...
294
			fofoDetails = cookiesProcessor.getCookiesObject(request);
294
			fofoDetails = cookiesProcessor.getCookiesObject(request);
295
		} catch (ProfitMandiBusinessException e) {
295
		} catch (ProfitMandiBusinessException e) {
296
			model.addAttribute("loginResponse", mvcResponseSender.createResponseString("RTLR_1009", false, "/login"));
296
			model.addAttribute("loginResponse", mvcResponseSender.createResponseString("RTLR_1009", false, "/login"));
297
			return "response";
297
			return "response";
298
		}
298
		}
-
 
299
		try{
299
		FofoOrder fofoOrder = fofoOrderRepository.selectByFofoIdAndOrderId(fofoDetails.getFofoId(), orderId);
300
			FofoOrder fofoOrder = fofoOrderRepository.selectByFofoIdAndOrderId(fofoDetails.getFofoId(), orderId);
300
		List<FofoLineItem> fofoLineItems = fofoLineItemRepository.selectByOrderId(fofoOrder.getId());
301
			List<FofoLineItem> fofoLineItems = fofoLineItemRepository.selectByOrderId(fofoOrder.getId());
301
		CustomerAddress customerAddress = customerAddressRepository.selectById(fofoOrder.getCustomerAddressId());
302
			CustomerAddress customerAddress = customerAddressRepository.selectById(fofoOrder.getCustomerAddressId());
302
		List<PaymentOption> paymentOptions = paymentOptionRepository.selectByOrderId(fofoOrder.getId());
303
			List<PaymentOption> paymentOptions = paymentOptionRepository.selectByOrderId(fofoOrder.getId());
303
		List<InsurancePolicy> insurancePolicies = insurancePolicyRepository.selectByInvoiceNumber(fofoOrder.getInvoiceNumber());
304
			List<InsurancePolicy> insurancePolicies = insurancePolicyRepository.selectByInvoiceNumber(fofoOrder.getInvoiceNumber());
304
		model.addAttribute("fofoOrder", fofoOrder);
305
			model.addAttribute("fofoOrder", fofoOrder);
305
		model.addAttribute("fofoLineItems", fofoLineItems);
306
			model.addAttribute("fofoLineItems", fofoLineItems);
306
		model.addAttribute("customerBillingAddress", getBillingAddress(customerAddress));
307
			model.addAttribute("customerBillingAddress", getBillingAddress(customerAddress));
307
		model.addAttribute("customerBillingAddressObj", customerAddress);
308
			model.addAttribute("customerBillingAddressObj", customerAddress);
308
		model.addAttribute("paymentOptions", paymentOptions);
309
			model.addAttribute("paymentOptions", paymentOptions);
309
		model.addAttribute("insurancePolicies", insurancePolicies);
310
			model.addAttribute("insurancePolicies", insurancePolicies);
310
		return "sale-details";
311
			return "sale-details";
-
 
312
		}catch (Exception e) {
-
 
313
			LOGGER.error("Unble to fetch sale details... ", e);
-
 
314
			return "error";
-
 
315
		}
311
	}
316
	}
312
	
317
	
313
	
318
	
314
 
319
 
315
	private String getBillingAddress(CustomerAddress customerAddress) {
320
	private String getBillingAddress(CustomerAddress customerAddress) {