Generate [client] → [client] monthly invoices as PDFs.
All files in /opt/data/wiki/wealth/consulting/invoices/:
| File | Purpose |
|---|---|
invoice-template.html |
HTML/A4 template with {{INVOICE_NO}} and {{DATE}} placeholders |
generate-invoice.py |
Playwright-based HTML→PDF converter |
2026-27-gts-gst.xlsx |
Invoice tracker (sheet: Invoices) |
Output: {date}-[client].pdf |
Generated invoice PDF |
openpyxl, playwright): installed via uv, NOT system python.uv run python3 ...~/.cache/ms-playwright/chromium-1234/pip install or uv pip install — packages are already present.uv run --with openpyxl python3 -c "
import openpyxl
wb = openpyxl.load_workbook('2026-27-gts-gst.xlsx', data_only=True)
ws = wb['Invoices']
last = list(ws.iter_rows(min_row=2, values_only=True))[-1]
print(last)
"
Key columns: Date(A), Invoice no(B), Party(C), GSTIN(D), Taxable Value(E), IGST(F), Place of Supply(K), SAC(L).
cd /opt/data/wiki/wealth/consulting/invoices
uv run python3 generate-invoice.py <invoice_no> <date>
invoice_no: next in sequence (e.g. gts-2627-006)date: YYYY-MM-DD format{date}-[client].pdfVisually check the generated PDF with vision_analyze.
The HTML template has hardcoded amounts (₹1,25,000 taxable, 18% IGST, ₹1,47,500 total). If the xlsx last row differs, update the template HTML before running generate-invoice.py — the script only replaces {{INVOICE_NO}} and {{DATE}}.
Pattern: gts-YY-NNN (e.g. gts-2627-006). Increment from the last row in the xlsx.
python3 for openpyxl/playwright — use uv run python3.invoice-template.html directly.