Added filter methods for estimates & invoices

This commit is contained in:
2017-04-03 21:49:57 -04:00
committed by GitHub
parent cc46902095
commit fd3c8e15e6

View File

@@ -39,6 +39,14 @@ class CustomersController < ApplicationController
@filtered_vehicles = Vehicle.all.where(customer_id: params[:selected_customer])
end
def filter_invoices_by_customer
@filtered_invoices = QboInvoice.all.where(customer_id: params[:selected_customer])
end
def filter_estimates_by_customer
@filtered_estimates = QboEstimate.all.where(customer_id: params[:selected_customer])
end
# display a list of all customers
def index
if params[:search]