Skip to main content

GridInvoice

Type Alias GridInvoice 

Source
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: u32

BDEW Prüfidentifikator — caller may override after construction.

§settlement_type: SettlementType

Settlement type.

§status: SettlementStatus

Lifecycle status.

§rechnungsnummer: String

Unique invoice reference number.

§correction_of: Option<String>

If this is a correction, the rechnungsnummer of the original settlement.

§invoice_date: Date

Invoice issue date.

§due_date: Date

Payment due date (Zahlungsziel, §271 BGB).

§period_from: Date

Start of billing period (inclusive).

§period_to: Date

End of billing period (inclusive).

§nb_mp_id: String

Sender MP-ID — Netzbetreiber (or MSB for PID 31009).

§counterparty_mp_id: String

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

Net 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.