Added friendly notice on no transactions

This commit is contained in:
Rick Falkvinge
2014-10-25 13:54:36 +02:00
parent 0558bf2901
commit 19055b5b50
2 changed files with 11 additions and 0 deletions
@@ -521,6 +521,9 @@
<data name="InspectLedgers_InspectNotAvailable" xml:space="preserve">
<value>Inspecting a single transaction is not yet implemented. It is scheduled for one of the early Swarmops Red sprints, late 2005Q1.</value>
</data>
<data name="InspectLedgers_NoTransactions" xml:space="preserve">
<value>Account has no transactions in this time period.</value>
</data>
<data name="InspectLedgers_OutboundBalance" xml:space="preserve">
<value>Outbound Balance</value>
</data>
@@ -167,6 +167,14 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
runningBalance / 100.0) + "},");
}
if (rows.Count == 0)
{
// If there are no transactions in this time period, say so
result.Append("{\"description\":\"" +
JsonSanitize(Resources.Pages.Ledgers.InspectLedgers_NoTransactions) + "\"},");
}
result.Append("{" +
String.Format("\"description\":\"{0}\",\"balance\":\"{1:N0}\"", JsonSanitize(endString), runningBalance / 100.0) + "},");