pub struct GoodsReceiptItem {Show 13 fields
pub base: DocumentLineItem,
pub movement_type: MovementType,
pub po_number: Option<String>,
pub po_item: Option<u16>,
pub batch: Option<String>,
pub serial_numbers: Vec<String>,
pub vendor_batch: Option<String>,
pub quantity_base_uom: Decimal,
pub valuation_type: Option<String>,
pub stock_type: StockType,
pub reason_for_movement: Option<String>,
pub delivery_note: Option<String>,
pub bill_of_lading: Option<String>,
}Expand description
Goods Receipt line item.
Fields§
§base: DocumentLineItemBase line item fields
movement_type: MovementTypeMovement type
po_number: Option<String>Reference PO number
po_item: Option<u16>Reference PO item
batch: Option<String>Batch number (if batch managed)
serial_numbers: Vec<String>Serial numbers (if serial managed)
vendor_batch: Option<String>Vendor batch
quantity_base_uom: DecimalQuantity in base UOM
valuation_type: Option<String>Valuation type
stock_type: StockTypeStock type (unrestricted, quality inspection, blocked)
reason_for_movement: Option<String>Reason for movement (for returns, adjustments)
delivery_note: Option<String>Delivery note reference
bill_of_lading: Option<String>Bill of lading
Implementations§
Source§impl GoodsReceiptItem
impl GoodsReceiptItem
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 goods receipt item.
Sourcepub fn from_po(
line_number: u16,
description: impl Into<String>,
quantity: Decimal,
unit_price: Decimal,
po_number: impl Into<String>,
po_item: u16,
) -> Self
pub fn from_po( line_number: u16, description: impl Into<String>, quantity: Decimal, unit_price: Decimal, po_number: impl Into<String>, po_item: u16, ) -> Self
Create from PO 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_stock_type(self, stock_type: StockType) -> Self
pub fn with_stock_type(self, stock_type: StockType) -> Self
Set stock type.
Sourcepub fn with_movement_type(self, movement_type: MovementType) -> Self
pub fn with_movement_type(self, movement_type: MovementType) -> Self
Set movement type.
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 plant and storage location.
Sourcepub fn with_delivery_note(self, note: impl Into<String>) -> Self
pub fn with_delivery_note(self, note: impl Into<String>) -> Self
Set delivery note.
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.
Trait Implementations§
Source§impl Clone for GoodsReceiptItem
impl Clone for GoodsReceiptItem
Source§fn clone(&self) -> GoodsReceiptItem
fn clone(&self) -> GoodsReceiptItem
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 GoodsReceiptItem
impl Debug for GoodsReceiptItem
Source§impl<'de> Deserialize<'de> for GoodsReceiptItem
impl<'de> Deserialize<'de> for GoodsReceiptItem
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 GoodsReceiptItem
impl RefUnwindSafe for GoodsReceiptItem
impl Send for GoodsReceiptItem
impl Sync for GoodsReceiptItem
impl Unpin for GoodsReceiptItem
impl UnwindSafe for GoodsReceiptItem
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