Subversion Repositories SmartDukaan

Rev

Rev 37091 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 37091 Rev 37110
Line 320... Line 320...
320
                                throw new ProfitMandiBusinessException(
320
                                throw new ProfitMandiBusinessException(
321
                                        "Full Stock Payment is required before creating PO",
321
                                        "Full Stock Payment is required before creating PO",
322
                                        fofoStore.getCode(),
322
                                        fofoStore.getCode(),
323
                                        "Full Stock Payment must be completed before first PO can be created");
323
                                        "Full Stock Payment must be completed before first PO can be created");
324
                            }
324
                            }
-
 
325
 
-
 
326
                            // Block first PO until the business agreement e-sign has been verified
-
 
327
                            // (by Legal / Gaurav Sharma) — sits between FULL_STOCK_PAYMENT and PO creation.
-
 
328
                            StoreTimelinetb esignEntry = storeTimelinetbRepository.selectByOnboardingIdAndEvent(
-
 
329
                                    pob.getId(), StoreTimeline.AGREEMENT_ESIGN);
-
 
330
                            if (esignEntry == null) {
-
 
331
                                LOGGER.warn("PO creation blocked for fofoId={}, onboardingId={}: AGREEMENT_ESIGN not done", fofoId, pob.getId());
-
 
332
                                throw new ProfitMandiBusinessException(
-
 
333
                                        "Business agreement e-sign is required before creating PO",
-
 
334
                                        fofoStore.getCode(),
-
 
335
                                        "Business agreement e-sign must be verified before first PO can be created");
-
 
336
                            }
325
                        }
337
                        }
326
                    }
338
                    }
327
                }
339
                }
328
 
340
 
329
                LOGGER.info("totalPayableAmount - {}", totalPayableAmount);
341
                LOGGER.info("totalPayableAmount - {}", totalPayableAmount);