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
@@ -41,7 +41,15 @@ public sealed class DemoLedgerSeeder(
|
||||
public int Order => 40;
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task SeedAsync(string companyCode, CompanySeedContext context, CancellationToken cancellationToken = default)
|
||||
public Task SeedAsync(string companyCode, CompanySeedContext context, CancellationToken cancellationToken = default)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(context);
|
||||
return context.Demo
|
||||
? DemoMarker.RunAsync(factory, companyCode, () => SeedCoreAsync(companyCode, context, cancellationToken), cancellationToken)
|
||||
: Task.CompletedTask;
|
||||
}
|
||||
|
||||
private async Task SeedCoreAsync(string companyCode, CompanySeedContext context, CancellationToken cancellationToken)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(context);
|
||||
if (!context.Demo)
|
||||
|
||||
Reference in new issue
Block a user