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
dbIAppDbContextproviderITaxProviderguardEntityGuardeventsIEventPublisherclockBusinessClockauditAdminAuditLogloggerILogger<ReconciliationService>
Methods
IssuesAsync(string, bool, CancellationToken)
Issues for the entity, newest first.
public Task<IReadOnlyList<ReconciliationIssueDto>> IssuesAsync(string entityId, bool includeResolved, CancellationToken ct)
Parameters
entityIdstringincludeResolvedboolctCancellationToken
Returns
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
entityLegalEntityfromDateOnlytoDateOnlyctCancellationToken
Returns
ResolveAsync(Guid, CancellationToken)
Marks an issue resolved.
public Task<ReconciliationIssueDto> ResolveAsync(Guid id, CancellationToken ct)
Parameters
idGuidctCancellationToken