Updating /invoices/byRates route functionality