Skip to content

Commit

Permalink
Merge pull request #476 from webstream-io/viks-billing-report-more-th…
Browse files Browse the repository at this point in the history
…an-seven-days-Task#19949

Task#19949: Billing report more than seven days
  • Loading branch information
nasa42 committed Feb 21, 2014
2 parents cc44916 + 9c268a0 commit e53754c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions app/models/worklog_report.rb
Expand Up @@ -461,13 +461,7 @@ def get_date_header(w)
end

def get_date_key(w)
if [0,1,2].include? @range.to_i
"#{tz.utc_to_local(w.started_at).to_date.year} #{I18n.l(tz.utc_to_local(w.started_at).to_date, format: '%u')}"
elsif [3,4].include? @range.to_i
"#{tz.utc_to_local(w.started_at).to_date.year} #{I18n.l(tz.utc_to_local(w.started_at).to_date, format: '%V')}"
elsif @range.to_i == 5 || @range.to_i == 6
"#{tz.utc_to_local(w.started_at).to_date.year} #{I18n.l(tz.utc_to_local(w.started_at).to_date, format: '%m')}"
end
"#{tz.utc_to_local(w.started_at).to_date.year} #{I18n.l(tz.utc_to_local(w.started_at).to_date, format: '%j')}"
end


Expand Down

0 comments on commit e53754c

Please sign in to comment.