@page @model DXApp.TemplateKitProject.Pages.Invoices.DetailsModel @{ ViewData["Title"] = "Rechnungsdetails"; string FormatFileSize(long bytes) { if (bytes < 1024) return $"{bytes} Bytes"; if (bytes < 1024 * 1024) return $"{bytes / 1024.0:N2} KB"; return $"{bytes / (1024.0 * 1024.0):N2} MB"; } }

📄 Rechnungsdetails

← Zurück zur Liste @if (!string.IsNullOrEmpty(Model.Invoice?.ResultFilePath)) { } @if (Model.Invoice is null) {
Rechnung nicht gefunden.
} else {
ID@Model.Invoice.Id
Rechnungsnummer@Model.Invoice.InvoiceNumber
Rechnungsdatum@Model.Invoice.InvoiceDate.ToString("dd.MM.yyyy")
Verkäufer@Model.Invoice.SellerName
USt-ID Verkäufer@Model.Invoice.SellerTaxId
Käufer@Model.Invoice.BuyerName
Währung@Model.Invoice.CurrencyCode
Steuerbetrag@Model.Invoice.TaxAmount.ToString("N2")
Gesamtbetrag@Model.Invoice.TotalAmount.ToString("N2")
IBAN@Model.Invoice.Iban
Quelle@Model.Invoice.SourceType
Guideline-ID@Model.Invoice.GuidelineId
Importiert am@Model.Invoice.ImportedAt.ToString("dd.MM.yyyy HH:mm")
Result-PDF @if (!string.IsNullOrEmpty(Model.Invoice.ResultFilePath)) { @Model.Invoice.ResultFilePath } else { – nicht vorhanden – }
@* Anhänge-Sektion *@ @if (Model.Invoice.Attachments.Any()) {

📎 Anhänge (@Model.Invoice.Attachments.Count)

@foreach (var attachment in Model.Invoice.Attachments) { var icon = attachment.IsZugferdXml ? "📋" : "📄"; var extension = System.IO.Path.GetExtension(attachment.OriginalFileName).ToLowerInvariant(); icon = extension switch { ".xml" => "📋", ".pdf" => "📄", ".jpg" or ".jpeg" or ".png" or ".gif" => "🖼️", ".txt" => "📝", _ => "📎" };
@icon @attachment.OriginalFileName @if (attachment.IsZugferdXml) { ZUGFeRD-XML }
Größe: @FormatFileSize(attachment.FileSizeBytes) · Extrahiert: @attachment.ExtractedAt.ToString("dd.MM.yyyy HH:mm")
Öffnen
}
} else {

📎 Anhänge

Keine Anhänge extrahiert.
} @(Html.DevExtreme().Popup() .ID("pdf-viewer-popup") .Title("PDF Viewer") .Width("90%") .Height("90%") .ShowCloseButton(true) .OnHiding("onPdfPopupHiding") .Shading(true) .ShadingColor("rgba(0, 0, 0, 0.5)") .ContentTemplate(new JS(@"function() { return ''; }")) ) @(Html.DevExtreme().Popup() .ID("attachment-viewer-popup") .Title("Anhang") .Width("90%") .Height("90%") .ShowCloseButton(true) .OnHiding("onAttachmentPopupHiding") .Shading(true) .ShadingColor("rgba(0, 0, 0, 0.5)") .ContentTemplate(new JS(@"function() { return '
'; }")) ) }