Skip to content

Commit

Permalink
fix bug (#415)
Browse files Browse the repository at this point in the history
Co-authored-by: Lewis Renfrew <[email protected]>
  • Loading branch information
lewisrenfrew and Lewis Renfrew authored Nov 23, 2022
1 parent fe3e842 commit 3f59cd4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Domain.LinnApps/Reports/BuildsDetailReportService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ public ResultsModel GetBuildsDetailReport(
{
var table = this.databaseService.GetBuildsDetail(from, to, quantityOrValue, department, monthly, partNumbers);
var partGroups = table.Select().GroupBy(r => r[2]).ToList();
var weeks = partGroups
.Select(
g => ((DateTime)g.First().ItemArray[4])).Distinct().OrderBy(w => w).ToList();
var weeks = partGroups.SelectMany(x => x.Select(y => (DateTime)y.ItemArray[4]))
.Distinct().OrderBy(date => date).ToList();

var colHeaders = new List<string> { "Part Number" };
colHeaders.AddRange(weeks.Select(w => w.ToString("dd-MMM-yyyy")));
Expand Down

0 comments on commit 3f59cd4

Please sign in to comment.