| Line 268... |
Line 268... |
| 268 |
}
|
268 |
}
|
| 269 |
|
269 |
|
| 270 |
LOGGER.info("finalBidStatus: {}",finalBidStatus);
|
270 |
LOGGER.info("finalBidStatus: {}",finalBidStatus);
|
| 271 |
if (finalBidStatus.equals(ProfitMandiConstants.BID_ENUM.CLOSED)) {
|
271 |
if (finalBidStatus.equals(ProfitMandiConstants.BID_ENUM.CLOSED)) {
|
| 272 |
// Check if this is the first PO for this partner (before creating the new transaction)
|
272 |
// Check if this is the first PO for this partner (before creating the new transaction)
|
| 273 |
List<Transaction> existingTransactions = transactionRepository.selectByRetailerId(fofoId);
|
273 |
boolean isFirstPO = !transactionRepository.hasTransactionsByRetailerId(fofoId);
|
| 274 |
boolean isFirstPO = (existingTransactions == null || existingTransactions.isEmpty());
|
- |
|
| 275 |
|
274 |
|
| 276 |
// Block first PO if FULL_STOCK_PAYMENT is not done (for LOI-flow partners only)
|
275 |
// Block first PO if FULL_STOCK_PAYMENT is not done (for LOI-flow partners only)
|
| 277 |
if (isFirstPO && fofoStore != null && !fofoStore.isInternal() && fofoStore.getCode() != null) {
|
276 |
if (isFirstPO && fofoStore != null && !fofoStore.isInternal() && fofoStore.getCode() != null) {
|
| 278 |
com.spice.profitmandi.dao.entity.fofo.PartnerOnBoardingPanel pob =
|
277 |
com.spice.profitmandi.dao.entity.fofo.PartnerOnBoardingPanel pob =
|
| 279 |
partnerOnBoardingPanelRepository.selectByCode(fofoStore.getCode());
|
278 |
partnerOnBoardingPanelRepository.selectByCode(fofoStore.getCode());
|