This is what we use to generate invoices at LinDev.
This is not yet flexible enough, but has its uses.
It will eventually grow into something more useful as we move away from the "historically grown" spreadsheets that are our bookkeeping system right now.
Automatically send an autogenerated invoice (e.g. using harvest.sh from a cron job or systemd timer):
echo -e "Hi,\nPlease find attached my invoice for last month.\nBoth the invoice and this mail are autogenerated." |mailx -v -r you@your.domain -s "Invoice" -S smtp=mail.your.isp:587 -S smtp-use-starttls -S smtp-auth=login -S smtp-auth-user="you@your.domain" -S smtp-auth-password='YourPassword' -S ssl-verify=ignore -a invoice.pdf billing@company.com