C# Класс BudgetAnalyser.Engine.Ledger.LedgerCalculation

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

CalculateCurrentMonthBucketSpend() публичный Метод

Calculates the current month bucket spend.
///
public CalculateCurrentMonthBucketSpend ( [ ledgerBook, [ filter, [ statement, [ bucketCode ) : decimal
ledgerBook [
filter [
statement [
bucketCode [
Результат decimal

CalculateCurrentMonthLedgerBalances() публичный Метод

Calculates the current month ledger balances.
///
public CalculateCurrentMonthLedgerBalances ( [ ledgerBook, [ filter, [ statement ) : decimal>.IDictionary
ledgerBook [
filter [
statement [
Результат decimal>.IDictionary

CalculateCurrentMonthSurplusBalance() публичный Метод

Calculates the current month surplus balance.
///
public CalculateCurrentMonthSurplusBalance ( [ ledgerBook, [ filter, [ statement ) : decimal
ledgerBook [
filter [
statement [
Результат decimal

CalculateOverspentLedgers() публичный Метод

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
Результат IEnumerable

LedgerCalculation() публичный Метод

Initializes a new instance of the LedgerCalculation class.
public LedgerCalculation ( ) : System
Результат System

LedgerCalculation() публичный Метод

Initializes a new instance of the LedgerCalculation class.
public LedgerCalculation ( ILogger logger ) : System
logger ILogger
Результат System

LocateApplicableLedgerBalance() публичный Метод

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
Результат decimal

LocateApplicableLedgerLine() публичный Метод

Locates the applicable ledger line.
public LocateApplicableLedgerLine ( LedgerBook ledgerBook, System.DateTime beginDate ) : LedgerEntryLine
ledgerBook LedgerBook
beginDate System.DateTime
Результат LedgerEntryLine

LocateApplicableLedgerLine() публичный Метод

Locates the applicable ledger line.
public LocateApplicableLedgerLine ( LedgerBook ledgerBook, [ filter ) : LedgerEntryLine
ledgerBook LedgerBook
filter [
Результат LedgerEntryLine