pub struct DeliveryItem {Show 15 fields
pub base: DocumentLineItem,
pub sales_order_id: Option<String>,
pub so_item: Option<u16>,
pub quantity_picked: Decimal,
pub quantity_packed: Decimal,
pub quantity_issued: Decimal,
pub is_fully_picked: bool,
pub is_fully_issued: bool,
pub batch: Option<String>,
pub serial_numbers: Vec<String>,
pub pick_location: Option<String>,
pub handling_unit: Option<String>,
pub weight: Option<Decimal>,
pub volume: Option<Decimal>,
pub cogs_amount: Decimal,
}Expand description
Delivery item.
Fields§
§base: DocumentLineItemBase line item fields
sales_order_id: Option<String>Reference SO number
so_item: Option<u16>Reference SO item
quantity_picked: DecimalPicked quantity
quantity_packed: DecimalPacked quantity
quantity_issued: DecimalGoods issued quantity
is_fully_picked: boolIs this line fully picked?
is_fully_issued: boolIs this line fully issued?
batch: Option<String>Batch number (if batch managed)
serial_numbers: Vec<String>Serial numbers (if serial managed)
pick_location: Option<String>Pick location (bin)
handling_unit: Option<String>Handling unit
weight: Option<Decimal>Weight in kg
volume: Option<Decimal>Volume in m³
cogs_amount: DecimalCOGS amount (cost of goods sold)
Implementations§
Source§impl DeliveryItem
impl DeliveryItem
Sourcepub fn new(
line_number: u16,
description: impl Into<String>,
quantity: Decimal,
unit_price: Decimal,
) -> Self
pub fn new( line_number: u16, description: impl Into<String>, quantity: Decimal, unit_price: Decimal, ) -> Self
Create a new delivery item.
Sourcepub fn from_sales_order(
line_number: u16,
description: impl Into<String>,
quantity: Decimal,
unit_price: Decimal,
sales_order_id: impl Into<String>,
so_item: u16,
) -> Self
pub fn from_sales_order( line_number: u16, description: impl Into<String>, quantity: Decimal, unit_price: Decimal, sales_order_id: impl Into<String>, so_item: u16, ) -> Self
Create from SO reference.
Sourcepub fn with_material(self, material_id: impl Into<String>) -> Self
pub fn with_material(self, material_id: impl Into<String>) -> Self
Set material.
Sourcepub fn with_batch(self, batch: impl Into<String>) -> Self
pub fn with_batch(self, batch: impl Into<String>) -> Self
Set batch.
Sourcepub fn with_location(
self,
plant: impl Into<String>,
storage_location: impl Into<String>,
) -> Self
pub fn with_location( self, plant: impl Into<String>, storage_location: impl Into<String>, ) -> Self
Set location.
Sourcepub fn with_dimensions(self, weight: Decimal, volume: Decimal) -> Self
pub fn with_dimensions(self, weight: Decimal, volume: Decimal) -> Self
Set weight and volume.
Sourcepub fn add_serial_number(&mut self, serial: impl Into<String>)
pub fn add_serial_number(&mut self, serial: impl Into<String>)
Add serial number.
Sourcepub fn record_pick(&mut self, quantity: Decimal)
pub fn record_pick(&mut self, quantity: Decimal)
Record pick.
Sourcepub fn record_pack(&mut self, quantity: Decimal)
pub fn record_pack(&mut self, quantity: Decimal)
Record pack.
Sourcepub fn record_goods_issue(&mut self, quantity: Decimal)
pub fn record_goods_issue(&mut self, quantity: Decimal)
Record goods issue.
Sourcepub fn open_quantity_pick(&self) -> Decimal
pub fn open_quantity_pick(&self) -> Decimal
Get open quantity for picking.
Sourcepub fn open_quantity_gi(&self) -> Decimal
pub fn open_quantity_gi(&self) -> Decimal
Get open quantity for goods issue.
Trait Implementations§
Source§impl Clone for DeliveryItem
impl Clone for DeliveryItem
Source§fn clone(&self) -> DeliveryItem
fn clone(&self) -> DeliveryItem
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 DeliveryItem
impl Debug for DeliveryItem
Source§impl<'de> Deserialize<'de> for DeliveryItem
impl<'de> Deserialize<'de> for DeliveryItem
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 DeliveryItem
impl RefUnwindSafe for DeliveryItem
impl Send for DeliveryItem
impl Sync for DeliveryItem
impl Unpin for DeliveryItem
impl UnwindSafe for DeliveryItem
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