Skip to content

Commit

Permalink
Update inspectionform.php
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlosb committed Mar 11, 2024
1 parent 30a99c2 commit e025300
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions application/views/inspectionform.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,20 +349,20 @@ function uploadFile() {
if ($(this).data("sect") === 1) {
total1 += isNaN(parseInt($(this).val())) ? 0 : parseInt($(this).val());
total1pc = 100 * (total1 / 112);
$("#score1").text(total1pc + '%');
$("#score4").text(total1pc + '%');
$("#score1").text(total1pc.toFixed(2) + '%');
$("#score4").text(total1pc.toFixed(2) + '%');
}
if ($(this).data("sect") === 12) {
total2 += isNaN(parseInt($(this).val())) ? 0 : parseInt($(this).val());
total2pc = 100 * (total2 / 62);
$("#score2").text(total2pc + '%');
$("#score5").text(total2pc + '%');
$("#score2").text(total2pc.toFixed(2) + '%');
$("#score5").text(total2pc.toFixed(2) + '%');
}
if ($(this).data("sect") === 16) {
total3 += isNaN(parseInt($(this).val())) ? 0 : parseInt($(this).val());
total3pc = 100 * (total3 / 16);
$("#score3").text(total3pc + '%');
$("#score6").text(total3pc + '%');
$("#score3").text(total3pc.toFixed(2) + '%');
$("#score6").text(total3pc.toFixed(2) + '%');
}
}
});
Expand Down Expand Up @@ -494,20 +494,20 @@ function uploadFile() {
if ($(this).data("sect") === 1) {
total1 += isNaN(parseInt($(this).val())) ? 0 : parseInt($(this).val());
total1pc = 100 * (total1 / 112);
$("#score1").text(total1pc + '%');
$("#score4").text(total1pc + '%');
$("#score1").text(total1pc.toFixed(2) + '%');
$("#score4").text(total1pc.toFixed(2) + '%');
}
if ($(this).data("sect") === 12) {
total2 += isNaN(parseInt($(this).val())) ? 0 : parseInt($(this).val());
total2pc = 100 * (total2 / 62);
$("#score2").text(total2pc + '%');
$("#score5").text(total2pc + '%');
$("#score2").text(total2pc.toFixed(2) + '%');
$("#score5").text(total2pc.toFixed(2) + '%');
}
if ($(this).data("sect") === 16) {
total3 += isNaN(parseInt($(this).val())) ? 0 : parseInt($(this).val());
total3pc = 100 * (total3 / 16);
$("#score3").text(total3pc + '%');
$("#score6").text(total3pc + '%');
$("#score3").text(total3pc.toFixed(2) + '%');
$("#score6").text(total3pc.toFixed(2) + '%');
}
}
});
Expand Down

0 comments on commit e025300

Please sign in to comment.