Fix invoice ProjectName not pre-filling on edit; add to Details view

Edit GET now falls back to job.ProjectName for invoices created before the
column was added. Details view shows Project Name alongside Customer PO.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-09 08:58:09 -04:00
parent 9367e358d9
commit 7cbae31916
2 changed files with 8 additions and 1 deletions
@@ -903,7 +903,7 @@ public class InvoicesController : Controller
InternalNotes = invoice.InternalNotes,
Terms = invoice.Terms,
CustomerPO = invoice.CustomerPO,
ProjectName = invoice.ProjectName,
ProjectName = invoice.ProjectName ?? invoice.Job?.ProjectName,
InvoiceItems = invoice.InvoiceItems
.Where(i => !i.IsDeleted)
.OrderBy(i => i.DisplayOrder)