Results 1 to 3 of 3

Thread: Sugar Function for currency

  1. #1
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Sugar Function for currency

    Hi,

    I think sugar have a function that will take a number as input and return it formatted as currency. i.e. 1000000.45 will be returned as 1,000,000.45

    What is this called, I can't remember and i've been looking through the sugarbean.php for it.

    Can anyone recall this?

    Rgds
    Chris
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  2. #2
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: Sugar Function for currency

    For this I am going to use the number_format function in PHP but can anyone tell me how I can shown the euro sign € in php code. I am adding mutliple fields for the DB to a single string so I want this string to include €10,000.00.

    How can this be done?

    Rgds
    Chris
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  3. #3
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: Sugar Function for currency

    Hi,

    Found the function I was looking for currency_format_number() - in Currency.php

    returns 10000 as €10,000.00

    Perfect
    Chris
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Currency format problem - Sugar 4.2.0
    By sutfra in forum Help
    Replies: 1
    Last Post: 2009-05-12, 10:30 AM
  2. import function of sugar??
    By Meyer in forum Help
    Replies: 0
    Last Post: 2009-04-03, 06:02 AM
  3. Is there any group function in Sugar?
    By tina2007 in forum Help
    Replies: 2
    Last Post: 2007-05-08, 05:42 PM
  4. Sugar search function not working
    By gmullen in forum Help
    Replies: 0
    Last Post: 2007-01-25, 06:15 PM
  5. Base Currency in Sugar
    By geoff_allan in forum General Discussion
    Replies: 9
    Last Post: 2006-05-09, 04:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •