Skip to content

Commit

Permalink
Add total of fields 5 and 7 to the recon form
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMwashuma committed Oct 23, 2024
1 parent e87ecbc commit ced9b56
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 5 deletions.
1 change: 1 addition & 0 deletions tally_ho/apps/tally/forms/recon_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Meta:
'number_ballots_outside_box',
'number_ballots_inside_box',
'number_ballots_inside_and_outside_box',
'total_of_fields_5_and_7',
'number_unstamped_ballots',
'number_invalid_votes',
'number_valid_votes',
Expand Down
16 changes: 11 additions & 5 deletions tally_ho/apps/tally/templates/data_entry/enter_results_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,34 +54,40 @@ <h2>{% trans 'Reconciliation section' %}</h2>
<tbody>
<tr>
<th width="10%"><span class="bignum">9</span></th>
<th width="60%"><label for="id_total_of_fields_5_and_7">
{% trans 'Total of fields 5 + 7:' %}</label></th>
<td width="30%" class="blue-bg"><input class="blue-bg" tabindex="110" autocomplete="off" class="required form-control" id="id_total_of_fields_5_and_7" name="total_of_fields_5_and_7" oncopy="return false;" ondrag="return false;" ondrop="return false;" onpaste="return false;" type="text"/></td>
</tr>
<tr>
<th width="10%"><span class="bignum">10</span></th>
<th width="60%"><label for="id_number_unstamped_ballots">
{% trans 'Number of unstamped ballots:' %}</label></th>
<td width="30%" class="blue-bg"><input class="blue-bg" tabindex="110" autocomplete="off" class="required form-control" id="id_number_unstamped_ballots" name="number_unstamped_ballots" oncopy="return false;" ondrag="return false;" ondrop="return false;" onpaste="return false;" type="text"/></td>
</tr>
<tr>
<th><span class="bignum">10</span></th>
<th><span class="bignum">11</span></th>
<th><label for="id_number_invalid_votes">
{% trans 'Number of invalid votes (including the blanks):' %}</label></th>
<td class="blue-bg"><input class="blue-bg" tabindex="120" autocomplete="off" class="required form-control" id="id_number_invalid_votes" name="number_invalid_votes" oncopy="return false;" ondrag="return false;" ondrop="return false;" onpaste="return false;" type="text"/></td>
</tr>
<tr>
<th><span class="bignum">11</span></th>
<th><span class="bignum">12</span></th>
<th><label for="id_number_valid_votes">
{% trans 'Number of valid votes:' %}</label></th>
<td class="blue-bg"><input class="blue-bg" tabindex="130" autocomplete="off" class="required form-control" id="id_number_valid_votes" name="number_valid_votes" oncopy="return false;" ondrag="return false;" ondrop="return false;" onpaste="return false;" type="text"/></td>
</tr>
<tr>
<th><span class="bignum">12</span></th>
<th><span class="bignum">13</span></th>
<th><label for="id_number_sorted_and_counted">
{% trans 'Total number of the sorted and counted ballots:' %}</label></th>
<td class="blue-bg"><input tabindex="140" class="blue-bg" autocomplete="off" class="required form-control" id="id_number_sorted_and_counted" name="number_sorted_and_counted" oncopy="return false;" ondrag="return false;" ondrop="return false;" onpaste="return false;" type="text"/><br/></td>
</tr>
<tr>
<td colspan="3" class="blue-bg">
{% trans 'If the figure in the field 12 does not equal the one in field 7, the totals of the fields 9, 10 and 11 should be recounted.' %}
{% trans 'If the figure in the field 13 does not equal the one in field 7, the totals of the fields 10, 11 and 12 should be recounted.' %}
<br/>
<br/>
{% trans 'If after recounting, the difference persists, the ballots of the fields 9, 10 and 11 should be recounted as in the manual.' %}
{% trans 'If after recounting, the difference persists, the ballots of the fields 10, 11 and 12 should be recounted as in the manual.' %}
<br/>
<br/>
{% trans 'If the difference persists, write a note in the field at the bottom of the form to explain the action taken prior to proceeding to the next step.' %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ <h2>{% trans 'Reconciliation Section' %}</h2>
{% trans 'Total number of ballots found inside and outside the ballot box:' %}</label></th>
<td class="pink-bg">{{ form.number_ballots_inside_and_outside_box.data }}</td>
</tr>
<tr>
<th><span class="bignum">8</span></th>
<th><label for="id_total_of_fields_5_and_7">
{% trans 'Total of fields 5 + 7:' %}</label></th>
<td class="pink-bg">{{ form.total_of_fields_5_and_7.data }}</td>
</tr>
<tr>
<td class="pink-bg" colspan="3">
{% trans 'N.B. if the figure in field 8 does not equal the figure in field 1, the calculations above should be redone.' %}
Expand Down
3 changes: 3 additions & 0 deletions tally_ho/libs/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ def create_reconciliation_form(
number_ballots_outside_box=1,
number_ballots_inside_box=number_ballots_inside_box,
number_ballots_inside_and_outside_box=1,
total_of_fields_5_and_7=\
(number_ballots_inside_box + number_cancelled_ballots),
number_unstamped_ballots=number_unstamped_ballots,
number_invalid_votes=number_invalid_votes,
number_valid_votes=number_valid_votes,
Expand Down Expand Up @@ -395,6 +397,7 @@ def result_form_data(result_form):
'number_unstamped_ballots': ['1'],
'number_ballots_inside_box': ['1'],
'number_ballots_inside_and_outside_box': ['1'],
'total_of_fields_5_and_7': ['2'],
'number_valid_votes': ['1'],
'number_unused_ballots': ['1'],
'number_spoiled_ballots': ['1'],
Expand Down
1 change: 1 addition & 0 deletions tests/performance-tests/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
'number_ballots_outside_box': 0,
'number_ballots_inside_box': 10,
'number_ballots_inside_and_outside_box': 10,
'total_of_fields_5_and_7': 10,
'form-TOTAL_FORMS': 8,
'form-INITIAL_FORMS': 0,
'form-MIN_NUM_FORMS': 0,
Expand Down
1 change: 1 addition & 0 deletions tests/performance-tests/data_entry1_clerk.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def enter_barcode(self):
'number_ballots_outside_box': '5',
'number_ballots_inside_box': '70',
'number_ballots_inside_and_outside_box': '100',
'total_of_fields_5_and_7': '80',
'form-TOTAL_FORMS': '8',
'form-INITIAL_FORMS': '0',
'form-MIN_NUM_FORMS': '0',
Expand Down

0 comments on commit ced9b56

Please sign in to comment.