Bug 12274: handle closed invoices properly on invoice details page