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
15bd9c96
Commit
15bd9c96
authored
Nov 01, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log en faizal, redundant data.
parent
22dc6c2b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
43 deletions
+66
-43
packages/portal/timesheet/resources/views/dashboard/timesheetViewer.blade.php
+14
-11
packages/portal/timesheet/resources/views/report/department.blade.php
+2
-0
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+50
-32
No files found.
packages/portal/timesheet/resources/views/dashboard/timesheetViewer.blade.php
View file @
15bd9c96
...
@@ -243,7 +243,10 @@
...
@@ -243,7 +243,10 @@
</thead>
</thead>
<tbody>
<tbody>
@foreach(
$overheadlist
as
$key
=>
$projectoverhead
)
@foreach(
$overheadlist
as
$key
=>
$projectoverhead
)
<?php
$totaloverhead
= 0; ?>
<?php
$totaloverhead
= 0;
// dd(
$overheadlist
);
?>
<tr>
<tr>
<td style="
width
:
4
%
;
"></td>
<td style="
width
:
4
%
;
"></td>
<td style="
width
:
23
%
;
">{{
$projectoverhead['pname']
}}</td>
<td style="
width
:
23
%
;
">{{
$projectoverhead['pname']
}}</td>
...
@@ -327,7 +330,7 @@
...
@@ -327,7 +330,7 @@
}
}
}
}
?>
?>
<th style="
width
:
4
%
">{{
$totaloverheadbyday
}}</th>
<th style="
width
:
4
%
">{{
number_format(
$totaloverheadbyday
, 1, '.', '')
}}</th>
@endfor
@endfor
@else
@else
@for(
$i
= 15;
$i
<
$daymonth
;
$i
++)
@for(
$i
= 15;
$i
<
$daymonth
;
$i
++)
...
@@ -343,7 +346,7 @@
...
@@ -343,7 +346,7 @@
}
}
}
}
?>
?>
<th style="
width
:
4
%
">{{
$totaloverheadbyday
}}</th>
<th style="
width
:
4
%
">{{
number_format(
$totaloverheadbyday
, '1', '.', '')
}}</th>
@endfor
@endfor
@endif
@endif
<th style="
width
:
5
%
">@if(
$totaloverheadhrs
) {{ number_format(
$totaloverheadhrs
, 1, '.', '') }} @else 0 @endif</th>
<th style="
width
:
5
%
">@if(
$totaloverheadhrs
) {{ number_format(
$totaloverheadhrs
, 1, '.', '') }} @else 0 @endif</th>
...
@@ -356,7 +359,7 @@
...
@@ -356,7 +359,7 @@
<table id="
printtable5
" class="
ui
celled
structured
table
unstackable
">
<table id="
printtable5
" class="
ui
celled
structured
table
unstackable
">
<thead>
<thead>
<tr>
<tr>
<th colspan="
3
" class="
center
aligned
">Note
s
: BIDS/TENDER/OTHERS</th>
<th colspan="
3
" class="
center
aligned
">Note: BIDS/TENDER/OTHERS</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -366,13 +369,13 @@
...
@@ -366,13 +369,13 @@
<td style="
width
:
@
if
(
$phase
==
1
){{(
15
*
4
)
+
10
}}
@
else
{{((
$daymonth
-
15
)
*
4
)
+
10
}}
@
endif
%
;
">Description</td>
<td style="
width
:
@
if
(
$phase
==
1
){{(
15
*
4
)
+
10
}}
@
else
{{((
$daymonth
-
15
)
*
4
)
+
10
}}
@
endif
%
;
">Description</td>
</tr>
</tr>
@if(
$notes
)
@if(
$notes
)
@foreach(
$notes
as
$key
=>
$value
)
@foreach(
$notes
as
$key
=>
$value
)
<tr>
<tr>
<td>{{ date("
d
-
m
-
Y
", strtotime(data_get(
$value
,'td_date'))) }}</td>
<td>{{ date("
d
-
m
-
Y
", strtotime(data_get(
$value
,'td_date'))) }}</td>
<td>{{ data_get(
$value
,'td_overhead_desc') }}</td>
<td>{{ data_get(
$value
,'td_overhead_desc') }}</td>
<td>{{ data_get(
$value
,'td_overhead_note') }}</td>
<td>{{ data_get(
$value
,'td_overhead_note') }}</td>
</tr>
</tr>
@endforeach
@endforeach
@endif
@endif
</tbody>
</tbody>
</table>
</table>
...
...
packages/portal/timesheet/resources/views/report/department.blade.php
View file @
15bd9c96
...
@@ -51,7 +51,9 @@
...
@@ -51,7 +51,9 @@
</tr>
</tr>
<?php
<?php
//
$chargeproject
=
$project->where
('ptype', 1);
$chargeproject
=
$project->where
('ptype', 1);
$chargeproject
=
$project->where
('ptype', 1);
dd(
$chargeproject
);
$chargehours
=
$chargedays
= 0;
$chargehours
=
$chargedays
= 0;
?>
?>
...
...
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
15bd9c96
...
@@ -1327,42 +1327,60 @@ class DashboardController extends Controller
...
@@ -1327,42 +1327,60 @@ class DashboardController extends Controller
$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
)
->
get
();
// ->groupby('fk_o_id')
->
get
();
$tempOverhead
[
0
]
=
""
;
$tempOverheadid
[
0
]
=
0
;
if
(
isset
(
$overheadhour
[
0
]))
$ovlist
=
Ts_detail
::
where
(
'fk_tm_id'
,
$check
->
id
)
->
where
(
'td_project_type'
,
$overhead
)
->
where
(
'td_hours'
,
'!='
,
0
)
->
groupby
(
'fk_o_id'
)
->
orderby
(
'fk_o_id'
,
'asc'
)
->
get
();
// dd($ovlist);
foreach
(
$ovlist
as
$key
=>
$value
)
{
{
// dd('sini ke?');
$overheadlist
[]
=
[
$tempOverhead
[
0
]
=
$overheadhour
[
0
]
->
td_overhead_desc
;
'pid'
=>
data_get
(
$value
,
'fk_o_id'
)
,
$tempOverheadid
[
0
]
=
$overheadhour
[
0
]
->
fk_o_id
;
'pname'
=>
data_get
(
$value
,
'td_overhead_desc'
),
];
$j
=
0
;
}
for
(
$i
=
0
;
$i
<
count
(
$overheadhour
);
$i
++
)
{
if
(
$tempOverhead
[
$j
]
==
$overheadhour
[
$i
]
->
td_overhead_desc
)
{
}
else
{
$j
++
;
$tempOverhead
[
$j
]
=
$overheadhour
[
$i
]
->
td_overhead_desc
;
$tempOverheadid
[
$j
]
=
$overheadhour
[
$i
]
->
fk_o_id
;
}
}
foreach
(
$tempOverhead
as
$key
=>
$value
)
{
// dd($overheadlist);
$overheadlist
[]
=
[
// $tempOverhead[0] = "";
'pid'
=>
$tempOverheadid
[
$key
],
// $tempOverheadid[0] = 0;
'pname'
=>
$tempOverhead
[
$key
],
];
// if(isset($overheadhour[0]))
}
// {
}
// // dd('sini ke?');
else
// $tempOverhead[0] = $overheadhour[0]->td_overhead_desc;
{
// $tempOverheadid[0] = $overheadhour[0]->fk_o_id;
// dd('ke sini?');
}
// $j = 0;
// for($i = 0; $i < count($overheadhour); $i++)
// {
// if ($tempOverhead[$j] == $overheadhour[$i]->td_overhead_desc) {
// }
// else
// {
// $j++;
// $tempOverhead[$j] = $overheadhour[$i]->td_overhead_desc;
// $tempOverheadid[$j] = $overheadhour[$i]->fk_o_id;
// }
// }
// // dd($tempOverhead);
// foreach ($tempOverhead as $key => $value) {
// $overheadlist[] = [
// 'pid' => $tempOverheadid[$key],
// 'pname' => $tempOverhead[$key],
// ];
// }
// }
// else
// {
// // dd('ke sini?');
// }
$totalchargehrs
=
$check
->
tm_chargeable_hrs
;
$totalchargehrs
=
$check
->
tm_chargeable_hrs
;
$totaloverheadhrs
=
$check
->
tm_overhead_hrs
;
$totaloverheadhrs
=
$check
->
tm_overhead_hrs
;
...
...
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