Phase 3: AR/AP aging buckets, PO seeder, Bills vendor fix
- Bills.cs: replace aceHardware/fastenal lookups with grainger/harbor/localSupply to match Phase 1 vendor renames; update all vendor invoice number prefixes - Bills.cs: add 3 AP aging-bucket bills (30-60, 61-90, 90+ days overdue) so all four AP aging buckets are populated for report demos - Invoices.cs: add 3 more overdue invoices (31-60, 61-90, 90+ day AR buckets) alongside the existing 21-day overdue; total now 29 invoices - New SeedDataService.PurchaseOrders.cs: 7 POs — 3 Received (historical), 2 Submitted (in-flight), 2 Draft (pending approval); links to inventory items where available - SeedDataService.cs: wire SeedPurchaseOrdersAsync after Vendors seeder - Remove.cs: add PO + POItem cleanup inside Bills removal block (two-step ID fetch to avoid nested LINQ translation issues) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -213,12 +213,20 @@ public partial class SeedDataService
|
||||
await Inv(InvoiceStatus.Sent, 6, 30, 0m, "Net 30", "Payment due within 30 days.");
|
||||
|
||||
// ── Current month (1 overdue + 2 sent + 1 draft) ─────────────────────
|
||||
// Overdue: created 35 days ago on Net 14 terms → 21 days past due
|
||||
// Overdue: created 35 days ago on Net 14 terms → 21 days past due (1–30 bucket)
|
||||
await Inv(InvoiceStatus.Sent, 35, 14, 7.5m, "Net 14", "PAST DUE — please remit payment immediately.");
|
||||
await Inv(InvoiceStatus.Sent, 4, 30, 0m, "Net 30", "Payment due within 30 days.");
|
||||
await Inv(InvoiceStatus.Sent, 2, 30, 7.5m, "Net 30", "Payment due within 30 days.");
|
||||
await Inv(InvoiceStatus.Draft, 1, 30, 0m, "Net 30", null);
|
||||
|
||||
// ── AR Aging demo invoices — populate all four overdue buckets ────────
|
||||
// 31–60 day bucket: issued 55 days ago, Net 10 → 45 days past due
|
||||
await Inv(InvoiceStatus.Sent, 55, 10, 0m, "Net 10", "PAST DUE 45 days — second notice sent.");
|
||||
// 61–90 day bucket: issued 80 days ago, Net 10 → 70 days past due
|
||||
await Inv(InvoiceStatus.Sent, 80, 10, 7.5m, "Net 10", "PAST DUE 70 days — final notice. Collections pending.");
|
||||
// 90+ day bucket: issued 120 days ago, Net 14 → 106 days past due
|
||||
await Inv(InvoiceStatus.PartiallyPaid, 120, 14, 0m, "Net 14", "PAST DUE 106 days — partial payment received, balance outstanding.");
|
||||
|
||||
return seeded;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user