| Line 614... |
Line 614... |
| 614 |
List<InventoryItem> modelInventoryItems = catalogInventoryItemMap.get(catalogSummaryModel.getCatalogId());
|
614 |
List<InventoryItem> modelInventoryItems = catalogInventoryItemMap.get(catalogSummaryModel.getCatalogId());
|
| 615 |
for (InventoryItem inventoryItem : modelInventoryItems) {
|
615 |
for (InventoryItem inventoryItem : modelInventoryItems) {
|
| 616 |
float inventoryItemCashback = this.createSchemeInOut(schemeSummaryModels, inventoryItem);
|
616 |
float inventoryItemCashback = this.createSchemeInOut(schemeSummaryModels, inventoryItem);
|
| 617 |
if (loan != null && loan.getCdFreeDays() > 0) {
|
617 |
if (loan != null && loan.getCdFreeDays() > 0) {
|
| 618 |
List<SchemeType> rejectedCDTypes = HALF_DAYS_CD_REJECT_SCHEME_TYPES;
|
618 |
List<SchemeType> rejectedCDTypes = HALF_DAYS_CD_REJECT_SCHEME_TYPES;
|
| 619 |
if (loan.getCdFreeDays() == ProfitMandiConstants.LOAN_FULL_CREDIT_DAYS) {
|
619 |
if (loan.getCdFreeDays() == ProfitMandiConstants.LOAN_FULL_CREDIT_DAYS
|
| - |
|
620 |
|| loan.getCdFreeDays() == ProfitMandiConstants.PREMIUM_LOAN_FULL_CREDIT_DAYS) {
|
| 620 |
rejectedCDTypes = FULL_DAYS_CD_SCHEME_TYPES;
|
621 |
rejectedCDTypes = FULL_DAYS_CD_SCHEME_TYPES;
|
| 621 |
}
|
622 |
}
|
| 622 |
for (SchemeType rejectedCDType : rejectedCDTypes) {
|
623 |
for (SchemeType rejectedCDType : rejectedCDTypes) {
|
| 623 |
// Fixed: single DB call instead of duplicate calls
|
624 |
// Fixed: single DB call instead of duplicate calls
|
| 624 |
List<SchemeInOut> cdSios = schemeInOutRepository.selectAllByType(rejectedCDType, inventoryItem.getId());
|
625 |
List<SchemeInOut> cdSios = schemeInOutRepository.selectAllByType(rejectedCDType, inventoryItem.getId());
|