Results 1 to 6 of 6

Thread: amount_usdollor

  1. #1
    adamlee is offline Member
    Join Date
    Dec 2007
    Posts
    7

    Default amount_usdollor

    Hi, I have a qeustion on default currency in SugarCRM.

    Although I have changed the default currency to MYR, but i noticed that the there is a field in Oppportunities module showed as amount_usdollar when i export out Opportunities list. I know it's the field name in Opportunites table.

    How can I change the field name to my default currency which i would like it to show as amount_MYR?

    Thank you.

  2. #2
    heta's Avatar
    heta is offline Sugar Community Member
    Join Date
    Nov 2007
    Location
    Ahmedabad,India
    Posts
    214

    Default Re: amount_usdollor

    hi adamlee,

    did u changed defualt currency from admin->locale settings?
    Best Regards
    ---------------------------------------
    Heta Shah - iNET PROCESS
    heta.shah@inetprocess.com
    http://www.inetprocess.co.in
    Projects :
    iNETDocs -Project of the month(Dec-2008)
    iNETGoogleMap

  3. #3
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: amount_usdollor

    The field amount_usdollar always contains the amount value in your default currency - even if it is not US$.

    So in Europe amount_usdollar contains the value of opportunities in Euro.

    Names are nothing but smoke and mirrors...

    So just rename the LABELs of the field amaount_usdollar.
    This can be done by 3 lines in the language files in /custom/modules/Opportunies/language/

    $mod_strings['UPDATE_DOLLARAMOUNTS'] = 'Update MYR Amounts';
    $mod_strings['UPDATE_DOLLARAMOUNTS_TXT'] = 'Update the MYRamounts for opportunities based on the current set currency rates. This value is used to calculate Graphs and List View Currency Amounts.';
    $mod_strings['LBL_AMOUNT'] = 'Amount (MYR):';

  4. #4
    adamlee is offline Member
    Join Date
    Dec 2007
    Posts
    7

    Default Re: amount_usdollor

    Hi Kuske,

    Thank you so much for your reply. I understand your explaination and solution and where it affected.
    The changes seem applied only on the field lable on the screen, but my problem now is when i export the opportunties records out, the header/field in the excel file still showing "amount_usdollar", which confusing people. So how can i make the changes so that it will also apply to the export in excel? Please refer to my attachment.

    Really appreciate your help and solution.
    I really need to solve this problem.

    Thank you.


    Quote Originally Posted by kuske
    The field amount_usdollar always contains the amount value in your default currency - even if it is not US$.

    So in Europe amount_usdollar contains the value of opportunities in Euro.

    Names are nothing but smoke and mirrors...

    So just rename the LABELs of the field amaount_usdollar.
    This can be done by 3 lines in the language files in /custom/modules/Opportunies/language/

    $mod_strings['UPDATE_DOLLARAMOUNTS'] = 'Update MYR Amounts';
    $mod_strings['UPDATE_DOLLARAMOUNTS_TXT'] = 'Update the MYRamounts for opportunities based on the current set currency rates. This value is used to calculate Graphs and List View Currency Amounts.';
    $mod_strings['LBL_AMOUNT'] = 'Amount (MYR):';
    Attached Images Attached Images  
    Last edited by adamlee; 2008-06-16 at 08:20 AM.

  5. #5
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: amount_usdollor

    In /include/export_utils.php there is a unused feature

    At the beginning of function export you can find two array definitions for $contact_fields and $account_fields.
    Just create a third one like this:

    PHP Code:
     * * * 
       
    $opportunity_fields = array(
          
    "id"=>"Opportunity ID",
          
    "name"=>"Opportunity Name",
          
    "amount_usdollar"=>"Amount EUR",
          
    "description"=>"Description"
       
    );
     
    $focus 0;
     
    $content '';
    * * * 
    Then go to the end of the function export and insert after the line
    $fields_array = $db->getFieldsArray($result);

    the following code:

    PHP Code:
       if ($bean == "Opportunity")
       {
          foreach (
    $fields_array as $key => $value
          {
             if (isset(
    $opportunity_fields[$value]))
             {
                
    $fields_array[$key] = $opportunity_fields[$value];
             }
          }
       } 
    This patch is not upgrade safe, but it works fine.

    You can do the same for accounts and contacts...

  6. #6
    adamlee is offline Member
    Join Date
    Dec 2007
    Posts
    7

    Default Re: amount_usdollor

    Dear Kuske,

    Thank you so much for your help.
    You are the expert and master, :-)
    As I'm just the beginner in Joomla and PHP, I really appreciate your help, and hope that I can learn from you.

Thread Information

Users Browsing this Thread

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

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
  •