Percents into statistics have now minimum two digits

Package libraries into lib instead of root (package.sh)
This commit is contained in:
2010-08-20 21:33:59 +02:00
parent 5da154cd48
commit 75dfe39a03
5 changed files with 9 additions and 6 deletions

View File

@@ -493,7 +493,7 @@ void AccountPanel::UpdateStats()
for(i=0; i<user->GetCategoriesNumber()+1; i++)
{
percents = ((double) (_categoriesValues[i]*100))/totalDebit;
_statsGrid->SetCellValue(CATS_STATS+i, 1, wxString::Format(wxT("%.2lf (%d %%)"), _categoriesValues[i], (int)percents));
_statsGrid->SetCellValue(CATS_STATS+i, 1, wxString::Format(wxT("%.2lf (%02d %%)"), _categoriesValues[i], (int)percents));
}
for (i=0, accountIt=user->_accounts.begin(); accountIt!=user->_accounts.end(); accountIt++, i++)

View File

@@ -260,7 +260,7 @@ void StatsPanel::UpdateStats(int monthFrom, int yearFrom, int monthTo, int yearT
{
_categoriesValues[_categoriesIndexes[categoriesIt->first]] = categoriesIt->second;
percents = ((double) (categoriesIt->second*100))/total;
value = wxString::Format(wxT("%0.2lf (%d%%)"), categoriesIt->second, percents);
value = wxString::Format(wxT("%0.2lf (%02d%%)"), categoriesIt->second, percents);
_statsGrid->SetCellValue(_categoriesIndexes[categoriesIt->first], 1, value);
}