pub struct InvoiceDocument {
pub settlement: SettlementResult,
pub pid: u32,
pub rechnungsnummer: String,
pub correction_of: Option<String>,
pub invoice_date: Date,
pub due_date: Date,
pub cadence: Option<Rechnungscharakter>,
pub abschlaege: Vec<Abschlagsverrechnung>,
}Expand description
A settlement presented as an invoice.
Everything here is a property of the document rather than of the calculation: an invoice number, the dates it was issued and falls due, the Prüfidentifikator that routes it, and the reference to whatever it corrects. None of it affects what is owed.
Built by an adapter around a SettlementResult; the engine never produces
one, which is why the engine can be run without inventing an invoice number.
Fields§
§settlement: SettlementResultWhat the document presents.
pid: u32BDEW Prüfidentifikator.
rechnungsnummer: StringUnique invoice reference.
correction_of: Option<String>The rechnungsnummer this corrects, if any.
invoice_date: DateIssue date.
due_date: DatePayment due date (Zahlungsziel, §271 BGB).
cadence: Option<Rechnungscharakter>The billing cadence — IMD+7081 on the wire.
A document fact, not a calculation one: an NNE settlement is the same
arithmetic whether it is billed monthly, per Turnus or as the
Abschlussrechnung that closes a year. None leaves the field unset
rather than guessing a rhythm nothing supports.
abschlaege: Vec<Abschlagsverrechnung>Abschlagsrechnungen this document settles, deducted from what is owed.
Empty on an Abschlagsrechnung itself and on every document that has no payments on account to reconcile.
Implementations§
Source§impl InvoiceDocument
impl InvoiceDocument
Sourcepub fn numbered_positions(
&self,
) -> impl Iterator<Item = (u32, &SettlementPosition)>
pub fn numbered_positions( &self, ) -> impl Iterator<Item = (u32, &SettlementPosition)>
Positions paired with their 1-based document numbers.
Numbering is assigned here, at rendering time, rather than carried through the calculation as mutable state.
Trait Implementations§
Source§impl Clone for InvoiceDocument
impl Clone for InvoiceDocument
Source§fn clone(&self) -> InvoiceDocument
fn clone(&self) -> InvoiceDocument
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more