Generate invoice PDF and register it as evidence

Generate invoice PDF and register it as evidence

An invoice PDF is derived output. The workflow keeps it reviewable by storing the rendered document as repository data and registering it in the attachments dataset so it remains linked to the invoice records that justify it.

  1. Alice renders a PDF for a specific invoice:
bus invoices pdf 1001 --out tmp/INV-1001.pdf

The module must render deterministically from the stored invoice and invoice-line rows. If the output file already exists, it must be overwritten only when explicitly requested, because the PDF file is evidence that is expected to remain stable once issued.

  1. Alice registers the rendered PDF in the attachments dataset so other records can reference it:
bus attachments add --help

bus attachments add tmp/INV-1001.pdf \
  --desc "Invoice INV-1001 (PDF)"
  1. Alice confirms the attachment is discoverable as repository data:
bus attachments list
  1. Alice records the result as a new revision using her version control tooling.