Пример #1
0
 public IEnumerable <Return> GetSubmittedReports()
 {
     return(Returns.Where(
                r =>
                r.Status == ReturnStatuses.Submitted)
            .OrderByDescending(r => r.AccountingDate));
 }
Пример #2
0
 public Return GetLatestReturn()
 {
     return(Returns
            .Where(r => r.Status == ReturnStatuses.Submitted)
            .OrderByDescending(r => r.AccountingDate)
            .FirstOrDefault());
 }
Пример #3
0
        //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());
 }