scope.includes(:customer)

This commit is contained in:
2026-02-16 18:53:29 -05:00
parent 886d5f4ace
commit 2f9ef6304f

View File

@@ -16,12 +16,17 @@ module RedmineQbo
def base_scope
scope = super
if filters['customer_name'].present?
scope = scope.left_outer_joins(:customer)
end
scope
if has_column?(:customer) || filters['customer_name'].present?
scope = scope.includes(:customer)
end
scope
end
# Add qbo options to the aviable columns
def available_columns