Vehicle cost report
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
<li>@Html.ActionLink("Vehicles", "Index", "Vehicle")</li>
|
||||
<li>@Html.ActionLink("Vehicle Service", "Index", "VehicleService")</li>
|
||||
<li>@Html.ActionLink("Fuel Logs", "Index", "FuelLog")</li>
|
||||
<li>@Html.ActionLink("Cost Report", "VehicleCostIndex", "Vehicle")</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li id="user-nav">@Html.ActionLink("Users", "Index", "User")</li>
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
@model IList<int>
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Vehicle Cost Report";
|
||||
}
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2 id="vehicle-title"><i class="fa fa-money"></i> @ViewBag.Title</h2>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<p>
|
||||
@Html.ActionLink("FY" + item.ToString(), "VehicleCostReport", new { fiscalYear = item }, new { @class = "btn" })
|
||||
</p>
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
@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 Price
|
||||
</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.TotalPrice)</strong></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@@ -42,7 +42,7 @@
|
||||
grid.Column("InvoiceDate", "Invoice Date", item => item.InvoiceDate.ToString("d")),
|
||||
grid.Column("VehicleId", "Vehicle ID", item => Html.ActionLink((string)item.VehicleId, "DetailsPartial", "Vehicle", new { id = item.VehicleId }, new { @class = "qtip-modal" })),
|
||||
grid.Column("ServiceCenterName", "Service Center Name"),
|
||||
grid.Column("Price", "Price"),
|
||||
grid.Column("Price", "Price", @<text>@String.Format("{0:C}", item.Price)</text>),
|
||||
grid.Column("Description", "Description"),
|
||||
grid.Column(format:
|
||||
@<div class='btn-group'>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
@model IList<MileageTraker.Web.ViewModels.ServiceReminder.ServiceReminderViewModel>
|
||||
|
||||
@{
|
||||
const int showCount = 10;
|
||||
}
|
||||
<table class="table table-striped table-bordered table-hover table-condensed">
|
||||
<tr>
|
||||
<th>Vehicle ID</th>
|
||||
@@ -9,20 +12,26 @@
|
||||
<th>Description</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@foreach (var sr in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>@Html.ActionLink(sr.VehicleId, "DetailsPartial", "Vehicle", new { id = sr.VehicleId }, new { @class = "qtip-modal" })</td>
|
||||
<td>@Html.DisplayTextFor(m => sr.AssignedDriver)</td>
|
||||
<td>@Html.DisplayTextFor(m => sr.CurrentOdometer)</td>
|
||||
<td>@Html.DisplayTextFor(m => sr.TargetOdometer)
|
||||
@if (sr.IsServiceOverdue)
|
||||
{
|
||||
<span class="badge badge-warning" title="overdue @(-sr.ServiceDueInMiles) miles">!</span>
|
||||
}
|
||||
</td>
|
||||
<td>@Html.DisplayTextFor(m => sr.Description)</td>
|
||||
<td>@Html.ActionLink("Add Service", "Create", "VehicleService", new { vehicleId = sr.VehicleId }, new { @class = "btn btn-mini" })</td>
|
||||
</tr>
|
||||
}
|
||||
@foreach (var sr in Model.Take(showCount))
|
||||
{
|
||||
<tr>
|
||||
<td>@Html.ActionLink(sr.VehicleId, "DetailsPartial", "Vehicle", new {id = sr.VehicleId}, new {@class = "qtip-modal"})</td>
|
||||
<td>@Html.DisplayTextFor(m => sr.AssignedDriver)</td>
|
||||
<td>@Html.DisplayTextFor(m => sr.CurrentOdometer)</td>
|
||||
<td>@Html.DisplayTextFor(m => sr.TargetOdometer)
|
||||
@if (sr.IsServiceOverdue)
|
||||
{
|
||||
<span class="badge badge-warning" title="overdue @(-sr.ServiceDueInMiles) miles">!</span>
|
||||
}
|
||||
</td>
|
||||
<td>@Html.DisplayTextFor(m => sr.Description)</td>
|
||||
<td>@Html.ActionLink("Add Service", "Create", "VehicleService", new {vehicleId = sr.VehicleId}, new {@class = "btn btn-mini"})</td>
|
||||
</tr>
|
||||
}
|
||||
@if (Model.Count > showCount)
|
||||
{
|
||||
<tr>
|
||||
<td colspan="6">... and @(Model.Count - showCount) additional</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
Reference in New Issue
Block a user