Class TransactionsHelper
The main helper class for processing transactions and ensuring their values are consistently updated
Is responsible for updating ITransaction, ITransactionAllocated , IGLPosting, and IGLPostingAllocated records
Implements
Inherited Members
Namespace: LemonEdge.API.Core.FinancialServices.Processors.Transactional
Assembly: LemonEdge.API.Core.FinancialServices.dll
Syntax
public class TransactionsHelper : ITransactionsHelper
Constructors
TransactionsHelper(ITransactionProcessor)
Creates a new helper to work against the specified processor
Declaration
public TransactionsHelper(ITransactionProcessor processor)
Parameters
Type | Name | Description |
---|---|---|
ITransactionProcessor | processor | The processor to provide helper functionality too |
Properties
PreventBackingIntoFXCalcs
Prevents any calculation from backing into creating a new fx rate. Used to override behaviour for auto-generated transactions, such as step changes, that fix fx rates.
Declaration
public bool PreventBackingIntoFXCalcs { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
ConsolidateTransfers(ITransaction)
Takes any transferred records, aggregates them and adds them to single individual records, removing the transferred records themselves
Declaration
public Task ConsolidateTransfers(ITransaction tran)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | tran |
Returns
Type | Description |
---|---|
Task |
EnforceTransactionPathOnGlPostings(ITransaction)
Declaration
public Task EnforceTransactionPathOnGlPostings(ITransaction tran)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | tran |
Returns
Type | Description |
---|---|
Task |
GetEffectiveDate(ITransaction, IGLPosting)
Declaration
public DateTimeOffset GetEffectiveDate(ITransaction tran, IGLPosting posting)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | tran | |
IGLPosting | posting |
Returns
Type | Description |
---|---|
DateTimeOffset |
GetEffectiveDate(ITransaction, IGLPosting, IGLPostingAllocated)
Declaration
public DateTimeOffset GetEffectiveDate(ITransaction tran, IGLPosting posting, IGLPostingAllocated alloc)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | tran | |
IGLPosting | posting | |
IGLPostingAllocated | alloc |
Returns
Type | Description |
---|---|
DateTimeOffset |
GetEffectiveDate(ITransaction, ITransactionAllocated)
Declaration
public DateTimeOffset GetEffectiveDate(ITransaction tran, ITransactionAllocated tranAlloc)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | tran | |
ITransactionAllocated | tranAlloc |
Returns
Type | Description |
---|---|
DateTimeOffset |
GetEntitySet(ITransaction)
Declaration
public Task<IEntitySet> GetEntitySet(ITransaction transaction)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction |
Returns
Type | Description |
---|---|
Task<IEntitySet> |
GetSharedTransactionFormulaContext(ITransaction, ITransactionAllocated, IGLPosting)
Declaration
public TransactionContext GetSharedTransactionFormulaContext(ITransaction tran, ITransactionAllocated allocated = null, IGLPosting posting = null)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | tran | |
ITransactionAllocated | allocated | |
IGLPosting | posting |
Returns
Type | Description |
---|---|
TransactionContext |
GetTransactionAllocatedValue(ITransaction, ITransactionTypeValue, Guid)
Gets the values of the transaction allocation for the specified ITransactionTypeValue
in all currencies for the specified allocateToEntityID
Declaration
public (decimal? LocalValue, decimal? FuncValue, decimal? ReportingValue) GetTransactionAllocatedValue(ITransaction transaction, ITransactionTypeValue typeValue, Guid allocateToEntityID)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction to return the allocated value for |
ITransactionTypeValue | typeValue | The ITransactionTypeValue value to return from the transaction allocation |
Guid | allocateToEntityID |
Returns
Type | Description |
---|---|
(decimal? LocalValue, decimal? FuncValue, decimal? ReportingValue) | The values of the transaction allocation for the specified
Code in all currencies for the specified
|
GetTransactionAllocatedValue(ITransaction, string, Guid)
Gets the values of the transaction allocation for the specified
Code in all currencies for the specified
allocateToEntityID
Declaration
public Task<(decimal? LocalValue, decimal? FuncValue, decimal? ReportingValue)> GetTransactionAllocatedValue(ITransaction transaction, string transactionTypeValueCode, Guid allocateToEntityID)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction to return the allocated value for |
string | transactionTypeValueCode | The code of the ITransactionTypeValue value to return from the transaction allocation |
Guid | allocateToEntityID |
Returns
Type | Description |
---|---|
Task<(decimal? LocalValue, decimal? FuncValue, decimal? ReportingValue)> | The values of the transaction allocation for the specified
Code in all currencies for the specified
|
GetTransactionNote(ITransaction, ITransactionTypeValue)
Gets the note of the transaction for the specified Code
Declaration
public string GetTransactionNote(ITransaction transaction, ITransactionTypeValue transactionTypeValue)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction to return the note for |
ITransactionTypeValue | transactionTypeValue | The code of the ITransactionTypeValue note to return from the transaction |
Returns
Type | Description |
---|---|
string | The note of the transaction for the specified Code |
GetTransactionNote(ITransaction, string)
Gets the note of the transaction for the specified Code
Declaration
public Task<string> GetTransactionNote(ITransaction transaction, string transactionTypeValueCode)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction to return the note for |
string | transactionTypeValueCode | The code of the ITransactionTypeValue note to return from the transaction |
Returns
Type | Description |
---|---|
Task<string> | The note of the transaction for the specified Code |
GetTransactionSetting(ITransaction, string)
Declaration
public Task<IBaseEntity> GetTransactionSetting(ITransaction tran, string customEntityName)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | tran | |
string | customEntityName |
Returns
Type | Description |
---|---|
Task<IBaseEntity> |
GetTransactionSettingValue(ITransaction, string, string)
Declaration
public Task<object> GetTransactionSettingValue(ITransaction tran, string customEntityName, string customEntityProperty)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | tran | |
string | customEntityName | |
string | customEntityProperty |
Returns
Type | Description |
---|---|
Task<object> |
GetTransactionValue(ITransaction, ITransactionTypeValue)
Gets the values of the transaction for the specified ITransactionTypeValue in all currencies
Declaration
public (decimal ReportingValue, decimal FuncValue, decimal LocalValue) GetTransactionValue(ITransaction transaction, ITransactionTypeValue typeValue)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction to return the value for |
ITransactionTypeValue | typeValue | The ITransactionTypeValue value to return from the transaction |
Returns
Type | Description |
---|---|
(decimal ReportingValue, decimal FuncValue, decimal LocalValue) | The values of the transaction for the specified ITransactionTypeValue in all currencies |
GetTransactionValue(ITransaction, string)
Gets the values of the transaction for the specified Code in all currencies
Declaration
public Task<(decimal ReportingValue, decimal FuncValue, decimal LocalValue)> GetTransactionValue(ITransaction transaction, string transactionTypeValueCode)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction to return the value for |
string | transactionTypeValueCode | The code of the ITransactionTypeValue value to return from the transaction |
Returns
Type | Description |
---|---|
Task<(decimal ReportingValue, decimal FuncValue, decimal LocalValue)> | The values of the transaction for the specified Code in all currencies |
IsFunctionalReportingEqual(ITransaction)
Declaration
public Task<bool> IsFunctionalReportingEqual(ITransaction transaction)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction |
Returns
Type | Description |
---|---|
Task<bool> |
IsLocalFunctionalEqual(ITransaction)
Declaration
public Task<bool> IsLocalFunctionalEqual(ITransaction transaction)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction |
Returns
Type | Description |
---|---|
Task<bool> |
IsLocalReportingEqual(ITransaction)
Declaration
public Task<bool> IsLocalReportingEqual(ITransaction transaction)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction |
Returns
Type | Description |
---|---|
Task<bool> |
SetTransactionAllocatedValue(ITransaction, ITransactionTypeValue, Guid, decimal?, decimal?, decimal?, bool, bool)
Sets the value of the specified transactionTypeValueCode
(
Code) of the specified transaction allocation in all currencies
If the specified allocateToEntityID
does not have an allocation one is created.
Declaration
public Task SetTransactionAllocatedValue(ITransaction transaction, ITransactionTypeValue typeValue, Guid allocateToEntityID, decimal? repValue, decimal? funcValue, decimal? localValue, bool updateGL = true, bool updateTotals = true)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction to update the allocation with new values in all currencies |
ITransactionTypeValue | typeValue | The ITransactionTypeValue of the value against this transaction allocation to update |
Guid | allocateToEntityID | The entity to update the transaction allocation amount for |
decimal? | repValue | The new value in reporting currency |
decimal? | funcValue | The new value in functional currency |
decimal? | localValue | The new value in local currency |
bool | updateGL | |
bool | updateTotals |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
SetTransactionAllocatedValue(ITransaction, string, Guid, decimal?, decimal?, decimal?)
Sets the value of the specified transactionTypeValueCode
(
Code) of the specified transaction allocation in all currencies
If the specified allocateToEntityID
does not have an allocation one is created.
Declaration
public Task SetTransactionAllocatedValue(ITransaction transaction, string transactionTypeValueCode, Guid allocateToEntityID, decimal? repValue, decimal? funcValue, decimal? localValue)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction to update the allocation with new values in all currencies |
string | transactionTypeValueCode | The Code of the value against this transaction allocation to update |
Guid | allocateToEntityID | The entity to update the transaction allocation amount for |
decimal? | repValue | The new value in reporting currency |
decimal? | funcValue | The new value in functional currency |
decimal? | localValue | The new value in local currency |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
SetTransactionNote(ITransaction, ITransactionTypeValue, string)
Set the note of the transaction for the specified Code
Declaration
public void SetTransactionNote(ITransaction transaction, ITransactionTypeValue transactionTypeValue, string note)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction to set the note for |
ITransactionTypeValue | transactionTypeValue | The code of the ITransactionTypeValue note to set for the transaction |
string | note | The note value to set |
SetTransactionNote(ITransaction, string, string)
Set the note of the transaction for the specified Code
Declaration
public Task SetTransactionNote(ITransaction transaction, string transactionTypeValueCode, string note)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction to set the note for |
string | transactionTypeValueCode | The code of the ITransactionTypeValue note to set for the transaction |
string | note | The note value to set |
Returns
Type | Description |
---|---|
Task |
SetTransactionValue(ITransaction, string, decimal?, decimal?, decimal?)
Sets the value of the specified transactionTypeValueCode
(
Code) of the specified transaction in all currencies
Once set the system updates all the allocations for this transaction (if any), the gl and the net amounts. It also then provides any TransactionProcessorExtender an opportunity to process the change too
Declaration
public Task SetTransactionValue(ITransaction transaction, string transactionTypeValueCode, decimal? repValue, decimal? funcValue, decimal? localValue)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction to update with new values in all currencies |
string | transactionTypeValueCode | The Code of the value against this transaction to update |
decimal? | repValue | The new value in reporting currency |
decimal? | funcValue | The new value in functional currency |
decimal? | localValue | The new value in local currency |
Returns
Type | Description |
---|---|
Task |
UpdateAllocations()
Updates all the allocations for all the transactions in the processor
Declaration
public Task UpdateAllocations()
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
UpdateAllocations(ITransaction, bool, ITransactionCodeValue)
For a given transaction this automatically processes the specified value (or all if null) and allocates them to any transaction allocations according to the path (determined dynamically) for that transaction if the Allocation is configured to not be None
The allocation only occurs if the value on the transaction has been manually entered
.GetManualChange(ITransaction, short) or force
is true.
Declaration
public Task UpdateAllocations(ITransaction transaction, bool force = false, ITransactionCodeValue codeValue = null)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction to automatically allocate to ITransactionAllocated records according to the relevant path, including creating new transactions and allocations for entities above |
bool | force | Indicates the allocation should be forced, overriding any allocated values that are manually entered |
ITransactionCodeValue | codeValue | The value to allocate. Null indicates all values in this transaction should be allocated |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
UpdateAllocations(ITransactionAllocated, ITransactionCodeValue)
For a given transaction allocation this automatically processes updates the totals for the parent transaction, and if this allocation points to another transaction it updates that total, and in turn its allocations
Declaration
public Task UpdateAllocations(ITransactionAllocated allocated, ITransactionCodeValue codeValue = null)
Parameters
Type | Name | Description |
---|---|---|
ITransactionAllocated | allocated | The transaction allocation to automatically have its parent updated, and to allocate any matching transaction with too |
ITransactionCodeValue | codeValue | The value to allocate. Null indicates all total values in the parent transaction should be allocated |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
UpdateAllocationsStructureFromPath(ITransaction)
Updates the allocation structure for the specified header transaction according to the path set against the transaction
This will remove any transactions in the set that are against entities no longer in the path, and will add any required missing ones, along with the allocations for each transaction
This only creates the correct structure for the transactions, and allocations, it does not update any valuesDeclaration
public Task UpdateAllocationsStructureFromPath(ITransaction headerTransaction)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | headerTransaction | The header transaction that requires a structure to be correctly created depending on the path selected |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
UpdateBoundValues(IGLPosting)
Declaration
public Task UpdateBoundValues(IGLPosting posting)
Parameters
Type | Name | Description |
---|---|---|
IGLPosting | posting |
Returns
Type | Description |
---|---|
Task |
UpdateDate(ITransaction, DateTimeOffset, DateTimeOffset?, bool)
Updates the root transaction to use the specified date, if it already has the same date it will only update again
if forceUpdate
is true
This is replicated for all transaction in the processor, then updates the allocations (if any) and gl incase the date change impacted any of that
Declaration
public Task UpdateDate(ITransaction transaction, DateTimeOffset date, DateTimeOffset? dateOverride, bool forceUpdate)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | |
DateTimeOffset | date | The new transaction date for all transactions in the processor |
DateTimeOffset? | dateOverride | |
bool | forceUpdate | Indicates all transactions, allocations, and gl should update from the specified date even if it is the same as the current root transaction date |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
UpdateFormulaValues(ITransaction)
Declaration
public Task UpdateFormulaValues(ITransaction transaction)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction |
Returns
Type | Description |
---|---|
Task |
UpdateFromFXRateChange(ITransaction, bool, bool)
Updates a specified transaction to automatically calculate and update the other currencies.
Declaration
public Task UpdateFromFXRateChange(ITransaction transaction, bool hasLocalFuncChange, bool hasLocalReportingChange)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | |
bool | hasLocalFuncChange | |
bool | hasLocalReportingChange |
Returns
Type | Description |
---|---|
Task |
UpdateFromFxRate(ITransaction, ITransactionAllocated, ITransactionCodeValue, ITransactionTypeValue, TransactionValueType?)
Updates a specified transaction allocation to automatically calculate and update the other currencies for a specified transaction code value according to the ITransactionCodeValue settings
Declaration
public Task UpdateFromFxRate(ITransaction transaction, ITransactionAllocated allocation, ITransactionCodeValue codeValue, ITransactionTypeValue valueDef, TransactionValueType? source)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction that has the allocation to udpate the amounts in other currencies for |
ITransactionAllocated | allocation | The transaction allocation to update the amounts in other currencies for |
ITransactionCodeValue | codeValue | The value configuration for how the other currencies should be updated - from formulas, or fx calcs |
ITransactionTypeValue | valueDef | The value to be updated |
TransactionValueType? | source |
Returns
Type | Description |
---|---|
Task |
UpdateFromFxRate(ITransaction, ITransactionCodeValue, ITransactionTypeValue, TransactionValueType?)
Updates a specified transaction to automatically calculate and update the other currencies for a specified transaction code value according to the ITransactionCodeValue settings
Declaration
public Task UpdateFromFxRate(ITransaction transaction, ITransactionCodeValue codeValue, ITransactionTypeValue valueDef, TransactionValueType? source)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction to udpate the amounts in other currencies for |
ITransactionCodeValue | codeValue | The value configuration for how the other currencies should be updated - from formulas, or fx calcs |
ITransactionTypeValue | valueDef | The value to be updated |
TransactionValueType? | source |
Returns
Type | Description |
---|---|
Task |
UpdateGL()
Updates the gl entries and allocations for every transaction in the processor. This only occurs if the transaction status is greater than or equal to committed
Declaration
public Task UpdateGL()
Returns
Type | Description |
---|---|
Task | A task indicating completion of the operation |
UpdateGL(IGLPosting)
Updates all the gl posting allocations against the specified gl posting entry, if the ITransactionCode is configured for allocations
Declaration
public Task UpdateGL(IGLPosting posting)
Parameters
Type | Name | Description |
---|---|---|
IGLPosting | posting | The gl posting entry to update the allocations for |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
UpdateGL(IGLPostingAllocated)
Updates the parent gl posting of the specified gl posting allocation, to ensure the totals correctly reflect the modified allocation amount
Declaration
public void UpdateGL(IGLPostingAllocated alloc)
Parameters
Type | Name | Description |
---|---|---|
IGLPostingAllocated | alloc | The gl posting allocation to update the parent posting amounts for |
UpdateGL(ITransaction, ITransactionCodeValue)
Updates the GL entries against all transactions in the specified transactionHeader
set,
according to the ITransactionCode automated rules for the gl entries
If the gl entries do not exist, the system will automatically create them. This only occurs if the transaction status is greater than or equal to committed
Declaration
public Task UpdateGL(ITransaction transactionHeader, ITransactionCodeValue codeValue = null)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transactionHeader | The IHeaderTransactionalEntity for which all transactions in the set will have their gl entries updated |
ITransactionCodeValue | codeValue | The value on the transactions that should be used to update the gl entries. Null implies all values on the transactions will be used to update the gl entries |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
UpdateGLBankAccountsToMatchEntity()
Updates all gl accounts that are selectable bank accounts to make sure they match the posting entity
Declaration
public Task UpdateGLBankAccountsToMatchEntity()
Returns
Type | Description |
---|---|
Task |
UpdateGLBankAccountsToMatchEntity(ITransaction)
Declaration
public Task UpdateGLBankAccountsToMatchEntity(ITransaction tran)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | tran |
Returns
Type | Description |
---|---|
Task |
UpdateGLPostingFromCreated(ITransaction, IGLPosting, ITransactionCodeGLEntry, bool)
Updates the specified newly created posting
with a default entity and currency from the owning
transaction
Declaration
public Task UpdateGLPostingFromCreated(ITransaction owningTransaction, IGLPosting posting, ITransactionCodeGLEntry glEntry = null, bool updateFxRate = true)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | owningTransaction | The transaction record this glposting is a child of |
IGLPosting | posting | The newly created gl posting record |
ITransactionCodeGLEntry | glEntry | An optional associated transaction code gl entry specifiying the rules for the creation of the gl posting. Can be null if created manually |
bool | updateFxRate |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
UpdateGLPostingInfo(ITransaction, IGLPosting, ITransactionCodeGLEntry, bool)
Updates the specified gl posting entry with the correct path, status, and fx rates. Also updates the account,
ledger, etc from the glEntry
settings from the ITransactionCode is
specified
Declaration
public Task UpdateGLPostingInfo(ITransaction owningTransaction, IGLPosting posting, ITransactionCodeGLEntry glEntry = null, bool updateFxRate = true)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | owningTransaction | The owning transaction the gl posting has as a parent |
IGLPosting | posting | The gl posting entry to update |
ITransactionCodeGLEntry | glEntry | An optional transaction code gl entry configuration specifying how the system should update the entry. Can be null if just added by a user. |
bool | updateFxRate | If true fx rate will be set from transaction |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
UpdateNetAmounts()
Updates the LocalNetAmount, FuncNetAmount , and ReportingNetAmount to hold the aggregate of all other values stored against all transactions in this processor
Declaration
public void UpdateNetAmounts()
UpdateNetAmounts(ITransaction)
Updates the LocalNetAmount, FuncNetAmount , and ReportingNetAmount to hold the aggregate of all other values stored in this transaction
If the transaction has allocations then it sums the values for each allocation and updates the transaction total to be the sum of the allocations if it does not match already
Declaration
public void UpdateNetAmounts(ITransaction tran)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | tran | The transaction to update the net amounts for |
UpdatePathFromEntity(ITransaction)
Attempts to automatically update the path for the transaction from the selected entity, if the Path is set to Manual and that entity is only involved in one IAllocationPath
Declaration
public Task UpdatePathFromEntity(ITransaction transaction)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction to automatically update the path for |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
UpdatePathFromInstrument(ITransaction)
Updates the path for the specified transaction if the Path is set to AutoFromInstrument
Retrieves the path from the IAllocationMapping entries to determine the correct path from the transactions instrument
Declaration
public Task UpdatePathFromInstrument(ITransaction tran)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | tran | The transaction to automatically update its path from the instrument |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
UpdateStatus(TransactionStatus)
Updates all transactions, transaction allocations, glpostings, and gl posting allocations in this processor to have the same TransactionStatus
When a transaction is InProgress the system does not generate any gl entries for it. Only when it is moved to Committed or Finalized does it do so
So when this status is updated it also calls UpdateGL() to ensure any gl entries are created if the status was previously InProgressDeclaration
public Task UpdateStatus(TransactionStatus status)
Parameters
Type | Name | Description |
---|---|---|
TransactionStatus | status | The transaction status to set all records to |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
UpdateTransactionFromEntityDateChange(ITransaction)
Declaration
public Task UpdateTransactionFromEntityDateChange(ITransaction transaction)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction |
Returns
Type | Description |
---|---|
Task |
UpdateTransactionFromEntityDateChange(ITransaction, bool, bool, string, bool)
Updates the specified transaction, and all in the set too, from its transaction date being changed.
This involves reevaluating path allocations, financial date calculations and fx
Declaration
public Task UpdateTransactionFromEntityDateChange(ITransaction transaction, bool forceNewFX, bool forceUpdateFromFX, string propChanged = null, bool updateAllOtherHeaders = true)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction, and all associated ones in the set, to update from a transaction date change |
bool | forceNewFX | |
bool | forceUpdateFromFX | Indicates all values calculated from fx should be recalculated even if the fx has not changed from the date moving |
string | propChanged | |
bool | updateAllOtherHeaders |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
UpdateTransactionFromPropertyChanged(ITransaction, string)
Updated the specified transaction, and all in the set too, from any property being changed.
This involves reevaluating path allocations, financial date calculations and fx
Declaration
public Task UpdateTransactionFromPropertyChanged(ITransaction transaction, string propertyChanged)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction, and all associated ones in the set, to update from the property changed |
string | propertyChanged | The name of the property that was changed. Used when updating the transaction's local currency |
Returns
Type | Description |
---|---|
Task |
UpdateTransactionInfo(ITransaction, ITransaction, bool)
Ensures the specified subTransaction
has all the correct matching properties as the
parentTransaction
such as status, dates, allocation types, codes, inctruments and paths
Declaration
public void UpdateTransactionInfo(ITransaction subTransaction, ITransaction parentTransaction, bool updateAllOtherHeaders = true)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | subTransaction | The transaction in a set to make sure it has the same standard properties such as transaction date and status |
ITransaction | parentTransaction | The parent transaction in the set to make sure all child ones have the same standard properties such as status and transaction date |
bool | updateAllOtherHeaders |
UpdateTransactionTotalUnitsFrom(ITransaction)
Updates unit totals for transactions above this one in the heirarchy (transaction set GetTransactionSet(ITransaction))
Declaration
public void UpdateTransactionTotalUnitsFrom(ITransaction fromTran)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | fromTran | The transaction to start from and update all other transactions above this one with |
UpdateTransactionTotalsFrom(ITransaction, ITransactionCodeValue, bool)
Updates totals for transactions above this one in the heirarchy (transaction set GetTransactionSet(ITransaction))
Declaration
public void UpdateTransactionTotalsFrom(ITransaction fromTran, ITransactionCodeValue codeValue, bool markFrom)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | fromTran | The transaction to start from and update all other transactions above this one with |
ITransactionCodeValue | codeValue | The value to update for the totals for all transactions above. If null, this updates all values against the transactions. |
bool | markFrom | Indicates that the specified transaction should be marked as having the value being manually changed |
UpdateUnitAllocations(ITransaction)
For a given transaction this automatically processes the units and allocates them to any transaction allocations according to the path (determined dynamically) for that transaction if the Allocation is configured to not be None The allocation creates Allocation records if they do not exist, and also creates new transaction records (and their allocations too) if the path includes entities above
Declaration
public Task UpdateUnitAllocations(ITransaction transaction)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | transaction | The transaction to automatically allocate to ITransactionAllocated records according to the relevant path, including creating new transactions and allocations for entities above |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |