Diffstat (limited to 'noncore/apps/checkbook/checkbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/checkbook.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/noncore/apps/checkbook/checkbook.cpp b/noncore/apps/checkbook/checkbook.cpp index 706d970..44d3764 100644 --- a/noncore/apps/checkbook/checkbook.cpp +++ b/noncore/apps/checkbook/checkbook.cpp @@ -336,2 +336,3 @@ void Checkbook::loadCheckbook() QString stramount; + QString symbol = _pCfg->getCurrencySymbol(); for ( TranInfo *tran = tranList->first(); tran; tran = tranList->next() ) @@ -343,3 +344,4 @@ void Checkbook::loadCheckbook() } - stramount.sprintf( "%s%.2f", _pCfg->getCurrencySymbol().latin1(), amount ); + stramount.sprintf( "%.2f", amount ); + stramount.prepend( symbol ); ( void ) new CBListItem( tran, tranTable, tran->getIdStr(), tran->datestr(false), tran->number(), tran->datestr(true), tran->desc(), stramount ); @@ -372,3 +374,5 @@ void Checkbook::adjustBalance() QString sRunning; + QString symbol = _pCfg->getCurrencySymbol(); float bal=info->startingBalance(); + for(CBListItem *item=(CBListItem *)tranTable->firstChild(); item; item=(CBListItem *)item->nextSibling() ) { @@ -376,3 +380,4 @@ void Checkbook::adjustBalance() bal=bal + (tran->withdrawal() ? -1 : 1)*tran->amount() - tran->fee(); - sRunning.sprintf( "%s%.2f", _pCfg->getCurrencySymbol().latin1(), bal ); + sRunning.sprintf( "%.2f", bal ); + sRunning.prepend(symbol); item->setText( COL_BAL, sRunning); @@ -484,2 +489,3 @@ void Checkbook::slotNewTran() _pCfg ); + QString symbol = _pCfg->getCurrencySymbol(); if ( QPEApplication::execDialog( currtran ) == QDialog::Accepted ) @@ -492,4 +498,5 @@ void Checkbook::slotNewTran() QString stramount; - amount = (traninfo->withdrawal() ? -1 : 1)*traninfo->amount(); - stramount.sprintf( "%s%.2f", _pCfg->getCurrencySymbol().latin1(), amount ); + amount = (traninfo->withdrawal() ? -1 : 1)*traninfo->amount(); + stramount.sprintf( "%.2f", amount ); + stramount.prepend(symbol); ( void ) new CBListItem( traninfo, tranTable, traninfo->getIdStr(), traninfo->datestr(false), @@ -543,3 +550,4 @@ void Checkbook::slotEditTran() QString stramount; - stramount.sprintf( "%s%.2f", _pCfg->getCurrencySymbol().latin1(), amount ); + stramount.sprintf( "%.2f", amount ); + stramount.prepend( _pCfg->getCurrencySymbol() ); curritem->setText( COL_AMOUNT, stramount ); |