pub struct AccountRegisterReport {
pub account_id: AccountId,
pub account_name: String,
pub starting_balance: Money,
pub ending_balance: Money,
pub entries: Vec<RegisterEntry>,
pub total_inflows: Money,
pub total_outflows: Money,
pub filter: RegisterFilter,
}Expand description
Account Register Report
Fields§
§account_id: AccountIdAccount ID
account_name: StringAccount name
starting_balance: MoneyStarting balance (before first transaction in report)
ending_balance: MoneyEnding balance (after last transaction)
entries: Vec<RegisterEntry>Register entries
total_inflows: MoneyTotal inflows in the report period
total_outflows: MoneyTotal outflows in the report period
filter: RegisterFilterFilter applied
Implementations§
Source§impl AccountRegisterReport
impl AccountRegisterReport
Sourcepub fn generate(
storage: &Storage,
account_id: AccountId,
filter: RegisterFilter,
) -> EnvelopeResult<Self>
pub fn generate( storage: &Storage, account_id: AccountId, filter: RegisterFilter, ) -> EnvelopeResult<Self>
Generate a register report for an account
Sourcepub fn format_terminal(&self) -> String
pub fn format_terminal(&self) -> String
Format the report for terminal display
Sourcepub fn export_csv<W: Write>(&self, writer: &mut W) -> EnvelopeResult<()>
pub fn export_csv<W: Write>(&self, writer: &mut W) -> EnvelopeResult<()>
Export the report to CSV format
Sourcepub fn summary(&self) -> RegisterSummary
pub fn summary(&self) -> RegisterSummary
Get summary statistics
Trait Implementations§
Source§impl Clone for AccountRegisterReport
impl Clone for AccountRegisterReport
Source§fn clone(&self) -> AccountRegisterReport
fn clone(&self) -> AccountRegisterReport
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 AccountRegisterReport
impl RefUnwindSafe for AccountRegisterReport
impl Send for AccountRegisterReport
impl Sync for AccountRegisterReport
impl Unpin for AccountRegisterReport
impl UnwindSafe for AccountRegisterReport
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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