Skip to main content

NneInput

Struct NneInput 

Source
pub struct NneInput {
Show 20 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 tariff_sheet_id: Option<String>, pub sparte: Sparte, pub ka_klasse: Option<KaKlasse>,
}
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_kw to the peak demand in kW.
  • Set leistungspreis_eur_per_kw to 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_kwh for Hochlast periods.
  • Set arbeitsmenge_nt_kwh + arbeitspreis_nt_ct_per_kwh for Niedertarif periods.
  • Leave arbeitsmenge_kwh / arbeitspreis_ct_per_kwh as the base fallback.

For Gas:

  • The arbeitsmenge_kwh should already be converted from m³ using brennwert × zustandszahl before being supplied here. (mako-edm MeterBillingPeriod.arbeitsmenge_kwh carries this converted value.)

Fields§

§malo_id: String

11-digit Marktlokations-ID.

§nb_mp_id: String

Invoice sender — Netzbetreiber or Gasnetzbetreiber MP-ID.

§lf_mp_id: String

Invoice recipient — Lieferant MP-ID.

§rechnungsnummer: String

Unique invoice number (operator-generated).

§period_from: Date

Start of billing period (inclusive, German local date).

§period_to: Date

End of billing period (inclusive, German local date).

§invoice_date: Date

Invoice issue date.

§due_date: Date

Payment due date (Zahlungsziel).

§arbeitsmenge_kwh: Decimal

Total 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: Decimal

Published 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).

§tariff_sheet_id: Option<String>

Optional tariff sheet identifier for audit tracing.

When set, each position’s trace.tariff_source references this sheet.

§sparte: Sparte

Commodity — drives legal references (StromNEV vs GasNEV) and SettlementType.

  • Sparte::Strom (default) → StromNEV §21 Arbeit, StromNEV §17 Leistung, SettlementType::NneStrom
  • Sparte::GasGasNEV §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.

Trait Implementations§

Source§

impl Clone for NneInput

Source§

fn clone(&self) -> NneInput

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NneInput

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.