mirror of
https://github.com/kbenestad/invoice.git
synced 2026-06-18 08:04:32 +00:00
Date format - Replace hardcoded toLocaleDateString with a config-driven formatter - date-format key in config (default "d MMMM YYYY") supports tokens: d, dd, M, MM, MMM, MMMM, YY, YYYY (regex replace, longest match first) Paper format - paper-format key in config: "a4" (default) or "letter" - Passed directly to jsPDF; page dimensions adjusted accordingly Tax system redesign - Remove single-select tax-rates from config; add tax-types list, each with a key and per-language labels (VAT, GST, Sales Tax, Withholding, Other) - Totals section now has a dynamic tax-tbody: each row has a number field, a % / Amount selector, and a tax-type label selector; rows are added with "+ Add new tax" and removed with × - calcTotals iterates tLines: % rows compute sub × (val/100), Amount rows use the fixed value directly; each row shows its calculated amount live - gatherData collects all tax lines into a taxes[] array with lineLabel (e.g. "VAT 7%" or "GST (50.00)") and amt; both preview and PDF render one row per tax entry - relabel() rebuilds tax-line dropdowns on language switch https://claude.ai/code/session_015iyCBgoTXNNqaErR287U1u |
||
|---|---|---|
| .. | ||
| config.yml | ||
| index.html | ||