pub struct NneInput {Show 24 fields
pub malo_id: String,
pub nb_mp_id: String,
pub lf_mp_id: String,
pub rechnungsnummer: String,
pub period_from: Date,
pub period_to: Date,
pub invoice_date: Date,
pub due_date: Date,
pub arbeitsmenge_kwh: Decimal,
pub arbeitspreis_ct_per_kwh: Decimal,
pub arbeitsmenge_ht_kwh: Option<Decimal>,
pub arbeitspreis_ht_ct_per_kwh: Option<Decimal>,
pub arbeitsmenge_nt_kwh: Option<Decimal>,
pub arbeitspreis_nt_ct_per_kwh: Option<Decimal>,
pub spitzenleistung_kw: Option<Decimal>,
pub leistungspreis_eur_per_kw: Option<Decimal>,
pub ka_satz_ct_per_kwh: Option<Decimal>,
pub sect14a_modul1_reduction_factor: Option<Decimal>,
pub nne_grundpreis_eur_per_month: Option<Decimal>,
pub nne_grundpreis_months: Option<u32>,
pub tariff_sheet_id: Option<String>,
pub sparte: Sparte,
pub ka_klasse: Option<KaKlasse>,
pub sect14a_modul3_intervals: Vec<Sect14aModul3Interval>,
}Expand description
Input for NNE (Netznutzungsentgelt) invoice calculation.
Covers:
- PID 31001 — NNE Strom (NB → LF, monthly network usage billing)
- PID 31005 — NNE Gas (NB → LF, monthly gas network usage billing)
For RLM (Leistungsmessung) meters:
- Set
spitzenleistung_kwto the peak demand in kW. - Set
leistungspreis_eur_per_kwto the published tariff.
For SLP meters:
- Leave both fields as
None(Arbeitspreisanteil only).
For §14a Modul 2 time-variable NNE (BNetzA BK6-22-300):
- Set
arbeitsmenge_ht_kwh+arbeitspreis_ht_ct_per_kwhfor Hochlast periods. - Set
arbeitsmenge_nt_kwh+arbeitspreis_nt_ct_per_kwhfor Niedertarif periods. - Leave
arbeitsmenge_kwh/arbeitspreis_ct_per_kwhas the base fallback.
For Gas:
- The
arbeitsmenge_kwhshould already be converted from m³ usingbrennwert × zustandszahlbefore being supplied here. (mako-edmMeterBillingPeriod.arbeitsmenge_kwhcarries this converted value.)
Fields§
§malo_id: String11-digit Marktlokations-ID.
nb_mp_id: StringInvoice sender — Netzbetreiber or Gasnetzbetreiber MP-ID.
lf_mp_id: StringInvoice recipient — Lieferant MP-ID.
rechnungsnummer: StringUnique invoice number (operator-generated).
period_from: DateStart of billing period (inclusive, German local date).
period_to: DateEnd of billing period (inclusive, German local date).
invoice_date: DateInvoice issue date.
due_date: DatePayment due date (Zahlungsziel).
arbeitsmenge_kwh: DecimalTotal energy consumption in kWh for the billing period.
For Gas: already converted from m³ (brennwert × zustandszahl × volume). Used when HT/NT split is not available (SLP, Gas, or pre-§14a deployments).
arbeitspreis_ct_per_kwh: DecimalPublished NNE Arbeitspreis in ct/kWh (from PreisblattNetznutzung).
Used as the single Arbeit rate when HT/NT split is absent.
arbeitsmenge_ht_kwh: Option<Decimal>Hochlast (HT) consumption in kWh — §14a Modul 2 periods (higher-price band).
None when ToU metering is not configured for this MaLo.
arbeitspreis_ht_ct_per_kwh: Option<Decimal>HT Arbeitspreis in ct/kWh (from PreisblattNetznutzung.zeitvariablePreispositionen).
Required when arbeitsmenge_ht_kwh is set.
arbeitsmenge_nt_kwh: Option<Decimal>Niedertarif (NT) consumption in kWh — §14a Modul 2 off-peak periods.
None when ToU metering is not configured for this MaLo.
arbeitspreis_nt_ct_per_kwh: Option<Decimal>NT Arbeitspreis in ct/kWh (from PreisblattNetznutzung.zeitvariablePreispositionen).
Required when arbeitsmenge_nt_kwh is set.
spitzenleistung_kw: Option<Decimal>Peak demand in kW (spitzenleistung_kw from MeterBillingPeriod).
None for SLP meters and Gas MaLos.
leistungspreis_eur_per_kw: Option<Decimal>Published NNE Leistungspreis in EUR/kW (from PreisblattNetznutzung).
None when spitzenleistung_kw is None.
ka_satz_ct_per_kwh: Option<Decimal>Published Konzessionsabgabe rate in ct/kWh (from PreisblattKonzessionsabgabe).
None when KA does not apply (Gas or exempt customer class).
sect14a_modul1_reduction_factor: Option<Decimal>§14a Modul 1 (BNetzA BK6-22-300): rate multiplier applied to the Arbeit positions (and Leistung if applicable) before billing.
This is the fraction of the full rate that the customer pays — a reduction
factor of 0.85 means the customer pays 85 % of the published tariff
(15 % reduction). The regulatory default per BK6-22-300 Anlage 2 is 0.85;
the NB may publish a different approved value in the PreisblattNetznutzung.
None when §14a Modul 1 does not apply to this MaLo. Must not be set
together with ToU HT/NT fields (Modul 2) — the validator rejects the
combination.
§Example
Full rate: 3.5 ct/kWh, reduction factor: 0.85 → billed rate: 2.975 ct/kWh
nne_grundpreis_eur_per_month: Option<Decimal>Gas NNE monthly base fee (Grundpreis / Verrechnungspreis) in EUR/month.
Per GasNEV, gas network charges may include a fixed monthly standing charge
in addition to the commodity-linked Arbeitspreis. Supply the approved
PreisblattNetznutzung.grundpreis_eur_per_month value here.
None for Strom NNE (Strom does not have a separate Grundpreis).
None when the Gas tariff is purely commodity-based (no Grundpreis).
nne_grundpreis_months: Option<u32>Number of months to apply the nne_grundpreis_eur_per_month to.
Defaults to None (= 0 months, no Grundpreis position generated).
Required when nne_grundpreis_eur_per_month is set.
tariff_sheet_id: Option<String>Optional tariff sheet identifier for audit tracing.
When set, each position’s trace.tariff_source references this sheet.
sparte: SparteCommodity — drives legal references (StromNEV vs GasNEV) and SettlementType.
Sparte::Strom(default) →StromNEV §21Arbeit,StromNEV §17Leistung,SettlementType::NneStromSparte::Gas→GasNEV §14,SettlementType::NneGas
ka_klasse: Option<KaKlasse>KAV rate class applied to this metering point.
Included in the calculation trace for KA positions so auditors can verify
the rate matches the correct KAV §2 tier. None when KA is absent.
sect14a_modul3_intervals: Vec<Sect14aModul3Interval>§14a Modul 3 (BNetzA BK6-22-300 Anlage 2 §3) per-dispatch-interval positions.
Each entry represents one 15-min interval during which a spot-price-linked
NNE rate applies. The caller fetches the EPEX Spot day-ahead price for each
interval and applies the formula from PreisblattNetznutzung.lastvariablePreispositionen
to derive nne_rate_ct_per_kwh. grid-billing receives pre-calculated rates —
it never queries EPEX directly.
Empty (default) when §14a Modul 3 does not apply to this MaLo.
Cannot be combined with sect14a_modul1_reduction_factor — the validator
returns InvalidInput when both are set.
Each interval generates one InvoicePosition with
kind = NneArbeitModul3 and lastvariable_preisposition_json populated.
§14a Modul 3 per-interval input data.