@page
@model FakturyWeb.Pages.Faktury.IndexModel

@{
    ViewData["Title"] = "Index";
}

<h1>Index</h1>

<p>
  <a asp-page="Create">Přidat fakturu</a>
</p>
<table class="table table-striped">
  <thead>
    <tr>
      <th>
        @Html.DisplayNameFor(model => model.FAKTURA[0].CISLO)
      </th>
      <th>
        @Html.DisplayNameFor(model => model.FAKTURA[0].VYSTAVENI)
      </th>
      <th>
        @Html.DisplayNameFor(model => model.FAKTURA[0].SPLATNOST)
      </th>
      <th>
        @Html.DisplayNameFor(model => model.FAKTURA[0].O_PRAJM)
      </th>
      <th>
        Částka
      </th>
      <th>
        Zaplaceno
      </th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    @foreach (var item in Model.FAKTURA)
    {
    <tr>
      <td class="fw-bold">
        @Html.DisplayFor(modelItem => item.CISLO)
      </td>
      <td>
        @Html.DisplayFor(modelItem => item.VYSTAVENI)
      </td>
      <td>
        @Html.DisplayFor(modelItem => item.SPLATNOST)
      </td>
      <td>
        @Html.DisplayFor(modelItem => item.O_PRAJM)
      </td>
      <td>
        @Html.DisplayFor(modelItem => item.CASTKA)
      </td>
      <td>
        @Html.DisplayFor(modelItem => item.ZAPLACENO)
      </td>
      <td>
        <a asp-page="./Edit" asp-route-id="@item.ID">Edit</a> |
        <a asp-page="./Details" asp-route-id="@item.ID">Details</a> |
        <a asp-page="./Delete" asp-route-id="@item.ID">Delete</a>
      </td>
    </tr>
    }
  </tbody>
</table>
