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
95f49f85
Commit
95f49f85
authored
Dec 14, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes in export report
parent
527ffcba
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
20 deletions
+40
-20
packages/portal/timesheet/resources/views/exports/exportDepartment.blade.php
+20
-10
packages/portal/timesheet/resources/views/report/department.blade.php
+20
-10
No files found.
packages/portal/timesheet/resources/views/exports/exportDepartment.blade.php
View file @
95f49f85
...
@@ -27,23 +27,36 @@
...
@@ -27,23 +27,36 @@
@foreach($staffs as $key => $staff)
@foreach($staffs as $key => $staff)
<tbody>
<tbody>
<?php
<?php
$countchargeable
=
$countoverhead
=
0
;
$countproject
=
$projecttitle
->
where
(
'staffid'
,
data_get
(
$staff
,
'staffid'
));
$countproject
=
$projecttitle
->
where
(
'staffid'
,
data_get
(
$staff
,
'staffid'
));
$chargeproject
=
$projecttitle
->
where
(
'ptype'
,
1
);
foreach
(
$chargeproject
as
$key
=>
$chargeable
)
{
if
(
data_get
(
$chargeable
,
'staffid'
)
==
data_get
(
$staff
,
'staffid'
))
{
$countchargeable
+=
1
;
}
}
foreach
(
$overheadtitle
as
$key
=>
$value
)
{
if
(
data_get
(
$value
,
'staffid'
)
==
data_get
(
$staff
,
'staffid'
))
{
$countoverhead
+=
1
;
}
}
$countrow
=
$countoverhead
+
$countchargeable
;
?>
?>
<tr>
<tr>
<td
colspan=
"6
"
>
{{data_get($staff,'name')}}
</td>
<td
rowspan=
"{{$countrow+2}}"
style=
"border-right: 1px solid rgba(34,36,38,.15);
"
>
{{data_get($staff,'name')}}
</td>
</tr>
</tr>
<?php
<?php
// $chargeproject = $project->where('ptype', 1);
$chargeproject
=
$projecttitle
->
where
(
'ptype'
,
1
);
// dump($chargeproject);
$chargehours
=
$chargedays
=
0
;
$chargehours
=
$chargedays
=
0
;
// dump($countrow);
?>
?>
@foreach($chargeproject as $key => $chargeable)
@foreach($chargeproject as $key => $chargeable)
@if(data_get($chargeable,'staffid') == data_get($staff,'staffid'))
@if(data_get($chargeable,'staffid') == data_get($staff,'staffid'))
<tr>
<tr>
<td
style=
"width: 35%"
></td>
<td
style=
"width: 5%"
class=
"center aligned"
>
C
</td>
<td
style=
"width: 5%"
class=
"center aligned"
>
C
</td>
<td
style=
"width: 15%"
class=
"center aligned"
>
{{data_get($chargeable,'pcode')}}
</td>
<td
style=
"width: 15%"
class=
"center aligned"
>
{{data_get($chargeable,'pcode')}}
</td>
<td
style=
"width: 25%"
>
{{data_get($chargeable,'pname')}}
</td>
<td
style=
"width: 25%"
>
{{data_get($chargeable,'pname')}}
</td>
...
@@ -76,7 +89,6 @@
...
@@ -76,7 +89,6 @@
@foreach($overheadtitle as $key => $value)
@foreach($overheadtitle as $key => $value)
@if(data_get($value,'staffid') == data_get($staff,'staffid'))
@if(data_get($value,'staffid') == data_get($staff,'staffid'))
<tr>
<tr>
<td
style=
"width: 35%"
></td>
<td
style=
"width: 5%"
class=
"center aligned"
>
NC
</td>
<td
style=
"width: 5%"
class=
"center aligned"
>
NC
</td>
<td
style=
"width: 15%"
class=
"center aligned"
></td>
<td
style=
"width: 15%"
class=
"center aligned"
></td>
<td
style=
"width: 25%"
>
{{data_get($value,'pname')}}
</td>
<td
style=
"width: 25%"
>
{{data_get($value,'pname')}}
</td>
...
@@ -107,8 +119,7 @@
...
@@ -107,8 +119,7 @@
$staffdays
=
$chargedays
+
$overheaddays
;
$staffdays
=
$chargedays
+
$overheaddays
;
?>
?>
<tr>
<tr>
<td
colspan=
"3"
></td>
<td
style=
"width: 25%"
colspan=
"3"
class=
"center aligned"
>
Total
</td>
<td
style=
"width: 25%"
class=
"center aligned"
>
Total
</td>
<td
style=
"width: 10%"
class=
"center aligned"
>
{{ number_format($staffhours, '1', '.', '') }}
</td>
<td
style=
"width: 10%"
class=
"center aligned"
>
{{ number_format($staffhours, '1', '.', '') }}
</td>
<td
style=
"width: 10%"
class=
"center aligned"
>
{{ number_format($staffdays, '1', '.', '') }}
</td>
<td
style=
"width: 10%"
class=
"center aligned"
>
{{ number_format($staffdays, '1', '.', '') }}
</td>
</tr>
</tr>
...
@@ -121,8 +132,7 @@
...
@@ -121,8 +132,7 @@
@endforeach
@endforeach
<tfoot
class=
"full-width"
>
<tfoot
class=
"full-width"
>
<tr>
<tr>
<th
colspan=
"3"
><strong>
Total
</strong></th>
<th
style=
"width: 25%"
colspan=
"4"
class=
"left aligned"
>
Total
</th>
<th
style=
"width: 25%"
class=
"center aligned"
></th>
<th
style=
"width: 10%"
class=
"center aligned"
><strong>
{{ number_format($totalhours, '1', '.', '') }}
</strong></th>
<th
style=
"width: 10%"
class=
"center aligned"
><strong>
{{ number_format($totalhours, '1', '.', '') }}
</strong></th>
<th
style=
"width: 10%"
class=
"center aligned"
><strong>
{{ number_format($totaldays, '1', '.', '') }}
</strong></th>
<th
style=
"width: 10%"
class=
"center aligned"
><strong>
{{ number_format($totaldays, '1', '.', '') }}
</strong></th>
</tr>
</tr>
...
...
packages/portal/timesheet/resources/views/report/department.blade.php
View file @
95f49f85
...
@@ -44,23 +44,36 @@
...
@@ -44,23 +44,36 @@
@foreach(
$staffs
as
$key
=>
$staff
)
@foreach(
$staffs
as
$key
=>
$staff
)
<tbody>
<tbody>
<?php
<?php
$countchargeable
=
$countoverhead
= 0;
$countproject
=
$projecttitle->where
('staffid', data_get(
$staff
,'staffid'));
$countproject
=
$projecttitle->where
('staffid', data_get(
$staff
,'staffid'));
$chargeproject
=
$projecttitle->where
('ptype', 1);
foreach (
$chargeproject
as
$key
=>
$chargeable
) {
if (data_get(
$chargeable
,'staffid') == data_get(
$staff
,'staffid')) {
$countchargeable
+= 1;
}
}
foreach (
$overheadtitle
as
$key
=>
$value
) {
if (data_get(
$value
,'staffid') == data_get(
$staff
,'staffid')) {
$countoverhead
+= 1;
}
}
$countrow
=
$countoverhead
+
$countchargeable
;
?>
?>
<tr>
<tr>
<td
colspan="
6
">
{
{data_get($staff,'name')}
}
</td>
<td
rowspan="
{{
$countrow
+
2
}}
" style="
border
-
right
:
1
px
solid
rgba
(
34
,
36
,
38
,
.
15
);
">
{
{data_get($staff,'name')}
}
</td>
</tr>
</tr>
<?php
<?php
//
$chargeproject
=
$project->where
('ptype', 1);
$chargeproject
=
$projecttitle->where
('ptype', 1);
// dump(
$chargeproject
);
$chargehours
=
$chargedays
= 0;
$chargehours
=
$chargedays
= 0;
// dump(
$countrow
);
?>
?>
@foreach(
$chargeproject
as
$key
=>
$chargeable
)
@foreach(
$chargeproject
as
$key
=>
$chargeable
)
@if(data_get(
$chargeable
,'staffid') == data_get(
$staff
,'staffid'))
@if(data_get(
$chargeable
,'staffid') == data_get(
$staff
,'staffid'))
<tr>
<tr>
<td style="
width
:
35
%
"></td>
<td style="
width
:
5
%
" class="
center
aligned
">C</td>
<td style="
width
:
5
%
" class="
center
aligned
">C</td>
<td style="
width
:
15
%
" class="
center
aligned
">
{
{data_get($chargeable,'pcode')}
}
</td>
<td style="
width
:
15
%
" class="
center
aligned
">
{
{data_get($chargeable,'pcode')}
}
</td>
<td style="
width
:
25
%
">
{
{data_get($chargeable,'pname')}
}
</td>
<td style="
width
:
25
%
">
{
{data_get($chargeable,'pname')}
}
</td>
...
@@ -93,7 +106,6 @@
...
@@ -93,7 +106,6 @@
@foreach(
$overheadtitle
as
$key
=>
$value
)
@foreach(
$overheadtitle
as
$key
=>
$value
)
@if(data_get(
$value
,'staffid') == data_get(
$staff
,'staffid'))
@if(data_get(
$value
,'staffid') == data_get(
$staff
,'staffid'))
<tr>
<tr>
<td style="
width
:
35
%
"></td>
<td style="
width
:
5
%
" class="
center
aligned
">NC</td>
<td style="
width
:
5
%
" class="
center
aligned
">NC</td>
<td style="
width
:
15
%
" class="
center
aligned
"></td>
<td style="
width
:
15
%
" class="
center
aligned
"></td>
<td style="
width
:
25
%
">
{
{data_get($value,'pname')}
}
</td>
<td style="
width
:
25
%
">
{
{data_get($value,'pname')}
}
</td>
...
@@ -124,8 +136,7 @@
...
@@ -124,8 +136,7 @@
$staffdays
=
$chargedays
+
$overheaddays
;
$staffdays
=
$chargedays
+
$overheaddays
;
?>
?>
<tr>
<tr>
<td colspan="
3
"></td>
<td style="
width
:
25
%
" colspan="
3
" class="
center
aligned
">Total</td>
<td style="
width
:
25
%
" class="
center
aligned
">Total</td>
<td style="
width
:
10
%
" class="
center
aligned
">{{ number_format(
$staffhours
, '1', '.', '') }}</td>
<td style="
width
:
10
%
" class="
center
aligned
">{{ number_format(
$staffhours
, '1', '.', '') }}</td>
<td style="
width
:
10
%
" class="
center
aligned
">{{ number_format(
$staffdays
, '1', '.', '') }}</td>
<td style="
width
:
10
%
" class="
center
aligned
">{{ number_format(
$staffdays
, '1', '.', '') }}</td>
</tr>
</tr>
...
@@ -138,8 +149,7 @@
...
@@ -138,8 +149,7 @@
@endforeach
@endforeach
<tfoot class="
full
-
width
">
<tfoot class="
full
-
width
">
<tr>
<tr>
<th colspan="
3
"><strong>Total</strong></th>
<th style="
width
:
25
%
" colspan="
4
" class="
left
aligned
">Total</th>
<th style="
width
:
25
%
" class="
center
aligned
"></th>
<th style="
width
:
10
%
" class="
center
aligned
"><strong>{{ number_format(
$totalhours
, '1', '.', '') }}</strong></th>
<th style="
width
:
10
%
" class="
center
aligned
"><strong>{{ number_format(
$totalhours
, '1', '.', '') }}</strong></th>
<th style="
width
:
10
%
" class="
center
aligned
"><strong>{{ number_format(
$totaldays
, '1', '.', '') }}</strong></th>
<th style="
width
:
10
%
" class="
center
aligned
"><strong>{{ number_format(
$totaldays
, '1', '.', '') }}</strong></th>
</tr>
</tr>
...
...
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