Search Results for

    Show / Hide Table of Contents

    Class PeriodEndProcessor

    Inheritance
    object
    BaseTransactionProcessor
    PeriodEndProcessor
    Implements
    ICanBeRevertedTransactionProcessor
    IPeriodEndProcessor
    ITaskProcessor
    IBaseDataSetProcessorWithDBSave
    IBaseDataSetProcessor
    IProcessor
    IDisposable
    ILockable
    Inherited Members
    BaseTransactionProcessor.RollbackChanges()
    BaseTransactionProcessor.ProcessOnDBSave()
    BaseTransactionProcessor.GetAllItemsInTransactionProcessor(bool)
    BaseTransactionProcessor.TaskInit(IEntityUpdater, IReadOnlyCache, UserInfo, BusyProgressReporter)
    BaseTransactionProcessor.StatusValidate(IHeaderTransactionalEntity, IEntityUpdater, IReadOnlyCache, UserInfo, IEntityDescriptorFactory, bool, bool)
    BaseTransactionProcessor.ForceLoad()
    BaseTransactionProcessor.ProcessTransaction()
    BaseTransactionProcessor.Validate()
    BaseTransactionProcessor.ExecuteFormula<T>(string, IBaseEntity)
    BaseTransactionProcessor.CustomUpdateCancelCorrectedItem(EntityDescriptor, ITransactionalEntity, ITransactionalEntity, bool)
    BaseTransactionProcessor.ProcessCancel(ITransactionalEntity, bool, BaseTransactionProcessor)
    BaseTransactionProcessor.ProcessCorrect(ITransactionalEntity, TransactionStatus, BaseTransactionProcessor)
    BaseTransactionProcessor.UpdateFinacialDate(ITransactionalEntity)
    BaseTransactionProcessor.UpdateCommonProperties()
    BaseTransactionProcessor.UpdateCommonProperties(IHeaderTransactionalEntity, ITransactionalEntity)
    BaseTransactionProcessor.KeepTransactionDateConsistent()
    BaseTransactionProcessor.UpdateAllStatuses(IHeaderTransactionalEntity)
    BaseTransactionProcessor.Dispose(bool)
    BaseTransactionProcessor.DisposeUnManagedState()
    BaseTransactionProcessor.Dispose()
    BaseTransactionProcessor.Services
    BaseTransactionProcessor.FinancialDateCalculator
    BaseTransactionProcessor.SubProcessors
    BaseTransactionProcessor.CancelledItems
    BaseTransactionProcessor.CorrectedItems
    BaseTransactionProcessor.RootCorrectedEntity
    BaseTransactionProcessor.RootCancelledEntity
    BaseTransactionProcessor.CanCancel
    BaseTransactionProcessor.CommitToFinalizeRequiresTask
    BaseTransactionProcessor.AnyChangeRequiresTaskRecalc
    BaseTransactionProcessor.Reporter
    BaseTransactionProcessor.Updater
    BaseTransactionProcessor.Cache
    BaseTransactionProcessor.User
    BaseTransactionProcessor.IgnoreEvents
    BaseTransactionProcessor.Order
    BaseTransactionProcessor.SaveProcessed
    BaseTransactionProcessor.CanLock
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.API.Core.FinancialServices.Processors.Transactional.PeriodEnd
    Assembly: LemonEdge.API.Core.FinancialServices.dll
    Syntax
    [ServerTask("Recalculate Period End", "d8592592-d980-45ac-b649-b9416752112a", typeof(PeriodEndProcessParameter), DefaultForHasSaveProcessingTask = typeof(IPeriodEnd))]
    public class PeriodEndProcessor : BaseTransactionProcessor, ICanBeRevertedTransactionProcessor, IPeriodEndProcessor, ITaskProcessor, IBaseDataSetProcessorWithDBSave, IBaseDataSetProcessor, IProcessor, IDisposable, ILockable

    Constructors

    PeriodEndProcessor(IEntityUpdater, IReadOnlyCache, UserInfo, IServiceContext, ITransactionsFinaliser)

    Declaration
    public PeriodEndProcessor(IEntityUpdater updater, IReadOnlyCache cache, UserInfo user, IServiceContext services, ITransactionsFinaliser transactionsFinaliser)
    Parameters
    Type Name Description
    IEntityUpdater updater
    IReadOnlyCache cache
    UserInfo user
    IServiceContext services
    ITransactionsFinaliser transactionsFinaliser

    PeriodEndProcessor(IServiceContext, ITransactionsFinaliser)

    Declaration
    public PeriodEndProcessor(IServiceContext context, ITransactionsFinaliser transactionsFinaliser)
    Parameters
    Type Name Description
    IServiceContext context
    ITransactionsFinaliser transactionsFinaliser

    Properties

    Adjustments

    Any manual adjustment records manually added to the period end, loaded from the PeriodEnd entity for this operation

    Declaration
    public IEnumerable<IPeriodEndAdjustment> Adjustments { get; }
    Property Value
    Type Description
    IEnumerable<IPeriodEndAdjustment>

    CapitalAccountDataItems

    All the capital account data item records generated by the process, to burn in all records for this period end for consistent, secure and fast reporting

    Declaration
    public IEnumerable<ICapitalAccountDataItem> CapitalAccountDataItems { get; }
    Property Value
    Type Description
    IEnumerable<ICapitalAccountDataItem>

    Loaded

    Flag to indicate if the processor has been fully loaded

    Declaration
    public override bool Loaded { get; }
    Property Value
    Type Description
    bool
    Overrides
    BaseTransactionProcessor.Loaded

    PeriodEnd

    The root period end record this processor is responsible for

    Declaration
    public IPeriodEnd PeriodEnd { get; }
    Property Value
    Type Description
    IPeriodEnd

    RootTransactionEntity

    The root transaction entity for this transaction processor

    Declaration
    public override IHeaderTransactionalEntity RootTransactionEntity { get; }
    Property Value
    Type Description
    IHeaderTransactionalEntity
    Overrides
    BaseTransactionProcessor.RootTransactionEntity

    Methods

    AddAdjustment(ICapitalAccountDataItem)

    Adds a manual capital account data item to the process linked to an IPeriodEndAdjustment

    Declaration
    public void AddAdjustment(ICapitalAccountDataItem adj)
    Parameters
    Type Name Description
    ICapitalAccountDataItem adj

    The capital account data item record to add to the process

    AddAdjustment(IPeriodEndAdjustment)

    Adds an adjustment manually to the processor

    Declaration
    public void AddAdjustment(IPeriodEndAdjustment adj)
    Parameters
    Type Name Description
    IPeriodEndAdjustment adj

    The period end adjustment record to add to the process

    AddToDataSetToProcess(IBaseEntity, EntityOperation)

    If a modified item belongs in the processor (IsChangedItemPartOfDataSet(IBaseEntity)), this adds the item to the processor if it already isn't a member of it

    Declaration
    public override void AddToDataSetToProcess(IBaseEntity item, EntityOperation operationType)
    Parameters
    Type Name Description
    IBaseEntity item

    The item to add to the processor

    EntityOperation operationType

    The type of operation that modified the item. Useful as deleted items can often be treated differently in a processor.

    Overrides
    BaseTransactionProcessor.AddToDataSetToProcess(IBaseEntity, EntityOperation)

    CalculateAsync(CancellationToken)

    Calculates the period end process generating all the capital account data item entries

    Declaration
    public Task CalculateAsync(CancellationToken token = default)
    Parameters
    Type Name Description
    CancellationToken token
    Returns
    Type Description
    Task

    A task indicating the completion of this operation

    CanWrite(IBaseEntity)

    Indicates if the processor allows items to be written to depending on the users permission and transaction status

    Declaration
    public override bool CanWrite(IBaseEntity baseEntity)
    Parameters
    Type Name Description
    IBaseEntity baseEntity
    Returns
    Type Description
    bool
    Overrides
    BaseTransactionProcessor.CanWrite(IBaseEntity)

    DisposeManagedState()

    Declaration
    protected override void DisposeManagedState()
    Overrides
    BaseTransactionProcessor.DisposeManagedState()

    GetAllItemsInThisProcessorExcludingSubProcessors()

    Returns all items in this base processor - Used by the system when reverting the status of a finalized transaction back to in progress

    Declaration
    public override IEnumerable<IBaseEntity> GetAllItemsInThisProcessorExcludingSubProcessors()
    Returns
    Type Description
    IEnumerable<IBaseEntity>

    An enumeration of all items in this transactional processor

    Overrides
    BaseTransactionProcessor.GetAllItemsInThisProcessorExcludingSubProcessors()

    Init(ITaskRunner, ServerTaskParameter)

    Initializes the task processor with the parameters for processing the task

    Declaration
    public Task Init(ITaskRunner runner, ServerTaskParameter parameter)
    Parameters
    Type Name Description
    ITaskRunner runner

    The context within which the task is being processed

    ServerTaskParameter parameter
    Returns
    Type Description
    Task

    A task indicating the completion of the operationn

    IsChangedItemPartOfDataSet(IBaseEntity)

    This function returns true if the specified modified item belongs in this processor.

    Non modified items will just automatically be loaded by the processor anyway, this is more to keep track of items as they are changed and should be added to the processor without having to reload

    Declaration
    public override bool IsChangedItemPartOfDataSet(IBaseEntity item)
    Parameters
    Type Name Description
    IBaseEntity item

    The item to check if it belongs in this processor

    Returns
    Type Description
    bool

    True if the specified item belongs in this processor

    Overrides
    BaseTransactionProcessor.IsChangedItemPartOfDataSet(IBaseEntity)

    IsLocked(IBaseEntity)

    Indicates if this item is currently locked. True if status is finalized or cancelled. Can be changed by the user in the UI to modify finalized transactions which this will process as a cancel/correct

    Declaration
    public override bool IsLocked(IBaseEntity baseEntity)
    Parameters
    Type Name Description
    IBaseEntity baseEntity
    Returns
    Type Description
    bool

    true if it can be unlocked to enable updates, otherwise false

    Overrides
    BaseTransactionProcessor.IsLocked(IBaseEntity)

    Load()

    A thread safe implementation to load all required data for the processor

    Once completed Loaded should return true.

    Declaration
    public override Task Load()
    Returns
    Type Description
    Task

    A task indicating the completion of the load operation

    Overrides
    BaseTransactionProcessor.Load()

    LoadLight()

    Declaration
    public Task LoadLight()
    Returns
    Type Description
    Task

    ProcessTask(CancellationToken)

    A function that implements the process for this task using the parameters provided during Init(ITaskRunner, ServerTaskParameter)

    Declaration
    public Task<object> ProcessTask(CancellationToken cancel)
    Parameters
    Type Name Description
    CancellationToken cancel

    A cancellation token for cancelling any long running task

    Returns
    Type Description
    Task<object>

    An optional object detailing the result which can be converted using ITaskResultHandler into a ServerTaskResult, or is a ServerTaskResult itself

    RemoveAdjustment(ICapitalAccountDataItem)

    Removes a manually added capital account data item from the processor

    Declaration
    public void RemoveAdjustment(ICapitalAccountDataItem adj)
    Parameters
    Type Name Description
    ICapitalAccountDataItem adj

    The capital account data item record to remove from the process

    RemoveAdjustment(IPeriodEndAdjustment)

    Removes an adjustment from the processor

    Declaration
    public void RemoveAdjustment(IPeriodEndAdjustment adj)
    Parameters
    Type Name Description
    IPeriodEndAdjustment adj

    The period end adjustment record to remove from the process

    SetLock(IBaseEntity, bool)

    Sets the locked status IBaseEntity

    Declaration
    public override void SetLock(IBaseEntity baseEntity, bool value)
    Parameters
    Type Name Description
    IBaseEntity baseEntity
    bool value
    Overrides
    BaseTransactionProcessor.SetLock(IBaseEntity, bool)

    UpdateCalculatedProperties(ITransactionalEntity)

    Updates calculated properties on the entity (and presumably sub affected entities) such as financial date

    Declaration
    protected override Task UpdateCalculatedProperties(ITransactionalEntity tranEntity)
    Parameters
    Type Name Description
    ITransactionalEntity tranEntity
    Returns
    Type Description
    Task
    Overrides
    BaseTransactionProcessor.UpdateCalculatedProperties(ITransactionalEntity)

    Implements

    ICanBeRevertedTransactionProcessor
    IPeriodEndProcessor
    ITaskProcessor
    IBaseDataSetProcessorWithDBSave
    IBaseDataSetProcessor
    IProcessor
    IDisposable
    ILockable

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.