pub struct TargetRatios {
pub current_ratio: Decimal,
pub quick_ratio: Decimal,
pub debt_to_equity: Decimal,
pub asset_turnover: Decimal,
pub target_dso_days: u32,
pub target_dpo_days: u32,
pub target_dio_days: u32,
pub gross_margin: Decimal,
pub operating_margin: Decimal,
}Expand description
Target financial ratios for opening balance.
Fields§
§current_ratio: DecimalCurrent ratio (Current Assets / Current Liabilities).
quick_ratio: DecimalQuick ratio ((Current Assets - Inventory) / Current Liabilities).
debt_to_equity: DecimalDebt-to-equity ratio (Total Liabilities / Total Equity).
asset_turnover: DecimalAsset turnover (Revenue / Total Assets) - for planning.
target_dso_days: u32Days Sales Outstanding (AR / Revenue * 365).
target_dpo_days: u32Days Payable Outstanding (AP / COGS * 365).
target_dio_days: u32Days Inventory Outstanding (Inventory / COGS * 365).
gross_margin: DecimalGross margin ((Revenue - COGS) / Revenue).
operating_margin: DecimalOperating margin (Operating Income / Revenue).
Implementations§
Source§impl TargetRatios
impl TargetRatios
Sourcepub fn for_industry(industry: IndustryType) -> Self
pub fn for_industry(industry: IndustryType) -> Self
Get target ratios for a specific industry.
Sourcepub fn calculate_target_ar(&self, annual_revenue: Decimal) -> Decimal
pub fn calculate_target_ar(&self, annual_revenue: Decimal) -> Decimal
Calculate target AR balance from revenue.
Sourcepub fn calculate_target_ap(&self, annual_cogs: Decimal) -> Decimal
pub fn calculate_target_ap(&self, annual_cogs: Decimal) -> Decimal
Calculate target AP balance from COGS.
Sourcepub fn calculate_target_inventory(&self, annual_cogs: Decimal) -> Decimal
pub fn calculate_target_inventory(&self, annual_cogs: Decimal) -> Decimal
Calculate target inventory balance from COGS.
Trait Implementations§
Source§impl Clone for TargetRatios
impl Clone for TargetRatios
Source§fn clone(&self) -> TargetRatios
fn clone(&self) -> TargetRatios
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 TargetRatios
impl Debug for TargetRatios
Source§impl Default for TargetRatios
impl Default for TargetRatios
Source§impl<'de> Deserialize<'de> for TargetRatios
impl<'de> Deserialize<'de> for TargetRatios
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 TargetRatios
impl RefUnwindSafe for TargetRatios
impl Send for TargetRatios
impl Sync for TargetRatios
impl Unpin for TargetRatios
impl UnwindSafe for TargetRatios
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