| Line 829... |
Line 829... |
| 829 |
InventoryPayoutModel inventoryPayoutModel = priceCircularService.getPayouts(inventoryItemsMap.get(fofoLineItem.getInventoryItemId()));
|
829 |
InventoryPayoutModel inventoryPayoutModel = priceCircularService.getPayouts(inventoryItemsMap.get(fofoLineItem.getInventoryItemId()));
|
| 830 |
double rolloutAmount = inventoryPayoutModel.getRolloutAmount(amountModel);
|
830 |
double rolloutAmount = inventoryPayoutModel.getRolloutAmount(amountModel);
|
| 831 |
totalRolloutAmount += rolloutAmount;
|
831 |
totalRolloutAmount += rolloutAmount;
|
| 832 |
|
832 |
|
| 833 |
OfferPayout offerPayout = new OfferPayout(fofoId, createOfferRequest.getId(), criteriaId, amount, fofoLineItem.getSerialNumber(), rolloutAmount, SchemePayoutStatus.CREDITED, createOfferRequest.getDescription(), LocalDateTime.now());
|
833 |
OfferPayout offerPayout = new OfferPayout(fofoId, createOfferRequest.getId(), criteriaId, amount, fofoLineItem.getSerialNumber(), rolloutAmount, SchemePayoutStatus.CREDITED, createOfferRequest.getDescription(), LocalDateTime.now());
|
| 834 |
//offerPayout.setInventoryItemId(inventoryItemSaleModelsMap.get(lineItemValueEntry.getKey().getInventoryItemId()));
|
834 |
offerPayout.setInventoryItemId(fofoLineItem.getInventoryItemId());
|
| 835 |
offerPayoutRepository.persist(offerPayout);
|
835 |
offerPayoutRepository.persist(offerPayout);
|
| 836 |
}
|
836 |
}
|
| 837 |
walletService.addAmountToWallet((int) fofoId, createOfferRequest.getId(), WalletReferenceType.ADDITIONAL_SCHEME, createOfferRequest.getDescription(), (float) totalRolloutAmount, LocalDateTime.now());
|
837 |
walletService.addAmountToWallet((int) fofoId, createOfferRequest.getId(), WalletReferenceType.ADDITIONAL_SCHEME, createOfferRequest.getDescription(), (float) totalRolloutAmount, LocalDateTime.now());
|
| 838 |
}
|
838 |
}
|
| 839 |
}
|
839 |
}
|
| Line 1005... |
Line 1005... |
| 1005 |
InventoryPayoutModel inventoryPayoutModel = priceCircularService.getPayouts(serialNumberInventoryItemEntry.getValue());
|
1005 |
InventoryPayoutModel inventoryPayoutModel = priceCircularService.getPayouts(serialNumberInventoryItemEntry.getValue());
|
| 1006 |
double rolloutAmount = inventoryPayoutModel.getRolloutAmount(amountModel);
|
1006 |
double rolloutAmount = inventoryPayoutModel.getRolloutAmount(amountModel);
|
| 1007 |
totalRolloutAmount += rolloutAmount;
|
1007 |
totalRolloutAmount += rolloutAmount;
|
| 1008 |
|
1008 |
|
| 1009 |
OfferPayout offerPayout = new OfferPayout(fofoId, createOfferRequest.getId(), criteriaId, amount, serialNumberInventoryItemEntry.getKey(), rolloutAmount, SchemePayoutStatus.CREDITED, createOfferRequest.getDescription(), LocalDateTime.now());
|
1009 |
OfferPayout offerPayout = new OfferPayout(fofoId, createOfferRequest.getId(), criteriaId, amount, serialNumberInventoryItemEntry.getKey(), rolloutAmount, SchemePayoutStatus.CREDITED, createOfferRequest.getDescription(), LocalDateTime.now());
|
| - |
|
1010 |
offerPayout.setInventoryItemId(serialNumberInventoryItemEntry.getValue().getId());
|
| 1010 |
offerPayoutRepository.persist(offerPayout);
|
1011 |
offerPayoutRepository.persist(offerPayout);
|
| 1011 |
}
|
1012 |
}
|
| 1012 |
walletService.addAmountToWallet((int) fofoId, createOfferRequest.getId(), WalletReferenceType.ADDITIONAL_SCHEME, createOfferRequest.getDescription(), (float) totalRolloutAmount, LocalDateTime.now());
|
1013 |
walletService.addAmountToWallet((int) fofoId, createOfferRequest.getId(), WalletReferenceType.ADDITIONAL_SCHEME, createOfferRequest.getDescription(), (float) totalRolloutAmount, LocalDateTime.now());
|
| 1013 |
}
|
1014 |
}
|
| 1014 |
}
|
1015 |
}
|