public Response <List <Invoice> > GetInvoiceByYear([FromRoute] int company, [FromQuery] int?year = null) { if (!_isLogged()) { return(CreateLoginRequired <List <Invoice> >()); } if (CheckPersonCompany(company, manager.GetCompany)) { CreateResponse(default(List <Invoice>), ResponseCode.INVALID_PERSON); } List <Invoice> invoices = manager.GetInvoices(company, year); return(CreateResponse(invoices)); }