C# Class BudgetAnalyser.Engine.Ledger.ReconciliationBuilder

Inheritance: IReconciliationBuilder
Show file Open project: Benrnz/BudgetAnalyser

Public Methods

Method Description
CreateNewMonthlyReconciliation ( System.DateTime reconciliationDateExclusive, BudgetModel budget, StatementModel statement ) : ReconciliationResult
FindAutoMatchingTransactions ( LedgerEntry ledgerEntry, bool includeMatchedTransactions = false ) : IEnumerable
FindAutoMatchingTransactions ( [ recon, bool includeMatchedTransactions = false ) : IEnumerable
IsAutoMatchingTransaction ( BudgetAnalyser.Engine.Statement.Transaction statementTransaction, IEnumerable ledgerTransactions ) : bool
ReconciliationBuilder ( [ logger ) : System

Private Methods

Method Description
AddBalanceAdjustmentsForFutureTransactions ( StatementModel statement, System.DateTime reconciliationDate ) : void
AddNew ( BudgetModel budget, StatementModel statement, System.DateTime startDateIncl ) : void

This is effectively stage 2 of the Reconciliation process. Called by ReconciliationBuilder.CreateNewMonthlyReconciliation. It builds the contents of the new ledger line based on budget and statement input.

AutoMatchTransactionsAlreadyInPreviousPeriod ( List transactions, LedgerEntry previousLedgerEntry, List newLedgerTransactions ) : void

Match statement transaction with special automatching references to Ledger transactions.

CalculateDateForReconcile ( LedgerBook ledgerBook, System.DateTime reconciliationDate ) : System.DateTime

When creating a new reconciliation a start date is required to be able to search a statement for transactions between the start date and the reconciliation date specified (today or pay day). The start date should start from the previous ledger entry line or one month prior if no records exist.

CompileLedgersAndBalances ( LedgerBook parentLedgerBook ) : IEnumerable
CreateBalanceAdjustmentTasksIfRequired ( ) : void
CreateTasksToTransferFundsIfPaidFromDifferentAccount ( IEnumerable transactions ) : void
CreateToDoForAnyOverdrawnSurplusBalance ( ) : void

An overdrawn surplus balance is not valid, and indicates that one or more ledger buckets have been overdrawn. A transfer probably needs to be manually done by the user.

ExtractNarrative ( BudgetAnalyser.Engine.Statement.Transaction t ) : string
IncludeBudgetedAmount ( BudgetModel currentBudget, LedgerBucket ledgerBucket, System.DateTime reconciliationDate ) : List
IncludeStatementTransactions ( LedgerEntry newEntry, ICollection filteredStatementTransactions ) : IEnumerable
TransactionsToAutoMatch ( IEnumerable transactions, string autoMatchingReference ) : IEnumerable

Method Details

CreateNewMonthlyReconciliation() public method

public CreateNewMonthlyReconciliation ( System.DateTime reconciliationDateExclusive, BudgetModel budget, StatementModel statement ) : ReconciliationResult
reconciliationDateExclusive System.DateTime
budget BudgetAnalyser.Engine.Budget.BudgetModel
statement BudgetAnalyser.Engine.Statement.StatementModel
return ReconciliationResult

FindAutoMatchingTransactions() public static method

public static FindAutoMatchingTransactions ( LedgerEntry ledgerEntry, bool includeMatchedTransactions = false ) : IEnumerable
ledgerEntry LedgerEntry
includeMatchedTransactions bool
return IEnumerable

FindAutoMatchingTransactions() public static method

public static FindAutoMatchingTransactions ( [ recon, bool includeMatchedTransactions = false ) : IEnumerable
recon [
includeMatchedTransactions bool
return IEnumerable

IsAutoMatchingTransaction() public static method

public static IsAutoMatchingTransaction ( BudgetAnalyser.Engine.Statement.Transaction statementTransaction, IEnumerable ledgerTransactions ) : bool
statementTransaction BudgetAnalyser.Engine.Statement.Transaction
ledgerTransactions IEnumerable
return bool

ReconciliationBuilder() public method

public ReconciliationBuilder ( [ logger ) : System
logger [
return System