You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@fineract.apache.org by Ippez Robert <ip...@gmail.com> on 2018/03/26 12:06:11 UTC

Share Dividends wrongly calculated

I have seen some behavior with Share Account and Dividend.
I initiated a dividend payout of 100,000 to 4 clients with shares as below

*Product>>Share Product>>Share Account (product name)>>Dividends*
NameDividend Period Start DateDividend Period End DateDividend AmountStatus
Share Account 01 January 2017 31 December 2017 100,000 Dividend Approved

*Client Name*

*No. of Shares*

Asienzo

38 (approved)               1 pending approval

Mureo

40 (approved)

Drani

6 (approved)

Amatura

0

*TOTAL SHARES*

*84 (approved)               1 pending approval*

The distribution of dividend is as follow which to me is wrong.

Client NameShare AccountDividend AmountStatus
Asienzo Clara 21-00001-0 29,260.01 Dividend Initiated
Mureo Stella 21-00002-3 61,078.95 Dividend Initiated
Drani Joseph 21-00003-1 8,192.8 Dividend Initiated
Amatura Women's Group 21-00004-0 1,468.24 Dividend Initiated
*Justification*

   1. ‌Dividend per share = 100,000/84 = 1,190.48 ==> This is because there
   are 84 approved shares, the 1 pending approval doesn't get dividend.
   2. Amatura Women's Group doesn't qualify for dividend because there is
   no share purchased though they have opened a share account.
   3. To me the share distribution table should be as below:-

Client NameShare AccountDividend AmountStatus
Asienzo Clara 21-00001-0 45,238.24 Dividend Initiated
Mureo Stella 21-00002-3 47,619.2 Dividend Initiated
Skyline Technologies 21-00003-1 7,142.88 Dividend Initiated
Amatura Women's Group 21-00004-0 0 Dividend Initiated
*NB:*

   1. After dividend has been approved, there is no option for posting
   dividend both at product level and share account level. So dividend just
   remains in *approved *status(state), yet i see
   in org.apache.fineract.portfolio.shareaccounts.data.ShareAccountStatusEnumData.java
   file Line 188 a *case POSTED:* switch statement. Was this incomplete.
   This i a huge block as clients are not getting their dividend posted to the
   linked savings account.

If this can be solved, it will be of great help especially to SACCO and
other credit unions using share modules.

Thanks
Regards
Ippez Robert

Re: Share Dividends wrongly calculated

Posted by Ed Cable <ed...@mifos.org>.
Sander,

As far as I know according to the designs that the community had moved
forward with implementing it was going to be based on the following whereby
dividends would be calculated based on average share balances held by
members on date of record for the dividend:

Whereby the average share balance is calculated by the balance between the
two dates selected when initiating the dividend?

Is this not the desired behavior? If so, what is the desired behavior you'd
like to see in terms of calculation of the dividend - it would be good if
we could fully document this (the spec we have on the wiki isn't too
detailed unfortunately.).

Clearly in this case though, Robert has found a bug whereby dividends are
being allocated to an individual whose share account is still pending
approval.

Thanks Robert for creating the JIRA ticket, we'll try to get it resolved
promptly!


   -

   Calculate Dividends for Each Shareholder
   -

      Dividends must calculated based on average share account balances
      held by shareholders as of the date of record for the dividend:
      -

         The dividend calculation will be based on the following
         configurations which may be captured and stored for each
period for which
         calculations are to be done.
         -

            Calculate Dividend for members who are no longer active
            (True/False)
            -

         Minimum active period (in days/weeks/months) for member to be
         eligible for dividend (Numeric + period type)
         -

         Amount to be distributed or percentage of profits to be distributed
         -

         Dividend to be calculated based on (Daily balances, monthly
         balances etc)
         -

         Balance to be considered between (Two dates)


On Tue, Mar 27, 2018 at 12:01 AM, Ippez Robert <ip...@gmail.com>
wrote:

> @Santosh and all
> I have created a Jira ticket at https://issues.apache.org/
> jira/browse/FINERACT-608 for this.
>
> @Sander, In our setting in SACCOs, dividend calculation is based on the
> whether the account is created within financial year and below or not.
>
> Example, If we are calculating dividend for 2017, we get the total shares
> at the organisation since inception of the organisation e.g if the
> organisation started in 2003, we shall get total shares from 2003 upto 31st
> Dec 2017. Say its 360 shares.
>
> Then if the approved dividend to be given to members is 720,000, we then
> get how much each share will get i.e 720,000/360 = *2,000*
> Now that we know each share gets 2,000, this will be the multiplying
> factor for each members total share.
>
> Eg.
> *Client Name               Total Shares                  Dividend*
> Client 1                                 1
> 2,000
> Client 2                                 5
>  10,000
> Client 3                                10
> 20,000
> ....... etc
>
> *TOTAL                               360
>  720,000*
>
> Total amount given to clients should be equal to approved dividend.
>
> I think this is the logic in shares and dividend especially in SACCO
> operation and i think its the same
>
> Thanks
> Regards
> Ippez Robert
>
>
>
>
> ‌
>
> On Tue, Mar 27, 2018 at 9:11 AM, Sander van der Heyden <
> sandervanderheyden@musonisystem.com> wrote:
>
>> Just quickly chipping in with a thought: is this not related to the fact
>> that dividend calculation is done depending on how long the shares were
>> held during the period? I've seen this as well in the past and find this
>> also undesired behaviour, and not sure why it was designed this way.
>>
>> @Ed when you were working on the design together with Dayna, do you know
>> why this was done like this?
>>
>>
>>
>>
>> Sander van der Heyden
>>
>> CTO Musoni Services
>>
>>
>>
>>
>> Mobile (NL): +31 (0)6 14239505
>> Skype: s.vdheyden
>> Website: musonisystem.com
>> Follow us on Twitter!  <https://twitter.com/musonimfi>
>> Postal address: Papiermolen 10, 3994DK Houten, Netherlands
>>
>> On 27 March 2018 at 08:09, Santosh Math <sa...@confluxtechnologies.com>
>> wrote:
>>
>>> Yes Robert, I can see in the case of Amatura Women's Group. Did you raise
>>> the ticket related to this?
>>>
>>> On Tue, Mar 27, 2018 at 11:12 AM, Ippez Robert <ip...@gmail.com>
>>> wrote:
>>>
>>> > Hi Santosh,
>>> > I think it just skipped my mind that *posting of Dividend* is done by
>>> *Scheduler
>>> > Job*. I was just posting my response to that then i saw your response.
>>> >
>>> > But the major issue here left is the dividend allocation as described
>>> (by
>>> > me) early, this is very critical.  @Santosh, Were you able to
>>> reproduce the
>>> > same at your ends?.
>>> >
>>> > This has halted our posting because if we continue, wrong values will
>>> be
>>> > posted to clients savings account as dividend when job scheduler is
>>> run. We
>>> > can not proceed with dividend posting unless this is solved for us, yet
>>> > members are demanding their dividend for last year since it just
>>> remains
>>> > posting after its been approved by AGM.
>>> >
>>> >  If possible to solve such problem, upload (import dividend) from excel
>>> > template can be enhanced as part of the data import tool integration,
>>> it
>>> > will also serve better as we shall feed in exact amount as calculated
>>> > manually.
>>> > We can have both options; system distribution or importing dividend
>>> from
>>> > data import module, but urgently we would appreciate the wrong
>>> calculation
>>> > patches and then then extension of import dividend can be done
>>> > by Kumaranath Fernando (copied in).
>>> >
>>> > Thanks
>>> > Regards
>>> > Ippez Robert
>>> > ‌
>>> >
>>>
>>>
>>>
>>> --
>>> Thanks & Regards
>>>
>>> Santosh Math
>>>
>>> *QA Engineer*
>>>
>>> *Conflux Technologies Pvt Ltd <http://www.confluxtechnologies.com/>*
>>> | *Office*: +91-080-41208662 |
>>>
>>> *Address*: #304, 2nd Floor, 7th Main Road, HRBR Layout 1st Block,
>>> Bengaluru, Karnataka, 560043 INDIA
>>>
>>
>>
>
>
> --
> Ippez Roberts
> Founder/C.E.O - Swift3 Technologies (U) Ltd
> "Redefining Next Generation I/O Systems"
> P.O.Box 155, Moyo
> UGANDA.
> Tel: +256788725408 <+256%20788%20725408>/770602630
> Skype ID: ippez.robert1
> Email: ippezrobert@gmail.com
>



-- 
*Ed Cable*
President/CEO, Mifos Initiative
edcable@mifos.org | Skype: edcable | Mobile: +1.484.477.8649

*Collectively Creating a World of 3 Billion Maries | *http://mifos.org
<http://facebook.com/mifos>  <http://www.twitter.com/mifos>

Re: Share Dividends wrongly calculated

Posted by Ippez Robert <ip...@gmail.com>.
@Santosh and all
I have created a Jira ticket at
https://issues.apache.org/jira/browse/FINERACT-608 for this.

@Sander, In our setting in SACCOs, dividend calculation is based on the
whether the account is created within financial year and below or not.

Example, If we are calculating dividend for 2017, we get the total shares
at the organisation since inception of the organisation e.g if the
organisation started in 2003, we shall get total shares from 2003 upto 31st
Dec 2017. Say its 360 shares.

Then if the approved dividend to be given to members is 720,000, we then
get how much each share will get i.e 720,000/360 = *2,000*
Now that we know each share gets 2,000, this will be the multiplying factor
for each members total share.

Eg.
*Client Name               Total Shares                  Dividend*
Client 1                                 1
2,000
Client 2                                 5
 10,000
Client 3                                10
20,000
....... etc

*TOTAL                               360
 720,000*

Total amount given to clients should be equal to approved dividend.

I think this is the logic in shares and dividend especially in SACCO
operation and i think its the same

Thanks
Regards
Ippez Robert




‌

On Tue, Mar 27, 2018 at 9:11 AM, Sander van der Heyden <
sandervanderheyden@musonisystem.com> wrote:

> Just quickly chipping in with a thought: is this not related to the fact
> that dividend calculation is done depending on how long the shares were
> held during the period? I've seen this as well in the past and find this
> also undesired behaviour, and not sure why it was designed this way.
>
> @Ed when you were working on the design together with Dayna, do you know
> why this was done like this?
>
>
>
>
> Sander van der Heyden
>
> CTO Musoni Services
>
>
>
>
> Mobile (NL): +31 (0)6 14239505
> Skype: s.vdheyden
> Website: musonisystem.com
> Follow us on Twitter!  <https://twitter.com/musonimfi>
> Postal address: Papiermolen 10, 3994DK Houten, Netherlands
>
> On 27 March 2018 at 08:09, Santosh Math <sa...@confluxtechnologies.com>
> wrote:
>
>> Yes Robert, I can see in the case of Amatura Women's Group. Did you raise
>> the ticket related to this?
>>
>> On Tue, Mar 27, 2018 at 11:12 AM, Ippez Robert <ip...@gmail.com>
>> wrote:
>>
>> > Hi Santosh,
>> > I think it just skipped my mind that *posting of Dividend* is done by
>> *Scheduler
>> > Job*. I was just posting my response to that then i saw your response.
>> >
>> > But the major issue here left is the dividend allocation as described
>> (by
>> > me) early, this is very critical.  @Santosh, Were you able to reproduce
>> the
>> > same at your ends?.
>> >
>> > This has halted our posting because if we continue, wrong values will be
>> > posted to clients savings account as dividend when job scheduler is
>> run. We
>> > can not proceed with dividend posting unless this is solved for us, yet
>> > members are demanding their dividend for last year since it just remains
>> > posting after its been approved by AGM.
>> >
>> >  If possible to solve such problem, upload (import dividend) from excel
>> > template can be enhanced as part of the data import tool integration, it
>> > will also serve better as we shall feed in exact amount as calculated
>> > manually.
>> > We can have both options; system distribution or importing dividend from
>> > data import module, but urgently we would appreciate the wrong
>> calculation
>> > patches and then then extension of import dividend can be done
>> > by Kumaranath Fernando (copied in).
>> >
>> > Thanks
>> > Regards
>> > Ippez Robert
>> > ‌
>> >
>>
>>
>>
>> --
>> Thanks & Regards
>>
>> Santosh Math
>>
>> *QA Engineer*
>>
>> *Conflux Technologies Pvt Ltd <http://www.confluxtechnologies.com/>*
>> | *Office*: +91-080-41208662 |
>>
>> *Address*: #304, 2nd Floor, 7th Main Road, HRBR Layout 1st Block,
>> Bengaluru, Karnataka, 560043 INDIA
>>
>
>


-- 
Ippez Roberts
Founder/C.E.O - Swift3 Technologies (U) Ltd
"Redefining Next Generation I/O Systems"
P.O.Box 155, Moyo
UGANDA.
Tel: +256788725408/770602630
Skype ID: ippez.robert1
Email: ippezrobert@gmail.com

Re: Share Dividends wrongly calculated

Posted by Sander van der Heyden <sa...@musonisystem.com>.
Just quickly chipping in with a thought: is this not related to the fact
that dividend calculation is done depending on how long the shares were
held during the period? I've seen this as well in the past and find this
also undesired behaviour, and not sure why it was designed this way.

@Ed when you were working on the design together with Dayna, do you know
why this was done like this?




Sander van der Heyden

CTO Musoni Services




Mobile (NL): +31 (0)6 14239505
Skype: s.vdheyden
Website: musonisystem.com
Follow us on Twitter!  <https://twitter.com/musonimfi>
Postal address: Papiermolen 10, 3994DK Houten, Netherlands

On 27 March 2018 at 08:09, Santosh Math <sa...@confluxtechnologies.com>
wrote:

> Yes Robert, I can see in the case of Amatura Women's Group. Did you raise
> the ticket related to this?
>
> On Tue, Mar 27, 2018 at 11:12 AM, Ippez Robert <ip...@gmail.com>
> wrote:
>
> > Hi Santosh,
> > I think it just skipped my mind that *posting of Dividend* is done by
> *Scheduler
> > Job*. I was just posting my response to that then i saw your response.
> >
> > But the major issue here left is the dividend allocation as described (by
> > me) early, this is very critical.  @Santosh, Were you able to reproduce
> the
> > same at your ends?.
> >
> > This has halted our posting because if we continue, wrong values will be
> > posted to clients savings account as dividend when job scheduler is run.
> We
> > can not proceed with dividend posting unless this is solved for us, yet
> > members are demanding their dividend for last year since it just remains
> > posting after its been approved by AGM.
> >
> >  If possible to solve such problem, upload (import dividend) from excel
> > template can be enhanced as part of the data import tool integration, it
> > will also serve better as we shall feed in exact amount as calculated
> > manually.
> > We can have both options; system distribution or importing dividend from
> > data import module, but urgently we would appreciate the wrong
> calculation
> > patches and then then extension of import dividend can be done
> > by Kumaranath Fernando (copied in).
> >
> > Thanks
> > Regards
> > Ippez Robert
> > ‌
> >
>
>
>
> --
> Thanks & Regards
>
> Santosh Math
>
> *QA Engineer*
>
> *Conflux Technologies Pvt Ltd <http://www.confluxtechnologies.com/>*
> | *Office*: +91-080-41208662 |
>
> *Address*: #304, 2nd Floor, 7th Main Road, HRBR Layout 1st Block,
> Bengaluru, Karnataka, 560043 INDIA
>

Re: Share Dividends wrongly calculated

Posted by Santosh Math <sa...@confluxtechnologies.com>.
Yes Robert, I can see in the case of Amatura Women's Group. Did you raise
the ticket related to this?

On Tue, Mar 27, 2018 at 11:12 AM, Ippez Robert <ip...@gmail.com>
wrote:

> Hi Santosh,
> I think it just skipped my mind that *posting of Dividend* is done by *Scheduler
> Job*. I was just posting my response to that then i saw your response.
>
> But the major issue here left is the dividend allocation as described (by
> me) early, this is very critical.  @Santosh, Were you able to reproduce the
> same at your ends?.
>
> This has halted our posting because if we continue, wrong values will be
> posted to clients savings account as dividend when job scheduler is run. We
> can not proceed with dividend posting unless this is solved for us, yet
> members are demanding their dividend for last year since it just remains
> posting after its been approved by AGM.
>
>  If possible to solve such problem, upload (import dividend) from excel
> template can be enhanced as part of the data import tool integration, it
> will also serve better as we shall feed in exact amount as calculated
> manually.
> We can have both options; system distribution or importing dividend from
> data import module, but urgently we would appreciate the wrong calculation
> patches and then then extension of import dividend can be done
> by Kumaranath Fernando (copied in).
>
> Thanks
> Regards
> Ippez Robert
> ‌
>



-- 
Thanks & Regards

Santosh Math

*QA Engineer*

*Conflux Technologies Pvt Ltd <http://www.confluxtechnologies.com/>*
| *Office*: +91-080-41208662 |

*Address*: #304, 2nd Floor, 7th Main Road, HRBR Layout 1st Block,
Bengaluru, Karnataka, 560043 INDIA

Re: Share Dividends wrongly calculated

Posted by Ippez Robert <ip...@gmail.com>.
Hi Santosh,
I think it just skipped my mind that *posting of Dividend* is done by
*Scheduler
Job*. I was just posting my response to that then i saw your response.

But the major issue here left is the dividend allocation as described (by
me) early, this is very critical.  @Santosh, Were you able to reproduce the
same at your ends?.

This has halted our posting because if we continue, wrong values will be
posted to clients savings account as dividend when job scheduler is run. We
can not proceed with dividend posting unless this is solved for us, yet
members are demanding their dividend for last year since it just remains
posting after its been approved by AGM.

 If possible to solve such problem, upload (import dividend) from excel
template can be enhanced as part of the data import tool integration, it
will also serve better as we shall feed in exact amount as calculated
manually.
We can have both options; system distribution or importing dividend from
data import module, but urgently we would appreciate the wrong calculation
patches and then then extension of import dividend can be done
by Kumaranath Fernando (copied in).

Thanks
Regards
Ippez Robert
‌

Re: Share Dividends wrongly calculated

Posted by Santosh Math <sa...@confluxtechnologies.com>.
Hi Ippez,

Did you run the scheduler job  (Admin>System>Scheduler Jobs) 'Post Dividend
for  Shares'  after approval? Do you want this feature on share account
level as well?

Regards
Santosh

On Mon, Mar 26, 2018 at 7:41 PM, Ed Cable <ed...@mifos.org> wrote:

> Robert,
>
> Thanks for reporting this. I'll be certain Santosh is reproducing and
> triaging and get back to you with his finding on it.
>
> Ed
>
> On Mon, Mar 26, 2018 at 5:06 AM, Ippez Robert <ip...@gmail.com>
> wrote:
>
>> I have seen some behavior with Share Account and Dividend.
>> I initiated a dividend payout of 100,000 to 4 clients with shares as below
>>
>> *Product>>Share Product>>Share Account (product name)>>Dividends*
>> NameDividend Period Start DateDividend Period End DateDividend Amount
>> Status
>> Share Account 01 January 2017 31 December 2017 100,000 Dividend Approved
>>
>> *Client Name*
>>
>> *No. of Shares*
>>
>> Asienzo
>>
>> 38 (approved)               1 pending approval
>>
>> Mureo
>>
>> 40 (approved)
>>
>> Drani
>>
>> 6 (approved)
>>
>> Amatura
>>
>> 0
>>
>> *TOTAL SHARES*
>>
>> *84 (approved)               1 pending approval*
>>
>> The distribution of dividend is as follow which to me is wrong.
>>
>> Client NameShare AccountDividend AmountStatus
>> Asienzo Clara 21-00001-0 29,260.01 Dividend Initiated
>> Mureo Stella 21-00002-3 61,078.95 Dividend Initiated
>> Drani Joseph 21-00003-1 8,192.8 Dividend Initiated
>> Amatura Women's Group 21-00004-0 1,468.24 Dividend Initiated
>> *Justification*
>>
>>    1. ‌Dividend per share = 100,000/84 = 1,190.48 ==> This is because
>>    there are 84 approved shares, the 1 pending approval doesn't get dividend.
>>    2. Amatura Women's Group doesn't qualify for dividend because there
>>    is no share purchased though they have opened a share account.
>>    3. To me the share distribution table should be as below:-
>>
>> Client NameShare AccountDividend AmountStatus
>> Asienzo Clara 21-00001-0 45,238.24 Dividend Initiated
>> Mureo Stella 21-00002-3 47,619.2 Dividend Initiated
>> Skyline Technologies 21-00003-1 7,142.88 Dividend Initiated
>> Amatura Women's Group 21-00004-0 0 Dividend Initiated
>> *NB:*
>>
>>    1. After dividend has been approved, there is no option for posting
>>    dividend both at product level and share account level. So dividend just
>>    remains in *approved *status(state), yet i see
>>    in org.apache.fineract.portfolio.shareaccounts.data.ShareAccountStatusEnumData.java
>>    file Line 188 a *case POSTED:* switch statement. Was this incomplete.
>>    This i a huge block as clients are not getting their dividend posted to the
>>    linked savings account.
>>
>> If this can be solved, it will be of great help especially to SACCO and
>> other credit unions using share modules.
>>
>> Thanks
>> Regards
>> Ippez Robert
>>
>
>
>
> --
> *Ed Cable*
> President/CEO, Mifos Initiative
> edcable@mifos.org | Skype: edcable | Mobile: +1.484.477.8649
>
> *Collectively Creating a World of 3 Billion Maries | *http://mifos.org
> <http://facebook.com/mifos>  <http://www.twitter.com/mifos>
>
>


-- 
Thanks & Regards

Santosh Math

*QA Engineer*

*Conflux Technologies Pvt Ltd <http://www.confluxtechnologies.com/>*
| *Office*: +91-080-41208662 |

*Address*: #304, 2nd Floor, 7th Main Road, HRBR Layout 1st Block,
Bengaluru, Karnataka, 560043 INDIA

Re: Share Dividends wrongly calculated

Posted by Ed Cable <ed...@mifos.org>.
Robert,

Thanks for reporting this. I'll be certain Santosh is reproducing and
triaging and get back to you with his finding on it.

Ed

On Mon, Mar 26, 2018 at 5:06 AM, Ippez Robert <ip...@gmail.com> wrote:

> I have seen some behavior with Share Account and Dividend.
> I initiated a dividend payout of 100,000 to 4 clients with shares as below
>
> *Product>>Share Product>>Share Account (product name)>>Dividends*
> NameDividend Period Start DateDividend Period End DateDividend Amount
> Status
> Share Account 01 January 2017 31 December 2017 100,000 Dividend Approved
>
> *Client Name*
>
> *No. of Shares*
>
> Asienzo
>
> 38 (approved)               1 pending approval
>
> Mureo
>
> 40 (approved)
>
> Drani
>
> 6 (approved)
>
> Amatura
>
> 0
>
> *TOTAL SHARES*
>
> *84 (approved)               1 pending approval*
>
> The distribution of dividend is as follow which to me is wrong.
>
> Client NameShare AccountDividend AmountStatus
> Asienzo Clara 21-00001-0 29,260.01 Dividend Initiated
> Mureo Stella 21-00002-3 61,078.95 Dividend Initiated
> Drani Joseph 21-00003-1 8,192.8 Dividend Initiated
> Amatura Women's Group 21-00004-0 1,468.24 Dividend Initiated
> *Justification*
>
>    1. ‌Dividend per share = 100,000/84 = 1,190.48 ==> This is because
>    there are 84 approved shares, the 1 pending approval doesn't get dividend.
>    2. Amatura Women's Group doesn't qualify for dividend because there is
>    no share purchased though they have opened a share account.
>    3. To me the share distribution table should be as below:-
>
> Client NameShare AccountDividend AmountStatus
> Asienzo Clara 21-00001-0 45,238.24 Dividend Initiated
> Mureo Stella 21-00002-3 47,619.2 Dividend Initiated
> Skyline Technologies 21-00003-1 7,142.88 Dividend Initiated
> Amatura Women's Group 21-00004-0 0 Dividend Initiated
> *NB:*
>
>    1. After dividend has been approved, there is no option for posting
>    dividend both at product level and share account level. So dividend just
>    remains in *approved *status(state), yet i see in org.apache.fineract.
>    portfolio.shareaccounts.data.ShareAccountStatusEnumData.java file Line
>    188 a *case POSTED:* switch statement. Was this incomplete. This i a
>    huge block as clients are not getting their dividend posted to the linked
>    savings account.
>
> If this can be solved, it will be of great help especially to SACCO and
> other credit unions using share modules.
>
> Thanks
> Regards
> Ippez Robert
>



-- 
*Ed Cable*
President/CEO, Mifos Initiative
edcable@mifos.org | Skype: edcable | Mobile: +1.484.477.8649

*Collectively Creating a World of 3 Billion Maries | *http://mifos.org
<http://facebook.com/mifos>  <http://www.twitter.com/mifos>