pub struct ARInvoiceLine {Show 15 fields
pub line_number: u32,
pub material_id: Option<String>,
pub description: String,
pub quantity: Decimal,
pub unit: String,
pub unit_price: Decimal,
pub net_amount: Decimal,
pub tax_code: Option<String>,
pub tax_rate: Decimal,
pub tax_amount: Decimal,
pub gross_amount: Decimal,
pub revenue_account: String,
pub cost_center: Option<String>,
pub profit_center: Option<String>,
pub reference: Option<String>,
}Expand description
AR invoice line item.
Fields§
§line_number: u32Line number.
material_id: Option<String>Material/product ID.
description: StringDescription.
quantity: DecimalQuantity.
unit: StringUnit of measure.
unit_price: DecimalUnit price.
net_amount: DecimalNet amount (quantity * unit_price).
tax_code: Option<String>Tax code.
tax_rate: DecimalTax rate.
tax_amount: DecimalTax amount.
gross_amount: DecimalGross amount.
revenue_account: StringRevenue account.
cost_center: Option<String>Cost center.
profit_center: Option<String>Profit center.
reference: Option<String>Reference (sales order line).
Implementations§
Source§impl ARInvoiceLine
impl ARInvoiceLine
Sourcepub fn new(
line_number: u32,
description: String,
quantity: Decimal,
unit: String,
unit_price: Decimal,
revenue_account: String,
) -> Self
pub fn new( line_number: u32, description: String, quantity: Decimal, unit: String, unit_price: Decimal, revenue_account: String, ) -> Self
Creates a new invoice line.
Sourcepub fn with_material(self, material_id: String) -> Self
pub fn with_material(self, material_id: String) -> Self
Sets material ID.
Sourcepub fn with_cost_center(
self,
cost_center: String,
profit_center: Option<String>,
) -> Self
pub fn with_cost_center( self, cost_center: String, profit_center: Option<String>, ) -> Self
Sets cost/profit center.
Trait Implementations§
Source§impl Clone for ARInvoiceLine
impl Clone for ARInvoiceLine
Source§fn clone(&self) -> ARInvoiceLine
fn clone(&self) -> ARInvoiceLine
Returns a duplicate of the value. Read more
1.0.0 · 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 ARInvoiceLine
impl Debug for ARInvoiceLine
Source§impl<'de> Deserialize<'de> for ARInvoiceLine
impl<'de> Deserialize<'de> for ARInvoiceLine
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
Auto Trait Implementations§
impl Freeze for ARInvoiceLine
impl RefUnwindSafe for ARInvoiceLine
impl Send for ARInvoiceLine
impl Sync for ARInvoiceLine
impl Unpin for ARInvoiceLine
impl UnwindSafe for ARInvoiceLine
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