| Line 294... |
Line 294... |
| 294 |
UserWallet wallet = userWalletRepository.selectByRetailerId(fofoId);
|
294 |
UserWallet wallet = userWalletRepository.selectByRetailerId(fofoId);
|
| 295 |
return userWalletHistoryRepository.getSumTillDate(wallet.getId(), date);
|
295 |
return userWalletHistoryRepository.getSumTillDate(wallet.getId(), date);
|
| 296 |
}
|
296 |
}
|
| 297 |
|
297 |
|
| 298 |
@Override
|
298 |
@Override
|
| 299 |
public float getOpeningTillExcludingPurchase(int fofoId, LocalDateTime date) throws ProfitMandiBusinessException {
|
- |
|
| 300 |
UserWallet wallet = userWalletRepository.selectByRetailerId(fofoId);
|
- |
|
| 301 |
return userWalletHistoryRepository.getSumTillDate(wallet.getId(), date) - userWalletHistoryRepository.getSumTillDate(wallet.getId(), date, WalletReferenceType.PURCHASE);
|
- |
|
| 302 |
}
|
- |
|
| 303 |
|
- |
|
| 304 |
@Override
|
- |
|
| 305 |
public boolean refundToWallet(int retailerId, float amountToRefund, int transactionId,
|
299 |
public boolean refundToWallet(int retailerId, float amountToRefund, int transactionId,
|
| 306 |
WalletReferenceType walletReferenceType, String description) throws ProfitMandiBusinessException {
|
300 |
WalletReferenceType walletReferenceType, String description) throws ProfitMandiBusinessException {
|
| 307 |
|
301 |
|
| 308 |
List<UserWalletHistory> all_entries = userWalletHistoryRepository
|
302 |
List<UserWalletHistory> all_entries = userWalletHistoryRepository
|
| 309 |
.selectAllByreferenceIdandreferenceType(transactionId, walletReferenceType);
|
303 |
.selectAllByreferenceIdandreferenceType(transactionId, walletReferenceType);
|