Class TransactionExtensions
A helper class used for translating values held against an ITransaction
This is because transactions and transaction allocated records store their values in different value fields depending on the configuration of the ITransactionCode
Inheritance
TransactionExtensions
Assembly: LemonEdge.API.Entities.FinancialServices.dll
Syntax
public static class TransactionExtensions
Fields
MAX_VALUES
Declaration
public static readonly short MAX_VALUES
Field Value
Methods
CanDeleteCancelledTransaction(IHeaderTransactionalEntity, UserInfo, IReadOnlyCache)
Declaration
public static Task<bool> CanDeleteCancelledTransaction(IHeaderTransactionalEntity item, UserInfo currentUser, IReadOnlyCache cache)
Parameters
Returns
GetFuncValuePropName(short)
Declaration
public static string GetFuncValuePropName(short sequence)
Parameters
Type |
Name |
Description |
short |
sequence |
|
Returns
Declaration
public static IEnumerable<T> GetHeaderTransactionsInCodeDependantProcessingOrder<T>(IEnumerable<ITransactionCodeDependant> all, IEnumerable<T> items, Func<T, Guid> getCodeID)
Parameters
Returns
Type Parameters
GetLocalValuePropName(short)
Declaration
public static string GetLocalValuePropName(short sequence)
Parameters
Type |
Name |
Description |
short |
sequence |
|
Returns
GetNextFreeSequence(ITransaction)
Declaration
public static short? GetNextFreeSequence(this ITransaction transaction)
Parameters
Returns
GetReportingValuePropName(short)
Declaration
public static string GetReportingValuePropName(short sequence)
Parameters
Type |
Name |
Description |
short |
sequence |
|
Returns
GetSequence(ITransaction, short)
Returns the sequence of the value that is stored against the specified transaction for the specified ValueIndex
Declaration
public static short? GetSequence(this ITransaction transaction, short valueIndex)
Parameters
Type |
Name |
Description |
ITransaction |
transaction |
The record to return the sequence of value field that holds the specified type
|
short |
valueIndex |
The id of the type of value that is stored against the transaction
|
Returns
Type |
Description |
short? |
The sequence of the value that is stored against the specified transaction for the specified ValueIndex. Returns null if it is not being stored.
|
GetValueIndex(ITransaction, short)
Returns the ValueIndex for the type stored against the specified sequence as defined from Sequence
Declaration
public static short GetValueIndex(this ITransaction transaction, short sequence)
Parameters
Type |
Name |
Description |
ITransaction |
transaction |
The record to return the value index of for the specified sequence
|
short |
sequence |
The sequence indicating the value index to be returned by the Sequence against the transactions transaction code
|
Returns
GetValueIndexPropName(short)
Declaration
public static string GetValueIndexPropName(short sequence)
Parameters
Type |
Name |
Description |
short |
sequence |
|
Returns
GetValues(ITransaction, short)
Declaration
public static (decimal Local, decimal Func, decimal Rep) GetValues(this ITransaction transaction, short seq)
Parameters
Returns
HasValue(ITransaction, short)
Declaration
public static bool HasValue(this ITransaction transaction, short valueTypeIndex)
Parameters
Returns
SetValueIndex(ITransaction, short, short)
Declaration
public static void SetValueIndex(this ITransaction transaction, short sequence, short index)
Parameters
Type |
Name |
Description |
ITransaction |
transaction |
The record to update the value index of for the specified sequence
|
short |
sequence |
The sequence indicating the value index to be updated by the Sequence against the transactions transaction code
|
short |
index |
The new ValueIndex
|
SetValues(ITransaction, short, decimal, decimal, decimal)
Declaration
public static void SetValues(this ITransaction tran, short seq, decimal local, decimal func, decimal rep)
Parameters