The deposit-account-management service in Fineract-CN has support for share products, but looking through the calculation code for dividends, I've found some of the things it's doing a bit confusing. The calculation logic is contained in the InterestCalculator <https://github.com/apache/fineract-cn-deposit-account-management/blob/develop/service/src/main/java/org/apache/fineract/cn/deposit/service/internal/command/handler/InterestCalculator.java#L244-L335> class.
1. It seems the dividend rate can only be given in terms of percentage from a members share, and not as a percentage of say net profit (divided proportionally between shareholders). Is this rate intended to be calculated manually? 2. When calculating the dividend amount, the dividend rate is compounded as if it were interest compounding 12 times a year <https://github.com/apache/fineract-cn-deposit-account-management/blob/3c4326fcaa5de1e26012f74681f9a107728d60a4/service/src/main/java/org/apache/fineract/cn/deposit/service/internal/command/handler/InterestCalculator.java#L286>. The number of compounding periods is fixed to 12 and not dependent on product terms. This seems strange to me, essentially if a rate of say 20% is specified, the real rate applied would be ~21.93%. At low rates the difference is not as significant, but still don't see why this should be done. 3. Shares are part of the deposit-account-management service, and so they have in their terms a few parameters that are more applicable to savings or checking, eg. product term, interest rate, etc. As far as I could tell the only term that is actually used for share is Interest Payable, which affects how long before the due date the dividends accrue. I was wondering if anyone has used the share product or has any insight into why it works this way. Thanks in advance, Michael.
