mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 08:31:39 -04:00
lk | doesn't display clients without agencies on the print select page
This commit is contained in:
@@ -32,7 +32,10 @@ class ClientsController < ApplicationController
|
||||
end
|
||||
|
||||
def print_select
|
||||
@clients = Client.includes(:bike).where.not(bike_id: nil).order(application_date: :desc).paginate(:page => params[:page], :per_page => 30)
|
||||
@clients = Client.includes(:bike, :agency)
|
||||
.where.not(bike_id: nil, agency_id: nil)
|
||||
.order(application_date: :desc)
|
||||
.paginate(:page => params[:page], :per_page => 30)
|
||||
end
|
||||
|
||||
def print_receipts
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
.container
|
||||
%h1 Select the clients whose receipts you would like to print
|
||||
%p Only clients with a bike and an agency assigned are shown on this page.
|
||||
|
||||
=form_tag("/clients/print_receipts", method: "get") do
|
||||
%table.table.table-striped.table-bordered.table-hover
|
||||
|
||||
Reference in New Issue
Block a user