templates: invoice.docx + generator - #48
Conversation
Professional invoice template in the house style ([placeholder] tokens + template note for AI agents, English). Structure: company header, invoice meta (number/date/due/currency), bill-to block, items table (5 rows + subtotal/discount/tax/total), payment terms and notes. Regenerable: env -u PYTHONPATH ~/.venvs/office/bin/python tools/gen-invoice-template.py
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 03a93f25a4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ("TOTAL DUE", "[0.00]"), | ||
| ] | ||
| for idx, (label, value) in enumerate(totals): | ||
| row = items.rows[5 + idx] if idx == 0 else items.add_row() |
There was a problem hiding this comment.
Add subtotal after all five item rows
Every generated invoice reuses row 5 for the subtotal even though rows 1–5 were just populated as the five item rows. This removes the fifth item, leaves the preallocated row 6 as an empty bordered row between Subtotal and Discount, and merging the reused cells retains the overwritten quantity and price paragraphs ([1][0.00]) in the subtotal cell. Create the totals in fresh rows after all five item rows instead.
Useful? React with 👍 / 👎.
- New AI Markdown app - the fifth suite app, with local image assets and ribbon AI entry points - Shell: dark/light/system theme (imports public PR criptogus#41) with lint fix and dark-mode onboarding polish - Docs: Word rendering fidelity fixes, 4x faster repagination, Shape Format contextual tab, auto-refreshing TOC page numbers - Slides: built-in standard layouts, anchored zoom and jump-free editing, selectable Draw pen thickness - Sheets: Insert Equation/Checkbox/Timeline, editing polish with undo for manual inserts and localized save errors - Bump pdfjs-dist to 6.2.108 and js-yaml to 4.3.1 Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
Invoice template for HermesOffice
Professional invoice template following the house style of
templates/docs/(English,[placeholder]tokens, template note for AI agents to delete before delivering).Structure (17 engine blocks — 2 tables parsed as blocks):
Regeneration (idempotent):
env -u PYTHONPATH ~/.venvs/office/bin/python tools/gen-invoice-template.pyVerified:
genoffice_docx_blocksparses all 17 blocks (tables at docxIndex 5 and 11) — agents can edit it via the standard block-patch flow.