FINERACT-2181: Capitalized Income and Buy Down Fees accounting values are still displayed on loan product after feature disabled

This commit is contained in:
Jose Alberto Hernandez
2025-07-16 12:06:52 +02:00
committed by Adam Saghy
parent 9e15e459f0
commit e2f481f351
6 changed files with 89 additions and 29 deletions
@@ -559,6 +559,15 @@ public class ProductToGLAccountMappingHelper {
return glAccount;
}
public void deleteProductToGLAccountMapping(final Long loanProductId, final PortfolioProductType portfolioProductType,
final int accountTypeId) {
final ProductToGLAccountMapping accountMapping = this.accountMappingRepository.findCoreProductToFinAccountMapping(loanProductId,
portfolioProductType.getValue(), accountTypeId);
if (accountMapping != null && accountMapping.getGlAccount() != null) {
this.accountMappingRepository.delete(accountMapping);
}
}
public void deleteProductToGLAccountMapping(final Long loanProductId, final PortfolioProductType portfolioProductType) {
final List<ProductToGLAccountMapping> productToGLAccountMappings = this.accountMappingRepository
.findByProductIdAndProductType(loanProductId, portfolioProductType.getValue());
@@ -30,7 +30,7 @@ public interface ProductToGLAccountMappingWritePlatformService {
void createSavingProductToGLAccountMapping(Long savingProductId, JsonCommand command, DepositAccountType accountType);
Map<String, Object> updateLoanProductToGLAccountMapping(Long loanProductId, JsonCommand command, boolean accountingRuleChanged,
AccountingRuleType accountingRuleTypeId);
AccountingRuleType accountingRuleTypeId, boolean enableIncomeCapitalization, boolean enableBuyDownFee);
Map<String, Object> updateSavingsProductToGLAccountMapping(Long savingsProductId, JsonCommand command, boolean accountingRuleChanged,
int accountingRuleTypeId, DepositAccountType accountType);