pub struct FAGenerator { /* private fields */ }Expand description
Generator for Fixed Assets transactions.
Implementations§
Source§impl FAGenerator
impl FAGenerator
Sourcepub fn new(config: FAGeneratorConfig, rng: ChaCha8Rng) -> Self
pub fn new(config: FAGeneratorConfig, rng: ChaCha8Rng) -> Self
Creates a new FA generator.
Sourcepub fn generate_asset_acquisition(
&mut self,
company_code: &str,
asset_class_str: &str,
description: &str,
acquisition_date: NaiveDate,
currency: &str,
cost_center: Option<&str>,
) -> (FixedAssetRecord, JournalEntry)
pub fn generate_asset_acquisition( &mut self, company_code: &str, asset_class_str: &str, description: &str, acquisition_date: NaiveDate, currency: &str, cost_center: Option<&str>, ) -> (FixedAssetRecord, JournalEntry)
Generates a new fixed asset acquisition.
Sourcepub fn run_depreciation(
&mut self,
company_code: &str,
assets: &[&FixedAssetRecord],
period_date: NaiveDate,
fiscal_year: i32,
fiscal_period: u32,
) -> (DepreciationRun, Vec<JournalEntry>)
pub fn run_depreciation( &mut self, company_code: &str, assets: &[&FixedAssetRecord], period_date: NaiveDate, fiscal_year: i32, fiscal_period: u32, ) -> (DepreciationRun, Vec<JournalEntry>)
Runs depreciation for a period.
Sourcepub fn generate_disposal(
&mut self,
asset: &FixedAssetRecord,
disposal_date: NaiveDate,
disposal_type: DisposalType,
proceeds: Decimal,
) -> (AssetDisposal, JournalEntry)
pub fn generate_disposal( &mut self, asset: &FixedAssetRecord, disposal_date: NaiveDate, disposal_type: DisposalType, proceeds: Decimal, ) -> (AssetDisposal, JournalEntry)
Generates an asset disposal.
Auto Trait Implementations§
impl Freeze for FAGenerator
impl RefUnwindSafe for FAGenerator
impl Send for FAGenerator
impl Sync for FAGenerator
impl Unpin for FAGenerator
impl UnwindSafe for FAGenerator
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