pub struct RealizedFxGainLoss {
pub document_number: String,
pub company_code: String,
pub transaction_date: NaiveDate,
pub settlement_date: NaiveDate,
pub transaction_currency: String,
pub local_currency: String,
pub original_amount: Decimal,
pub original_local_amount: Decimal,
pub settlement_local_amount: Decimal,
pub gain_loss: Decimal,
pub transaction_rate: Decimal,
pub settlement_rate: Decimal,
}Expand description
Realized FX gain/loss from settling a transaction in foreign currency.
Fields§
§document_number: StringDocument reference.
company_code: StringCompany code.
transaction_date: NaiveDateTransaction date (original).
settlement_date: NaiveDateSettlement date.
transaction_currency: StringTransaction currency.
local_currency: StringLocal currency.
original_amount: DecimalOriginal amount (transaction currency).
original_local_amount: DecimalOriginal local amount (at transaction date rate).
settlement_local_amount: DecimalSettlement local amount (at settlement date rate).
gain_loss: DecimalRealized gain/loss (positive = gain).
transaction_rate: DecimalTransaction date rate.
settlement_rate: DecimalSettlement date rate.
Implementations§
Source§impl RealizedFxGainLoss
impl RealizedFxGainLoss
Sourcepub fn new(
document_number: String,
company_code: String,
transaction_date: NaiveDate,
settlement_date: NaiveDate,
transaction_currency: String,
local_currency: String,
original_amount: Decimal,
transaction_rate: Decimal,
settlement_rate: Decimal,
) -> Self
pub fn new( document_number: String, company_code: String, transaction_date: NaiveDate, settlement_date: NaiveDate, transaction_currency: String, local_currency: String, original_amount: Decimal, transaction_rate: Decimal, settlement_rate: Decimal, ) -> Self
Creates a new realized FX gain/loss entry.
Trait Implementations§
Source§impl Clone for RealizedFxGainLoss
impl Clone for RealizedFxGainLoss
Source§fn clone(&self) -> RealizedFxGainLoss
fn clone(&self) -> RealizedFxGainLoss
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 moreAuto Trait Implementations§
impl Freeze for RealizedFxGainLoss
impl RefUnwindSafe for RealizedFxGainLoss
impl Send for RealizedFxGainLoss
impl Sync for RealizedFxGainLoss
impl Unpin for RealizedFxGainLoss
impl UnwindSafe for RealizedFxGainLoss
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