Commit 639deca0 by Azhan Hannan

Error checking untuk 2nd halfmonth

parent 0623c439
......@@ -1556,8 +1556,10 @@ class DashboardController extends Controller
$fulldate[] = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
}
} else {
for ($i=15; $i < $daymonth-15; $i++) {
}
else
{
for ($i=15; $i < $daymonth; $i++) {
$tempdate = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
$strday = Carbon::createFromFormat('Y-m-d', $tempdate)->format('l');
......@@ -1569,18 +1571,14 @@ class DashboardController extends Controller
$user = Users::find(Auth::id())
->u_staffID;
// dd($fulldate);
$haribekerja = LAttendance::where('staff_id', $user)
->whereIn('DATE', $fulldate)
->get();
$kurang = [];
foreach ($haribekerja as $key => $hari)
{
// dd($td->where('td_date', data_get($hari,'DATE')));
// dd(data_get($hari,'DATE'));
$minimumhari = $td->where('td_date', data_get($hari,'DATE'));
// dump($minimumhari);
if (data_get($hari,'day_type') == 1)
{
......@@ -1610,7 +1608,7 @@ class DashboardController extends Controller
}
}
}
// dd($kurang);
if (count($kurang) > 0) {
$intro = 'The timesheet is not complete. Please refer to the date and hours required.<br>';
$text = '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment