diff --git a/orm/entities/SubmissionVersion/TallySheetVersion/TallySheetVersion_PRE_30_ED.py b/orm/entities/SubmissionVersion/TallySheetVersion/TallySheetVersion_PRE_30_ED.py index 33cf264d..619be78d 100644 --- a/orm/entities/SubmissionVersion/TallySheetVersion/TallySheetVersion_PRE_30_ED.py +++ b/orm/entities/SubmissionVersion/TallySheetVersion/TallySheetVersion_PRE_30_ED.py @@ -454,12 +454,12 @@ def html_letter(self): content["validVoteCounts"] = [ to_comma_seperated_num(vote_count_result.validVoteCount), - to_percentage(vote_count_result.validVoteCount * 100 / self.submission.area.registeredVotersCount) + to_percentage(vote_count_result.validVoteCount * 100 / vote_count_result.totalVoteCount) ] content["rejectedVoteCounts"] = [ to_comma_seperated_num(vote_count_result.rejectedVoteCount), - to_percentage(vote_count_result.rejectedVoteCount * 100 / self.submission.area.registeredVotersCount) + to_percentage(vote_count_result.rejectedVoteCount * 100 / vote_count_result.totalVoteCount) ] content["totalVoteCounts"] = [ diff --git a/orm/entities/SubmissionVersion/TallySheetVersion/TallySheetVersion_PRE_ALL_ISLAND_RESULT.py b/orm/entities/SubmissionVersion/TallySheetVersion/TallySheetVersion_PRE_ALL_ISLAND_RESULT.py index 082cc8fd..b99e7b9f 100644 --- a/orm/entities/SubmissionVersion/TallySheetVersion/TallySheetVersion_PRE_ALL_ISLAND_RESULT.py +++ b/orm/entities/SubmissionVersion/TallySheetVersion/TallySheetVersion_PRE_ALL_ISLAND_RESULT.py @@ -130,12 +130,12 @@ def vote_count_result(self): if registered_voters_count > 0: vote_count_result["validVoteCountPercentage"] = (valid_vote_count_result.validVoteCount / - registered_voters_count) * 100 + total_vote_count) * 100 vote_count_result["totalVoteCountPercentage"] = (total_vote_count / registered_voters_count) * 100 if rejected_vote_count_result.rejectedVoteCount is not None: vote_count_result["rejectedVoteCountPercentage"] = (rejected_vote_count_result.rejectedVoteCount / - registered_voters_count) * 100 + total_vote_count) * 100 return vote_count_result diff --git a/orm/entities/SubmissionVersion/TallySheetVersion/TallySheetVersion_PRE_ALL_ISLAND_RESULTS_BY_ELECTORAL_DISTRICTS.py b/orm/entities/SubmissionVersion/TallySheetVersion/TallySheetVersion_PRE_ALL_ISLAND_RESULTS_BY_ELECTORAL_DISTRICTS.py index 3bab985c..bddc15e1 100644 --- a/orm/entities/SubmissionVersion/TallySheetVersion/TallySheetVersion_PRE_ALL_ISLAND_RESULTS_BY_ELECTORAL_DISTRICTS.py +++ b/orm/entities/SubmissionVersion/TallySheetVersion/TallySheetVersion_PRE_ALL_ISLAND_RESULTS_BY_ELECTORAL_DISTRICTS.py @@ -308,9 +308,9 @@ def get_html_content_dict(self): # Append the percentages. content["validVoteCounts"].append( - to_percentage(vote_count_result.validVoteCount * 100 / vote_count_result.registeredVotersCount)) + to_percentage(vote_count_result.validVoteCount * 100 / vote_count_result.totalVoteCount)) content["rejectedVoteCounts"].append( - to_percentage(vote_count_result.rejectedVoteCount * 100 / vote_count_result.registeredVotersCount)) + to_percentage(vote_count_result.rejectedVoteCount * 100 / vote_count_result.totalVoteCount)) content["totalVoteCounts"].append( to_percentage(vote_count_result.totalVoteCount * 100 / vote_count_result.registeredVotersCount))