Table of Contents

Class ReconciliationService

Namespace
Integrations.Application.Reports
Assembly
Integrations.Application.dll

Compares committed documents here with the provider for a date window and records discrepancies: committed here but not there, there but not here (created outside this service), tax totals that differ, and documents stuck in PendingTax for over a day. Each discrepancy is recorded once until resolved.

public sealed class ReconciliationService
Inheritance
ReconciliationService
Inherited Members

Constructors

ReconciliationService(IAppDbContext, ITaxProvider, EntityGuard, IEventPublisher, BusinessClock, AdminAuditLog, ILogger<ReconciliationService>)

Compares committed documents here with the provider for a date window and records discrepancies: committed here but not there, there but not here (created outside this service), tax totals that differ, and documents stuck in PendingTax for over a day. Each discrepancy is recorded once until resolved.

public ReconciliationService(IAppDbContext db, ITaxProvider provider, EntityGuard guard, IEventPublisher events, BusinessClock clock, AdminAuditLog audit, ILogger<ReconciliationService> logger)

Parameters

db IAppDbContext
provider ITaxProvider
guard EntityGuard
events IEventPublisher
clock BusinessClock
audit AdminAuditLog
logger ILogger<ReconciliationService>

Methods

IssuesAsync(string, bool, CancellationToken)

Issues for the entity, newest first.

public Task<IReadOnlyList<ReconciliationIssueDto>> IssuesAsync(string entityId, bool includeResolved, CancellationToken ct)

Parameters

entityId string
includeResolved bool
ct CancellationToken

Returns

Task<IReadOnlyList<ReconciliationIssueDto>>

ReconcileAsync(LegalEntity, DateOnly, DateOnly, CancellationToken)

Compares committed documents here and at the provider for the dates and records new issues; returns how many.

public Task<int> ReconcileAsync(LegalEntity entity, DateOnly from, DateOnly to, CancellationToken ct)

Parameters

entity LegalEntity
from DateOnly
to DateOnly
ct CancellationToken

Returns

Task<int>

ResolveAsync(Guid, CancellationToken)

Marks an issue resolved.

public Task<ReconciliationIssueDto> ResolveAsync(Guid id, CancellationToken ct)

Parameters

id Guid
ct CancellationToken

Returns

Task<ReconciliationIssueDto>