flyalaska Posted April 10, 2014 Report Share Posted April 10, 2014 I am running into a problem. I made a box to display the pilots total earnings. This is in layout.php. This is what I am using to display the money. <?php echo FinanceData::FormatMoney($userinfo->totalpay)?> Any idea what I am doing wrong? Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted April 10, 2014 Moderators Report Share Posted April 10, 2014 I did not know that there was such a function on phpvms. On my website, i use: <?php echo $userinfo->totalpay; ?> <?php echo MONEY_UNIT; ?> Can you check it? Quote Link to comment Share on other sites More sharing options...
flyalaska Posted April 10, 2014 Author Report Share Posted April 10, 2014 Just shows the $ sign Quote Link to comment Share on other sites More sharing options...
mseiwald Posted April 10, 2014 Report Share Posted April 10, 2014 If this is on layout.tpl/layout.php you need to use <?php echo Auth::$userinfo->totalpay; ?> Quote Link to comment Share on other sites More sharing options...
flyalaska Posted April 10, 2014 Author Report Share Posted April 10, 2014 If this is on layout.tpl/layout.php you need to use <?php echo Auth::$userinfo->totalpay; ?> That worked thank you, Do you how I can make it show with the decimal and full change? It shows 13814.1 want to show 13.814.10 Quote Link to comment Share on other sites More sharing options...
skylineVirtual Posted April 24, 2014 Report Share Posted April 24, 2014 Try to use: <?php echo round(Auth::$userinfo->totally, 2); ?> Quote Link to comment Share on other sites More sharing options...
mseiwald Posted April 24, 2014 Report Share Posted April 24, 2014 I would do it with number_format. <?php echo number_format(Auth::$userinfo->totalpay, 2, ',', '.'); ?> Quote Link to comment Share on other sites More sharing options...
mseiwald Posted April 24, 2014 Report Share Posted April 24, 2014 disregard...See Post above! Quote Link to comment Share on other sites More sharing options...
mseiwald Posted April 24, 2014 Report Share Posted April 24, 2014 disregard...See Post above! Quote Link to comment Share on other sites More sharing options...
mseiwald Posted April 24, 2014 Report Share Posted April 24, 2014 disregard...See Post above! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.