Files
MileageTraker/Web/Views/Vehicle/VehicleCostReport.cshtml
T
2015-11-02 09:43:06 -05:00

63 lines
1.8 KiB
Plaintext

@using MileageTraker.Web.ViewModels.FuelLog
@using MileageTraker.Web.ViewModels.VehicleService
@model MileageTraker.Web.ViewModels.Vehicle.VehicleCostReport
@{
ViewBag.Title = "Vehicle Cost Report";
}
@Html.Partial("_StatusMessage")
<h2><i class="fa fa-money"></i> @ViewBag.Title</h2>
<div class="btn-toolbar clearfix">
@Html.ActionLink("Export", "ExportVehicleCostReport", new { fiscalYear = Model.FiscalYear }, new { @class = "btn" })
</div>
@Html.DisplayFor(m => m.FiscalYear)
<table class="table">
<tr>
<th>
Vehicle Id
</th>
<th>
Tag Number
</th>
<th>
Cost Type
</th>
<th>
Total Cost
</th>
</tr>
@foreach (var item in Model.CostItems)
{
<tr>
<td>
@if(item.VehicleId != null)
{
@Html.ActionLink(item.VehicleId, "Details", new {id = item.VehicleId})
}
</td>
<td>
@Html.DisplayTextFor(i => item.TagNumber)
</td>
<td>
@Html.DisplayTextFor(i => item.CostType)
</td>
<td>
$@Html.DisplayTextFor(i => item.TotalPrice)
@*<small>@Html.ActionLink("Vehicle Services", "Index", "VehicleService",
new VehicleServiceQueryViewModel{Year = Model.FiscalYear - 1, Month = 7, MonthRange = 12}, new {@class="no-print"})</small>
<small>@Html.ActionLink("Fuel Logs", "Index", "FuelLog",
new FuelLogQueryViewModel{Year = Model.FiscalYear - 1, Month = 7, MonthRange = 12}, new {@class="no-print"})</small>*@
</td>
</tr>
}
<tfoot>
<tr>
<td colspan="3" style="text-align: right"><strong>Total:</strong></td>
<td><strong>$@Html.DisplayTextFor(m => m.TotalCost)</strong></td>
</tr>
</tfoot>
</table>