Subversion Repositories SmartDukaan

Rev

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

Rev 34479 Rev 34733
Line 1666... Line 1666...
1666
            List<UserWalletHistory> uwhList = walletService.getAllByReference(retailerId, transactionId, WalletReferenceType.PURCHASE);
1666
            List<UserWalletHistory> uwhList = walletService.getAllByReference(retailerId, transactionId, WalletReferenceType.PURCHASE);
1667
            //Refund only if any amount is deducted from wallet for that particular Transaction
1667
            //Refund only if any amount is deducted from wallet for that particular Transaction
1668
            if (uwhList.size() > 0) {
1668
            if (uwhList.size() > 0) {
1669
                totalAmount = -uwhList.get(0).getAmount();
1669
                totalAmount = -uwhList.get(0).getAmount();
1670
                walletService.refundToWallet(retailerId, totalAmount, transactionId, WalletReferenceType.PURCHASE, "Order canceled");
1670
                walletService.refundToWallet(retailerId, totalAmount, transactionId, WalletReferenceType.PURCHASE, "Order canceled");
1671
                sdCreditService.settleBlockedLoan(transactionId);
1671
                sdCreditService.settleBlockedLoan(transactionId, totalAmount);
1672
            }
1672
            }
1673
        }
1673
        }
1674
    }
1674
    }
1675
 
1675
 
1676
    @RequestMapping(value = "/bulkOrderTemplate", method = RequestMethod.GET)
1676
    @RequestMapping(value = "/bulkOrderTemplate", method = RequestMethod.GET)