adding if statement for invoices