diff --git a/src/cpp/HTTPInterface/CheckTransactionPage.cpp b/src/cpp/HTTPInterface/CheckTransactionPage.cpp index f639dde46..c20742fe7 100644 --- a/src/cpp/HTTPInterface/CheckTransactionPage.cpp +++ b/src/cpp/HTTPInterface/CheckTransactionPage.cpp @@ -69,7 +69,7 @@ void CheckTransactionPage::handleRequest(Poco::Net::HTTPServerRequest& request, size_t notReadyTransactions = 0; size_t sumTransactions = mSession->getProcessingTransactionCount(); if(sumTransactions == 0) { - response.redirect(ServerConfig::g_php_serverPath); + response.redirect(ServerConfig::g_php_serverPath + "state-balances/overview"); return; } auto processingTransaction = mSession->getNextReadyTransaction(¬ReadyTransactions); @@ -175,10 +175,10 @@ void CheckTransactionPage::handleRequest(Poco::Net::HTTPServerRequest& request, #line 60 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\header_navi.cpsp" responseStream << ( ServerConfig::g_php_serverPath ); responseStream << "state-balances/overview\" title=\"Kontoübersicht\">\n"; - responseStream << " "; + responseStream << " Kontoübersicht ("; #line 61 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\header_navi.cpsp" responseStream << ( TransactionBase::amountToString(userBalance) ); - responseStream << " GDD\n"; + responseStream << " GDD)\n"; responseStream << " \n"; responseStream << " \n"; responseStream << " \n"; diff --git a/src/cpp/model/TransactionBase.cpp b/src/cpp/model/TransactionBase.cpp index 665f38f80..820cfcd6f 100644 --- a/src/cpp/model/TransactionBase.cpp +++ b/src/cpp/model/TransactionBase.cpp @@ -13,5 +13,13 @@ std::string TransactionBase::amountToString(google::protobuf::int64 amount) std::stringstream ss; double dAmount = amount / 10000.0; ss << std::fixed << std::setprecision(2) << dAmount; - return ss.str(); + std::string amountString = ss.str(); + if (amountString.find('.') != amountString.npos) { + int pointPlace = amountString.find('.'); + if (amountString.substr(pointPlace+1) == "00") { + amountString = amountString.substr(0, pointPlace); + } + } + return amountString; + //return ss.str(); } diff --git a/src/cpsp/checkTransaction.cpsp b/src/cpsp/checkTransaction.cpsp index cefea3a34..4dc6e3b47 100644 --- a/src/cpsp/checkTransaction.cpsp +++ b/src/cpsp/checkTransaction.cpsp @@ -47,7 +47,7 @@ enum PageState { size_t notReadyTransactions = 0; size_t sumTransactions = mSession->getProcessingTransactionCount(); if(sumTransactions == 0) { - response.redirect(ServerConfig::g_php_serverPath); + response.redirect(ServerConfig::g_php_serverPath + "state-balances/overview"); return; } auto processingTransaction = mSession->getNextReadyTransaction(¬ReadyTransactions); diff --git a/src/cpsp/header_navi.cpsp b/src/cpsp/header_navi.cpsp index f7d98d871..b34d65cf3 100644 --- a/src/cpsp/header_navi.cpsp +++ b/src/cpsp/header_navi.cpsp @@ -58,7 +58,7 @@