added nested purchases to invoices