Fixed Accounting findProductIdAndProductTypeAndFinancialAccountTypeAndChargeId
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
81fc89c58c
commit
ce570b4b33
+3
-3
@@ -1124,7 +1124,7 @@ public class AccountingProcessorHelper {
|
|||||||
if (accountMappingTypeId == CashAccountsForLoan.INCOME_FROM_FEES.getValue()
|
if (accountMappingTypeId == CashAccountsForLoan.INCOME_FROM_FEES.getValue()
|
||||||
|| accountMappingTypeId == CashAccountsForLoan.INCOME_FROM_PENALTIES.getValue()) {
|
|| accountMappingTypeId == CashAccountsForLoan.INCOME_FROM_PENALTIES.getValue()) {
|
||||||
final ProductToGLAccountMapping chargeSpecificIncomeAccountMapping = this.accountMappingRepository
|
final ProductToGLAccountMapping chargeSpecificIncomeAccountMapping = this.accountMappingRepository
|
||||||
.findByProductIdAndProductTypeAndFinancialAccountTypeAndChargeId(loanProductId, PortfolioProductType.LOAN.getValue(),
|
.findProductIdAndProductTypeAndFinancialAccountTypeAndChargeId(loanProductId, PortfolioProductType.LOAN.getValue(),
|
||||||
accountMappingTypeId, chargeId);
|
accountMappingTypeId, chargeId);
|
||||||
if (chargeSpecificIncomeAccountMapping != null) {
|
if (chargeSpecificIncomeAccountMapping != null) {
|
||||||
accountMapping = chargeSpecificIncomeAccountMapping;
|
accountMapping = chargeSpecificIncomeAccountMapping;
|
||||||
@@ -1147,7 +1147,7 @@ public class AccountingProcessorHelper {
|
|||||||
if (accountMappingTypeId == CashAccountsForSavings.INCOME_FROM_FEES.getValue()
|
if (accountMappingTypeId == CashAccountsForSavings.INCOME_FROM_FEES.getValue()
|
||||||
|| accountMappingTypeId == CashAccountsForLoan.INCOME_FROM_PENALTIES.getValue()) {
|
|| accountMappingTypeId == CashAccountsForLoan.INCOME_FROM_PENALTIES.getValue()) {
|
||||||
final ProductToGLAccountMapping chargeSpecificIncomeAccountMapping = this.accountMappingRepository
|
final ProductToGLAccountMapping chargeSpecificIncomeAccountMapping = this.accountMappingRepository
|
||||||
.findByProductIdAndProductTypeAndFinancialAccountTypeAndChargeId(savingsProductId,
|
.findProductIdAndProductTypeAndFinancialAccountTypeAndChargeId(savingsProductId,
|
||||||
PortfolioProductType.SAVING.getValue(), accountMappingTypeId, chargeId);
|
PortfolioProductType.SAVING.getValue(), accountMappingTypeId, chargeId);
|
||||||
if (chargeSpecificIncomeAccountMapping != null) {
|
if (chargeSpecificIncomeAccountMapping != null) {
|
||||||
accountMapping = chargeSpecificIncomeAccountMapping;
|
accountMapping = chargeSpecificIncomeAccountMapping;
|
||||||
@@ -1218,7 +1218,7 @@ public class AccountingProcessorHelper {
|
|||||||
*****/
|
*****/
|
||||||
|
|
||||||
final ProductToGLAccountMapping chargeSpecificIncomeAccountMapping = this.accountMappingRepository
|
final ProductToGLAccountMapping chargeSpecificIncomeAccountMapping = this.accountMappingRepository
|
||||||
.findByProductIdAndProductTypeAndFinancialAccountTypeAndChargeId(shareProductId, PortfolioProductType.SHARES.getValue(),
|
.findProductIdAndProductTypeAndFinancialAccountTypeAndChargeId(shareProductId, PortfolioProductType.SHARES.getValue(),
|
||||||
accountMappingTypeId, chargeId);
|
accountMappingTypeId, chargeId);
|
||||||
if (chargeSpecificIncomeAccountMapping != null) {
|
if (chargeSpecificIncomeAccountMapping != null) {
|
||||||
accountMapping = chargeSpecificIncomeAccountMapping;
|
accountMapping = chargeSpecificIncomeAccountMapping;
|
||||||
|
|||||||
+3
-2
@@ -30,8 +30,9 @@ public interface ProductToGLAccountMappingRepository extends JpaRepository<Produ
|
|||||||
ProductToGLAccountMapping findByProductIdAndProductTypeAndFinancialAccountTypeAndPaymentTypeId(Long productId, int productType,
|
ProductToGLAccountMapping findByProductIdAndProductTypeAndFinancialAccountTypeAndPaymentTypeId(Long productId, int productType,
|
||||||
int financialAccountType, Long paymentType);
|
int financialAccountType, Long paymentType);
|
||||||
|
|
||||||
ProductToGLAccountMapping findByProductIdAndProductTypeAndFinancialAccountTypeAndChargeId(Long productId, int productType,
|
@Query("select mapping from ProductToGLAccountMapping mapping where mapping.productId= :productId and mapping.productType= :productType and mapping.financialAccountType= :financialAccountType and mapping.charge.id= :chargeId")
|
||||||
int financialAccountType, Long chargeId);
|
ProductToGLAccountMapping findProductIdAndProductTypeAndFinancialAccountTypeAndChargeId(@Param("productId") Long productId, @Param("productType") int productType,
|
||||||
|
@Param("financialAccountType") int financialAccountType, @Param("chargeId") Long ChargeId);
|
||||||
|
|
||||||
@Query("select mapping from ProductToGLAccountMapping mapping where mapping.productId =:productId and mapping.productType =:productType and mapping.financialAccountType=:financialAccountType and mapping.paymentType is NULL and mapping.charge is NULL")
|
@Query("select mapping from ProductToGLAccountMapping mapping where mapping.productId =:productId and mapping.productType =:productType and mapping.financialAccountType=:financialAccountType and mapping.paymentType is NULL and mapping.charge is NULL")
|
||||||
ProductToGLAccountMapping findCoreProductToFinAccountMapping(@Param("productId") Long productId, @Param("productType") int productType,
|
ProductToGLAccountMapping findCoreProductToFinAccountMapping(@Param("productId") Long productId, @Param("productType") int productType,
|
||||||
|
|||||||
Reference in New Issue
Block a user