Commit 8db7da79 by Azhan Hannan

PMHOD resubmit rejected project, auto verified for all chargeable and overhead.

parent 911277ed
......@@ -1741,6 +1741,7 @@ class DashboardController extends Controller
->update([
'tp_timesheet_sts' => 3,
'verifier_remark' => 'Verified',
'tp_verifier_at' => $today,
] );
}
else
......
......@@ -2367,6 +2367,35 @@ class FormController extends Controller
->where('td_project', $profile->td_project)
->update(['td_timesheet_sts' => 2]);
if( $roleid == '9' )
{
Tproject::where('id', $profile->id)
->update([
'tp_timesheet_sts' => 3,
'verifier_remark' => 'Auto-verified',
'tp_verified_at' => today()->toDateString(),
]);
Ts_detail::where('fk_tm_id', $profile->fk_tm_id)
->where('td_project', $profile->td_project)
->update(['td_timesheet_sts' => 3]);
$countproject = Tproject::where('fk_tm_id', $tmasterid)
->where('tp_timesheet_sts', 3)
->get();
$allproject = Tproject::where('fk_tm_id', $tmasterid)
->get();
if (count($countproject) == count($allproject)) {
Ts_master::where('id', $tmasterid)
->update([
'tm_timesheet_master_sts' => 3,
]);
}
return redirect()->route('timesheet::dashboard.index')->withSuccess('Timesheet project has been resubmit. Waiting for Project Director approval.');
}
return redirect()->route('timesheet::dashboard.index')->withSuccess('Timesheet has been resubmit to Project Manager');
}
......
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