Total Price => Total Cost
This commit is contained in:
@@ -11,6 +11,6 @@ namespace MileageTraker.Web.ViewModels.Vehicle
|
|||||||
public IList<VehicleCostItem> CostItems { get; set; }
|
public IList<VehicleCostItem> CostItems { get; set; }
|
||||||
|
|
||||||
[Currency]
|
[Currency]
|
||||||
public decimal TotalPrice { get { return CostItems.Sum(i => i.TotalPrice); } }
|
public decimal TotalCost { get { return CostItems.Sum(i => i.TotalPrice); } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
Cost Type
|
Cost Type
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
Total Price
|
Total Cost
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
@foreach (var item in Model.CostItems)
|
@foreach (var item in Model.CostItems)
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" style="text-align: right"><strong>Total:</strong></td>
|
<td colspan="3" style="text-align: right"><strong>Total:</strong></td>
|
||||||
<td><strong>$@Html.DisplayTextFor(m => m.TotalPrice)</strong></td>
|
<td><strong>$@Html.DisplayTextFor(m => m.TotalCost)</strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
Reference in New Issue
Block a user