| Line 647... |
Line 647... |
| 647 |
totalCashback += inventoryItemCashback;
|
647 |
totalCashback += inventoryItemCashback;
|
| 648 |
itemsCount++;
|
648 |
itemsCount++;
|
| 649 |
}
|
649 |
}
|
| 650 |
}
|
650 |
}
|
| 651 |
}
|
651 |
}
|
| - |
|
652 |
LOGGER.info("Items count for purchase id {} is {}", purchaseId, itemsCount);
|
| 652 |
if(itemsCount > 0) {
|
653 |
if(itemsCount > 0) {
|
| 653 |
walletService.addAmountToWallet(retailerId, purchaseId, WalletReferenceType.SCHEME_IN,
|
654 |
walletService.addAmountToWallet(retailerId, purchaseId, WalletReferenceType.SCHEME_IN,
|
| 654 |
"Added for SCHEME IN against invoice " + purchase.getPurchaseReference() + " (total " + itemsCount + " pcs)", totalCashback);
|
655 |
"Added for SCHEME IN against invoice " + purchase.getPurchaseReference() + " (total " + itemsCount + " pcs)", totalCashback);
|
| 655 |
LOGGER.info("Added Rs.{} for SCHEME IN against invoice {} total pcs({}) {}", totalCashback, purchase.getPurchaseReference(), itemsCount);
|
656 |
LOGGER.info("Added Rs.{} for SCHEME IN against invoice {} total pcs({}) {}", totalCashback, purchase.getPurchaseReference(), itemsCount);
|
| 656 |
purchase.setCashback(purchase.getCashback() + totalCashback);
|
657 |
purchase.setCashback(purchase.getCashback() + totalCashback);
|
| Line 812... |
Line 813... |
| 812 |
schemeInOut.setRolled_back_timestamp(LocalDateTime.now());
|
813 |
schemeInOut.setRolled_back_timestamp(LocalDateTime.now());
|
| 813 |
schemeInOutRepository.persist(schemeInOut);
|
814 |
schemeInOutRepository.persist(schemeInOut);
|
| 814 |
amountToRollback += schemeInOut.getAmount();
|
815 |
amountToRollback += schemeInOut.getAmount();
|
| 815 |
}
|
816 |
}
|
| 816 |
walletService.rollbackAmountFromWallet(inventoryItems.get(0).getFofoId(), amountToRollback, rollbackReference, WalletReferenceType.SCHEME_IN, rollbackReason);
|
817 |
walletService.rollbackAmountFromWallet(inventoryItems.get(0).getFofoId(), amountToRollback, rollbackReference, WalletReferenceType.SCHEME_IN, rollbackReason);
|
| 817 |
|
- |
|
| 818 |
}
|
818 |
}
|
| 819 |
|
819 |
|
| 820 |
}
|
820 |
}
|