C# Class BudgetAnalyser.Engine.Ledger.LedgerCalculation

Afficher le fichier Open project: Benrnz/BudgetAnalyser Class Usage Examples

Méthodes publiques

Méthode Description
CalculateCurrentMonthBucketSpend ( [ ledgerBook, [ filter, [ statement, [ bucketCode ) : decimal

Calculates the current month bucket spend.

CalculateCurrentMonthLedgerBalances ( [ ledgerBook, [ filter, [ statement ) : decimal>.IDictionary

Calculates the current month ledger balances.

CalculateCurrentMonthSurplusBalance ( [ ledgerBook, [ filter, [ statement ) : decimal

Calculates the current month surplus balance.

CalculateOverspentLedgers ( [ statement, [ ledger, System.DateTime beginDate ) : IEnumerable

Finds any overspent ledgers for the month and returns the date and value the of the total overspend. This resulting collection can then be used to subtract from Surplus. Overdrawn ledgers are supplemented from Surplus. Negative values indicate overdrawn ledgers.

LedgerCalculation ( ) : System

Initializes a new instance of the LedgerCalculation class.

LedgerCalculation ( ILogger logger ) : System

Initializes a new instance of the LedgerCalculation class.

LocateApplicableLedgerBalance ( [ ledgerBook, [ filter, string bucketCode ) : decimal

Locates the most recent LedgerEntryLine for the given date filter. Note that this will only return the most recent line that fits the criteria.

LocateApplicableLedgerLine ( LedgerBook ledgerBook, System.DateTime beginDate ) : LedgerEntryLine

Locates the applicable ledger line.

LocateApplicableLedgerLine ( LedgerBook ledgerBook, [ filter ) : LedgerEntryLine

Locates the applicable ledger line.

Private Methods

Méthode Description
BuildCacheKey ( object dependency1, object dependency2, System.DateTime dependentDate ) : string
CalculateLedgersBalanceSummary ( LedgerBook ledgerBook, System.DateTime beginDate, StatementModel statement ) : decimal>.Dictionary
CalculateTransactionTotal ( System.DateTime beginDate, [ statement, [ entryLine, string bucketCode ) : decimal
CheckCacheForCleanUp ( ) : void
GetOrAddFromCache ( string cacheKey, Func factory ) : object
LocateLedgerEntryLine ( LedgerBook ledgerBook, System.DateTime begin, System.DateTime end ) : LedgerEntryLine
ProcessOverdrawnLedgers ( decimal>.Dictionary runningBalances, decimal>.Dictionary previousBalances, List overSpendTransactions, System.DateTime currentDate ) : void

Method Details

CalculateCurrentMonthBucketSpend() public méthode

Calculates the current month bucket spend.
///
public CalculateCurrentMonthBucketSpend ( [ ledgerBook, [ filter, [ statement, [ bucketCode ) : decimal
ledgerBook [
filter [
statement [
bucketCode [
Résultat decimal

CalculateCurrentMonthLedgerBalances() public méthode

Calculates the current month ledger balances.
///
public CalculateCurrentMonthLedgerBalances ( [ ledgerBook, [ filter, [ statement ) : decimal>.IDictionary
ledgerBook [
filter [
statement [
Résultat decimal>.IDictionary

CalculateCurrentMonthSurplusBalance() public méthode

Calculates the current month surplus balance.
///
public CalculateCurrentMonthSurplusBalance ( [ ledgerBook, [ filter, [ statement ) : decimal
ledgerBook [
filter [
statement [
Résultat decimal

CalculateOverspentLedgers() public méthode

Finds any overspent ledgers for the month and returns the date and value the of the total overspend. This resulting collection can then be used to subtract from Surplus. Overdrawn ledgers are supplemented from Surplus. Negative values indicate overdrawn ledgers.
public CalculateOverspentLedgers ( [ statement, [ ledger, System.DateTime beginDate ) : IEnumerable
statement [
ledger [
beginDate System.DateTime
Résultat IEnumerable

LedgerCalculation() public méthode

Initializes a new instance of the LedgerCalculation class.
public LedgerCalculation ( ) : System
Résultat System

LedgerCalculation() public méthode

Initializes a new instance of the LedgerCalculation class.
public LedgerCalculation ( ILogger logger ) : System
logger ILogger
Résultat System

LocateApplicableLedgerBalance() public méthode

Locates the most recent LedgerEntryLine for the given date filter. Note that this will only return the most recent line that fits the criteria.
public LocateApplicableLedgerBalance ( [ ledgerBook, [ filter, string bucketCode ) : decimal
ledgerBook [
filter [
bucketCode string
Résultat decimal

LocateApplicableLedgerLine() public méthode

Locates the applicable ledger line.
public LocateApplicableLedgerLine ( LedgerBook ledgerBook, System.DateTime beginDate ) : LedgerEntryLine
ledgerBook LedgerBook
beginDate System.DateTime
Résultat LedgerEntryLine

LocateApplicableLedgerLine() public méthode

Locates the applicable ledger line.
public LocateApplicableLedgerLine ( LedgerBook ledgerBook, [ filter ) : LedgerEntryLine
ledgerBook LedgerBook
filter [
Résultat LedgerEntryLine