mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
change redirect after checkTransaction, update format of balance
This commit is contained in:
parent
987c820a5b
commit
2c5a20e9db
@ -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 << " <span class=\"link-title\">";
|
||||
responseStream << " <span class=\"link-title\">Kontoübersicht (";
|
||||
#line 61 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\header_navi.cpsp"
|
||||
responseStream << ( TransactionBase::amountToString(userBalance) );
|
||||
responseStream << " GDD</span>\n";
|
||||
responseStream << " GDD)</span>\n";
|
||||
responseStream << " <i class=\"mdi mdi-wallet-outline link-icon\"></i>\n";
|
||||
responseStream << " </a>\n";
|
||||
responseStream << " </li>\n";
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
<ul class="navigation-menu">
|
||||
<li>
|
||||
<a href="<%= ServerConfig::g_php_serverPath %>state-balances/overview" title="Kontoübersicht">
|
||||
<span class="link-title"><%= TransactionBase::amountToString(userBalance) %> GDD</span>
|
||||
<span class="link-title">Kontoübersicht (<%= TransactionBase::amountToString(userBalance) %> GDD)</span>
|
||||
<i class="mdi mdi-wallet-outline link-icon"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user