Skip to content

templates: invoice.docx + generator - #48

Merged
criptogus merged 2 commits into
mainfrom
templates/invoice
Aug 13, 2026
Merged

templates: invoice.docx + generator#48
criptogus merged 2 commits into
mainfrom
templates/invoice

Conversation

@criptogus

Copy link
Copy Markdown
Owner

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):

  • Company header + contact line
  • Invoice meta table: number / date / due date / currency
  • Bill-to block
  • Items table (5 rows): Description · Qty · Unit price · Amount + Subtotal / Discount / Tax / TOTAL DUE (dark header, right-aligned amounts)
  • Payment terms + notes

Regeneration (idempotent):

env -u PYTHONPATH ~/.venvs/office/bin/python tools/gen-invoice-template.py

Verified: genoffice_docx_blocks parses all 17 blocks (tables at docxIndex 5 and 11) — agents can edit it via the standard block-patch flow.

Gustavo Caetano added 2 commits August 7, 2026 10:08
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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@criptogus
criptogus merged commit 1cc7b1f into main Aug 13, 2026
2 checks passed
birhantprkc pushed a commit to birhantprkc/HermesOffice that referenced this pull request Aug 15, 2026
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant