Skip to content

Commit

Permalink
Merge pull request #399 from sul-dlss/fix-fy
Browse files Browse the repository at this point in the history
Fix fy
  • Loading branch information
dlrueda authored Apr 20, 2017
2 parents c45a6fa + d64e347 commit 28d615e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/controllers/endowed_funds_reports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def catalog_keys

def date_start
if @endowed_funds_report.fiscal_years.any?
start_date = Time.zone.parse("#{@endowed_funds_report.fiscal_years[0]}-07-01")
start_date = Time.zone.parse("#{@endowed_funds_report.fiscal_years[0]}-09-01") - 1.year
elsif @endowed_funds_report.calendar_years.any?
start_date = Time.zone.parse("#{@endowed_funds_report.calendar_years[0]}-01-01")
elsif @endowed_funds_report.paid_years.any?
Expand All @@ -53,8 +53,7 @@ def date_start

def date_end
if @endowed_funds_report.fiscal_years.any?
end_date = Time.zone.parse("#{@endowed_funds_report.fiscal_years[1]}-06-30")
end_date += 1.year if @endowed_funds_report.fiscal_years[1] == @endowed_funds_report.fiscal_years[0]
end_date = Time.zone.parse("#{@endowed_funds_report.fiscal_years[1]}-08-31")
elsif @endowed_funds_report.calendar_years.any?
end_date = Time.zone.parse("#{@endowed_funds_report.calendar_years[1]}-12-31")
elsif @endowed_funds_report.paid_years.any?
Expand Down

0 comments on commit 28d615e

Please sign in to comment.