#[non_exhaustive]pub struct SettleOutput {
pub settlement_eur: Option<Decimal>,
pub eligible_kwh: Option<Decimal>,
pub positions: Vec<SettlePosition>,
pub status: SettlementStatus,
pub pflichtzahlung_eur: Option<Decimal>,
pub pflichtzahlung_faelligkeitsdatum: Option<Date>,
pub verlaengerungsanspruch_qh: u64,
pub dezentrale_einspeisung_anspruch_verloren: bool,
pub billing_days_fraction_applied: Option<Decimal>,
pub faelligkeitsdatum: Option<Date>,
}Expand description
Output of a settlement calculation.
Default is “nothing settled”: NoData, no amount, no positions. Every
early exit in the engine builds on it with ..SettleOutput::default()
rather than restating ten fields — which is how a field added to this struct
stays correct at the twenty-eight places that return one.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.settlement_eur: Option<Decimal>Total settlement amount in EUR (sum of all positions).
None when status is NoData or PriceMissing.
Some(Decimal::ZERO) when status is Sanctioned or Eigenverbrauch.
eligible_kwh: Option<Decimal>Effective kWh used in the calculation.
- May be less than
einspeisemenge_kwhwhen KWKG hour-limit is approached. - Excludes
kwh_during_negative_epexwhen the §27 negative-price rule applies.
positions: Vec<SettlePosition>Individual billing positions that make up settlement_eur.
Empty when status is NoData, PriceMissing, Sanctioned, or Eigenverbrauch.
Multi-component models produce multiple positions:
Mieterstrom: base Vergütung + §21 Abs. 3 ZuschlagDirektvermarktung/Ausschreibung: Gleitende Marktprämie + §§53b–54 AW-AbzügeFlexibilitaet: base Vergütung + §50 Flex-Prämie- Multi-block plants (§24 Anlagenerweiterung): one position per active block
Use .to_line_item() on each position to convert to billing::LineItem
for invoice / BillingDocument generation.
status: SettlementStatusComputation outcome.
pflichtzahlung_eur: Option<Decimal>§52 EEG 2023 penalty amount owed by plant operator to NB (separate from Vergütung).
None when input.pflichtverstoss was not set.
Some(Decimal::ZERO) when there is no violation.
Positive = operator owes NB (the NB may net this against Vergütung per §52 Abs. 6).
This amount is NOT deducted from settlement_eur.
pflichtzahlung_faelligkeitsdatum: Option<Date>§52 Abs. 6 Satz 1 EEG 2023 — Fälligkeitsdatum for the §52 penalty payment.
The 15th calendar day of the month following the billing month — same
formula as faelligkeitsdatum (§26 Abs. 1), but legally distinct.
„Die Zahlungen werden zum 15. Kalendertag des Kalendermonats fällig, der auf den nach den Absätzen 2 und 4 jeweils maßgeblichen Kalendermonat folgt.“
For violations with §52 Abs. 4 extra months (Nr. 5, 7: +3m; Nr. 9: +1m; Nr. 12: +6m), the Fälligkeitsdatum is the 15th after the last relevant month. This field computes the 15th after the billing month as the base date.
None when billing_date is not set or pflichtzahlung_eur is None.
verlaengerungsanspruch_qh: u64§51a EEG 2023 — quarter-hours by which the Vergütungszeitraum is extended.
Non-zero only when input.negative_price_quarter_hours was provided AND
§51 actually reduced the Vergütung in this period.
Solar PV: ceil(lost_qh / 2) · Others: lost_qh (1:1 factor).
dezentrale_einspeisung_anspruch_verloren: bool§52 Abs. 7 EEG 2023 — whether violations cause loss of dezentrale Einspeisung entgelt.
When true, the operator loses the entitlement to the Entgelt für dezentrale Einspeisung
under §18 StromNEV for the entire calendar year in which any §52 violation occurred.
Legal basis: §52 Abs. 7 EEG 2023: „Bei Pflichtverstößen nach Absatz 1 verlieren die Anlagenbetreiber zusätzlich für das gesamte Kalenderjahr den Anspruch auf ein Entgelt für dezentrale Einspeisung nach §18 der Stromnetzentgeltverordnung.“
true when pflichtzahlung_eur.is_some_and(|p| p > 0).
The NB should also withhold the §18 StromNEV payment for this plant for the year.
billing_days_fraction_applied: Option<Decimal>§25 Abs. 1 Satz 3 EEG — billing_days_fraction that was actually applied.
The fraction applied to settlement_eur and position amounts in this settlement.
Either the value provided in SettleInput.billing_days_fraction or the
auto-computed value from billing_date, inbetriebnahme, and foerderendedatum.
None when the fraction is 1.0 (full month, no proration applied).
Some(f) when partial-month proration was applied.
Store in the settlement receipt for § 147 AO / GoBD audit trail.
faelligkeitsdatum: Option<Date>§26 Abs. 1 EEG 2023 — Fälligkeitsdatum for this period’s advance payment.
The 15th calendar day of the month following the billing month. Per §26 Abs. 1 EEG 2023: „Auf die zu erwartenden Zahlungen nach §19 Abs. 1 sind monatlich jeweils zum 15. Kalendertag für den Vormonat Abschläge in angemessenem Umfang zu leisten.“
| Billing month | Fälligkeitsdatum |
|---|---|
| June 2024 | 2024-07-15 |
| December 2024 | 2025-01-15 (year rolls over) |
| February 2025 | 2025-03-15 |
Populated when SettleInput.billing_date is provided. None otherwise.
Note: This is the statutory latest due date for monthly advance payments. The final annual settlement (Endabrechnung) falls under §26 Abs. 2, whose due date depends on the operator’s §71 data submission obligations.
Trait Implementations§
Source§impl Clone for SettleOutput
impl Clone for SettleOutput
Source§fn clone(&self) -> SettleOutput
fn clone(&self) -> SettleOutput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more