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
cd819ede
Commit
cd819ede
authored
Oct 19, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
display total hours & days utk footer summary report
parent
adff6d72
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
11 deletions
+34
-11
packages/portal/timesheet/resources/views/report/ringkasan.blade.php
+32
-9
packages/portal/timesheet/src/Http/Controllers/ReportController.php
+2
-2
No files found.
packages/portal/timesheet/resources/views/report/ringkasan.blade.php
View file @
cd819ede
...
...
@@ -91,9 +91,10 @@
@if(data_get(
$staff
,'staffid') == data_get(
$hours
,'staffid') && data_get(
$value
,'id') == data_get(
$hours
,'oid'))
<!--
{
{data_get($hours,'hours')}
}
-->
<?php
$monthly_hours
+= data_get(
$hours
,'hours') ?>
<
?php
$totalnc
+= data_get(
$hours
,'hours'); ?
>
<
!-- <?php
$totalnc
+= data_get(
$hours
,'hours'); ?> --
>
@endif
@endforeach
@if(
$monthly_hours
== 0)
@else
{
{$monthly_hours}
}
...
...
@@ -114,11 +115,36 @@
<th colspan="
5
" class="
center
aligned
">
<strong>Total</strong>
</th>
<th colspan="
{{
count
(
$chargeproject
)
+
2
+
count
(
$overhead
)
+
2
}}
"></th>
<?php
$tch
= 0; ?>
@foreach(
$chargeproject
as
$key
=>
$value
)
<?php
$currproject
=
$ringkasan->where
('c_pid', data_get(
$value
,'id')) ?>
<th>
<?php
$totalp
= 0; ?>
@foreach(
$staffs
as
$key
=>
$staff
)
@foreach(
$chargeproject
as
$key
=>
$chargeable
)
<?php
$monthly_hours
= 0; ?>
@foreach(
$currproject
as
$key
=>
$value
)
@if(data_get(
$value
,'staffid') == data_get(
$staff
,'staffid') && data_get(
$chargeable
,'id') == data_get(
$value
,'c_pid'))
<!--
{
{data_get($value,'total_c_hours')}
}
-->
<?php
$monthly_hours
+= data_get(
$value
,'total_c_hours'); ?>
@endif
@endforeach
<!--
{
{$monthly_hours}
}
-->
<?php
$totalp
+=
$monthly_hours
; ?>
@endforeach
@endforeach
{
{$totalp}
}
</th>
<?php
$tch
+=
$totalp
; ?>
@endforeach
<th class="
text
-
center
">
{
{$tch}
}
</th>
<th class="
text
-
center
">{{number_format(
$tch
/8, 1, '.', '')}}</th>
<th colspan="
{{
count
(
$overhead
)
+
2
}}
"></th>
<th><strong>
{
{$totalalldays}
}
</strong></th>
</tr>
</tfoot>
</tfoot>
</table>
</div>
</div>
...
...
@@ -184,7 +210,4 @@
</style>
@endsection
@push('script')
@endpush
\ No newline at end of file
@endsection
\ No newline at end of file
packages/portal/timesheet/src/Http/Controllers/ReportController.php
View file @
cd819ede
...
...
@@ -84,7 +84,7 @@ class ReportController extends Controller
// dd($ovhours);
$chargeproject
=
VwChargeable
::
all
();
// dd($chargeproject);
if
(
$request
->
dept
==
'all'
)
{
$staffs
=
VwStaff
::
orderby
(
'deptID'
)
->
where
(
'deptID'
,
'!='
,
8
)
...
...
@@ -97,7 +97,7 @@ class ReportController extends Controller
->
where
(
'deptID'
,
$request
->
dept
)
->
get
();
}
// dd($staffs);
$year
=
date
(
'Y'
);
if
(
$request
->
year
)
{
$year
=
$request
->
year
;
...
...
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