3 months ago

Attendance value problem in laravel

Posted 3 months ago by AbdulBazith

Guys iam working with a project School Management system.

i have a module Attendance for staff and student.

this is my attendance form for student: https://imgur.com/tkX80ql

here all the student for specific class is displayed with the options present, absent and half day. by default present is checked. if any student absent or half day that is changed and to be inserted into db.

My doubt is how can i insert this into database.

in my old project hotel project for employee module what i done is had attendance table like below

id      att_date        emp_id          att_count       reason  
1       01-10-19        3               1               null
2       01-10-19        4               0               fever so absent
3       01-10-19        5               0.5             half day personal work

in the above table 0=absent 1=present 0.5=halfday

this worked fine for my old project.

but it comes to report i faced many problems. because when need to take total count days for 1 month for specific employee i faced problems.

so iam asking suggestion for this project. how can i use tables for storing the attendance.

i need a report like below

Student         1       2       3       4       5       total(dates of single month)

Abdul           p       A       H       p       p       3.5  
Bazith          p       p       p       p       p       5

in the above report p=present H=half day A=Absent

if any holidays comes like Saturday and Sunday it must also be shown in the report. because if any holidays that day attendance are not taken. so in report that date should be displayed with the reason for that holiday.

Kindly some one help pleaseee..

Please sign in or create an account to participate in this conversation.