1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! GPKE Netznutzungsabrechnung / Mehr-Mindermengen — the INVOIC billing family.
//!
//! The process itself lives in [`mako_invoic`]: receive an invoice, validate it
//! against the AHB, settle or dispute it, and — in the issuer role — correlate
//! the payer's REMADV and any COMDIS answering it. Nothing in that is
//! GPKE-specific, so this module declares only what *is*: which PIDs belong to
//! the family, which roles a GPKE deployment plays, and the deadline it answers
//! under.
//!
//! # Covered Prüfidentifikatoren (INVOIC AHB 2.8e / AHB 1.0)
//!
//! | PID | Process variant |
//! |-------|------------------------------------------|
//! | 31001 | Abschlagsrechnung (Netznutzung) |
//! | 31002 | NN-Rechnung (Netznutzungsabrechnung) |
//! | 31005 | MMM-Rechnung (Mehr-/Mindermengensaldo) |
//! | 31006 | MMM-Rechnung (selbst ausgestellt) |
//!
//! Neighbouring PIDs deliberately belong elsewhere, and must not be registered
//! here or they would be double-routed:
//!
//! - **31003** (WiM-Rechnung) and **31009** (MSB-Rechnung, GPKE Teil 3 *and*
//! WiM Strom Teil 1) → `mako_wim::invoic`.
//! - **31007 / 31008** (Aggreg. MMM-Rechnung Gas, NB → MGV) → `mako_gabi_gas`;
//! MGV is a Gas-only role.
//! - **31004** (Stornorechnung) is a Sparte-neutral universal Storno
//! (INVOIC AHB § 3.1.2), checked Sparte-neutrally by `invoicd`.
//!
//! # Regulatory basis
//!
//! - **BDEW GPKE** — Geschäftsprozesse zur Kundenbelieferung mit Elektrizität
//! - **INVOIC AHB 2.8e / 1.0** — the invoice message format
//! - **REMADV AHB 1.0a § 3**, **COMDIS AHB 1.0** — the payment answer and its
//! refusal; see [`mako_invoic`] for how the two are read.
use Pruefidentifikator;
use ;
/// GPKE billing Prüfidentifikatoren (INVOIC-based), FV2025-10-01 onwards.
pub const GPKE_INVOIC_PIDS: & = &;
/// REMADV Prüfidentifikatoren answering a GPKE invoice.
///
/// The shared [`mako_invoic::REMADV_PIDS`] set: only 33001 confirms payment.
pub const GPKE_REMADV_PIDS: & = REMADV_PIDS;
/// COMDIS Prüfidentifikator for an inbound Ablehnung of a REMADV (payer side).
pub const GPKE_COMDIS_ABLEHNUNG_PID: Pruefidentifikator = COMDIS_ABLEHNUNG_PID;
/// Deadline label for the INVOIC settlement response window.
///
/// The recipient must settle or dispute within the contractual period
/// (typically 5 Werktage from receipt). Register a `Deadline` with this label
/// once the invoice validates.
pub const ABRECHNUNG_WINDOW_LABEL: &str = "invoic-settlement-deadline";
/// Canonical workflow name registered in the process engine.
pub const WORKFLOW_NAME: &str = "gpke-abrechnung";
/// The GPKE billing family.
///
/// A GPKE deployment plays both roles: the NB issues Netznutzungs- and
/// MMM-Rechnungen and receives the LF's REMADV, and the LF receives invoices
/// and may have its own REMADV refused by COMDIS.
;
/// The GPKE Netznutzungsabrechnung workflow.
pub type GpkeAbrechnungWorkflow = ;