pub struct ReportingService { /* private fields */ }Expand description
Report generator over the GL.
Implementations§
Source§impl ReportingService
impl ReportingService
pub fn new(repo: Arc<dyn ReportingRepository>) -> Self
pub async fn trial_balance(&self, as_of: NaiveDate) -> Result<TrialBalance>
pub async fn balance_sheet(&self, as_of: NaiveDate) -> Result<BalanceSheet>
pub async fn income_statement( &self, period_start: NaiveDate, period_end: NaiveDate, ) -> Result<IncomeStatement>
Sourcepub async fn general_ledger(
&self,
account_id: Option<Uuid>,
from_date: Option<NaiveDate>,
to_date: NaiveDate,
limit: Option<i64>,
offset: i64,
) -> Result<GeneralLedger>
pub async fn general_ledger( &self, account_id: Option<Uuid>, from_date: Option<NaiveDate>, to_date: NaiveDate, limit: Option<i64>, offset: i64, ) -> Result<GeneralLedger>
General ledger: per-account chronological sections with opening/closing balances.
limit is clamped to 1..=1000 (default 200); offset pages within the same window.
Sourcepub async fn partner_ledger(
&self,
party_type: &str,
party_id: Uuid,
as_of: NaiveDate,
) -> Result<PartnerLedger>
pub async fn partner_ledger( &self, party_type: &str, party_id: Uuid, as_of: NaiveDate, ) -> Result<PartnerLedger>
Partner ledger: every party-stamped line through as_of, each with its residual as of
that date. open_residual is the party’s still-open position.
Sourcepub async fn aged_report(
&self,
account_subtype: &str,
as_of: NaiveDate,
) -> Result<AgedReport>
pub async fn aged_report( &self, account_subtype: &str, as_of: NaiveDate, ) -> Result<AgedReport>
Aged receivables/payables: open items bucketed by age ((as_of − item date) days).
Buckets are fixed 0–30 / 31–60 / 61–90 / 91+; account_subtype selects the side
(accounts_receivable / accounts_payable).
pub async fn aged_receivables(&self, as_of: NaiveDate) -> Result<AgedReport>
pub async fn aged_payables(&self, as_of: NaiveDate) -> Result<AgedReport>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ReportingService
impl !UnwindSafe for ReportingService
impl Freeze for ReportingService
impl Send for ReportingService
impl Sync for ReportingService
impl Unpin for ReportingService
impl UnsafeUnpin for ReportingService
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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 more