Skip to content

Commit

Permalink
* Fixed - map hash into sums and then sum for total
Browse files Browse the repository at this point in the history
  • Loading branch information
cbarber committed Jun 15, 2015
1 parent befc67a commit ff4f8bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/timesheet/report.iif.riif
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ iif.trns do
date Time.now.strftime("%m/%d/%Y")
accnt 'Accounts Receivable'
name 'Customer'
amount timesheet.time_entries.sum { |project, data| data[:logs].sum { |time_entry| amount_for(time_entry) } }
amount timesheet.time_entries.map { |project, data| data[:logs].sum { |time_entry| amount_for(time_entry) } }.sum
docnum "#{date_from.year}-#{timesheet.projects.collect{|p| p.id.to_s.ljust(3, '0') }.join('')}-#{date_from.strftime('%m%d')}-#{date_to.strftime('%m%d')}"
memo "Time entered for #{timesheet.time_entries.map { |project, data| project }.join(', ') } between #{date_from.strftime('%Y-%m-%d')} and #{date_to.strftime('%Y-%m-%d')}"
clear 'N'
Expand Down

0 comments on commit ff4f8bb

Please sign in to comment.