Currency symbol not displaying on currency fields in detail views

update…

for some this might be old news, but for newbies this might be good info…

I have now discovered why the CURRENCY only shows in the field label for ‘Opportunities’ and ‘Campaign’ modules. The code to do this is only included in these 2 modules.

Similar to this post; Currency symbol not showing in account panel - #6 by mikebeck

I copied modules/Opportunities/views/view.detail.php to custom/modules/your-module_name/Views/view.detail.php
Then changed the class name at line 57 to match the module name.

Then in custom/modules/your-module_name/metadata/detailviewdefs.php, I replaced the labels for each currency type field ;

array (
          0 =>
          array (
            'name' => 'price',
            'label' => '{$MOD.LBL_PRICE} ({$CURRENCY})',
            //'label' => 'LBL_PRICE',
          ),
        ),

Hey Presto the CURRENCY field labels properly formatted.

Now to see whether code can be altered to show that $ symbol in the value field rather than in the label for all currency fields in all modules in detail views.

3 Likes