The demo company now has its electronic invoices: a paused PEC channel and an intermediary, routing rules, the files of the demo invoices with the notifications the SDI would send (delivered, one rejected, one not delivered, some waiting) read by the fiscal pack as real ones, and three supplier invoices in the inbox with their metadata. Every demo seeder now marks as demo also the rows the services write for it (entries, open items, payments, mandates, statements), so the new DemoDataRemover, driven by the schema of the migrations, removes the demo data and only them; it stops and names the tables when rows entered by users still refer to demo rows. `scripts/seed.sh --remove-demo` exposes it and the seed prints its time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fb12411404
commit
9d7cb9e71f
13 files changed
+877
-13
No files matched your search
@@ -66,7 +66,7 @@ public sealed class ConservationExportService
|
||||
public async Task<ConservationPackage> ExportAsync(Actor actor, string companyCode, DateOnly from, DateOnly to, CancellationToken cancellationToken = default)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(actor);
|
||||
if (to < from || to.DayNumber - from.DayNumber > 400)
|
||||
if (to < from || to.DayNumber - from.DayNumber > 731)
|
||||
{
|
||||
throw new ValidationFailedException(["To:" + EInvoiceErrors.PeriodInvalid]);
|
||||
}
|
||||
@@ -79,9 +79,9 @@ public sealed class ConservationExportService
|
||||
var notifications = new List<EInvoiceNotification>();
|
||||
foreach (var chunk in sent.Select(e => e.Id).Chunk(500))
|
||||
{
|
||||
var ids = chunk.ToList();
|
||||
var ids = chunk.Select(id => (long?)id).ToList();
|
||||
notifications.AddRange((await uow.Repository<EInvoiceNotification, long>()
|
||||
.ListAsync(Query.For<EInvoiceNotification>().Where(n => n.EInvoiceId != null && ids.Contains(n.EInvoiceId.Value)).OrderBy(n => n.ReceivedAt), cancellationToken)
|
||||
.ListAsync(Query.For<EInvoiceNotification>().Where(n => ids.Contains(n.EInvoiceId)).OrderBy(n => n.ReceivedAt), cancellationToken)
|
||||
.ConfigureAwait(false)).Items);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user