InterstitialTech / timeclonk

GNU General Public License v3.0
1 stars 0 forks source link

generate invoice document #28

Open bburdette opened 1 year ago

bburdette commented 1 year ago

would be great to automatically generate an invoice document.

various ideas:

there is a library, docx-rs, that might be able to help with this. currently is a bit broken but the examples seemed to work after fixing the compile errors.

bburdette commented 1 year ago

Josh suggested using latex for doing an invoice template. Looks better for templating than docx.

bburdette commented 1 year ago

Some latex invoice templates:

http://www.latextemplates.com/cat/invoices

bburdette commented 1 year ago

@muffinator what would be great would be a way to search-and-replace fields in the invoice. I could supply the fields in json form, something like

[ { "search": "{client address}"
   "replace": "1234 5th Street" },
  { "search": "{total hours}"
   "replace": "24.5" },
  {"search": "{hourly rate}",
   "replace": "85"}
]

Or maybe there's a better format that latex prefers for templates?  

Basically if there's a script that takes a table ot search-replace pairs and ewrites an invoice document, I can incorporate that into the server. 
bburdette commented 1 year ago

https://github.com/typst/typst