| Line 517... |
Line 517... |
| 517 |
|
517 |
|
| 518 |
if (addWalletRequest.getStatus().equals(AddWalletRequestStatus.pending)) {
|
518 |
if (addWalletRequest.getStatus().equals(AddWalletRequestStatus.pending)) {
|
| 519 |
walletService.addAmountToWallet(addWalletRequest.getRetailerId(), walletRequestid, WalletReferenceType.ADVANCE_AMOUNT, "ntfs/rgfs", addWalletRequest.getAmount(), addWalletRequest.getCreateTimestamp());
|
519 |
walletService.addAmountToWallet(addWalletRequest.getRetailerId(), walletRequestid, WalletReferenceType.ADVANCE_AMOUNT, "ntfs/rgfs", addWalletRequest.getAmount(), addWalletRequest.getCreateTimestamp());
|
| 520 |
addWalletRequest.setStatus(AddWalletRequestStatus.approved);
|
520 |
addWalletRequest.setStatus(AddWalletRequestStatus.approved);
|
| 521 |
addWalletRequest.setUpdateTimestamp(LocalDateTime.now());
|
521 |
addWalletRequest.setUpdateTimestamp(LocalDateTime.now());
|
| - |
|
522 |
// If this manual top-up recovers a captured HDFC payment (same UTR), mark that row
|
| - |
|
523 |
// credited so the flag means "credited by any path" — prevents a later duplicate
|
| - |
|
524 |
// approval or re-pushed HDFC credit from topping up the same UTR again. Managed
|
| - |
|
525 |
// entity, so the flag flushes as an UPDATE at commit.
|
| - |
|
526 |
HdfcPayment recoveredHdfcPayment = hdfcPaymentRepository.selectByUtrNo(addWalletRequest.getTransaction_reference());
|
| - |
|
527 |
if (recoveredHdfcPayment != null) {
|
| - |
|
528 |
recoveredHdfcPayment.setCredited(true);
|
| - |
|
529 |
}
|
| 522 |
unsettledPaymentsRepository.deleteById(id);
|
530 |
unsettledPaymentsRepository.deleteById(id);
|
| 523 |
|
531 |
|
| 524 |
// check full stock payment if partner comes from Loi process
|
532 |
// check full stock payment if partner comes from Loi process
|
| 525 |
String code = fofoStoreRepository.selectByRetailerId(addWalletRequest.getRetailerId()).getCode();
|
533 |
String code = fofoStoreRepository.selectByRetailerId(addWalletRequest.getRetailerId()).getCode();
|
| 526 |
StoreTimelineModel storeTimelineModel = partnerOnBoardingPanelRepository.selectStoreTimeLine(code);
|
534 |
StoreTimelineModel storeTimelineModel = partnerOnBoardingPanelRepository.selectStoreTimeLine(code);
|