Menu

#1 allow decimals: tradeAmount in mysql needs to be chagned

open
nobody
None
4
2010-08-23
2010-08-12
No

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)

Discussion

  • Xavier de Pedro

    Xavier de Pedro - 2010-08-12

    sorry, forgot to add, that this filed is in table: om_trades

     
  • Hugh Barnard

    Hugh Barnard - 2010-08-23

    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'.

     
  • Hugh Barnard

    Hugh Barnard - 2010-08-23
    • priority: 5 --> 4
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.