Invoicing For Fun And Profit

davorg on 2001-11-01T17:47:59

For the first time for months I've done something with Perl that was both fun and useful.

I'm a freelancer (or "contractor" or "consultant" call it what you will). This means that periodically I need to record the time that I've put in on a client's site and send them (or, more usually an agent that I'm working thru) an invoice. When I first started doing this (six and a half years ago) I had never heard of Perl and still used Windows more than I'd like to admit. I therefore wrote myself a simple time recording and billing system in (gasp!) Access. I've been using this system ever since.

Now, I don't visit Windows much any more. I do still have PCs with Windows installed, but I spend the vast majority of my time in Linux. One of the last things that I was still doing in Windows was my invoicing. But no more. Over the last few evenings, I've thrown together a system that allows me to do all that the old system did (and more) from Linux.

The data is stored in a MySQL database and is both entered and extracted with a Perl script (of course). This is all obvious stuff. The interesting stuff is creating the actual invoice. I'm using the Template Toolkit to create a LaTeX input file containing the data. The Template Toolkit then has a nice LaTeX filter which will convert that stuff into in a PDF file. It's all very lovely and I've learned far more LaTeX than I've had to know before.

It makes me very happy (but I'm easily pleased :)

I see that hfb has been discussing English idioms and one of the examples she uses is "there's method in his madness". This reminds me that in a former life (late 1980s) I worked for the methods house LBMS. At once point they had staff t-shirts with the slogan "there's madness in our methods".

Which was nice.