| Line 82... |
Line 82... |
| 82 |
private PurchaseRepository purchaseRepository;
|
82 |
private PurchaseRepository purchaseRepository;
|
| 83 |
|
83 |
|
| 84 |
public void schemeRollback() {
|
84 |
public void schemeRollback() {
|
| 85 |
Map<Integer, Float> fofoIdAmount = new HashMap<>();
|
85 |
Map<Integer, Float> fofoIdAmount = new HashMap<>();
|
| 86 |
fofoIdAmount.put(175135218, 1942f);
|
86 |
fofoIdAmount.put(175135218, 1942f);
|
| 87 |
fofoIdAmount.put(175135218, 438f);
|
- |
|
| 88 |
fofoIdAmount.put(175135218, -478f);
|
- |
|
| 89 |
String description = "Price drop/differential rolled out as, they were already returned, Total 2pcs.";
|
87 |
String description = "Price drop/differential rolled out as, they were already returned, Total 2pcs.";
|
| 90 |
for(Map.Entry<Integer, Float> fofoIdAmountEntry: fofoIdAmount.entrySet()) {
|
88 |
for(Map.Entry<Integer, Float> fofoIdAmountEntry: fofoIdAmount.entrySet()) {
|
| 91 |
Integer fofoId=fofoIdAmountEntry.getKey();
|
89 |
Integer fofoId=fofoIdAmountEntry.getKey();
|
| 92 |
Float amount = fofoIdAmountEntry.getValue();
|
90 |
Float amount = fofoIdAmountEntry.getValue();
|
| 93 |
walletService.rollbackAmountFromWallet(fofoId, amount, 4, WalletReferenceType.PRICE_DROP, description);
|
91 |
walletService.rollbackAmountFromWallet(fofoId, amount, 4, WalletReferenceType.PRICE_DROP, description);
|
| 94 |
}
|
92 |
}
|
| - |
|
93 |
fofoIdAmount.put(175135218, 438f);
|
| - |
|
94 |
for(Map.Entry<Integer, Float> fofoIdAmountEntry: fofoIdAmount.entrySet()) {
|
| - |
|
95 |
Integer fofoId=fofoIdAmountEntry.getKey();
|
| - |
|
96 |
Float amount = fofoIdAmountEntry.getValue();
|
| - |
|
97 |
walletService.rollbackAmountFromWallet(fofoId, amount, 4, WalletReferenceType.PRICE_DROP, description);
|
| - |
|
98 |
}
|
| 95 |
}
|
99 |
}
|
| 96 |
|
100 |
|
| 97 |
public void populateGrnTimestamp() {
|
101 |
public void populateGrnTimestamp() {
|
| 98 |
List<Purchase> allPurchases = purchaseRepository.selectAll();
|
102 |
List<Purchase> allPurchases = purchaseRepository.selectAll();
|
| 99 |
for (Purchase p : allPurchases) {
|
103 |
for (Purchase p : allPurchases) {
|