Files
DXApp/DXApp.TemplateKitProject/Pages/Invoices/Details.cshtml
OlgunR 9adc9ac4ed Add invoice details page and grid column link
Added a "Details" column to the grid in `Index.cshtml` with a button linking to the new invoice details page. The button dynamically generates the URL using the invoice ID.

Created `Details.cshtml` to display detailed invoice information, including metadata such as seller, buyer, amounts, and dates. Added a back button and error handling for missing invoices.

Introduced `DetailsModel` in `Details.cshtml.cs` to fetch invoice data using `AppDbContext`. Implemented the `OnGetAsync` method to retrieve data asynchronously and handle cases where the invoice is not found.
2026-05-28 16:53:50 +02:00

44 lines
1.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@page
@model DXApp.TemplateKitProject.Pages.Invoices.DetailsModel
@{
ViewData["Title"] = "Rechnungsdetails";
}
<h2>📄 Rechnungsdetails</h2>
<a href="/Invoices" class="btn btn-secondary mb-3">← Zurück zur Liste</a>
@if (Model.Invoice is null)
{
<div class="alert alert-danger">Rechnung nicht gefunden.</div>
}
else
{
<table class="table table-sm table-bordered w-auto">
<tr><th>ID</th><td>@Model.Invoice.Id</td></tr>
<tr><th>Rechnungsnummer</th><td>@Model.Invoice.InvoiceNumber</td></tr>
<tr><th>Rechnungsdatum</th><td>@Model.Invoice.InvoiceDate.ToString("dd.MM.yyyy")</td></tr>
<tr><th>Verkäufer</th><td>@Model.Invoice.SellerName</td></tr>
<tr><th>USt-ID Verkäufer</th><td>@Model.Invoice.SellerTaxId</td></tr>
<tr><th>Käufer</th><td>@Model.Invoice.BuyerName</td></tr>
<tr><th>Währung</th><td>@Model.Invoice.CurrencyCode</td></tr>
<tr><th>Steuerbetrag</th><td>@Model.Invoice.TaxAmount.ToString("N2")</td></tr>
<tr><th>Gesamtbetrag</th><td><strong>@Model.Invoice.TotalAmount.ToString("N2")</strong></td></tr>
<tr><th>IBAN</th><td>@Model.Invoice.Iban</td></tr>
<tr><th>Quelle</th><td>@Model.Invoice.SourceType</td></tr>
<tr><th>Guideline-ID</th><td><code>@Model.Invoice.GuidelineId</code></td></tr>
<tr><th>Importiert am</th><td>@Model.Invoice.ImportedAt.ToString("dd.MM.yyyy HH:mm")</td></tr>
<tr>
<th>Result-PDF</th>
<td>
@if (!string.IsNullOrEmpty(Model.Invoice.ResultFilePath))
{
<small class="text-muted">@Model.Invoice.ResultFilePath</small>
}
else
{
<span class="text-muted"> nicht vorhanden </span>
}
</td>
</tr>
</table>
}