pub struct NetMonetaryPositionGainLoss {
pub reporting_date: NaiveDate,
pub opening_net_monetary_position: Decimal,
pub closing_net_monetary_position: Decimal,
pub period_indexation_factor: Decimal,
pub gain_or_loss: Decimal,
pub currency: String,
}Expand description
IAS 29 § 27 net-monetary-position gain or loss for a period.
Monetary items (cash, receivables, payables) lose purchasing power as the general price level rises. The gain or loss is recognised in P&L for the period.
Fields§
§reporting_date: NaiveDateReporting period end.
opening_net_monetary_position: DecimalOpening net monetary position (monetary assets less monetary liabilities) at the start of the period, in the functional currency.
closing_net_monetary_position: DecimalClosing net monetary position at reporting_date.
period_indexation_factor: DecimalIndexation factor for the period =
index(reporting_date) / index(opening_date).
gain_or_loss: DecimalComputed gain or loss on the net monetary position. Sign convention: a loss (negative number) when the entity is a net holder of monetary assets in a rising-price environment (the typical case in hyperinflation). A gain (positive) arises when the entity is a net debtor — its monetary liabilities lose purchasing power.
currency: StringFunctional currency code.
Implementations§
Source§impl NetMonetaryPositionGainLoss
impl NetMonetaryPositionGainLoss
Sourcepub fn compute(
reporting_date: NaiveDate,
opening_net_monetary_position: Decimal,
closing_net_monetary_position: Decimal,
period_indexation_factor: Decimal,
currency: impl Into<String>,
) -> Self
pub fn compute( reporting_date: NaiveDate, opening_net_monetary_position: Decimal, closing_net_monetary_position: Decimal, period_indexation_factor: Decimal, currency: impl Into<String>, ) -> Self
Compute the IAS 29 § 27 gain/loss using the simplified opening-balance restatement approach:
gain_or_loss = closing_net_monetary − (opening_net_monetary × factor)
A more rigorous calculation would index every monetary transaction during the period — that’s out of scope for v5.2’s model layer; the wiring layer can refine the input aggregation later.
Trait Implementations§
Source§impl Clone for NetMonetaryPositionGainLoss
impl Clone for NetMonetaryPositionGainLoss
Source§fn clone(&self) -> NetMonetaryPositionGainLoss
fn clone(&self) -> NetMonetaryPositionGainLoss
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NetMonetaryPositionGainLoss
impl Debug for NetMonetaryPositionGainLoss
Source§impl<'de> Deserialize<'de> for NetMonetaryPositionGainLoss
impl<'de> Deserialize<'de> for NetMonetaryPositionGainLoss
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>,
Source§impl PartialEq for NetMonetaryPositionGainLoss
impl PartialEq for NetMonetaryPositionGainLoss
Source§fn eq(&self, other: &NetMonetaryPositionGainLoss) -> bool
fn eq(&self, other: &NetMonetaryPositionGainLoss) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NetMonetaryPositionGainLoss
Auto Trait Implementations§
impl Freeze for NetMonetaryPositionGainLoss
impl RefUnwindSafe for NetMonetaryPositionGainLoss
impl Send for NetMonetaryPositionGainLoss
impl Sync for NetMonetaryPositionGainLoss
impl Unpin for NetMonetaryPositionGainLoss
impl UnsafeUnpin for NetMonetaryPositionGainLoss
impl UnwindSafe for NetMonetaryPositionGainLoss
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.