Advanced PHP Javascript User Form Problem (Orangehrm)
$30-250 USD
Completed
Posted over 12 years ago
$30-250 USD
Paid on delivery
We have inherited an employee leave/holiday booking application.
When booking one day of leave/holiday, the user booking form takes the number of hours applied for (on the form) and compares it to the user's working day/workshift (e.g. 7.6 hours).
If the hours leave/holiday applied for (e.g. 6 hours) is less than or equal to the daily hours, or workshift, (e.g. 7.6 hours) then we can book the leave - no problems.
If the applied for leave time is above the available daily working hours (or workshift) - then the system will not book the leave and gives an error message (time wanted is longer than available time, or workshift).
PROBLEM:
BUT...the current system only allows booking time in 15 minute intervals.
So we cannot book 7.6 hours (which is the current working daily hours, or workshift), only 7.5 hours. So we are short by a few minutes for each single (complete) day we book off as leave.
SOLUTION WANTED:
If the user books more than the available daily hours, workshift, (e.g. 9 hours), then the booked hours should auto-set to the maximum available daily hours (e.g. 7.6 hours). I.E. We will always assume the user wants a full working day off if booking over their avialable working hours for one day.
This is part of a much bigger solution (OrangeHRM) - but we have narrowed the problem down to 2 php files.
One is the user form with javascript ([login to view URL]).
The other is a calculation file ([login to view URL]) which works in tandem with the form script. These are included as attachments.
We have marked where we think the important bits of code/script are.
We need the scripts changing so that when choosing to book a day off, and the hours submitted on the form are greater than the workshift hours, the hours requested auto-set to the workshift hours and the leave request saves without an error message.
Feel free to message us for more information.
Hello we are 7 years old web-development company. 6 years of experience in symfony please check our portfolio for more details.
please check our review about symfony work.
thanks