allow decimals: tradeAmount in mysql needs to be chagned
Cclite Alternative Currency Software
Status: Beta
Brought to you by:
hbarnard
Hi:
A friend of mine had a look at cclite code and found that the problem with CCLite not accepting decimals can be because the tradeAmount in the mysql tables is defined as integer:
tradeAmount` int(11) NOT NULL default '0'
Shouldn't it allow decimals? double, float, or whatever way/syntax is needed by mysql?
Xavi
(thanks to pingus - Giancarlo Pinerolo - for finding it)
sorry, forgot to add, that this filed is in table: om_trades
Nope, in fact nearly all financial systems uses pennies, centimes etc. etc. they then make the change when they display. Otherwise, if you store as float, you end up with unnecessary rounding on something that is naturally an integer. That is 1 euro is 100 centimes of a euro, always. I'm leaving this one open but it concerns the input and display logic not the storage. Changed also therefore to 'feature request'.