pub struct FinancialReportUseCases { /* private fields */ }Implementations§
Source§impl FinancialReportUseCases
impl FinancialReportUseCases
pub fn new( account_repo: Arc<dyn AccountRepository>, expense_repo: Arc<dyn ExpenseRepository>, journal_entry_repo: Arc<dyn JournalEntryRepository>, ) -> Self
Sourcepub async fn generate_balance_sheet(
&self,
organization_id: Uuid,
) -> Result<BalanceSheetReport, String>
pub async fn generate_balance_sheet( &self, organization_id: Uuid, ) -> Result<BalanceSheetReport, String>
Generate a balance sheet report for an organization
Balance sheet shows (following Belgian PCMN and accounting equation):
- Assets (Classes 2-5): Buildings, receivables, bank, cash
- Liabilities (Class 1): Capital, reserves, provisions, payables
- Equity: Net result from revenues - expenses
Accounting equation: Assets = Liabilities + Equity
Inspired by Noalyss’ balance sheet generation
Sourcepub async fn generate_income_statement(
&self,
organization_id: Uuid,
period_start: DateTime<Utc>,
period_end: DateTime<Utc>,
) -> Result<IncomeStatementReport, String>
pub async fn generate_income_statement( &self, organization_id: Uuid, period_start: DateTime<Utc>, period_end: DateTime<Utc>, ) -> Result<IncomeStatementReport, String>
Generate an income statement (profit & loss) report
Income statement shows:
- Expenses (Class 6): Operating costs, maintenance, utilities
- Revenue (Class 7): Regular fees, extraordinary fees, interest income
Inspired by Noalyss’ income statement generation
Sourcepub async fn generate_balance_sheet_for_building(
&self,
organization_id: Uuid,
building_id: Uuid,
) -> Result<BalanceSheetReport, String>
pub async fn generate_balance_sheet_for_building( &self, organization_id: Uuid, building_id: Uuid, ) -> Result<BalanceSheetReport, String>
Generate a balance sheet report for a specific building
Auto Trait Implementations§
impl Freeze for FinancialReportUseCases
impl !RefUnwindSafe for FinancialReportUseCases
impl Send for FinancialReportUseCases
impl Sync for FinancialReportUseCases
impl Unpin for FinancialReportUseCases
impl !UnwindSafe for FinancialReportUseCases
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<T> Chain<T> for T
impl<T> Chain<T> for T
§impl<T> Fake for T
impl<T> Fake for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 moreCreates a shared type from an unshared type.