AccountingNext/Schaad.Accounting.UI/Components/Pages/Dialogs/ElectricityBillDialog.razor
Claudio Schaad ca4a67f20a Remove Akonto and Saldo from the electricity bills
Drop the advance payment (AdvanceChf) and the computed Balance from
ElectricityBill, the Strom list, the edit dialog and the help image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 19:33:52 +01:00

64 lines
2.8 KiB
Text

@implements IDialogContentComponent<Schaad.Accounting.Models.ElectricityBill>
@rendermode InteractiveServer
<FluentDialogHeader ShowDismiss="true">
<FluentStack VerticalAlignment="VerticalAlignment.Center">
<FluentIcon Value="@(new Icons.Regular.Size24.WindowApps())" />
<FluentLabel Typo="Typography.PaneHeader">
@Dialog.Instance.Parameters.Title
</FluentLabel>
</FluentStack>
</FluentDialogHeader>
<FluentDialogBody>
<EditForm EditContext="@editContext">
<DataAnnotationsValidator />
<FluentStack Orientation="Orientation.Horizontal">
<FluentDatePicker @bind-Value="@periodFrom" Label="Von" Style="width: 170px;" />
<FluentDatePicker @bind-Value="@periodTo" Label="Bis" Style="width: 170px;" />
</FluentStack>
<FluentStack Orientation="Orientation.Horizontal">
<FluentNumberField @bind-Value="@Content.GridKwh" Label="Netzbezug (kWh)" Style="width: 170px;" />
<FluentNumberField @bind-Value="@Content.PvKwh" Label="PV-Produktion (kWh)" Style="width: 170px;" />
</FluentStack>
<FluentStack Orientation="Orientation.Horizontal">
<FluentNumberField @bind-Value="@Content.GridChf" Label="Netzbezug (CHF)" Style="width: 170px;" />
<FluentNumberField @bind-Value="@Content.PvChf" Label="PV (CHF)" Style="width: 170px;" />
</FluentStack>
<FluentStack Orientation="Orientation.Horizontal">
<FluentNumberField @bind-Value="@Content.SideCostsChf" Label="Nebenkosten (CHF)" Style="width: 170px;" />
</FluentStack>
<div>
<FluentValidationSummary />
</div>
</EditForm>
<div style="margin-top: 12px; font-size: 13px; color: #52514e;">
Total <strong>@Chf(Content.TotalChf)</strong>
</div>
<FluentButton Appearance="Appearance.Lightweight" Style="margin-top: 12px; padding: 0; font-size: 13px;" OnClick="ShowGuideAsync">
Woher kommen die Werte? (NeoVac-Abrechnung)
</FluentButton>
</FluentDialogBody>
<FluentDialogFooter>
<FluentButton Appearance="Appearance.Neutral"
OnClick="@CancelAsync">
Abbrechen
</FluentButton>
<FluentButton Appearance="Appearance.Accent"
Disabled="@(periodFrom is null || periodTo is null)"
OnClick="@SaveAsync">
Speichern
</FluentButton>
</FluentDialogFooter>
@code {
// Shown in its own dialog (see ShowGuideAsync) instead of expanding inline: this dialog has a
// fixed Height, and FluentDialogBody doesn't resize to fit growing content.
private RenderFragment GuideImage =>
@<img src="/images/electricity-bill-guide.svg"
alt="Beispiel-Abrechnung mit Markierungen, welcher Wert in welches Feld gehört"
style="width: 100%; height: auto; display: block;" />;
}