Subversion Repositories SmartDukaan

Rev

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

Rev 32442 Rev 32455
Line 520... Line 520...
520
    @RequestMapping(value = "/unholdOrder", method = RequestMethod.POST)
520
    @RequestMapping(value = "/unholdOrder", method = RequestMethod.POST)
521
    public String unholdOrder(HttpServletRequest request, @RequestParam int transactionId, Model model) throws Exception {
521
    public String unholdOrder(HttpServletRequest request, @RequestParam int transactionId, Model model) throws Exception {
522
 
522
 
523
        List<Order> orders = orderRepository.selectAllByTransactionId(transactionId);
523
        List<Order> orders = orderRepository.selectAllByTransactionId(transactionId);
524
 
524
 
-
 
525
        SanctionRequest sanctionRequest = sanctionRequestRepository.selectByTransactionId(transactionId);
-
 
526
 
-
 
527
 
525
        LOGGER.info("orders" + orders);
528
        LOGGER.info("orders" + orders);
526
 
529
 
-
 
530
        if (sanctionRequest != null) {
-
 
531
            sanctionRequest.setPendingAmount(BigDecimal.ZERO);
-
 
532
        }
-
 
533
 
527
        if (!orders.isEmpty()) {
534
        if (!orders.isEmpty()) {
528
            orders.forEach(x -> x.setShipmentHold(false));
535
            orders.forEach(x -> x.setShipmentHold(false));
529
        }
536
        }
530
 
537
 
531
        double totalAmount = orders.stream().collect(Collectors.summingDouble(x -> x.getTotalAmount()));
538
        double totalAmount = orders.stream().collect(Collectors.summingDouble(x -> x.getTotalAmount()));