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,
}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).
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