Commit 546537d1 by Azhan Hannan

Display overhead description bila approve

parent 6f84d8c8
......@@ -341,6 +341,25 @@
<th style="width: 5%">@if($totaloverheadhrs) {{ number_format($totaloverheadhrs/8, 1, '.', '') }} @else 0 @endif</th>
</tfoot> -->
</table>
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 10%" class="center aligned">Date</th>
<th style="width: 15%" class="single line"> Overhead Description</th>
<th class="center aligned">Notes</th>
</tr>
</thead>
@foreach(data_get($profile,'notes') as $key => $value)
@if(data_get($profile,'fk_o_id') == data_get($value, 'fk_o_id'))
<tr>
<td style="width: 10%" class="center aligned">{{ date("d-m-Y", strtotime(data_get($value, 'td_date'))) }}</td>
<td style="width: 15%" class="single line">{{data_get($value, 'td_overhead_desc')}}</td>
<td>{{data_get($value, 'td_overhead_note')}}</td>
</tr>
@endif
@endforeach
</table>
@endif
</div>
......
......@@ -340,6 +340,25 @@
</table>
@endif
@if(count($notes) > 0)
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 10%" class="center aligned">Date</th>
<th style="width: 15%" class="single line"> Overhead Description</th>
<th class="center aligned">Notes</th>
</tr>
</thead>
@foreach($notes as $key => $value)
<tr>
<td style="width: 10%" class="center aligned">{{ date("d-m-Y", strtotime(data_get($value, 'td_date'))) }}</td>
<td style="width: 15%" class="single line">{{data_get($value, 'td_overhead_desc')}}</td>
<td>{{data_get($value, 'td_overhead_note')}}</td>
</tr>
@endforeach
</table>
@endif
</div>
<div class="ui segment">
......
......@@ -338,6 +338,25 @@
<th style="width: 5%">@if($totaloverheadhrs) {{ number_format($totaloverheadhrs/8, 1, '.', '') }} @else 0 @endif</th>
</tfoot> -->
</table>
@if(count($notes) > 0)
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 10%" class="center aligned">Date</th>
<th style="width: 15%" class="single line"> Overhead Description</th>
<th class="center aligned">Notes</th>
</tr>
</thead>
@foreach($notes as $key => $value)
<tr>
<td style="width: 10%" class="center aligned">{{ date("d-m-Y", strtotime(data_get($value, 'td_date'))) }}</td>
<td style="width: 15%" class="single line">{{data_get($value, 'td_overhead_desc')}}</td>
<td>{{data_get($value, 'td_overhead_note')}}</td>
</tr>
@endforeach
</table>
@endif
@endif
<div class="ui segment">
......
......@@ -2242,6 +2242,7 @@ class DashboardController extends Controller
$tempOverhead[0] = "";
$tempOverheadid[0] = 0;
$overheadid = [];
if(isset($overheadhour[0]))
{
......@@ -2270,6 +2271,8 @@ class DashboardController extends Controller
'pid' => $value->fk_o_id,
'pname' => $value->tp_project_name,
];
$overheadid[] = $value->fk_o_id;
}
}
// dd($overheadlist);
......@@ -2287,11 +2290,13 @@ class DashboardController extends Controller
->where('tm_month', $month)
->where('tm_phase', $phase)
->where('fk_tm_id', $check->id)
->whereIn('fk_o_id', $overheadid)
->where('tm_staff_id', $tm->tm_staff_id)
->where('td_project_type', $overhead)
->whereNotNull('td_hours')
->orderby('td_date')
->get();
// dd($notes);
}
else
{
......@@ -2303,7 +2308,7 @@ class DashboardController extends Controller
$check = null;
}
return view('timesheet::dashboard.selectapprovalpage', compact('tm' ,'phase', 'month', 'year', 'staff', 'strMonth', 'profile', 'strdays', 'overheadlist', 'overheadhour', 'totaloverheadhrs', 'chargeablelist', 'chargehour', 'totalchargehrs', 'page', 'bod', 'daymonth'));
return view('timesheet::dashboard.selectapprovalpage', compact('tm' ,'phase', 'month', 'year', 'staff', 'strMonth', 'profile', 'strdays', 'overheadlist', 'overheadhour', 'totaloverheadhrs', 'chargeablelist', 'chargehour', 'totalchargehrs', 'page', 'bod', 'daymonth', 'notes'));
}
public function selectapprovalpage(Request $request)
......@@ -2936,6 +2941,7 @@ class DashboardController extends Controller
$tempOverhead[0] = "";
$tempOverheadid[0] = 0;
$overheadid = [];
if(isset($overheadhour[0]))
{
......@@ -2964,6 +2970,8 @@ class DashboardController extends Controller
'pid' => $value->fk_o_id,
'pname' => $value->tp_project_name,
];
$overheadid[] = $value->fk_o_id;
}
}
}
......@@ -2980,6 +2988,7 @@ class DashboardController extends Controller
->where('tm_month', $month)
->where('tm_phase', $phase)
->where('fk_tm_id', $check->id)
->whereIn('fk_o_id', $overheadid)
->where('tm_staff_id', $tm->tm_staff_id)
->where('td_project_type', $overhead)
->whereNotNull('td_hours')
......@@ -2996,7 +3005,7 @@ class DashboardController extends Controller
$check = null;
}
return view('timesheet::dashboard.approveallaction', compact('tm', 'user', 'staff', 'year', 'month', 'phase', 'strMonth', 'chargeablelist', 'daymonth', 'strdays', 'chargehour', 'totalchargehrs', 'overheadlist', 'overheadhour', 'totaloverheadhrs', 'page', 'chargeableproject', 'overheadproject', 'bod'));
return view('timesheet::dashboard.approveallaction', compact('tm', 'user', 'staff', 'year', 'month', 'phase', 'strMonth', 'chargeablelist', 'daymonth', 'strdays', 'chargehour', 'totalchargehrs', 'overheadlist', 'overheadhour', 'totaloverheadhrs', 'page', 'chargeableproject', 'overheadproject', 'bod', 'notes'));
}
public function approvalall(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