pub struct TaxLine {
pub percentage: Option<Number>,
pub taxable: Number,
pub amount: Number,
}Available on crate feature
tariffs only.Expand description
One tax line of the result.
The tax lines of a breakdown always sum to total_incl_vat - total_excl_vat. That invariant
is what makes the breakdown filable: a document whose tax lines disagree with its own totals
is not something a tax authority or a disputing partner can act on.
Fields§
§percentage: Option<Number>The VAT percentage this line covers.
None for tax that could not be attributed to a rate — which happens when a
min_price.after_taxes raises the inclusive total of a session that had no VAT to
apportion it to. The 2.3.0 wire type
TaxAmount has the same optionality, for the same
reason: an amount of tax is a fact, a rate is an explanation.
taxable: NumberThe amount the percentage was applied to.
amount: NumberThe tax owed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TaxLine
impl<'de> Deserialize<'de> for TaxLine
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for TaxLine
Auto Trait Implementations§
impl Freeze for TaxLine
impl RefUnwindSafe for TaxLine
impl Send for TaxLine
impl Sync for TaxLine
impl Unpin for TaxLine
impl UnsafeUnpin for TaxLine
impl UnwindSafe for TaxLine
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