pub struct PeriodTrialBalance {
pub fiscal_year: u16,
pub fiscal_period: u8,
pub period_start: NaiveDate,
pub period_end: NaiveDate,
pub entries: Vec<TrialBalanceEntry>,
}Expand description
A single period’s trial balance with metadata.
Used as the orchestrator’s in-memory representation while it
builds per-period FS / CF artefacts. At write time the runtime
converts each PeriodTrialBalance to the canonical
datasynth_core::models::balance::TrialBalance shape via
PeriodTrialBalance::into_canonical so the on-disk
period_close/trial_balances.json matches what the group
aggregate phase loads — see
[crate::output_writer::write_outputs].
Fields§
§fiscal_year: u16Fiscal year.
fiscal_period: u8Fiscal period (1-12).
period_start: NaiveDatePeriod start date.
period_end: NaiveDatePeriod end date.
entries: Vec<TrialBalanceEntry>Trial balance entries for this period.
Implementations§
Source§impl PeriodTrialBalance
impl PeriodTrialBalance
Sourcepub fn into_canonical(self, company_code: &str, currency: &str) -> TrialBalance
pub fn into_canonical(self, company_code: &str, currency: &str) -> TrialBalance
Convert this in-memory period TB into the canonical
datasynth_core::models::balance::TrialBalance shape used
for the on-disk artefact.
v5.1: the on-disk shape is now canonical end-to-end. Group
aggregate’s tb_loader consumes the canonical type directly,
dropping the v5.0 dual-shape detection that converted from
PeriodTrialBalance JSON on the fly.
Trait Implementations§
Source§impl Clone for PeriodTrialBalance
impl Clone for PeriodTrialBalance
Source§fn clone(&self) -> PeriodTrialBalance
fn clone(&self) -> PeriodTrialBalance
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PeriodTrialBalance
impl Debug for PeriodTrialBalance
Source§impl<'de> Deserialize<'de> for PeriodTrialBalance
impl<'de> Deserialize<'de> for PeriodTrialBalance
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>,
Auto Trait Implementations§
impl Freeze for PeriodTrialBalance
impl RefUnwindSafe for PeriodTrialBalance
impl Send for PeriodTrialBalance
impl Sync for PeriodTrialBalance
impl Unpin for PeriodTrialBalance
impl UnsafeUnpin for PeriodTrialBalance
impl UnwindSafe for PeriodTrialBalance
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
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.