Some mobile work
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Swarmops.Logic.Security;
|
||||
|
||||
namespace Swarmops.Logic.Financial
|
||||
{
|
||||
@@ -26,5 +28,37 @@ namespace Swarmops.Logic.Financial
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public string ImportHash
|
||||
{
|
||||
get
|
||||
{
|
||||
string importKey = string.Empty;
|
||||
|
||||
if (!string.IsNullOrEmpty(UniqueId))
|
||||
{
|
||||
importKey = UniqueId;
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(NotUniqueId))
|
||||
{
|
||||
string commentKey = Description.ToLowerInvariant();
|
||||
|
||||
string hashKey = NotUniqueId + commentKey + (TransactionNetCents / 100.0).ToString(CultureInfo.InvariantCulture) + (AccountBalanceCents / 100.0).ToString(CultureInfo.InvariantCulture) +
|
||||
DateTime.ToString("yyyy-MM-dd-00-00-00");
|
||||
|
||||
// the 00-00-00 used to be hh-mm-ss but is replaced this way for backward hash compatibility
|
||||
// maybe replace cleanly at a certain year to include seconds in hash or so
|
||||
|
||||
importKey = SHA1.Hash(hashKey).Replace(" ", "");
|
||||
}
|
||||
|
||||
if (importKey.Length > 30)
|
||||
{
|
||||
importKey = importKey.Substring(0, 30);
|
||||
}
|
||||
|
||||
return importKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,6 +245,11 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
|
||||
newMismatch.MasterTransactionCount = masterTransactionCount;
|
||||
newMismatch.SwarmopsDeltaCents = swarmopsDeltaCents;
|
||||
newMismatch.SwarmopsTransactionCount = 0; // TODO
|
||||
|
||||
// Load transactions from both sources
|
||||
|
||||
// Analyze actions
|
||||
|
||||
|
||||
mismatchList.Add(newMismatch);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user