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
a5916ce8
Commit
a5916ce8
authored
Sep 20, 2022
by
hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
summary, department and project report page, remove non-chargeable
parent
3c95e20b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
39 deletions
+12
-39
packages/portal/timesheet/resources/views/report/department.blade.php
+2
-24
packages/portal/timesheet/resources/views/report/ringkasan.blade.php
+6
-11
packages/portal/timesheet/src/Http/Controllers/ReportController.php
+4
-4
No files found.
packages/portal/timesheet/resources/views/report/department.blade.php
View file @
a5916ce8
...
...
@@ -71,28 +71,6 @@
@endforeach
<?php
$nonchargeproject
=
$project->where
('ptype', 2);
$nonchargehours
=
$nonchargedays
= 0;
?>
@foreach(
$nonchargeproject
as
$key
=>
$nonchargeable
)
@if(data_get(
$nonchargeable
,'staffid') == data_get(
$staff
,'staffid'))
<tr>
<td style="
width
:
35
%
"></td>
<td style="
width
:
5
%
" class="
center
aligned
">NC</td>
<td style="
width
:
15
%
" class="
center
aligned
">
{
{data_get($nonchargeable,'pcode')}
}
</td>
<td style="
width
:
25
%
">
{
{data_get($nonchargeable,'pname')}
}
</td>
<td style="
width
:
10
%
" class="
center
aligned
">
{
{data_get($nonchargeable,'hours')}
}
</td>
<td style="
width
:
10
%
" class="
center
aligned
">{{number_format(data_get(
$nonchargeable
,'hours')/8, '1', '.', '')}}</td>
</tr>
<?php
$nonchargehours
+= data_get(
$nonchargeable
,'hours');
$nonchargedays
+= number_format(data_get(
$nonchargeable
,'hours')/8, '1', '.', '');
?>
@endif
@endforeach
<?php
$overheadhours
=
$overheaddays
= 0;
?>
...
...
@@ -114,8 +92,8 @@
@endforeach
<?php
$staffhours
=
$chargehours
+
$
nonchargehours
+
$
overheadhours
;
$staffdays
=
$chargedays
+
$
nonchargedays
+
$
overheaddays
;
$staffhours
=
$chargehours
+
$overheadhours
;
$staffdays
=
$chargedays
+
$overheaddays
;
?>
<tr>
<td colspan="
3
"></td>
...
...
packages/portal/timesheet/resources/views/report/ringkasan.blade.php
View file @
a5916ce8
...
...
@@ -30,7 +30,7 @@
<tr>
<th colspan="
5
"></th>
<th colspan="
{{
count
(
$chargeproject
)
+
2
}}
" class="
center
aligned
">Chargeable</th>
<th colspan="
{{
count
(
$overhead
)
+
3
}}
" class="
center
aligned
">Non-Chargeable</th>
<th colspan="
{{
count
(
$overhead
)
+
2
}}
" class="
center
aligned
">Non-Chargeable</th>
<th rowspan="
2
" class="
center
aligned
">Total (Working Days)</th>
</tr>
<tr>
...
...
@@ -46,7 +46,6 @@
@endforeach
<th>Total Hours</th>
<th>Total Days</th>
<th class="
center
aligned
">Project</th>
@foreach(
$overhead
as
$key
=>
$value
)
<th>
{
{data_get($value,'o_overhead_desc')}
}
</th>
@endforeach
...
...
@@ -54,6 +53,7 @@
<th>Total Days</th>
</tr>
</thead>
<?php
$totaldays
=
$totalalldays
= 0; ?>
@foreach(
$staffs
as
$key
=>
$staff
)
<tbody>
...
...
@@ -76,15 +76,8 @@
@endforeach
<td class="
center
aligned
">
{
{$totalc}
}
</td>
<td class="
center
aligned
">{{number_format(
$totalc
/8, 1, '.', '')}}</td>
<td class="
center
aligned
">
<?php
$totalnc
= 0; ?>
@foreach(
$projectnc
as
$key
=>
$project
)
@if(data_get(
$project
,'staffid') == data_get(
$staff
,'staffid'))
{
{data_get($project,'nonchargehours')}
}
<?php
$totalnc
+= data_get(
$project
,'nonchargehours'); ?>
@endif
@endforeach
</td>
@foreach(
$overhead
as
$key
=>
$value
)
<td>
@foreach(
$ovhours
as
$key
=>
$hours
)
...
...
@@ -103,15 +96,17 @@
</tbody>
<?php
$totalalldays
+=
$totaldays
; ?>
@endforeach
<tfoot>
<tr>
<th colspan="
5
" class="
center
aligned
">
<strong>Total</strong>
</th>
<th colspan="
{{
count
(
$chargeproject
)
+
2
+
count
(
$overhead
)
+
3
}}
"></th>
<th colspan="
{{
count
(
$chargeproject
)
+
2
+
count
(
$overhead
)
+
2
}}
"></th>
<th><strong>
{
{$totalalldays}
}
</strong></th>
</tr>
</tfoot>
</table>
</div>
</div>
...
...
packages/portal/timesheet/src/Http/Controllers/ReportController.php
View file @
a5916ce8
...
...
@@ -65,9 +65,9 @@ class ReportController extends Controller
->
where
(
'year'
,
$request
->
year
)
->
get
();
$projectnc
=
VwNonchargeSummary
::
where
(
'month'
,
$request
->
month
)
->
where
(
'year'
,
$request
->
year
)
->
get
();
//
$projectnc = VwNonchargeSummary::where('month', $request->month)
//
->where('year', $request->year)
//
->get();
$overhead
=
Overhead
::
where
(
'o_overhead_sts'
,
1
)
->
get
();
// dd($overhead);
...
...
@@ -91,7 +91,7 @@ class ReportController extends Controller
$month
=
date
(
'F'
,
mktime
(
0
,
0
,
0
,
$request
->
month
,
1
,
date
(
'Y'
)));
return
view
(
'timesheet::report.ringkasan'
,
compact
(
'intmonth'
,
'month'
,
'year'
,
'ringkasan'
,
'chargeproject'
,
'staffs'
,
'
projectnc'
,
'
overhead'
,
'ovhours'
));
return
view
(
'timesheet::report.ringkasan'
,
compact
(
'intmonth'
,
'month'
,
'year'
,
'ringkasan'
,
'chargeproject'
,
'staffs'
,
'overhead'
,
'ovhours'
));
}
public
function
projectreport
()
...
...
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