Include blank and null ballots in booth totals
Just the same way it's done for all polls.
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
module PollRecountsHelper
|
||||
|
||||
def total_recounts_by_booth(booth_assignment)
|
||||
booth_assignment.recounts.any? ? booth_assignment.recounts.to_a.sum(&:total_amount) : nil
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user