Udai,

To be honest, I'm not sure I see any value you in limiting the number of
digits before the decimal.  I could see some value in putting in a min/max
range for amount, but not number of digits.  Even then, that's of limited
value as you can set min/max ranges on loan products.

You also don't want to set the min to two, as there are often single digit
fees, or interest payments, etc.

That said, is there any value from Mifos side (like in performance) to keep
this?  Maybe we should depreciate the config setting?

Ryan


On 2/25/10 6:02, "Udai Gupta" <mailt...@gmail.com> wrote:

> Hi Folks,
> 
> I am working on this issue http://mifosforge.jira.com/browse/MIFOS-1537.
> 
> The current implementation for this property.
>   - The default value is 7 and its hardcoded because this was the
> limit in the database.
>   - One can override 7 by using AccountingRules.DigitsBeforeDecimal in
> configuration file.
>   - This property is not documented, I am not sure if someone is using
> it for a value like 6 or 5
>   - It allow more than 7 too which can cause data overflow for amount
> fields in database
>   - May be it wasn't documented because we didn't wanted to allow user
> to use it for a value more than 7.
> 
> Now we have increased the database limit to be able to store up to 17
> digits before decimal for amount.
> 
> There are 3 ways I can think of,
> 
> 1) Keep the same code, have the hardcoded default 7 and let the user
> will be able to set more than 7 using
> AccountingRules.DigitsBeforeDecimal
> applicationConfiguration.custom.properties behind the curtain. (This
> would require no change)
> 2) Move the hardcoded 7 to applicationConfiguration.default.properties
> and document the use of this property.
> 3) Remove the AccountingRules.DigitsBeforeDecimal and the ability to
> configured it behind the curtain and make it hardcoded value like 14.
> this will change the current behavior of users seeing error on
> entering amount of more than 7 digits.
> 
> I can think of a validation for 1 and 2. where we hardcode Max and the
> Min value for this property and throw an exception for "out of bound"
> values. The question here is what should be the max and min here. My
> thought is max should be 14 and min should be 2. Although we can store
> up to 17 in database I think its better to use a lower value because
> for totals allowing 17 could make the totals overflow which are using
> same data limit.
> 
> I am in favor of approach 2,
> 
> Thoughts/ Comment/ Vote/ Questions ?
> 
> Udai
> 
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Mifos-users mailing list
> Mifos-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mifos-users

-- 
Ryan Whitney  
Mifos Technical Program Manager
rwhit...@grameenfoundation.org
Mifos - Technology that Empowers Microfinance (www.mifos.org)
Our mission is to enable the poor, especially the poorest, to create a world
without poverty.  
<http://grameenfoundation.org/take-action/ingenuity-fund-challenge/>
P please consider the environment before printing this e-mail.


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mifos-users mailing list
Mifos-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mifos-users

Reply via email to