Skip to main content

CTAEntry

Struct CTAEntry 

Source
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: String

Entry ID.

§company_code: String

Company code (subsidiary).

§local_currency: String

Local currency.

§group_currency: String

Group currency.

§fiscal_year: i32

Fiscal year.

§fiscal_period: u8

Fiscal period.

§period_end_date: NaiveDate

Period end date.

§cta_amount: Decimal

CTA amount (positive = gain, negative = loss).

§opening_rate: Decimal

Opening rate used.

§closing_rate: Decimal

Closing rate used.

§average_rate: Decimal

Average rate used.

§opening_net_assets_local: Decimal

Net assets at opening (local currency).

§closing_net_assets_local: Decimal

Net assets at closing (local currency).

§net_income_local: Decimal

Net income for period (local currency).

§components: Vec<CTAComponent>

Breakdown by component.

Implementations§

Source§

impl CTAEntry

Source

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.

Source

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§

Source§

impl Clone for CTAEntry

Source§

fn clone(&self) -> CTAEntry

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CTAEntry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V