pub struct CostLayer {
pub id: Uuid,
pub sku: String,
pub layer_date: DateTime<Utc>,
pub quantity: Decimal,
pub remaining_quantity: Decimal,
pub unit_cost: Decimal,
pub total_cost: Decimal,
pub source_type: CostLayerSource,
pub source_id: Option<Uuid>,
pub lot_id: Option<Uuid>,
pub location_id: Option<i32>,
pub created_at: DateTime<Utc>,
}Expand description
A cost layer for FIFO/LIFO costing.
Fields§
§id: Uuid§sku: String§layer_date: DateTime<Utc>§quantity: Decimal§remaining_quantity: Decimal§unit_cost: Decimal§total_cost: Decimal§source_type: CostLayerSource§source_id: Option<Uuid>§lot_id: Option<Uuid>§location_id: Option<i32>§created_at: DateTime<Utc>Trait Implementations§
Source§impl<'de> Deserialize<'de> for CostLayer
impl<'de> Deserialize<'de> for CostLayer
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CostLayer, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CostLayer, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CostLayer
impl Serialize for CostLayer
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for CostLayer
impl RefUnwindSafe for CostLayer
impl Send for CostLayer
impl Sync for CostLayer
impl Unpin for CostLayer
impl UnsafeUnpin for CostLayer
impl UnwindSafe for CostLayer
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