event

Product Order Invoice Document Attached

A rendered invoice PDF was attached to a Product Order: a DRAFT preview, or the final invoice.

EventStatus: Implemented in api-v1

Trigger

ProductOrder.attachDraftPreview / attachFinalInvoice, called by PrintProductOrderInvoiceUseCase (UI Print invoice; POST …/:orderId/actions/print-invoice). A draft’s preview replaces the previous one on each print; the final invoice is attached once (INV-5) and later prints only re-sign it, with no event. Printing never changes the invoice status.

Payload Shape

productOrderId, kind (draft_preview or final), filename.

Consumers

In-process DomainEventAuditLogger ('*') only. Product Order events are internal domain events (ProductOrder.events.ts); there are no integration events and no outbox. The command’s use case dispatches the collected events once, after every write and after the per-project lock is released; a dispatch failure never fails or rolls back the command.