pub struct NewSleRow<'a> {Show 13 fields
pub item_id: Uuid,
pub warehouse_id: Uuid,
pub posting_date: NaiveDate,
pub actual_qty: Decimal,
pub qty_after_txn: Decimal,
pub incoming_rate: Decimal,
pub valuation_rate: Decimal,
pub stock_value: Decimal,
pub stock_value_difference: Decimal,
pub voucher_type: &'a str,
pub voucher_id: Uuid,
pub voucher_no: &'a str,
pub sle_no: i32,
}Expand description
The exact row an immutable Stock Ledger Entry insert writes.
Mirrors the raw column shape rather than the StockLedgerEntry entity: voucher_type is
supplied as a free string and cast at the DB ($12::voucher_type) so a bad value fails as a DB
error, and status is a literal ‘active’ (the SLE is append-only — a correction is a new
entry, never an edit).
Fields§
§item_id: Uuid§warehouse_id: Uuid§posting_date: NaiveDate§actual_qty: DecimalSigned: positive on an inflow, negative on an outflow.
qty_after_txn: Decimal§incoming_rate: Decimal§valuation_rate: Decimal§stock_value: Decimal§stock_value_difference: DecimalSigned value delta this entry contributes — what the GL post mirrors.
voucher_type: &'a str“purchase_receipt” | “delivery_note” | “stock_entry” | “stock_reconciliation”.
voucher_id: Uuid§voucher_no: &'a str§sle_no: i32Auto Trait Implementations§
impl<'a> Freeze for NewSleRow<'a>
impl<'a> RefUnwindSafe for NewSleRow<'a>
impl<'a> Send for NewSleRow<'a>
impl<'a> Sync for NewSleRow<'a>
impl<'a> Unpin for NewSleRow<'a>
impl<'a> UnsafeUnpin for NewSleRow<'a>
impl<'a> UnwindSafe for NewSleRow<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more