add gl mapping in the saving product,current product,rd product and also add genrate account no all three

This commit is contained in:
Nitesh Yadav
2026-04-26 02:02:56 +05:30
parent efb0511725
commit 159633f59a
31 changed files with 34724 additions and 34388 deletions
@@ -36,8 +36,13 @@ public interface ProductToGLAccountMappingRepository
@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 and mapping.chargeOffReason is NULL and mapping.writeOffReason is NULL and mapping.capitalizedIncomeClassification is NULL and mapping.buydownFeeClassification is NULL")
ProductToGLAccountMapping findCoreProductToFinAccountMapping(@Param("productId") Long productId, @Param("productType") int productType,
@Param("financialAccountType") int financialAccountType);
List<ProductToGLAccountMapping> findCoreProductToFinAccountMappings(@Param("productId") Long productId,
@Param("productType") int productType, @Param("financialAccountType") int financialAccountType);
default ProductToGLAccountMapping findCoreProductToFinAccountMapping(Long productId, int productType, int financialAccountType) {
List<ProductToGLAccountMapping> results = findCoreProductToFinAccountMappings(productId, productType, financialAccountType);
return results.isEmpty() ? null : results.get(0);
}
/***
* The financial Account Type for a fund source will always be an asset (1)