Total Price => Total Cost
This commit is contained in:
@@ -11,6 +11,6 @@ namespace MileageTraker.Web.ViewModels.Vehicle
|
||||
public IList<VehicleCostItem> CostItems { get; set; }
|
||||
|
||||
[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
|
||||
</th>
|
||||
<th>
|
||||
Total Price
|
||||
Total Cost
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var item in Model.CostItems)
|
||||
@@ -57,7 +57,7 @@
|
||||
<tfoot>
|
||||
<tr>
|
||||
<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>
|
||||
</tfoot>
|
||||
</table>
|
||||
Reference in New Issue
Block a user