Skip to content

Commit

Permalink
Modify spacing of section104 export
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpung committed Nov 10, 2023
1 parent b485ee5 commit b61c7b7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Model.Interfaces;
using Model.UkTaxModel;

using System.Text;

namespace Services;
Expand All @@ -24,7 +25,7 @@ public string PrintToTextFile(IEnumerable<int> yearsToExport)
IEnumerable<int> activeYears = pool.Section104HistoryList.Select(i => _taxYear.ToTaxYear(i.Date)).Distinct();
if (!activeYears.Intersect(yearsToExport).Any()) continue; // skip if no activities in selected yearsToExport
output.AppendLine($"Asset Name {pool.AssetName}");
output.AppendLine("Date\t\tNew Quantity (change)\t\tNew Value (change)");
output.AppendLine("Date\t\tNew Quantity (change)\t\tNew Value (change)\t\tContract value (for futures)");
foreach (var history in pool.Section104HistoryList)
{
output.AppendLine(history.PrintToTextFile());
Expand All @@ -40,7 +41,7 @@ public string PrintToTextFile()
foreach (var pool in _section104Pools.GetSection104s())
{
output.AppendLine($"Asset Name {pool.AssetName}");
output.AppendLine("Date\t\tNew Quantity (change)\t\tNew Value (change)");
output.AppendLine("Date\t\tNew Quantity (change)\t\tNew Value (change)\t\tContract value (for futures)");
foreach (var history in pool.Section104HistoryList)
{
output.AppendLine(history.PrintToTextFile());
Expand Down

0 comments on commit b61c7b7

Please sign in to comment.