pub struct Reconciler { /* private fields */ }Expand description
Computes BG-23 and BG-22 from an invoice’s lines, allowances and charges.
Implementations§
Source§impl Reconciler
impl Reconciler
Sourcepub fn exemption(
self,
category: impl Into<String>,
text: Option<&str>,
code: Option<&str>,
) -> Self
pub fn exemption( self, category: impl Into<String>, text: Option<&str>, code: Option<&str>, ) -> Self
BT-120 / BT-121 for one category. Categories that forbid a reason drop it.
Sourcepub fn paid(self, amount: InvoiceAmount) -> Self
pub fn paid(self, amount: InvoiceAmount) -> Self
BT-113. Absent is not zero.
Sourcepub fn rounding(self, amount: InvoiceAmount) -> Self
pub fn rounding(self, amount: InvoiceAmount) -> Self
BT-114. Malaysian 5-sen cash rounding belongs here, not as slack.
Sourcepub fn tax_total_accounting(self, amount: InvoiceAmount) -> Self
pub fn tax_total_accounting(self, amount: InvoiceAmount) -> Self
BT-111. Not derived.
Sourcepub fn compute(&self, inv: &Invoice) -> Result<Reconciled, ReconcileError>
pub fn compute(&self, inv: &Invoice) -> Result<Reconciled, ReconcileError>
Compute BG-23 and BG-22 without writing them back.
Trait Implementations§
Source§impl Clone for Reconciler
impl Clone for Reconciler
Source§fn clone(&self) -> Reconciler
fn clone(&self) -> Reconciler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Reconciler
impl Debug for Reconciler
Source§impl Default for Reconciler
impl Default for Reconciler
Source§fn default() -> Reconciler
fn default() -> Reconciler
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Reconciler
impl RefUnwindSafe for Reconciler
impl Send for Reconciler
impl Sync for Reconciler
impl Unpin for Reconciler
impl UnsafeUnpin for Reconciler
impl UnwindSafe for Reconciler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more