Clean up reports
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
@model MileageTraker.Web.ViewModels.Vehicle.VehicleMileageViewModel
|
||||
@{
|
||||
ViewBag.Title = "Vehicle Mileage Report";
|
||||
}
|
||||
|
||||
@{ Html.RenderPartial("BackToLogs"); }
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2><i class="fa fa-road"></i> @ViewBag.Title</h2>
|
||||
|
||||
<div class="btn-toolbar clearfix">
|
||||
@Html.ActionLink("Export", "ExportMonthlyVehicleMileage", Model.Query, new { @class = "btn" })
|
||||
</div>
|
||||
|
||||
@Html.DisplayFor(m => m.Query)
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
Vehicle Id
|
||||
</th>
|
||||
<th>
|
||||
Prog
|
||||
</th>
|
||||
<th>
|
||||
Total Miles
|
||||
</th>
|
||||
<th>
|
||||
Total Gas Purchased
|
||||
</th>
|
||||
<th>
|
||||
Miles Per Gallon
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var item in Model.Items)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.ActionLink(item.VehicleId, "Details", "Vehicle", new { id = item.VehicleId }, null)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayTextFor(i => item.Prog)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayTextFor(i => item.Miles)
|
||||
<small>@Html.ActionLink("Logs", "Index", Model.Query.CloneSet(item.VehicleId), new {@class="no-print"})</small>
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayTextFor(i => item.GasPurchased)
|
||||
</td>
|
||||
<td>@(item.MilesPerGallon > 0 ? string.Format("{0:0.000}", item.MilesPerGallon) : "")</td>
|
||||
</tr>
|
||||
}
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: right"><strong>Total:</strong></td>
|
||||
<td><strong>@Html.DisplayTextFor(m => m.TotalMiles)</strong></td>
|
||||
<td><strong>@Html.DisplayTextFor(m => m.TotalGasPurchased)</strong></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
Reference in New Issue
Block a user