mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-04-02 08:21:57 -04:00
scope.includes(:customer)
This commit is contained in:
@@ -16,12 +16,17 @@ module RedmineQbo
|
|||||||
|
|
||||||
def base_scope
|
def base_scope
|
||||||
scope = super
|
scope = super
|
||||||
|
|
||||||
if filters['customer_name'].present?
|
if filters['customer_name'].present?
|
||||||
scope = scope.left_outer_joins(:customer)
|
scope = scope.left_outer_joins(:customer)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if has_column?(:customer) || filters['customer_name'].present?
|
||||||
|
scope = scope.includes(:customer)
|
||||||
|
end
|
||||||
|
|
||||||
scope
|
scope
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Add qbo options to the aviable columns
|
# Add qbo options to the aviable columns
|
||||||
def available_columns
|
def available_columns
|
||||||
|
|||||||
Reference in New Issue
Block a user