adamsaghy commented on code in PR #3752:
URL: https://github.com/apache/fineract/pull/3752#discussion_r1497649988
##########
fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformServiceImpl.java:
##########
@@ -225,49 +229,44 @@ public Map<String, Object>
fetchAccountMappingDetailsForLoanProduct(final Long l
@Override
public Map<String, Object>
fetchAccountMappingDetailsForSavingsProduct(final Long savingsProductId, final
Integer accountingType) {
- final Map<String, Object> accountMappingDetails = new
LinkedHashMap<>(8);
-
final ProductToGLAccountMappingMapper rm = new
ProductToGLAccountMappingMapper();
final String sql = "select " + rm.schema() + " and product_id = ? and
payment_type is null and mapping.charge_id is null ";
final List<Map<String, Object>> listOfProductToGLAccountMaps =
this.jdbcTemplate.query(sql, rm, // NOSONAR
new Object[] { PortfolioProductType.SAVING.getValue(),
savingsProductId });
- if (AccountingRuleType.CASH_BASED.getValue().equals(accountingType)) {
+ Map<String, Object> accountMappingDetails =
setBaseSavingsProductToGLAccountMaps(listOfProductToGLAccountMaps);
Review Comment:
Please do not reuse cash based accounting settings.
Define the mapping for Cash based and for Accrual based separately. Even if
there are common rules and accounts, still it is better to handle them and
define them differently!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]