Skip to content
Snippets Groups Projects
Commit 9587fed3 authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Fix math in classroom count

parent 3de1afee
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -286,7 +286,7 @@ classroomCountApp.post('/', rqf.parse(), (req, res, next) => { ...@@ -286,7 +286,7 @@ classroomCountApp.post('/', rqf.parse(), (req, res, next) => {
j = 0; j = 0;
let educationLevelSet = new Set(); let educationLevelSet = new Set();
let enrollment = enrollments[j]; let enrollment = enrollments[j];
// FIXME: Performance
while(enrollmentMatch && j < enrollments.length) { while(enrollmentMatch && j < enrollments.length) {
enrollment = enrollments[j]; enrollment = enrollments[j];
...@@ -378,7 +378,8 @@ classroomCountApp.post('/', rqf.parse(), (req, res, next) => { ...@@ -378,7 +378,8 @@ classroomCountApp.post('/', rqf.parse(), (req, res, next) => {
educationLevel.enrollment.full_period_classes = Math.ceil((educationLevel.enrollment.total_enrollment_day * (enrollmentEducationLevel.offerGoal/100)) / enrollmentEducationLevel.numberStudentClass); educationLevel.enrollment.full_period_classes = Math.ceil((educationLevel.enrollment.total_enrollment_day * (enrollmentEducationLevel.offerGoal/100)) / enrollmentEducationLevel.numberStudentClass);
// Turmas diurnas // Turmas diurnas
educationLevel.enrollment.day_classes = Math.ceil((educationLevel.enrollment.total_enrollment_day / enrollmentEducationLevel.numberStudentClass) - educationLevel.enrollment.full_period_classes); // Matrículas diurnas - matrículas integrais
educationLevel.enrollment.day_classes = Math.ceil((educationLevel.enrollment.total_enrollment_day * (1 - enrollmentEducationLevel.offerGoal/100)) / enrollmentEducationLevel.numberStudentClass);
// Turmas noturnas // Turmas noturnas
educationLevel.enrollment.night_classes = Math.ceil((educationLevel.enrollment.total_enrollment_night / enrollmentEducationLevel.numberStudentClass)); educationLevel.enrollment.night_classes = Math.ceil((educationLevel.enrollment.total_enrollment_night / enrollmentEducationLevel.numberStudentClass));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment