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
9e777547
Commit
9e777547
authored
Dec 14, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
report ringkasan & report project changes
parent
933f0e6d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
246 additions
and
162 deletions
+246
-162
packages/portal/timesheet/resources/views/exports/exportProject.blade.php
+89
-66
packages/portal/timesheet/resources/views/exports/exportRingkasan.blade.php
+150
-89
packages/portal/timesheet/resources/views/report/ringkasan.blade.php
+1
-2
packages/portal/timesheet/src/Http/Controllers/ExportController.php
+2
-4
packages/portal/timesheet/src/Http/Controllers/ReportController.php
+4
-1
No files found.
packages/portal/timesheet/resources/views/exports/exportProject.blade.php
View file @
9e777547
<table>
<table
class=
"ui unstackable celled table"
>
<thead>
<thead>
<tr>
<tr>
<th
>
Project
</th>
<th
style=
"width: 10%"
>
Project
</th>
<th
>
:
</th>
<th
style=
"width: 1%"
>
:
</th>
<th
colspan=
"3
"
>
{{data_get($pdetail,'pcode')}} - {{data_get($pdetail,'pname')}}
</th>
<th
colspan=
"2
"
>
{{data_get($pdetail,'pcode')}} - {{data_get($pdetail,'pname')}}
</th>
</tr>
</tr>
<tr>
<tr>
<th
>
Month/Year
</th>
<th
style=
"width: 10%"
>
Month/Year
</th>
<th
>
:
</th>
<th
style=
"width: 1%"
>
:
</th>
<th
colspan=
"3
"
>
{{$month}} {{$year}}
</th>
<th
colspan=
"2
"
>
{{$month}} {{$year}}
</th>
</tr>
</tr>
</thead>
</thead>
</table>
</table>
<table>
<thead>
<table
class=
"ui unstackable celled table"
>
<tr>
<thead>
<th>
Staff Name
</th>
<tr>
<th>
Role
</th>
<th
style=
"width: 10%"
class=
"center aligned"
rowspan=
"2"
>
role
</th>
<th>
Total Hours
</th>
<th
style=
"width: 10%"
class=
"center aligned"
rowspan=
"2"
>
allocation
</th>
<th>
Total Days
</th>
<th
style=
"width: 10%"
class=
"center aligned"
rowspan=
"2"
>
total accumulate
</th>
</tr>
<th
style=
"width: 15%"
class=
"center aligned"
rowspan=
"2"
>
staff name
</th>
</thead>
<th
style=
"width: 20%"
class=
"center aligned"
colspan=
"2"
>
Mandays
</th>
<tbody>
<th
style=
"width: 10%"
class=
"center aligned"
rowspan=
"2"
>
balance
</th>
<?php
$totalhours
=
$totaldays
=
0
;
?>
</tr>
@foreach($pteam as $key => $team)
<tr>
<tr>
<th
style=
"width: 15%"
class=
"center aligned"
>
total hours
</th>
<td>
{{data_get($team,'name')}}
</td>
<th
style=
"width: 15%"
class=
"center aligned"
>
total days
</th>
<td>
{{data_get($team,'role')}}
</td>
</tr>
<td>
</thead>
<?php
$sumhours
=
0
;
?>
<tbody>
@foreach($ptdetail as $key => $hours)
<?php
@if(data_get($hours,'staffid') == data_get($team,'staffid'))
$pteam
=
[];
<?php
$sumhours
+=
data_get
(
$hours
,
'hours'
);
?>
?>
<?php
$totalhours
+=
data_get
(
$hours
,
'hours'
);
?>
@foreach($roles as $key => $role)
@endif
<?php
@endforeach
$pteam
=
$pteams
->
where
(
'role_id'
,
data_get
(
$role
,
'pm_roles'
));
@if($sumhours == 0)
?>
@else
<tr>
{{$sumhours}}
<td
rowspan=
"{{count($pteam)+1}}"
>
{{data_get($role,'role.role')}}
</td>
@endif
<td
rowspan=
"{{count($pteam)+1}}"
>
{{data_get($role,'pm_hours')}} Hours
<br>
{{data_get($role,'pm_days')}} Days
</td>
</td>
<td>
<td
rowspan=
"{{count($pteam)+1}}"
>
<?php
$sumdays
=
0
;
?>
<?php
@foreach($ptdetail as $key => $hours)
$accumulatehours
=
0
;
@if(data_get($hours,'staffid') == data_get($team,'staffid'))
$staffaccumulateshours
=
$accumulates
->
where
(
'tp_roles'
,
data_get
(
$role
,
'pm_roles'
));
<!-- {{number_format(data_get($hours,'hours')/8, 1, '.', '')}} -->
foreach
(
$staffaccumulateshours
as
$key
=>
$accumulateshours
)
{
<?php
$sumdays
+=
number_format
(
data_get
(
$hours
,
'hours'
)
/
8
,
1
,
'.'
,
''
);
?>
$accumulatehours
+=
data_get
(
$accumulateshours
,
'tp_hours'
);
<?php
$totaldays
+=
number_format
(
data_get
(
$hours
,
'hours'
)
/
8
,
1
,
'.'
,
''
);
?>
}
@endif
?>
@endforeach
{{ number_format($accumulatehours, 1, '.', '') }} Hours
<br>
@if($sumdays == 0)
{{ number_format($accumulatehours/8, 1, '.', '') }} Days
@else
</td>
{{$sumdays}}
</tr>
@endif
<?php
$count
=
0
;
?>
</td>
@foreach($pteam as $key => $team)
</tr>
<tr>
@endforeach
<td>
{{data_get($team,'pt_team')}}
</td>
</tbody>
<td
class=
"center aligned"
>
<tfoot>
<?php
<tr>
$currhour
=
0
;
<th><strong>
Total
</strong></th>
$currmonthhours
=
$currentmonthhours
->
where
(
'staffid'
,
data_get
(
$team
,
'pt_staff_id'
));
<th></th>
foreach
(
$currmonthhours
as
$key
=>
$hours
)
{
<th><strong>
{{$totalhours}} / {{data_get($pdetail,'mandays.p_total_hours')}}
</strong></th>
$currhour
=
data_get
(
$hours
,
'tp_hours'
);
<th><strong>
{{$totaldays}} / {{data_get($pdetail,'mandays.p_total_days')}}
</strong></th>
}
</tr>
?>
</tfoot>
{{ number_format($currhour, '1', '.', '') }} Hours
</td>
<td
class=
"center aligned"
>
{{ number_format($currhour/8, '1', '.', '') }} Days
</td>
@if($count == 0)
<td
rowspan=
"{{count($pteam)}}"
class=
"center aligned"
>
<?php
$balancehours
=
data_get
(
$role
,
'pm_hours'
)
-
$accumulatehours
;
?>
{{ number_format($balancehours, '1', '.', '') }} Hours
<br>
{{ number_format($balancehours/8, '1', '.', '') }} Days
</td>
@else
@endif
<?php
$count
++
;
?>
</tr>
@endforeach
@endforeach
</tbody>
</table>
</table>
\ No newline at end of file
packages/portal/timesheet/resources/views/exports/exportRingkasan.blade.php
View file @
9e777547
This diff is collapsed.
Click to expand it.
packages/portal/timesheet/resources/views/report/ringkasan.blade.php
View file @
9e777547
...
@@ -6,8 +6,7 @@
...
@@ -6,8 +6,7 @@
<div class="
ui
purple
left
ribbon
label
">
<div class="
ui
purple
left
ribbon
label
">
Report Summary
Report Summary
</div>
</div>
<button class="
floated
center
aligned
ui
violet
compact
labeled
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
export
.
exportsummary
', ['
month
'=> $intmonth, '
year
'=> $year, '
dept
'=> $dept]) }}'
;
">
<button class="
floated
center
aligned
ui
violet
compact
labeled
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
export
.
exportsummary
', ['
month
'=> $intmonth, '
year
'=> $year]) }}'
;
">
<i class="
file
excel
outline
icon
"></i>
<i class="
file
excel
outline
icon
"></i>
Export to Excel
Export to Excel
</button>
</button>
...
...
packages/portal/timesheet/src/Http/Controllers/ExportController.php
View file @
9e777547
...
@@ -52,9 +52,9 @@ class ExportController extends Controller
...
@@ -52,9 +52,9 @@ class ExportController extends Controller
return
(
new
RingkasanExport
(
return
(
new
RingkasanExport
(
[
[
'dept'
=>
$request
->
dept
,
'month'
=>
$request
->
month
,
'month'
=>
$request
->
month
,
'year'
=>
$request
->
year
'year'
=>
$request
->
year
]))
->
download
(
'Report Summary '
.
$month
.
' '
.
$year
.
'.xlsx'
);
]))
->
download
(
'Report Summary '
.
$month
.
' '
.
$year
.
'.xlsx'
);
...
@@ -62,8 +62,6 @@ class ExportController extends Controller
...
@@ -62,8 +62,6 @@ class ExportController extends Controller
public
function
exportproject
(
Request
$request
)
public
function
exportproject
(
Request
$request
)
{
{
// dd($request);
$month
=
date
(
'F'
,
mktime
(
0
,
0
,
0
,
$request
->
month
,
1
,
date
(
'Y'
)));
$month
=
date
(
'F'
,
mktime
(
0
,
0
,
0
,
$request
->
month
,
1
,
date
(
'Y'
)));
$year
=
strval
(
$request
->
year
);
$year
=
strval
(
$request
->
year
);
$pdetail
=
VwProject
::
where
(
'pid'
,
$request
->
pid
)
$pdetail
=
VwProject
::
where
(
'pid'
,
$request
->
pid
)
...
...
packages/portal/timesheet/src/Http/Controllers/ReportController.php
View file @
9e777547
...
@@ -65,6 +65,8 @@ class ReportController extends Controller
...
@@ -65,6 +65,8 @@ class ReportController extends Controller
public
function
generateRingkasan
(
Request
$request
)
public
function
generateRingkasan
(
Request
$request
)
{
{
// dd($request);
$dept
=
$request
->
dept
;
$ringkasan
=
VwRingkasanLaporan
::
where
(
'month'
,
$request
->
month
)
$ringkasan
=
VwRingkasanLaporan
::
where
(
'month'
,
$request
->
month
)
->
where
(
'year'
,
$request
->
year
)
->
where
(
'year'
,
$request
->
year
)
->
where
(
'status'
,
4
)
->
where
(
'status'
,
4
)
...
@@ -135,7 +137,7 @@ class ReportController extends Controller
...
@@ -135,7 +137,7 @@ class ReportController extends Controller
$month
=
date
(
'F'
,
mktime
(
0
,
0
,
0
,
$request
->
month
,
1
,
date
(
'Y'
)));
$month
=
date
(
'F'
,
mktime
(
0
,
0
,
0
,
$request
->
month
,
1
,
date
(
'Y'
)));
return
view
(
'timesheet::report.ringkasan'
,
compact
(
'intmonth'
,
'month'
,
'year'
,
'ringkasan'
,
'chargeproject'
,
'staffs'
,
'overhead'
,
'ovhours'
,
'chargeprojects'
,
'chargehours'
));
return
view
(
'timesheet::report.ringkasan'
,
compact
(
'intmonth'
,
'month'
,
'year'
,
'ringkasan'
,
'chargeproject'
,
'staffs'
,
'overhead'
,
'ovhours'
,
'chargeprojects'
,
'chargehours'
,
'dept'
));
}
}
public
function
projectreport
()
public
function
projectreport
()
...
@@ -293,6 +295,7 @@ class ReportController extends Controller
...
@@ -293,6 +295,7 @@ class ReportController extends Controller
->
where
(
'tp_month'
,
'<='
,
$request
->
month
)
->
where
(
'tp_month'
,
'<='
,
$request
->
month
)
->
orderby
(
'tp_month'
,
'ASC'
)
->
orderby
(
'tp_month'
,
'ASC'
)
->
get
();
->
get
();
$currentmonthhours
=
Tproject
::
where
(
'td_project'
,
$pid
)
$currentmonthhours
=
Tproject
::
where
(
'td_project'
,
$pid
)
->
where
(
'tp_year'
,
$request
->
year
)
->
where
(
'tp_year'
,
$request
->
year
)
->
where
(
'tp_month'
,
$request
->
month
)
->
where
(
'tp_month'
,
$request
->
month
)
...
...
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