remove WebGUI::Utility::commify

This commit is contained in:
Graham Knop 2010-08-20 12:18:04 -05:00
parent 006a5003c2
commit 96004e50ac
4 changed files with 6 additions and 29 deletions

View file

@ -17,6 +17,7 @@ use DateTime;
use Tie::IxHash;
use WebGUI::International;
use WebGUI::Utility;
use Number::Format ();
use WebGUI::HTML;
use POSIX qw(ceil floor);
use Moose;
@ -762,8 +763,8 @@ sub view {
$hash->{'project.description.data'} = $project->{description};
$hash->{'project.startDate.data'} = $project->{startDate}?$datetime->epochToSet($project->{startDate}):$i18n->get("N_A");
$hash->{'project.endDate.data'} = $project->{endDate}?$datetime->epochToSet($project->{endDate}):$i18n->get("N_A");
$hash->{'project.cost.data.int'} = WebGUI::Utility::commify(int($project->{targetBudget}));
$hash->{'project.cost.data.float'} = WebGUI::Utility::commify($project->{targetBudget});
$hash->{'project.cost.data.int'} = Number::Format::format_number($project->{targetBudget}, 0);
$hash->{'project.cost.data.float'} = Number::Format::format_number($project->{targetBudget});
$hash->{'project.complete.data.int'} = int($project->{percentComplete});
$hash->{'project.complete.data.int'} = 100 if($hash->{'project.complete.data.int'} > 100);
$hash->{'project.complete.data.float'} = sprintf("%2.2f",$project->{percentComplete});

View file

@ -16,6 +16,7 @@ use WebGUI::Utility;
use WebGUI::Asset::Wobject;
use Finance::Quote;
use Tie::IxHash;
use Number::Format ();
use Moose;
use WebGUI::Definition::Asset;
@ -110,7 +111,7 @@ sub _appendStockVars {
$hash->{'stocks.volume.millions'} = _na(WebGUI::Utility::round(($hash->{'stocks.volume'}/1000000),2));
$hash->{'stocks.avg_vol'} = _na($data->{$symbol,"avg_vol"});
$hash->{'stocks.bid'} = _na($data->{$symbol,"bid"});
$hash->{'stocks.ask'} = _na(WebGUI::Utility::commify($data->{$symbol,"ask"}));
$hash->{'stocks.ask'} = _na(Number:Format::format_number($data->{$symbol,"ask"}));
$hash->{'stocks.close'} = _na($data->{$symbol,"close"});
$hash->{'stocks.open'} = _na($data->{$symbol,"open"});
$hash->{'stocks.day_range'} = _na($data->{$symbol,"day_range"});