pub struct InvoicePosition {
pub number: u32,
pub text: String,
pub quantity: Decimal,
pub unit: QuantityUnit,
pub unit_price_eur: Decimal,
pub net_eur: Decimal,
}Expand description
One line item in a grid invoice.
Carries raw numbers for the service layer to map into the required format
(BO4E Rechnungsposition, EN16931 UBL, etc.).
Invariant: net_eur == (quantity × unit_price_eur).round_dp(5).
Fields§
§number: u321-based sequence number.
text: StringHuman-readable position description.
quantity: DecimalMetered or contracted quantity.
unit: QuantityUnitUnit of measure.
unit_price_eur: DecimalUnit price in EUR (already converted from ct where applicable).
net_eur: DecimalNet amount in EUR, rounded to 5 decimal places. May be negative for credit positions (Mindermengen, Gutschriften).
Trait Implementations§
Source§impl Clone for InvoicePosition
impl Clone for InvoicePosition
Source§fn clone(&self) -> InvoicePosition
fn clone(&self) -> InvoicePosition
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 moreAuto Trait Implementations§
impl Freeze for InvoicePosition
impl RefUnwindSafe for InvoicePosition
impl Send for InvoicePosition
impl Sync for InvoicePosition
impl Unpin for InvoicePosition
impl UnsafeUnpin for InvoicePosition
impl UnwindSafe for InvoicePosition
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