pub struct InventoryMovementGenerator { /* private fields */ }Expand description
Generates InventoryMovement records for warehouse stock flow.
Implementations§
Source§impl InventoryMovementGenerator
impl InventoryMovementGenerator
Sourcepub fn generate(
&mut self,
company_code: &str,
material_ids: &[(String, String)],
period_start: NaiveDate,
period_end: NaiveDate,
movements_per_material: u32,
currency: &str,
) -> Vec<InventoryMovement>
pub fn generate( &mut self, company_code: &str, material_ids: &[(String, String)], period_start: NaiveDate, period_end: NaiveDate, movements_per_material: u32, currency: &str, ) -> Vec<InventoryMovement>
Generate inventory movements for the given period.
Creates a mix of movement types distributed across the period for each material in the pool.
§Arguments
company_code- Company / entity code.material_ids- Available materials as(material_id, description)tuples.period_start- Start of the generation period.period_end- End of the generation period.movements_per_material- Average number of movements per material.currency- Currency code for value calculations.
Auto Trait Implementations§
impl !Freeze for InventoryMovementGenerator
impl RefUnwindSafe for InventoryMovementGenerator
impl Send for InventoryMovementGenerator
impl Sync for InventoryMovementGenerator
impl Unpin for InventoryMovementGenerator
impl UnsafeUnpin for InventoryMovementGenerator
impl UnwindSafe for InventoryMovementGenerator
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