pub struct MmmInput {
pub malo_id: String,
pub nb_mp_id: String,
pub lf_mp_id: String,
pub period: SettlementPeriod,
pub sparte: Sparte,
pub actual_kwh: Decimal,
pub profil_kwh: Decimal,
pub mehr_preis_ct_per_kwh: Decimal,
pub minder_preis_ct_per_kwh: Decimal,
pub wiederverkaeufer: Wiederverkaeuferstatus,
pub selbstausgestellt: bool,
}Expand description
Input for Mehr-/Mindermengen (MMM) settlement invoice calculation.
Covers:
- PID 31005 — MMM-Rechnung used for Mehr-/Mindermengen settlement between NB and LF (Strom and Gas).
Mehr-/Mindermengen settle the difference between the LF’s forecast profile (SLP standard load profile) and the actual measured consumption.
- Mehrmengen (positive deviation): actual > profil → LF owes NB
- Mindermengen (negative deviation): actual < profil → NB owes LF
The settlement amount is the algebraic sum of both positions. It can be negative (i.e. a credit note from NB to LF) when Mindermengen dominate.
Fields§
§malo_id: String11-digit Marktlokations-ID.
nb_mp_id: StringInvoice sender — Netzbetreiber MP-ID.
lf_mp_id: StringInvoice recipient — Lieferant MP-ID.
period: SettlementPeriodThe delivery period being settled.
sparte: SparteCommodity — determines which Festlegung the legal references cite.
Sparte::Strom→GPKE (BK6-24-174) Teil 1 Kap. 8.4,GPKE BK6-22-024Sparte::Gas→GaBi Gas 2.1 (BK7-24-01-008),GeLi Gas 3.0 (BK7-24-01-009)
actual_kwh: DecimalActual measured consumption in kWh (from MSCONS / MeterBillingPeriod).
profil_kwh: DecimalStandard load profile (SLP) forecast consumption in kWh.
mehr_preis_ct_per_kwh: DecimalMehrmengen price in ct/kWh (from PreisblattNetznutzung MMM position).
minder_preis_ct_per_kwh: DecimalMindermengen price in ct/kWh (from PreisblattNetznutzung MMM position).
wiederverkaeufer: WiederverkaeuferstatusWho holds §3g Wiederverkäufer status, evidenced by a USt 1 TH.
A Mehr-/Mindermenge is a Lieferung of electricity or gas, not a
network service, so §13b Abs. 2 Nr. 5 Buchst. b UStG can shift the tax to
the recipient. The condition differs by Sparte — electricity needs both
parties, gas needs the recipient — which is why this is a status rather
than a reverse_charge: bool the caller has to reason out.
selbstausgestellt: boolThe receiving party issues this invoice itself (Gutschriftverfahren).
PID 31006 (Strom) / 31008 (Gas) is the Mehrmenge leg written by the
party that would otherwise receive it, which the AHB marks as
Selbstausgestellt rather than Handelsrechnung. That distinction is
on the wire (IMD+7081 and the Rechnungsart), so it has to come from
the settlement rather than be stamped on the document afterwards:
labelling an ordinary SettlementType::MmmStrom with PID 31006
produces a message that states Handelsrechnung under a
Selbstausstellung Prüfidentifikator.