pub struct CheckReport {
pub outcome: CheckOutcome,
pub findings: Vec<Finding>,
pub pid: u32,
pub total_net_invoic: Option<EuroAmount>,
pub total_net_computed: Option<EuroAmount>,
pub line_items_checked: usize,
}Expand description
Full report from InvoicCheckEngine::check.
Fields§
§outcome: CheckOutcomeOverall outcome — highest severity across all findings.
findings: Vec<Finding>Ordered list of findings (empty when outcome == Ok).
pid: u32BDEW Prüfidentifikator from the checked INVOIC.
total_net_invoic: Option<EuroAmount>Total net amount as stated in Rechnung.gesamtnetto.
total_net_computed: Option<EuroAmount>Total net amount as re-computed by summing Rechnungsposition.gesamtpreis (BO4E v202607).
line_items_checked: usizeNumber of Rechnungsposition entries checked.
Implementations§
Source§impl CheckReport
impl CheckReport
Sourcepub fn from_findings(
pid: u32,
rechnung: &Rechnung,
findings: Vec<Finding>,
computed_total: Option<EuroAmount>,
) -> Self
pub fn from_findings( pid: u32, rechnung: &Rechnung, findings: Vec<Finding>, computed_total: Option<EuroAmount>, ) -> Self
Assemble a report from the findings a check pipeline produced.
The outcome is the highest severity across the findings: one dispute
makes the whole report a dispute, any finding at all makes it at least a
warning, none makes it Ok. That rule, the invoice’s own stated total
and the line count were open-coded once per pipeline — three copies of
the same four lines, in the one place where a divergence would silently
change whether an invoice is auto-paid.
Sourcepub fn has_dispute(&self) -> bool
pub fn has_dispute(&self) -> bool
true when at least one finding escalates to Dispute.
Trait Implementations§
Source§impl Clone for CheckReport
impl Clone for CheckReport
Source§fn clone(&self) -> CheckReport
fn clone(&self) -> CheckReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more