pub type GridInvoice = GridSettlement;Expand description
Backward-compatible alias so callers using the old name continue to compile.
GridInvoice was the original output type. New code should use GridSettlement
which carries full calculation traces, legal references, and settlement metadata.
Aliased Type§
pub struct GridInvoice {Show 14 fields
pub pid: u32,
pub settlement_type: SettlementType,
pub status: SettlementStatus,
pub rechnungsnummer: String,
pub correction_of: Option<String>,
pub invoice_date: Date,
pub due_date: Date,
pub period_from: Date,
pub period_to: Date,
pub nb_mp_id: String,
pub counterparty_mp_id: String,
pub positions: Vec<InvoicePosition>,
pub total_eur: Decimal,
pub warnings: Vec<SettlementWarning>,
}Fields§
§pid: u32BDEW Prüfidentifikator — caller may override after construction.
settlement_type: SettlementTypeSettlement type.
status: SettlementStatusLifecycle status.
rechnungsnummer: StringUnique invoice reference number.
correction_of: Option<String>If this is a correction, the rechnungsnummer of the original settlement.
invoice_date: DateInvoice issue date.
due_date: DatePayment due date (Zahlungsziel, §271 BGB).
period_from: DateStart of billing period (inclusive).
period_to: DateEnd of billing period (inclusive).
nb_mp_id: StringSender MP-ID — Netzbetreiber (or MSB for PID 31009).
counterparty_mp_id: StringRecipient MP-ID — Lieferant (NNE/MMM), MSB (PID 31009), or MGV (GaBi Gas).
Maps to rechnungsempfaenger in the BO4E Rechnung built by the service layer.
Previously omitted, causing service-layer code to pass recipient IDs separately.
positions: Vec<InvoicePosition>Ordered billing positions (each with full calculation trace).
total_eur: DecimalNet total in EUR, rounded to 2 decimal places.
warnings: Vec<SettlementWarning>Non-blocking validation warnings.
Empty when the settlement is clean. The service layer should review
Warning and Error severity items before dispatch.