I am making a report, I managed to get him to bring me the data of specific dates, but I am now needing him to bring me the sum of everything that was selected, I made an attempt but not the sum of everything, just a few things have been added.
My View:
Sales Report by Order / Period From: @ ViewBag.data Start to @ ViewBag.dataFinal
<tr>
<th>N° Carro </th>
<th>Quant. </th>
<th>Km </th>
<th>Valor Unitário </th>
<th>Sub Total </th>
<th>Data Abastecimento </th>
</tr>
@{foreach (var item in Model)
{
foreach(var iten in Model)
{
<tr>
<td> @Html.DisplayFor(modelItem => iten.NumCarro.NCarro) </td>
<td> @Html.DisplayFor(modelItem => iten.Litro) </td>
<td> @Html.DisplayFor(modelItem => iten.Km) </td>
<td> @Html.DisplayFor(modelItem => iten.VlrUnit) </td>
<td> @Html.DisplayFor(modelItem => iten.TotalGasto) </td>
<td> @Html.DisplayFor(modelItem => iten.DtAbastecido) </td>
</tr>
}
}
}
I'm not sure what to do,