Roughly the same code I use to generate invoices for my company