Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
3
3f-timesheet
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dockers
3f-timesheet
Commits
e2afcfa5
Commit
e2afcfa5
authored
Nov 22, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
timesheet viewer -> filter null data & filter column penyokong
parent
a9c41025
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
194 additions
and
157 deletions
+194
-157
packages/portal/timesheet/resources/views/dashboard/timesheetViewer.blade.php
+194
-157
No files found.
packages/portal/timesheet/resources/views/dashboard/timesheetViewer.blade.php
View file @
e2afcfa5
...
...
@@ -89,84 +89,88 @@
</tr>
</thead>
<tbody>
@foreach(
$chargeablelist
as
$key
=>
$projectchargeable
)
<?php
$totalcharge
= 0; ?>
<tr>
<td style="
width
:
4
%
;
"></td>
<td style="
width
:
10
%
;
">{{
$projectchargeable['pcode']
}}</td>
<td style="
width
:
13
%
;
">{{
$projectchargeable['pname']
}}</td>
@if(
$phase
== 1)
@for(
$i
= 0;
$i
< 15 ;
$i
++)
<?php
$valchargehour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if(
$chargehour
)
{
$valchargehour
=
$chargehour->where
('td_date','=',
$date
)
->where('td_project',
$projectchargeable['pid']
)
->where('tm_phase',
$phase
)
->first();
$totalcharge
+= data_get(
$valchargehour
,'td_hours');
}
?>
@if(
$valchargehour
)
<td style="
width
:
4
%
;
">
@if(data_get(
$valchargehour
,'td_hours') == 0)
@else {{ data_get(
$valchargehour
,'td_hours') }}
@endif
</td>
@else
<td style="
width
:
4
%
;
"></td>
@endif
@endfor
@else
@for(
$i
= 15;
$i
<
$daymonth
;
$i
++)
<?php
$valchargehour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if(
$chargehour
)
{
$valchargehour
=
$chargehour->where
('td_date','=',
$date
)
->where('td_project',
$projectchargeable['pid']
)
->where('tm_phase',
$phase
)
->first();
$totalcharge
+= data_get(
$valchargehour
,'td_hours');
}
?>
@if(
$valchargehour
)
<td style="
width
:
4
%
;
">
@if(data_get(
$valchargehour
,'td_hours') == 0)
@else {{ data_get(
$valchargehour
,'td_hours') }}
@endif
</td>
@if(count(
$chargeablelist
) > 0)
@foreach(
$chargeablelist
as
$key
=>
$projectchargeable
)
<?php
$totalcharge
= 0; ?>
<tr>
<td style="
width
:
4
%
;
"></td>
<td style="
width
:
10
%
;
">{{
$projectchargeable['pcode']
}}</td>
<td style="
width
:
13
%
;
">{{
$projectchargeable['pname']
}}</td>
@if(
$phase
== 1)
@for(
$i
= 0;
$i
< 15 ;
$i
++)
<?php
$valchargehour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if(
$chargehour
)
{
$valchargehour
=
$chargehour->where
('td_date','=',
$date
)
->where('td_project',
$projectchargeable['pid']
)
->where('tm_phase',
$phase
)
->first();
$totalcharge
+= data_get(
$valchargehour
,'td_hours');
}
?>
@if(
$valchargehour
)
<td style="
width
:
4
%
;
">
@if(data_get(
$valchargehour
,'td_hours') == 0)
@else {{ data_get(
$valchargehour
,'td_hours') }}
@endif
</td>
@else
<td style="
width
:
4
%
;
"></td>
@endif
@endfor
@else
@for(
$i
= 15;
$i
<
$daymonth
;
$i
++)
<?php
$valchargehour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if(
$chargehour
)
{
$valchargehour
=
$chargehour->where
('td_date','=',
$date
)
->where('td_project',
$projectchargeable['pid']
)
->where('tm_phase',
$phase
)
->first();
$totalcharge
+= data_get(
$valchargehour
,'td_hours');
}
?>
@if(
$valchargehour
)
<td style="
width
:
4
%
;
">
@if(data_get(
$valchargehour
,'td_hours') == 0)
@else {{ data_get(
$valchargehour
,'td_hours') }}
@endif
</td>
@else
<td style="
width
:
4
%
;
"></td>
@endif
@endfor
@endif
@if(
$totalcharge
)
<td style="
width
:
5
%
">{{ number_format(
$totalcharge
, 1, '.', '') }}</td>
<td style="
width
:
5
%
">{{ number_format(
$totalcharge
/8, 1, '.', '') }}</td>
@else
<td style="
width
:
4
%
;
"></td>
<td style="
width
:
5
%
">0</td>
<td style="
width
:
5
%
">0</td>
@endif
@endfor
@endif
@if(
$totalcharge
)
<td style="
width
:
5
%
">{{ number_format(
$totalcharge
, 1, '.', '') }}</td>
<td style="
width
:
5
%
">{{ number_format(
$totalcharge
/8, 1, '.', '') }}</td>
@else
<td style="
width
:
5
%
">0</td>
<td style="
width
:
5
%
">0</td>
@endif
</tr>
@endforeach
</tr>
@endforeach
@else
<tr>
<td class="
text
-
center
" colspan="
@
if
(
$phase
==
1
){{
5
+
15
}}
@
else
{{
5
+
(
$daymonth
-
15
)}}
@
endif
">No Data Overhead</td>
</tr>
@endif
</tbody>
<tfoot>
<th colspan="
3
">Total (A)</th>
...
...
@@ -248,77 +252,81 @@
</tr>
</thead>
<tbody>
@foreach(
$overheadlist
as
$key
=>
$projectoverhead
)
<?php
$totaloverhead
= 0;
// dd(
$overheadlist
);
?>
<tr>
<td style="
width
:
4
%
;
"></td>
<td style="
width
:
23
%
;
">{{
$projectoverhead['pname']
}}</td>
@if(
$phase
== 1)
@for(
$i
= 0;
$i
< 15 ;
$i
++)
<?php
$valoverheadhour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if(
$overheadhour
)
{
$valoverheadhour
=
$overheadhour->where
('td_date','=',
$date
)
->where('fk_o_id',
$projectoverhead['pid']
)
->where('tm_phase',
$phase
)
->first();
$totaloverhead
+= data_get(
$valoverheadhour
,'td_hours');
}
?>
@if(
$valoverheadhour
)
<td style="
width
:
4
%
;
">{{ data_get(
$valoverheadhour
,'td_hours') }}</td>
@else
<td style="
width
:
4
%
;
"></td>
@endif
@endfor
@else
@for(
$i
= 15;
$i
<
$daymonth
;
$i
++)
<?php
$valoverheadhour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if(
$overheadhour
)
{
$valoverheadhour
=
$overheadhour->where
('td_date','=',
$date
)
->where('fk_o_id',
$projectoverhead['pid']
)
->where('tm_phase',
$phase
)
->first();
$totaloverhead
+= data_get(
$valoverheadhour
,'td_hours');
}
?>
@if(
$valoverheadhour
)
<td style="
width
:
4
%
;
">{{ data_get(
$valoverheadhour
,'td_hours') }}</td>
@else
<td style="
width
:
4
%
;
"></td>
@endif
@if(count(
$overheadlist
) > 0)
@foreach(
$overheadlist
as
$key
=>
$projectoverhead
)
<?php
$totaloverhead
= 0;
?>
<tr>
<td style="
width
:
4
%
;
"></td>
<td style="
width
:
23
%
;
">{{
$projectoverhead['pname']
}}</td>
@if(
$phase
== 1)
@for(
$i
= 0;
$i
< 15 ;
$i
++)
<?php
$valoverheadhour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if(
$overheadhour
)
{
$valoverheadhour
=
$overheadhour->where
('td_date','=',
$date
)
->where('fk_o_id',
$projectoverhead['pid']
)
->where('tm_phase',
$phase
)
->first();
$totaloverhead
+= data_get(
$valoverheadhour
,'td_hours');
}
?>
@if(
$valoverheadhour
)
<td style="
width
:
4
%
;
">{{ data_get(
$valoverheadhour
,'td_hours') }}</td>
@else
<td style="
width
:
4
%
;
"></td>
@endif
@endfor
@else
@for(
$i
= 15;
$i
<
$daymonth
;
$i
++)
<?php
$valoverheadhour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if(
$overheadhour
)
{
$valoverheadhour
=
$overheadhour->where
('td_date','=',
$date
)
->where('fk_o_id',
$projectoverhead['pid']
)
->where('tm_phase',
$phase
)
->first();
$totaloverhead
+= data_get(
$valoverheadhour
,'td_hours');
}
?>
@if(
$valoverheadhour
)
<td style="
width
:
4
%
;
">{{ data_get(
$valoverheadhour
,'td_hours') }}</td>
@else
<td style="
width
:
4
%
;
"></td>
@endif
@endfor
@endif
@endfor
@endif
@if(
$totaloverhead
)
<td style="
width
:
5
%
">{{ number_format(
$totaloverhead
, 1, '.', '') }}</td>
<td style="
width
:
5
%
">{{ number_format(
$totaloverhead
/8, 1, '.', '') }}</td>
@else
<td style="
width
:
5
%
">0</td>
<td style="
width
:
5
%
">0</td>
@endif
</tr>
@endforeach
@if(
$totaloverhead
)
<td style="
width
:
5
%
">{{ number_format(
$totaloverhead
, 1, '.', '') }}</td>
<td style="
width
:
5
%
">{{ number_format(
$totaloverhead
/8, 1, '.', '') }}</td>
@else
<td style="
width
:
5
%
">0</td>
<td style="
width
:
5
%
">0</td>
@endif
</tr>
@endforeach
@else
<tr>
<td class="
text
-
center
" colspan="
@
if
(
$phase
==
1
){{
4
+
15
}}
@
else
{{
4
+
(
$daymonth
-
15
)}}
@
endif
">No Data Overhead</td>
</tr>
@endif
</tbody>
<tfoot>
<th colspan="
2
">Total (B)</th>
...
...
@@ -374,7 +382,7 @@
<td style="
width
:
17
%
;
">Task</td>
<td style="
width
:
@
if
(
$phase
==
1
){{(
15
*
4
)
+
10
}}
@
else
{{((
$daymonth
-
15
)
*
4
)
+
10
}}
@
endif
%
;
">Description</td>
</tr>
@if(
$notes
)
@if(
$notes
)
@foreach(
$notes
as
$key
=>
$value
)
<tr>
<td>{{ date("
d
-
m
-
Y
", strtotime(data_get(
$value
,'td_date'))) }}</td>
...
...
@@ -382,11 +390,18 @@
<td>{{ data_get(
$value
,'td_overhead_note') }}</td>
</tr>
@endforeach
@endif
@else
<tr>
<td colspan="
3
" class="
text
-
center
">No Data Overhead</td>
</tr>
@endif
</tbody>
</table>
@if(data_get(
$check
,'attachement'))
<table id="
printtable5
" class="
ui
celled
structured
table
unstackable
">
</div>
@if(data_get(
$check
,'attachement'))
<div class="
ui
segment
">
<table id="
printtable8
" class="
ui
celled
structured
table
unstackable
">
<thead>
<tr>
<th class="
center
aligned
">Title</th>
...
...
@@ -408,15 +423,14 @@
</tr>
</tbody>
</table>
@endif
</div>
@endif
<div class="
ui
segment
">
<table id="
printtabl6
" class="
ui
celled
structured
table
unstackable
">
<table id="
printtabl
e
6
" class="
ui
celled
structured
table
unstackable
">
<tbody>
<tr>
<td style="
width
:
4
%
;
"></td>
<td style="
width
:
4
%
"></td>
<td style="
width
:
23
%
;
">Total (A) + (B) Working Hours</td>
@if(
$phase
== 1 )
@for(
$i
= 0;
$i
< 15 ;
$i
++)
...
...
@@ -481,12 +495,12 @@
<td style="
width
:
4
%
;
">{{ number_format(
$ac
, '1', '.', '') }}</td>
@endfor
@endif
<td> @if(
$check
) {{ number_format((
$totalchargehrs
+
$totaloverheadhrs
), 1, '.', '') }} @else 0 @endif </td>
<td> {{ number_format((
$totalchargehrs
+
$totaloverheadhrs
)/8, 1, '.', '') }} </td>
<td
style="
width
:
5
%
;
"
> @if(
$check
) {{ number_format((
$totalchargehrs
+
$totaloverheadhrs
), 1, '.', '') }} @else 0 @endif </td>
<td
style="
width
:
5
%
;
"
> {{ number_format((
$totalchargehrs
+
$totaloverheadhrs
)/8, 1, '.', '') }} </td>
</tr>
<tr>
<td style="
width
:
4
%
;
"></td>
<td style="
width
:
4
%
"></td>
<td style="
width
:
23
%
;
">Total (A+B) - 8 Overtime</td>
<?php
$totalot
= 0; ?>
@if(
$phase
== 1 )
...
...
@@ -583,6 +597,7 @@
</table>
</div>
@if(data_get(
$profile
,'HOD_NAME'))
<div class="
ui
segment
">
<table id="
printtable7
" class="
ui
celled
structured
table
unstackable
">
<thead>
...
...
@@ -606,6 +621,28 @@
</tbody>
</table>
</div>
@else
<div class="
ui
segment
">
<table id="
printtable7
" class="
ui
celled
structured
table
unstackable
">
<thead>
<tr>
<th style="
width
:
50
%
;
" class="
center
aligned
">Staff Signature</th>
<th style="
width
:
50
%
;
" class="
center
aligned
">Approved by</th>
</tr>
</thead>
<tbody>
<tr>
<td style="
width
:
50
%
;
" class="
center
aligned
"><br><br></td>
<td style="
width
:
50
%
;
" class="
center
aligned
"><br><br></td>
</tr>
<tr>
<td style="
width
:
50
%
;
" class="
center
aligned
">@if(
$profile
){{ data_get(
$profile
,'STAFF_NAME') }}@endif</td>
<td style="
width
:
50
%
;
" class="
center
aligned
">@if(
$profile
){{ data_get(
$profile
,'BOD_NAME') }}@endif</td>
</tr>
</tbody>
</table>
</div>
@endif
</div>
<br>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment