From b0590156ad0f072ea57b1e962d1308b27901e8c0 Mon Sep 17 00:00:00 2001 From: James Kolpack Date: Thu, 25 Jun 2015 10:58:56 -0400 Subject: [PATCH] Inactive vehicles now show active if the inactive date is in the future --- Web/Controllers/VehicleController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Web/Controllers/VehicleController.cs b/Web/Controllers/VehicleController.cs index 052b0ca..55c23d8 100644 --- a/Web/Controllers/VehicleController.cs +++ b/Web/Controllers/VehicleController.cs @@ -13,7 +13,7 @@ namespace MileageTraker.Web.Controllers { public ViewResult Index(bool inactive = false) { - var vehicles = DataService.GetVehicles().Where(v => v.InactiveDate.HasValue == inactive); + var vehicles = DataService.GetVehicles().Where(v => inactive == (v.InactiveDate.HasValue && v.InactiveDate.Value < DateTime.Today.AddDays(1))); var viewModel = new VehicleResultsViewModel(vehicles, inactive); return View(viewModel); }