97 lines
5.0 KiB
Plaintext
97 lines
5.0 KiB
Plaintext
@page "/finance-cockpit/vergleich"
|
|
@using TrafagSalesExporter.Models
|
|
@using TrafagSalesExporter.Services
|
|
@inject IFinanceReconciliationService FinanceReconciliationService
|
|
@inject IUiTextService UiText
|
|
|
|
<PageTitle>@T("Soll/Ist Vergleich", "Actual/reference comparison")</PageTitle>
|
|
|
|
<MudText Typo="Typo.h4" Class="mb-4">@T("Soll/Ist Vergleich", "Actual/reference comparison")</MudText>
|
|
|
|
<MudPaper Class="pa-4 mb-4" Elevation="1">
|
|
<MudStack Row AlignItems="AlignItems.Center" Class="mb-3">
|
|
<div>
|
|
<MudText Typo="Typo.h6">@T("Net Sales Actuals 2025 Referenz", "Net sales actuals 2025 reference")</MudText>
|
|
<MudText Typo="Typo.caption">check.xlsx / Power BI Stand 29.04.2026</MudText>
|
|
</div>
|
|
<MudSpacer />
|
|
<MudButton Variant="Variant.Outlined" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Refresh"
|
|
OnClick="LoadAsync" Disabled="_loading">
|
|
@(_loading ? T("Lade...", "Loading...") : T("Aktualisieren", "Refresh"))
|
|
</MudButton>
|
|
</MudStack>
|
|
|
|
<MudTable Items="_netSalesReferenceRows" Dense Hover Striped Loading="_loading">
|
|
<HeaderContent>
|
|
<MudTh>@T("Firma", "Company")</MudTh>
|
|
<MudTh>@T("Ist 2025", "Actual 2025")</MudTh>
|
|
<MudTh>@T("IC-Abzug", "IC deduction")</MudTh>
|
|
<MudTh>@T("Ist exkl. IC", "Actual excl. IC")</MudTh>
|
|
<MudTh>@T("Referenz", "Reference")</MudTh>
|
|
<MudTh>@T("Summenfeld", "Value field")</MudTh>
|
|
<MudTh>@T("Quelle", "Source")</MudTh>
|
|
<MudTh>@T("Differenz", "Difference")</MudTh>
|
|
<MudTh>@T("Diff exkl. IC", "Diff excl. IC")</MudTh>
|
|
<MudTh>@T("Waehrung", "Currency")</MudTh>
|
|
<MudTh>@T("Zeilen", "Rows")</MudTh>
|
|
<MudTh>@T("Status", "Status")</MudTh>
|
|
</HeaderContent>
|
|
<RowTemplate>
|
|
<MudTd>@context.Label</MudTd>
|
|
<MudTd>@FormatAmount(context.ActualValue)</MudTd>
|
|
<MudTd>@FormatAmount(context.IntercompanyDeduction)</MudTd>
|
|
<MudTd>@FormatAmount(context.ActualValueExcludingIntercompany)</MudTd>
|
|
<MudTd>@FormatAmount(context.ReferenceValue)</MudTd>
|
|
<MudTd>@(string.IsNullOrWhiteSpace(context.ValueField) ? "-" : context.ValueField)</MudTd>
|
|
<MudTd>@context.ReferenceSource</MudTd>
|
|
<MudTd>@FormatAmount(context.Difference)</MudTd>
|
|
<MudTd>@FormatAmount(context.DifferenceExcludingIntercompany)</MudTd>
|
|
<MudTd>@(string.IsNullOrWhiteSpace(context.Currencies) ? "-" : context.Currencies)</MudTd>
|
|
<MudTd>@(context.RowCount > 0 ? context.RowCount.ToString("N0") : "-")</MudTd>
|
|
<MudTd>
|
|
@if (context.Status == "OK")
|
|
{
|
|
<MudChip T="string" Size="Size.Small" Color="Color.Success" Variant="Variant.Filled">OK</MudChip>
|
|
}
|
|
else if (context.Status == "Pruefen")
|
|
{
|
|
<MudChip T="string" Size="Size.Small" Color="Color.Warning" Variant="Variant.Filled">@T("Pruefen", "Check")</MudChip>
|
|
}
|
|
else
|
|
{
|
|
<MudChip T="string" Size="Size.Small" Color="Color.Default" Variant="Variant.Outlined">@T("Keine Daten", "No data")</MudChip>
|
|
}
|
|
</MudTd>
|
|
</RowTemplate>
|
|
<NoRecordsContent>
|
|
<MudText Typo="Typo.caption">@T("Keine Referenzdaten fuer aktive Standorte gefunden.", "No reference data found for active sites.")</MudText>
|
|
</NoRecordsContent>
|
|
</MudTable>
|
|
|
|
<MudAlert Severity="Severity.Info" Dense Variant="Variant.Outlined" Class="mt-3">
|
|
@T("Vergleich: Jahr 2025 aus Buchungsdatum, sonst Invoice Date, sonst Extraction Date. Das Summenfeld wird automatisch aus Sales Price/Value, DocTotalFC - VatSumFC oder DocTotal - VatSum gewaehlt; Belegkopfwerte werden pro DocEntry nur einmal gezaehlt. IC-Abzug ist eine Diagnose fuer den aktuellen Abgleich und veraendert die Originaldaten nicht.", "Comparison: year 2025 from posting date, otherwise invoice date, otherwise extraction date. The value field is selected automatically from Sales Price/Value, DocTotalFC - VatSumFC, or DocTotal - VatSum; document header values are counted only once per DocEntry. IC deduction is a diagnostic value for the current reconciliation and does not change the original data.")
|
|
</MudAlert>
|
|
</MudPaper>
|
|
|
|
@code {
|
|
private List<NetSalesReferenceRow> _netSalesReferenceRows = new();
|
|
private bool _loading = true;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
await LoadAsync();
|
|
}
|
|
|
|
private async Task LoadAsync()
|
|
{
|
|
_loading = true;
|
|
_netSalesReferenceRows = await FinanceReconciliationService.BuildNetSalesReferenceRowsAsync(2025);
|
|
_loading = false;
|
|
}
|
|
|
|
private static string FormatAmount(decimal? value)
|
|
=> value.HasValue ? value.Value.ToString("N2") : "-";
|
|
|
|
private string T(string german, string english) => UiText.Text(german, english);
|
|
}
|