setting 8 decimal places in currency

Discussion in 'Modding/Theme Help' started by rossc, Nov 15, 2016.

  1. rossc

    rossc New Member

    Joined:
    Oct 18, 2014
    Messages:
    8
    Likes Received:
    2
    Hi I'm trying to set 8 decimal places to try to use alt coins. I have it set in currency settings to 8 places and db entries all set to decimal 16,8. When I try to post item it gives error " incorrect money format" I previously accomplished this a few years ago and then lost interest. Now I cant remember for the life of me how I done it. Anyone any ideas?
     
  2. rossc

    rossc New Member

    Joined:
    Oct 18, 2014
    Messages:
    8
    Likes Received:
    2
    Got it. Edit CheckMoney in functions_global to 0,8
     
  3. John Ward

    John Ward New Member

    Joined:
    May 3, 2018
    Messages:
    1
    Likes Received:
    0
    I found the CheckMoney in functions_global as shown below.
    Do I need to change all the '3's to 'x' or just the {0,3} to {0,x} ?
    Do I still need to change the database values to (16,x) ?
    If so do you know the names of the actual tables/fields that require changing.

    I'm far from a programmer.....just trying to make this application work for me.....any help would be greatly appreciated.

    function CheckMoney($amount)
    {
    if ($this->SETTINGS['moneyformat'] == 1)
    {
    if (!preg_match('#^([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(\.[0-9]{0,3})?$#', $amount))
    return false;
    }
    else
    {
    if (!preg_match('#^([0-9]+|[0-9]{1,3}(\.[0-9]{3})*)(,[0-9]{0,3})?$#', $amount))
    return false;
    }
    return true;
     
  4. nay27uk

    nay27uk Super Moderator Staff Member

    Joined:
    Nov 24, 2009
    Messages:
    5,573
    Likes Received:
    549
    Try getting to know the admin area of webid you can set the decimal place amount right from the WeBid Admin as far as I remember
     
  5. Box Lot

    Box Lot Super Moderator Staff Member Developer

    Joined:
    Dec 18, 2008
    Messages:
    2,622
    Likes Received:
    167
    SQL changes if not in Admin..

    In your case 16,8 is correct.

    I forget the fields but remember there are a couple/few to change. I suspect you missed one/two initially.
     

Share This Page