Work on hotwallet auditing
This commit is contained in:
@@ -1401,6 +1401,15 @@ namespace Resources.Pages {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Inspect Bitcoin Hotwallet For.
|
||||
/// </summary>
|
||||
internal static string InspectLedgers_Header_Hotwallet {
|
||||
get {
|
||||
return ResourceManager.GetString("InspectLedgers_Header_Hotwallet", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Inspect.
|
||||
/// </summary>
|
||||
|
||||
@@ -1057,4 +1057,8 @@
|
||||
<value>Verify Cold Storage</value>
|
||||
<comment>This verifies that the amounts supposed to be in cold storage are indeed in cold storage</comment>
|
||||
</data>
|
||||
<data name="InspectLedgers_Header_Hotwallet" xml:space="preserve">
|
||||
<value>Inspect Bitcoin Hotwallet For</value>
|
||||
<comment>This is followed by a year and month dropdown</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -443,11 +443,11 @@
|
||||
<th data-options="field:'id',width:70,align:'right'"><asp:Label ID="Label1" runat="server" Text="ID#"/></th>
|
||||
<th data-options="field:'datetime',width:90,sortable:true"><asp:Label ID="Label2" runat="server" Text="XYZ DateTime" /></th>
|
||||
<th data-options="field:'description',width:250"><asp:Label ID="Label3" runat="server" Text="XYZ Description" /></th>
|
||||
<th data-options="field:'deltaPres',width:70,align:'right'"><asp:Label ID="Label4" runat="server" Text="XYZ Debit" /></th>
|
||||
<th data-options="field:'deltaBitcoin',width:70,align:'right'"><asp:Label ID="Label5" runat="server" Text="XYZ Credit" /></th>
|
||||
<th data-options="field:'balanceBitcoin',width:80,align:'right'"><asp:Label ID="Label6" runat="server" Text="XYZ Balance" /></th>
|
||||
<th data-options="field:'deltaPres',width:70,align:'right'"><asp:Label ID="Label4" runat="server" Text="XYZ SEK" /></th>
|
||||
<th data-options="field:'deltaBitcoin',width:70,align:'right'"><asp:Label ID="Label5" runat="server" Text="XYZ Microcoin" /></th>
|
||||
<th data-options="field:'balanceBitcoin',width:80,align:'right'"><asp:Label ID="Label6" runat="server" Text="XYZ Coin balance" /></th>
|
||||
<th data-options="field:'action',width:43,align:'center'"><asp:Label ID="Label7" runat="server" Text="XYZAct" /></th>
|
||||
</tr>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
|
||||
{
|
||||
this.DropYears.Items.Add(year.ToString(CultureInfo.InvariantCulture));
|
||||
this.DropGeneralYears.Items.Add(year.ToString(CultureInfo.InvariantCulture));
|
||||
this.DropHotwalletYears.Items.Add(year.ToString(CultureInfo.InvariantCulture));
|
||||
year--;
|
||||
}
|
||||
|
||||
@@ -48,6 +49,8 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
|
||||
monthNumber.ToString(CultureInfo.InvariantCulture))); // will autolocalize
|
||||
this.DropGeneralMonths.Items.Add(new ListItem(new DateTime(2014, monthNumber, 1).ToString("MMM"),
|
||||
monthNumber.ToString(CultureInfo.InvariantCulture))); // will autolocalize
|
||||
this.DropHotwalletMonths.Items.Add(new ListItem(new DateTime(2014, monthNumber, 1).ToString("MMM"),
|
||||
monthNumber.ToString(CultureInfo.InvariantCulture))); // will autolocalize
|
||||
}
|
||||
|
||||
this.DropMonths.Items.Add(new ListItem(Global.Global_Q1, "21"));
|
||||
@@ -64,14 +67,23 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
|
||||
this.DropGeneralMonths.Items.Add(new ListItem(Global.Global_Q4, "24"));
|
||||
this.DropGeneralMonths.Items.Add(new ListItem(Global.Global_AllYear, "31"));
|
||||
|
||||
this.DropHotwalletMonths.Items.Add(new ListItem(Global.Global_Q1, "21"));
|
||||
// quarters and all-year are coded as fake month numbers
|
||||
this.DropHotwalletMonths.Items.Add(new ListItem(Global.Global_Q2, "22"));
|
||||
this.DropHotwalletMonths.Items.Add(new ListItem(Global.Global_Q3, "23"));
|
||||
this.DropHotwalletMonths.Items.Add(new ListItem(Global.Global_Q4, "24"));
|
||||
this.DropHotwalletMonths.Items.Add(new ListItem(Global.Global_AllYear, "31"));
|
||||
|
||||
DateTime lastMonth = today.AddMonths(-1);
|
||||
|
||||
this.DropYears.SelectedValue =
|
||||
this.DropGeneralYears.SelectedValue =
|
||||
this.DropHotwalletYears.SelectedValue =
|
||||
lastMonth.Year.ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
this.DropMonths.SelectedValue =
|
||||
this.DropGeneralMonths.SelectedValue =
|
||||
this.DropHotwalletMonths.SelectedValue =
|
||||
lastMonth.Month.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
@@ -85,6 +97,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
|
||||
this.LabelHeaderInspect.Text = Resources.Pages.Ledgers.InspectLedgers_Header_Inspect;
|
||||
this.LabelHeaderInspectFor.Text = Resources.Pages.Ledgers.InspectLedgers_Header_For;
|
||||
this.LabelHeaderGeneral.Text = Resources.Pages.Ledgers.InspectLedgers_GeneralLedger;
|
||||
this.LabelHeaderHotwallet.Text = Resources.Pages.Ledgers.InspectLedgers_Header_Hotwallet;
|
||||
|
||||
this.LabelGridHeaderAction.Text = this.LabelTreeHeaderAction.Text = Global.Global_Action;
|
||||
this.LabelGridHeaderBalance.Text = this.LabelTreeHeaderBalance.Text = Global.Ledgers_Balance;
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Swarmops.Common;
|
||||
using Swarmops.Common.Enums;
|
||||
using Swarmops.Common.Interfaces;
|
||||
using Swarmops.Logic.Financial;
|
||||
@@ -23,9 +24,6 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
|
||||
int year = Int32.Parse (yearString);
|
||||
int month = Int32.Parse (monthString);
|
||||
|
||||
DateTime dawnOfMankind = new DateTime (1901, 1, 1);
|
||||
// no org will ever import bookkeeping from before this date
|
||||
|
||||
if (!CurrentAuthority.HasAccess (new Access (CurrentOrganization, AccessAspect.Bookkeeping, AccessType.Read)))
|
||||
{
|
||||
throw new UnauthorizedAccessException ("Access denied because security tokens say so");
|
||||
@@ -66,7 +64,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
|
||||
}
|
||||
|
||||
DateTime profitLossStart = new DateTime(periodStart.Year, 1, 1);
|
||||
DateTime balanceStart = dawnOfMankind;
|
||||
DateTime balanceStart = Constants.DateTimeLow;
|
||||
|
||||
FinancialAccounts accounts = FinancialAccounts.ForOrganization(CurrentOrganization);
|
||||
FinancialAccountRows rows = accounts.GetRows (periodStart, periodEnd);
|
||||
|
||||
Reference in New Issue
Block a user