diff --git a/mifosng-provider/src/main/java/org/mifosplatform/accounting/journalentry/service/AccountingProcessorHelper.java b/mifosng-provider/src/main/java/org/mifosplatform/accounting/journalentry/service/AccountingProcessorHelper.java index 1f84db58d..ef28e4f47 100755 --- a/mifosng-provider/src/main/java/org/mifosplatform/accounting/journalentry/service/AccountingProcessorHelper.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/accounting/journalentry/service/AccountingProcessorHelper.java @@ -264,7 +264,7 @@ public class AccountingProcessorHelper { ***/ if (accountMappingTypeId == CASH_ACCOUNTS_FOR_LOAN.FUND_SOURCE.getValue()) { ProductToGLAccountMapping paymentChannelSpecificAccountMapping = this.accountMappingRepository - .findByProductIdAndProductTypeAndFinancialAccountTypeAndPaymentType(loanProductId, + .findByProductIdAndProductTypeAndFinancialAccountTypeAndPaymentTypeId(loanProductId, PortfolioProductType.LOAN.getValue(), accountMappingTypeId, paymentTypeId); if (paymentChannelSpecificAccountMapping != null) { accountMapping = paymentChannelSpecificAccountMapping; diff --git a/mifosng-provider/src/main/java/org/mifosplatform/accounting/producttoaccountmapping/domain/ProductToGLAccountMappingRepository.java b/mifosng-provider/src/main/java/org/mifosplatform/accounting/producttoaccountmapping/domain/ProductToGLAccountMappingRepository.java index 8238b1225..0012b5061 100755 --- a/mifosng-provider/src/main/java/org/mifosplatform/accounting/producttoaccountmapping/domain/ProductToGLAccountMappingRepository.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/accounting/producttoaccountmapping/domain/ProductToGLAccountMappingRepository.java @@ -15,7 +15,7 @@ import org.springframework.data.repository.query.Param; public interface ProductToGLAccountMappingRepository extends JpaRepository, JpaSpecificationExecutor { - ProductToGLAccountMapping findByProductIdAndProductTypeAndFinancialAccountTypeAndPaymentType(Long productId, int productType, + ProductToGLAccountMapping findByProductIdAndProductTypeAndFinancialAccountTypeAndPaymentTypeId(Long productId, int productType, int financialAccountType, Long paymentType); @Query("from ProductToGLAccountMapping mapping where mapping.productId =:productId and mapping.productType =:productType and mapping.financialAccountType=:financialAccountType and mapping.paymentType is NULL")