public IEnumerable <Return> GetSubmittedReports() { return(Returns.Where( r => r.Status == ReturnStatuses.Submitted) .OrderByDescending(r => r.AccountingDate)); }
public Return GetLatestReturn() { return(Returns .Where(r => r.Status == ReturnStatuses.Submitted) .OrderByDescending(r => r.AccountingDate) .FirstOrDefault()); }
//Returns the latest return for the specified accounting year or the latest ever if no accounting year is public Return GetReturn(int year = 0) { DateTime accountingStartDate = SectorType.GetAccountingStartDate(year); return(Returns .Where(r => r.Status == ReturnStatuses.Submitted && r.AccountingDate == accountingStartDate) .OrderByDescending(r => r.StatusDate) .FirstOrDefault()); }
//Returns the latest return for the specified accounting year or the latest ever if no accounting year is public Return GetReturn(int year) { return(Returns.Where(r => r.Status == ReturnStatuses.Submitted && r.AccountingDate.Year == year) .OrderByDescending(r => r.StatusDate) .FirstOrDefault()); }