Make the blank event invoice a fillable, printable form#2005
Open
maebeale wants to merge 3 commits into
Open
Conversation
The blank invoice was a static template meant to be printed and completed by hand. Make it editable in-browser so admins can fill in bill-to, attention, invoice meta, and line-item fields, add a notes area for the names covered by the registration fees, and edit quantity and amount-per-person with the line amount and total recomputing live before printing. Registration and bulk-payment invoices stay read-only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maebeale
marked this pull request as ready for review
July 22, 2026 10:45
Adds a "Save record" submit on the editable blank invoice that posts the filled-in form to Events::InvoicesController#create, which logs a "generate.invoice" Ahoy event tied to the event (who generated it, plus the entered bill-to/attention/line-item/names details) — a usage breadcrumb without a dedicated invoice model. The form re-renders prefilled so values survive the save, and the live auto-totalling is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 suggested review level: 3 Read 📖 contained presenter + view change plus a small create action and Stimulus controller (blank template only)
Why
The blank event invoice was a static print template. This makes it editable in-browser and logs each generation to Ahoy so there's a usage record — without a dedicated invoice model. Registration and bulk-payment invoices stay read-only.
What
EventInvoice#editable?— true only for the blank template (from_event)._invoice.html.erb(editable branch) — standard-sized inputs for bill-to / attention / meta / line item, a "Names included in registration fees" notes area, all wrapped in a form.invoice-editorStimulus controller (whole dollars drop cents, matchingMoneyFormatter).Events::InvoicesController#create, which logs agenerate.invoiceAhoy event tied to the event (user + entered details) and re-renders the filled-in form so values survive the save. No new model/table.Notes