Commit 3c95e20b by hannan

remove nonchargeable in form and dashboard controller

parent 9a697d00
...@@ -415,17 +415,6 @@ class DashboardController extends Controller ...@@ -415,17 +415,6 @@ class DashboardController extends Controller
$dept = Department::where('id', $user->fk_lkp_department) $dept = Department::where('id', $user->fk_lkp_department)
->first(); ->first();
// dd(Staff_info::all());
// $hod = Staff_info::find($user->penyokong)
// ->fullname;
// $penyokong = Staff_info::where('penyokong', 0)
// ->get();
// dd($penyokong);
// $bod = Staff_info::select('id', 'fullname')
// ->whereIn('id', [1,45,46,47,48])
// ->get();
$year = date('Y'); $year = date('Y');
if(isset($request->phase)) if(isset($request->phase))
...@@ -471,7 +460,6 @@ class DashboardController extends Controller ...@@ -471,7 +460,6 @@ class DashboardController extends Controller
->get(); ->get();
$chargeablelist = []; $chargeablelist = [];
$nonchargeablelist = [];
$overheadlist = []; $overheadlist = [];
foreach($chargeableproject as $key => $value) { foreach($chargeableproject as $key => $value) {
...@@ -486,17 +474,6 @@ class DashboardController extends Controller ...@@ -486,17 +474,6 @@ class DashboardController extends Controller
} }
foreach ($nonchargeableproject as $key => $value) {
$nonchargeablelist[] = [
'pid' => $value->fk_project_id,
'pname' => $value->toProject->p_project_description,
];
}
$check = Ts_master::where('tm_staff_id', $user->staff_id) $check = Ts_master::where('tm_staff_id', $user->staff_id)
->where('tm_year', $year) ->where('tm_year', $year)
->where('tm_month', $month) ->where('tm_month', $month)
...@@ -513,11 +490,6 @@ class DashboardController extends Controller ...@@ -513,11 +490,6 @@ class DashboardController extends Controller
// ->where('td_hours', '!=', 0) // ->where('td_hours', '!=', 0)
->get(); ->get();
$nonchargehour = Ts_detail::where('fk_tm_id',$check->id)
->where('td_project_type', $nonchargeable)
// ->where('td_hours', '!=', 0)
->get();
$overheadhour = Ts_detail::where('fk_tm_id',$check->id) $overheadhour = Ts_detail::where('fk_tm_id',$check->id)
->where('td_project_type', $overhead) ->where('td_project_type', $overhead)
->where('td_hours', '!=', 0) ->where('td_hours', '!=', 0)
...@@ -559,7 +531,6 @@ class DashboardController extends Controller ...@@ -559,7 +531,6 @@ class DashboardController extends Controller
} }
$totalchargehrs = $check->tm_chargeable_hrs; $totalchargehrs = $check->tm_chargeable_hrs;
$totalnonchargehrs = $check->tm_nonchargeable_hrs;
$totaloverheadhrs = $check->tm_overhead_hrs; $totaloverheadhrs = $check->tm_overhead_hrs;
$notes = Ts_detail::where('tm_year', $year) $notes = Ts_detail::where('tm_year', $year)
...@@ -575,17 +546,15 @@ class DashboardController extends Controller ...@@ -575,17 +546,15 @@ class DashboardController extends Controller
else else
{ {
$chargehour = null; $chargehour = null;
$nonchargehour = null;
$overheadhour = null; $overheadhour = null;
$totalchargehrs = null; $totalchargehrs = null;
$totalnonchargehrs = null;
$totaloverheadhrs = null; $totaloverheadhrs = null;
$notes = null; $notes = null;
$check = null; $check = null;
} }
// dd($check->id); // dd($check->id);
return view('timesheet::dashboard.timesheetViewer', compact('curruser', 'user','profile', 'dept', 'phase', 'month', 'year', 'strMonth', 'daymonth', 'chargeablelist', 'nonchargeablelist', 'overheadlist', 'chargehour', 'nonchargehour', 'totalchargehrs', 'totalnonchargehrs', 'totaloverheadhrs', 'overheadhour', 'notes', 'check', 'strdays')); return view('timesheet::dashboard.timesheetViewer', compact('curruser', 'user','profile', 'dept', 'phase', 'month', 'year', 'strMonth', 'daymonth', 'chargeablelist', 'overheadlist', 'chargehour', 'totalchargehrs', 'totaloverheadhrs', 'overheadhour', 'notes', 'check', 'strdays'));
} }
public function tsubmit(Request $request) public function tsubmit(Request $request)
......
...@@ -45,19 +45,19 @@ class FormController extends Controller ...@@ -45,19 +45,19 @@ class FormController extends Controller
return view('timesheet::form.filterChargeable', compact('month', 'currmonth', 'curryear')); return view('timesheet::form.filterChargeable', compact('month', 'currmonth', 'curryear'));
} }
public function filterNonChargeable() // public function filterNonChargeable()
{ // {
$currmonth = date('n'); // $currmonth = date('n');
$curryear = date('Y'); // $curryear = date('Y');
$month = []; // $month = [];
for ($m=1; $m<=12; $m++) { // for ($m=1; $m<=12; $m++) {
$month[] = date('F', mktime(0,0,0,$m, 1, date('Y'))); // $month[] = date('F', mktime(0,0,0,$m, 1, date('Y')));
} // }
return view('timesheet::form.filterNonChargeable', compact('month', 'currmonth', 'curryear')); // return view('timesheet::form.filterNonChargeable', compact('month', 'currmonth', 'curryear'));
} // }
public function filterOverhead() public function filterOverhead()
{ {
...@@ -92,10 +92,10 @@ class FormController extends Controller ...@@ -92,10 +92,10 @@ class FormController extends Controller
return redirect()->route('timesheet::form.chargeableForm', ['phase' => $request->phase, 'month' =>$request->month]); return redirect()->route('timesheet::form.chargeableForm', ['phase' => $request->phase, 'month' =>$request->month]);
} }
public function nonchargeableselectmonthphase(Request $request){ // public function nonchargeableselectmonthphase(Request $request){
return redirect()->route('timesheet::form.nonChargeableForm', ['phase' => $request->phase, 'month' =>$request->month]); // return redirect()->route('timesheet::form.nonChargeableForm', ['phase' => $request->phase, 'month' =>$request->month]);
} // }
public function overheadselectmonthphase(Request $request){ public function overheadselectmonthphase(Request $request){
...@@ -319,357 +319,357 @@ class FormController extends Controller ...@@ -319,357 +319,357 @@ class FormController extends Controller
return redirect()->route('timesheet::form.chargeableForm', ['phase' => $request->phase, 'month' =>$request->month,'year',$request->year])->with('success', 'Timesheet Updated'); return redirect()->route('timesheet::form.chargeableForm', ['phase' => $request->phase, 'month' =>$request->month,'year',$request->year])->with('success', 'Timesheet Updated');
} }
public function nonChargeableForm(Request $request) // public function nonChargeableForm(Request $request)
{ // {
$nonchargeable = 2; // $nonchargeable = 2;
$userId = users::find(Auth::id()) // $userId = users::find(Auth::id())
->u_staffID; // ->u_staffID;
$nonchargeables = Project::where('p_project_type', $nonchargeable) // $nonchargeables = Project::where('p_project_type', $nonchargeable)
->get(); // ->get();
$pcodes = Project::select('p_project_code', 'p_project_description') // $pcodes = Project::select('p_project_code', 'p_project_description')
->whereNotNull('p_project_code') // ->whereNotNull('p_project_code')
->get(); // ->get();
// dd($pcode); // // dd($pcode);
$project = Pteam::where('pt_staff_id',$userId) // $project = Pteam::where('pt_staff_id',$userId)
->where('pt_project_type', $nonchargeable) // ->where('pt_project_type', $nonchargeable)
->get(); // ->get();
$projectlist = []; // $projectlist = [];
foreach ($project as $key => $value) { // foreach ($project as $key => $value) {
$projectlist[] = [ // $projectlist[] = [
'td_project' => $value->fk_project_id, // 'td_project' => $value->fk_project_id,
'td_project_name' => $value->toProject->p_project_description, // 'td_project_name' => $value->toProject->p_project_description,
]; // ];
} // }
$year = date('Y'); // $year = date('Y');
if(isset($request->phase)) // if(isset($request->phase))
{ // {
$phase = $request->phase; // $phase = $request->phase;
} // }
if(isset($request->month)) // if(isset($request->month))
{ // {
$month = $request->month; // $month = $request->month;
} // }
if(isset($request->year)) // if(isset($request->year))
{ // {
$year = $request->year; // $year = $request->year;
} // }
$daymonth=cal_days_in_month(CAL_GREGORIAN,$month,$year); // $daymonth=cal_days_in_month(CAL_GREGORIAN,$month,$year);
$strdays = []; // $strdays = [];
for ($i=0; $i < $daymonth; $i++) { // for ($i=0; $i < $daymonth; $i++) {
$tempdate = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1); // $tempdate = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
$strday = Carbon::createFromFormat('Y-m-d', $tempdate)->format('l'); // $strday = Carbon::createFromFormat('Y-m-d', $tempdate)->format('l');
$strdays[$i] = substr($strday, 0, 3); // $strdays[$i] = substr($strday, 0, 3);
} // }
$check = Ts_master::where('tm_staff_id', $userId) // $check = Ts_master::where('tm_staff_id', $userId)
->where('tm_year', $year) // ->where('tm_year', $year)
->where('tm_month', $month) // ->where('tm_month', $month)
->where('tm_phase', $phase) // ->where('tm_phase', $phase)
->first(); // ->first();
if($check) // if($check)
{ // {
$hour = Ts_detail::where('fk_tm_id',$check->id) // $hour = Ts_detail::where('fk_tm_id',$check->id)
->where('td_project_type', $nonchargeable) // ->where('td_project_type', $nonchargeable)
->get(); // ->get();
} // }
else // else
{ // {
$hour = null; // $hour = null;
} // }
$checkoverhead = Ts_master::where('tm_staff_id', $userId) // $checkoverhead = Ts_master::where('tm_staff_id', $userId)
->where('tm_year', $year) // ->where('tm_year', $year)
->where('tm_month', $month) // ->where('tm_month', $month)
->where('tm_phase', $phase) // ->where('tm_phase', $phase)
->first(); // ->first();
if ($checkoverhead) {
$fk_tm_id = $checkoverhead->id;
}
else
{
$fk_tm_id = null;
}
return view('timesheet::form.nonChargeableForm', compact('projectlist','userId','month','phase','daymonth','year','hour','nonchargeables','strdays', 'fk_tm_id', 'pcodes'));
}
public function addnonchargeabletask(Request $request)
{
// dd($request);
if(isset($request->phase))
{
$phase = $request->phase;
}
if(isset($request->month))
{
$month = $request->month;
}
if(isset($request->year))
{
$year = $request->year;
}
$nonchargeable = 2; // if ($checkoverhead) {
$user = Users::select('name','u_staffID') // $fk_tm_id = $checkoverhead->id;
->where('id',Auth::id()) // }
->first(); // else
// {
// $fk_tm_id = null;
if ($request->chargeableProject != null && $request->nonChargeableProject == null) { // }
$project = Project::where('id', $request->chargeableProject)
->first();
$data = new Pteam;
$data->fk_project_id = $request->chargeableProject;
$data->pt_project_description = $project->p_project_description;
$data->pt_team = $user->name;
$data->pt_staff_id = $user->u_staffID;
$data->pt_project_task_sts = $request->status;
$data->updated_by = $user->u_staffID;
$data->pt_project_type = $nonchargeable;
$data->save();
}else if ($request->chargeableProject != null && $request->nonChargeableProject != null) {
$project = Project::where('id', $request->chargeableProject)
->first();
$select = new Pteam;
$select->fk_project_id = $request->chargeableProject;
$select->pt_project_description = $project->p_project_description;
$select->pt_team = $user->name;
$select->pt_staff_id = $user->u_staffID;
$select->pt_project_task_sts = $request->status;
$select->updated_by = $user->u_staffID;
$select->pt_project_type = $nonchargeable;
$select->save();
$task = new Project;
$task->p_project_description = $request->nonChargeableProject;
$task->p_project_type = $nonchargeable;
$task->p_project_sts = $request->status;
$task->updated_by = $user->u_staffID;
$task->save();
$taskId = Project::select('id')
->where('p_project_description', $request->nonChargeableProject)
->first();
// dd($taskId->id);
$pt = new Pteam;
$pt->pt_project_description = $request->nonChargeableProject;
$pt->fk_project_id = $taskId->id;
$pt->pt_team = $user->name;
$pt->pt_staff_id = $user->u_staffID;
$pt->pt_project_task_sts = $request->status;
$pt->updated_by = $user->u_staffID;
$pt->pt_project_type = $nonchargeable;
$pt->save();
}else if ($request->chargeableProject == null && $request->nonChargeableProject != null) {
// dd('input ja');
$task = new Project;
$task->p_project_description = $request->nonChargeableProject;
$task->p_project_type = $nonchargeable;
$task->p_project_sts = $request->status;
$task->updated_by = $user->u_staffID;
$task->save();
$taskId = Project::select('id')
->where('p_project_description', $request->nonChargeableProject)
->first();
// dd($taskId->id);
$pt = new Pteam; // return view('timesheet::form.nonChargeableForm', compact('projectlist','userId','month','phase','daymonth','year','hour','nonchargeables','strdays', 'fk_tm_id', 'pcodes'));
$pt->pt_project_description = $request->nonChargeableProject; // }
$pt->fk_project_id = $taskId->id;
$pt->pt_team = $user->name; // public function addnonchargeabletask(Request $request)
$pt->pt_staff_id = $user->u_staffID; // {
$pt->pt_project_task_sts = $request->status; // // dd($request);
$pt->updated_by = $user->u_staffID;
$pt->pt_project_type = $nonchargeable; // if(isset($request->phase))
$pt->save(); // {
// $phase = $request->phase;
// }
// if(isset($request->month))
// {
// $month = $request->month;
// }
// if(isset($request->year))
// {
// $year = $request->year;
// }
// $nonchargeable = 2;
// $user = Users::select('name','u_staffID')
// ->where('id',Auth::id())
// ->first();
// if ($request->chargeableProject != null && $request->nonChargeableProject == null) {
// $project = Project::where('id', $request->chargeableProject)
// ->first();
// $data = new Pteam;
// $data->fk_project_id = $request->chargeableProject;
// $data->pt_project_description = $project->p_project_description;
// $data->pt_team = $user->name;
// $data->pt_staff_id = $user->u_staffID;
// $data->pt_project_task_sts = $request->status;
// $data->updated_by = $user->u_staffID;
// $data->pt_project_type = $nonchargeable;
// $data->save();
// }else if ($request->chargeableProject != null && $request->nonChargeableProject != null) {
// $project = Project::where('id', $request->chargeableProject)
// ->first();
// $select = new Pteam;
// $select->fk_project_id = $request->chargeableProject;
// $select->pt_project_description = $project->p_project_description;
// $select->pt_team = $user->name;
// $select->pt_staff_id = $user->u_staffID;
// $select->pt_project_task_sts = $request->status;
// $select->updated_by = $user->u_staffID;
// $select->pt_project_type = $nonchargeable;
// $select->save();
// $task = new Project;
// $task->p_project_description = $request->nonChargeableProject;
// $task->p_project_type = $nonchargeable;
// $task->p_project_sts = $request->status;
// $task->updated_by = $user->u_staffID;
// $task->save();
// $taskId = Project::select('id')
// ->where('p_project_description', $request->nonChargeableProject)
// ->first();
// // dd($taskId->id);
// $pt = new Pteam;
// $pt->pt_project_description = $request->nonChargeableProject;
// $pt->fk_project_id = $taskId->id;
// $pt->pt_team = $user->name;
// $pt->pt_staff_id = $user->u_staffID;
// $pt->pt_project_task_sts = $request->status;
// $pt->updated_by = $user->u_staffID;
// $pt->pt_project_type = $nonchargeable;
// $pt->save();
// }else if ($request->chargeableProject == null && $request->nonChargeableProject != null) {
// // dd('input ja');
// $task = new Project;
// $task->p_project_description = $request->nonChargeableProject;
// $task->p_project_type = $nonchargeable;
// $task->p_project_sts = $request->status;
// $task->updated_by = $user->u_staffID;
// $task->save();
// $taskId = Project::select('id')
// ->where('p_project_description', $request->nonChargeableProject)
// ->first();
// // dd($taskId->id);
// $pt = new Pteam;
// $pt->pt_project_description = $request->nonChargeableProject;
// $pt->fk_project_id = $taskId->id;
// $pt->pt_team = $user->name;
// $pt->pt_staff_id = $user->u_staffID;
// $pt->pt_project_task_sts = $request->status;
// $pt->updated_by = $user->u_staffID;
// $pt->pt_project_type = $nonchargeable;
// $pt->save();
// } else {
// return redirect()->route('timesheet::form.nonChargeableForm', compact('month', 'year', 'phase'))->withErrors('You did not select any task or enter any input!');
// }
// return redirect()->route('timesheet::form.nonChargeableForm', compact('month', 'year', 'phase'))->withSuccess('Successfully Added New Task');
// }
// public function savenonchargeablehours(Request $request)
// {
// // dd($request);
// $nonchargeable = 2;
// $userId = users::find(Auth::id())
// ->u_staffID;
// $check = Ts_master::where('tm_staff_id', $userId)
// ->where('tm_year', $request->year)
// ->where('tm_month', $request->month)
// ->where('tm_phase', $request->phase)
// ->first();
} else { // if($check)
// {
return redirect()->route('timesheet::form.nonChargeableForm', compact('month', 'year', 'phase'))->withErrors('You did not select any task or enter any input!');
}
return redirect()->route('timesheet::form.nonChargeableForm', compact('month', 'year', 'phase'))->withSuccess('Successfully Added New Task');
}
public function savenonchargeablehours(Request $request)
{
// dd($request);
$nonchargeable = 2;
$userId = users::find(Auth::id())
->u_staffID;
$check = Ts_master::where('tm_staff_id', $userId)
->where('tm_year', $request->year)
->where('tm_month', $request->month)
->where('tm_phase', $request->phase)
->first();
if($check)
{
}
else
{
$check = new Ts_master;
$check->tm_staff_id = $userId;
$check->tm_year = $request->year;
$check->tm_month = $request->month;
$check->tm_phase = $request->phase;
$check->tm_timesheet_master_sts = 1;
$check->updated_by = $userId;
$check->save();
}
$tmasterid = $check->id;
$detail = $request->hour;
foreach ($detail as $key => $value)
{
$projectid = $key;
foreach ($value as $keyday => $day)
{
$date = $request->year.'-'.$request->month.'-'.sprintf('%02d', $keyday);
$checkTimesheetDetail = Ts_detail::where('fk_tm_id', $tmasterid)
->where('td_project', $projectid)
->where('td_project_type', $nonchargeable)
->where('td_date', $date)
->where('tm_phase', $request->phase)
->first();
$valuehour = $day;
if($valuehour == null)
{
$valuehour = 0;
}
if($checkTimesheetDetail)
{
$checkTimesheetDetail->td_hours = $valuehour;
$checkTimesheetDetail->updated_by = $userId;
$checkTimesheetDetail->update();
}
else
{
$tmdetail = new Ts_detail;
$tmdetail->td_date = $date;
$tmdetail->td_project = $projectid;
$tmdetail->fk_tm_id = $tmasterid;
$tmdetail->tm_staff_id = $userId;
$tmdetail->tm_month = $check->tm_month;
$tmdetail->tm_year = $check->tm_year;
$tmdetail->tm_phase = $check->tm_phase;
$tmdetail->td_project_type = $nonchargeable;
$project = Project::where('id', $projectid)
->first();
$tmdetail->td_project_name = $project->p_project_description; // }
$tmdetail->td_hours = $valuehour;
$tmdetail->td_timesheet_sts = 1;
$tmdetail->updated_by = $userId;
$tmdetail->save();
} // else
} // {
$checktproject = Tproject::where('fk_tm_id', $tmasterid)
->where('td_project', $projectid)
->first();
$checkhours = Ts_detail::where('fk_tm_id', $tmasterid) // $check = new Ts_master;
->where('td_project', $projectid) // $check->tm_staff_id = $userId;
->where('td_hours', '!=', '0') // $check->tm_year = $request->year;
->get(); // $check->tm_month = $request->month;
// $check->tm_phase = $request->phase;
// $check->tm_timesheet_master_sts = 1;
// $check->updated_by = $userId;
// $check->save();
// }
if ($checktproject) { // $tmasterid = $check->id;
$checktproject->tp_hours = $checkhours->sum('td_hours');
$checktproject->update();
}
else
{
$tpdetail = new Tproject;
$tpdetail->td_project = $projectid;
$tpdetail->staffid = $userId;
$tpdetail->fk_tm_id = $tmasterid;
$tpdetail->tp_project_type = 2;
$tpdetail->tp_year = $request->year;
$tpdetail->tp_month = $request->month;
$tpdetail->tp_phase = $request->phase;
$project = Project::where('id', $projectid) // $detail = $request->hour;
->first(); // foreach ($detail as $key => $value)
// {
// $projectid = $key;
$tpdetail->tp_project_name = $project->p_project_description; // foreach ($value as $keyday => $day)
$tpdetail->tp_hours = $checkhours->sum('td_hours'); // {
$tpdetail->tp_pm = $project->p_project_task_team;
$tpdetail->tp_timesheet_sts = 1;
$tpdetail->updated_by = $userId;
$tpdetail->save();
} // $date = $request->year.'-'.$request->month.'-'.sprintf('%02d', $keyday);
}
$sumdetailhour = Ts_detail::where('td_project_type', $nonchargeable) // $checkTimesheetDetail = Ts_detail::where('fk_tm_id', $tmasterid)
->where('fk_tm_id', $tmasterid) // ->where('td_project', $projectid)
->where('tm_phase', $request->phase) // ->where('td_project_type', $nonchargeable)
->sum('td_hours'); // ->where('td_date', $date)
// checktotalhours // ->where('tm_phase', $request->phase)
// ->first();
// $valuehour = $day;
// if($valuehour == null)
// {
// $valuehour = 0;
// }
// if($checkTimesheetDetail)
// {
// $checkTimesheetDetail->td_hours = $valuehour;
// $checkTimesheetDetail->updated_by = $userId;
// $checkTimesheetDetail->update();
// }
// else
// {
// $tmdetail = new Ts_detail;
// $tmdetail->td_date = $date;
// $tmdetail->td_project = $projectid;
// $tmdetail->fk_tm_id = $tmasterid;
// $tmdetail->tm_staff_id = $userId;
// $tmdetail->tm_month = $check->tm_month;
// $tmdetail->tm_year = $check->tm_year;
// $tmdetail->tm_phase = $check->tm_phase;
// $tmdetail->td_project_type = $nonchargeable;
// $project = Project::where('id', $projectid)
// ->first();
// $tmdetail->td_project_name = $project->p_project_description;
// $tmdetail->td_hours = $valuehour;
// $tmdetail->td_timesheet_sts = 1;
// $tmdetail->updated_by = $userId;
// $tmdetail->save();
// }
// }
// $checktproject = Tproject::where('fk_tm_id', $tmasterid)
// ->where('td_project', $projectid)
// ->first();
// $checkhours = Ts_detail::where('fk_tm_id', $tmasterid)
// ->where('td_project', $projectid)
// ->where('td_hours', '!=', '0')
// ->get();
// if ($checktproject) {
// $checktproject->tp_hours = $checkhours->sum('td_hours');
// $checktproject->update();
// }
// else
// {
// $tpdetail = new Tproject;
// $tpdetail->td_project = $projectid;
// $tpdetail->staffid = $userId;
// $tpdetail->fk_tm_id = $tmasterid;
// $tpdetail->tp_project_type = 2;
// $tpdetail->tp_year = $request->year;
// $tpdetail->tp_month = $request->month;
// $tpdetail->tp_phase = $request->phase;
// $project = Project::where('id', $projectid)
// ->first();
// $tpdetail->tp_project_name = $project->p_project_description;
// $tpdetail->tp_hours = $checkhours->sum('td_hours');
// $tpdetail->tp_pm = $project->p_project_task_team;
// $tpdetail->tp_timesheet_sts = 1;
// $tpdetail->updated_by = $userId;
// $tpdetail->save();
// }
// }
// $sumdetailhour = Ts_detail::where('td_project_type', $nonchargeable)
// ->where('fk_tm_id', $tmasterid)
// ->where('tm_phase', $request->phase)
// ->sum('td_hours');
// // checktotalhours
$checktotalhours = Ts_master::where('id', $tmasterid)->first(); // $checktotalhours = Ts_master::where('id', $tmasterid)->first();
$checktotalhours->tm_nonchargeable_hrs = $sumdetailhour; // $checktotalhours->tm_nonchargeable_hrs = $sumdetailhour;
$checktotalhours->tm_nonchargeable_days = $sumdetailhour/8.0; // $checktotalhours->tm_nonchargeable_days = $sumdetailhour/8.0;
$checktotalhours->update(); // $checktotalhours->update();
// return redirect::to('mobile/profile'); // // return redirect::to('mobile/profile');
return redirect()->route('timesheet::form.nonChargeableForm', ['phase' => $request->phase, 'month' =>$request->month,'year',$request->year])->with('success', 'Timesheet Updated'); // return redirect()->route('timesheet::form.nonChargeableForm', ['phase' => $request->phase, 'month' =>$request->month,'year',$request->year])->with('success', 'Timesheet Updated');
} // }
public function overheadForm(Request $request) public function overheadForm(Request $request)
{ {
......
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