Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 Ajusta o filtro de busca para utilizar apenas a data fixa sem tempo #1306

Merged
merged 1 commit into from
May 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def project_fiscals_to_informs

def project_fiscals_from_sub_project
ProjectFiscal.where(
'project_id = :project_id AND begin_date >= :begin_date AND end_date <= :end_date',
'project_id = :project_id AND begin_date::date >= :begin_date AND end_date::date <= :end_date',
project_id: params[:project_id], begin_date: @begin_date, end_date: @end_date
)
end
Expand All @@ -93,7 +93,7 @@ def project_fiscals_from_not_sub_project
return if last_end_date.try(:year).nil? || last_end_date.try(:year) < params[:fiscal_year].to_i

ProjectFiscal.where(
'project_id = :project_id AND end_date <= :end_date', project_id: params[:project_id], end_date: @end_date
'project_id = :project_id AND end_date::date <= :end_date', project_id: params[:project_id], end_date: @end_date
)
end
end
Expand Down