pub struct CTAEntry {Show 15 fields
pub entry_id: String,
pub company_code: String,
pub local_currency: String,
pub group_currency: String,
pub fiscal_year: i32,
pub fiscal_period: u8,
pub period_end_date: NaiveDate,
pub cta_amount: Decimal,
pub opening_rate: Decimal,
pub closing_rate: Decimal,
pub average_rate: Decimal,
pub opening_net_assets_local: Decimal,
pub closing_net_assets_local: Decimal,
pub net_income_local: Decimal,
pub components: Vec<CTAComponent>,
}Expand description
Currency Translation Adjustment (CTA) entry.
Fields§
§entry_id: StringEntry ID.
company_code: StringCompany code (subsidiary).
local_currency: StringLocal currency.
group_currency: StringGroup currency.
fiscal_year: i32Fiscal year.
fiscal_period: u8Fiscal period.
period_end_date: NaiveDatePeriod end date.
cta_amount: DecimalCTA amount (positive = gain, negative = loss).
opening_rate: DecimalOpening rate used.
closing_rate: DecimalClosing rate used.
average_rate: DecimalAverage rate used.
opening_net_assets_local: DecimalNet assets at opening (local currency).
closing_net_assets_local: DecimalNet assets at closing (local currency).
net_income_local: DecimalNet income for period (local currency).
components: Vec<CTAComponent>Breakdown by component.
Implementations§
Source§impl CTAEntry
impl CTAEntry
Sourcepub fn new(
entry_id: String,
company_code: String,
local_currency: String,
group_currency: String,
fiscal_year: i32,
fiscal_period: u8,
period_end_date: NaiveDate,
) -> Self
pub fn new( entry_id: String, company_code: String, local_currency: String, group_currency: String, fiscal_year: i32, fiscal_period: u8, period_end_date: NaiveDate, ) -> Self
Creates a new CTA entry.
Sourcepub fn calculate_current_rate_method(&mut self)
pub fn calculate_current_rate_method(&mut self)
Calculates CTA using the current rate method.
CTA = Net Assets(closing) × Closing Rate - Net Assets(opening) × Opening Rate - Net Income × Average Rate
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CTAEntry
impl RefUnwindSafe for CTAEntry
impl Send for CTAEntry
impl Sync for CTAEntry
impl Unpin for CTAEntry
impl UnwindSafe for CTAEntry
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