Files
grecia/app/helpers/poll_recounts_helper.rb
Javi Martín 31515ddd45 Include blank and null ballots in booth totals
Just the same way it's done for all polls.
2019-05-30 17:22:41 +02:00

12 lines
288 B
Ruby

module PollRecountsHelper
def total_recounts_by_booth(booth_assignment)
if booth_assignment.recounts.any?
booth_assignment.recounts.sum(:total_amount) +
booth_assignment.recounts.sum(:white_amount) +
booth_assignment.recounts.sum(:null_amount)
end
end
end