pub struct DepreciationRun {Show 17 fields
pub run_id: String,
pub company_code: String,
pub fiscal_year: i32,
pub fiscal_period: u32,
pub depreciation_area: DepreciationAreaType,
pub run_date: NaiveDate,
pub posting_date: NaiveDate,
pub status: DepreciationRunStatus,
pub asset_entries: Vec<DepreciationEntry>,
pub total_depreciation: Decimal,
pub asset_count: u32,
pub gl_references: Vec<GLReference>,
pub created_by: String,
pub created_at: DateTime<Utc>,
pub completed_at: Option<DateTime<Utc>>,
pub error_count: u32,
pub errors: Vec<DepreciationError>,
}Expand description
Depreciation run (batch depreciation posting).
Fields§
§run_id: StringRun ID.
company_code: StringCompany code.
fiscal_year: i32Fiscal year.
fiscal_period: u32Fiscal period.
depreciation_area: DepreciationAreaTypeDepreciation area.
run_date: NaiveDateRun date.
posting_date: NaiveDatePosting date.
status: DepreciationRunStatusRun status.
asset_entries: Vec<DepreciationEntry>Individual asset depreciation.
total_depreciation: DecimalTotal depreciation amount.
asset_count: u32Asset count processed.
gl_references: Vec<GLReference>GL references.
created_by: StringCreated by.
created_at: DateTime<Utc>Created at.
completed_at: Option<DateTime<Utc>>Completed at.
error_count: u32Error count.
errors: Vec<DepreciationError>Errors.
Implementations§
Source§impl DepreciationRun
impl DepreciationRun
Sourcepub fn new(
run_id: String,
company_code: String,
fiscal_year: i32,
fiscal_period: u32,
depreciation_area: DepreciationAreaType,
run_date: NaiveDate,
created_by: String,
) -> Self
pub fn new( run_id: String, company_code: String, fiscal_year: i32, fiscal_period: u32, depreciation_area: DepreciationAreaType, run_date: NaiveDate, created_by: String, ) -> Self
Creates a new depreciation run.
Sourcepub fn add_entry(&mut self, entry: DepreciationEntry)
pub fn add_entry(&mut self, entry: DepreciationEntry)
Adds a depreciation entry.
Sourcepub fn add_error(&mut self, error: DepreciationError)
pub fn add_error(&mut self, error: DepreciationError)
Adds an error.
Sourcepub fn summary_by_class(&self) -> HashMap<String, DepreciationSummary>
pub fn summary_by_class(&self) -> HashMap<String, DepreciationSummary>
Gets summary by asset class.
Trait Implementations§
Source§impl Clone for DepreciationRun
impl Clone for DepreciationRun
Source§fn clone(&self) -> DepreciationRun
fn clone(&self) -> DepreciationRun
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 DepreciationRun
impl Debug for DepreciationRun
Source§impl<'de> Deserialize<'de> for DepreciationRun
impl<'de> Deserialize<'de> for DepreciationRun
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 DepreciationRun
impl RefUnwindSafe for DepreciationRun
impl Send for DepreciationRun
impl Sync for DepreciationRun
impl Unpin for DepreciationRun
impl UnwindSafe for DepreciationRun
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