order statements by date
This commit is contained in:
parent
e45c36e6e3
commit
95ae8f11b3
2 changed files with 6 additions and 2 deletions
|
@ -4,6 +4,7 @@ using System.Globalization;
|
|||
using System.IO;
|
||||
using System.Text.Json;
|
||||
using System.CommandLine.DragonFruit;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using CsvHelper;
|
||||
|
||||
|
@ -54,6 +55,7 @@ namespace BunyMuny {
|
|||
switch (bank) {
|
||||
case Bank.ME:
|
||||
var value = double.Parse(csv.GetField("Debits and credits").TrimStart().Replace("$", ""));
|
||||
// SHOW PET THIS
|
||||
var ruleValues = MatchAgainstRules(rules, csv.GetField("Description"));
|
||||
|
||||
statements.Add(new Statement() {
|
||||
|
@ -79,7 +81,9 @@ namespace BunyMuny {
|
|||
}
|
||||
}
|
||||
|
||||
foreach (var statement in statements) {
|
||||
foreach (var statement in statements.
|
||||
Where(s => s.Category != null).
|
||||
OrderBy(s => s.Date)) {
|
||||
Console.WriteLine(statement);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace BunyMuny {
|
|||
public override string ToString() {
|
||||
// e.g.: Debit: $5.00 --> Lynnear Software (Personal) on Apr 2 2020
|
||||
return String.Format(
|
||||
"{0} ${1:0.##} {2} {3} ({4}) on {5:MMM d yyyy}",
|
||||
"{0} ${1:F2} {2} {3} ({4}) on {5:MMM d yyyy}",
|
||||
Value < 0 ? "Credit:" : "Debit: ",
|
||||
Math.Abs(Value),
|
||||
Value < 0 ? "-->" : "<--",
|
||||
|
|
Loading…
Reference in a new issue