Subversion Repositories SmartDukaan

Rev

Rev 36519 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36519 Rev 36791
Line 1982... Line 1982...
1982
            //Refund only if any amount is deducted from wallet for that particular Transaction
1982
            //Refund only if any amount is deducted from wallet for that particular Transaction
1983
            if (uwhList.size() > 0) {
1983
            if (uwhList.size() > 0) {
1984
                totalAmount = -uwhList.get(0).getAmount();
1984
                totalAmount = -uwhList.get(0).getAmount();
1985
                walletService.refundToWallet(retailerId, totalAmount, transactionId, WalletReferenceType.PURCHASE, "Order canceled");
1985
                walletService.refundToWallet(retailerId, totalAmount, transactionId, WalletReferenceType.PURCHASE, "Order canceled");
1986
                sdCreditService.settleBlockedLoan(transactionId, totalAmount);
1986
                sdCreditService.settleBlockedLoan(transactionId, totalAmount);
-
 
1987
                // Mark the rejected PO's order rows so they drop out of pending indent (the wallet refund
-
 
1988
                // above releases the committed amount; without this the orders stay status=0 forever and
-
 
1989
                // inflate pending indent with no matching wallet liability).
-
 
1990
                orderRepository.cancelRejectedTransactionOrders(transactionId, approvedBy, "PO rejected: " + remark);
1987
            }
1991
            }
1988
        }
1992
        }
1989
    }
1993
    }
1990
 
1994
 
1991
    @RequestMapping(value = "/transaction/bulkOrderApprovalReport", method = RequestMethod.GET)
1995
    @RequestMapping(value = "/transaction/bulkOrderApprovalReport", method = RequestMethod.GET)