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
e22cc6fb
Commit
e22cc6fb
authored
Aug 26, 2022
by
hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes in report summary
parent
d22c846f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
128 additions
and
15 deletions
+128
-15
packages/portal/timesheet/resources/views/report/ringkasan.blade.php
+47
-12
packages/portal/timesheet/src/Http/Controllers/FormController.php
+1
-1
packages/portal/timesheet/src/Http/Controllers/ReportController.php
+18
-2
packages/portal/timesheet/src/Model/VwNonchargeSummary.php
+31
-0
packages/portal/timesheet/src/Model/VwOverheadSummary.php
+31
-0
No files found.
packages/portal/timesheet/resources/views/report/ringkasan.blade.php
View file @
e22cc6fb
...
...
@@ -24,8 +24,9 @@
<thead>
<tr>
<th colspan="
5
"></th>
<th colspan="
{{
count
(
$chargeproject
)}}
" class="
center
aligned
">Chargeable</th>
<th colspan="
2
"></th>
<th colspan="
{{
count
(
$chargeproject
)
+
2
}}
" class="
center
aligned
">Chargeable</th>
<th colspan="
{{
count
(
$overhead
)
+
3
}}
" class="
center
aligned
">Non-Chargeable</th>
<th rowspan="
2
" class="
center
aligned
">Total (Working Days)</th>
</tr>
<tr>
<th>No</th>
...
...
@@ -40,13 +41,15 @@
@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
<th>Total Hours</th>
<th>Total Days</th>
</tr>
</thead>
<?php
// dd(count(
$staffs->where
('deptID', 1)));
?>
<?php
$totaldays
=
$totalalldays
= 0; ?>
@foreach(
$staffs
as
$key
=>
$staff
)
<tbody>
<tr>
...
...
@@ -55,23 +58,55 @@
<td>
{
{data_get($staff,'staffid')}
}
</td>
<td>
{
{data_get($staff,'name')}
}
</td>
<td></td>
<?php
$total
= 0; ?>
<?php
$total
c
= 0; ?>
@foreach(
$chargeproject
as
$key
=>
$chargeable
)
<td>
@foreach(
$ringkasan
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
$total
+= data_get(
$value
,'total_c_hours'); ?>
<?php
$total
c
+= data_get(
$value
,'total_c_hours'); ?>
@endif
@endforeach
</td>
@endforeach
<td class="
center
aligned
">
{
{$total}
}
</td>
<td class="
center
aligned
">{{number_format(
$total
/8, 1, '.', '')}}</td>
<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
)
@if(data_get(
$staff
,'staffid') == data_get(
$hours
,'staffid') && data_get(
$value
,'id') == data_get(
$hours
,'oid'))
{
{data_get($hours,'hours')}
}
<?php
$totalnc
+= data_get(
$hours
,'hours'); ?>
@endif
@endforeach
</td>
@endforeach
<td class="
center
aligned
">
{
{$totalnc}
}
</td>
<td class="
center
aligned
">{{number_format(
$totalnc
/8, 1, '.', '')}}</td>
<?php
$totaldays
= number_format(
$totalc
/8, 1, '.', '') + number_format(
$totalnc
/8, 1, '.', ''); ?>
<td>
{
{$totaldays}
}
</td>
</tr>
</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><strong>
{
{$totalalldays}
}
</strong></th>
</tr>
</tfoot>
</table>
</div>
</div>
...
...
packages/portal/timesheet/src/Http/Controllers/FormController.php
View file @
e22cc6fb
...
...
@@ -472,7 +472,7 @@ class FormController extends Controller
$task
=
new
Project
;
$task
->
p_project_description
=
$request
->
nonChargeableProject
;
$task
->
p
t
_project_type
=
$nonchargeable
;
$task
->
p_project_type
=
$nonchargeable
;
$task
->
p_project_sts
=
$request
->
status
;
$task
->
updated_by
=
$user
->
u_staffID
;
$task
->
save
();
...
...
packages/portal/timesheet/src/Http/Controllers/ReportController.php
View file @
e22cc6fb
...
...
@@ -24,6 +24,8 @@ use Portal\Timesheet\Model\VwNonChargeable;
use
Portal\Timesheet\Model\VwStaff
;
use
Portal\Timesheet\Model\VwOverhead
;
use
Portal\Timesheet\Model\VwProject
;
use
Portal\Timesheet\Model\VwNonchargeSummary
;
use
Portal\Timesheet\Model\VwOverheadSummary
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\Input
;
use
File
;
...
...
@@ -61,12 +63,25 @@ class ReportController extends Controller
->
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);
$ovhours
=
VwOverheadSummary
::
where
(
'month'
,
$request
->
month
)
->
where
(
'year'
,
$request
->
year
)
->
get
();
// dd($ovhours);
$chargeproject
=
VwChargeable
::
all
();
$nonchargeproject
=
VwNonChargeable
::
all
();
$staffs
=
VwStaff
::
orderby
(
'deptID'
)
->
where
(
'deptID'
,
'!='
,
8
)
->
get
();
// dd($nonchargeproject);
$year
=
date
(
'Y'
);
if
(
$request
->
year
)
{
...
...
@@ -75,7 +90,7 @@ class ReportController extends Controller
$month
=
date
(
'F'
,
mktime
(
0
,
0
,
0
,
$request
->
month
,
1
,
date
(
'Y'
)));
return
view
(
'timesheet::report.ringkasan'
,
compact
(
'month'
,
'year'
,
'ringkasan'
,
'chargeproject'
,
'nonchargeproject'
,
'staffs'
));
return
view
(
'timesheet::report.ringkasan'
,
compact
(
'month'
,
'year'
,
'ringkasan'
,
'chargeproject'
,
'nonchargeproject'
,
'staffs'
,
'projectnc'
,
'overhead'
,
'ovhours'
));
}
public
function
projectreport
()
...
...
@@ -150,6 +165,7 @@ class ReportController extends Controller
->
where
(
'year'
,
$request
->
year
)
->
get
();
$overhead
=
VwOverhead
::
where
(
'deptid'
,
$request
->
dept
)
->
where
(
'month'
,
$request
->
month
)
->
where
(
'year'
,
$request
->
year
)
...
...
packages/portal/timesheet/src/Model/VwNonchargeSummary.php
0 → 100644
View file @
e22cc6fb
<?php
namespace
Portal\Timesheet\Model
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Notifications\Notifiable
;
class
VwNonchargeSummary
extends
Model
{
use
Notifiable
;
/**
* The database table used by the model.
*
* @var string
*/
protected
$table
=
'vw_noncharge_summary'
;
/**
* undocumented function
*
* @return void
* @author
**/
public
function
info
()
{
}
}
packages/portal/timesheet/src/Model/VwOverheadSummary.php
0 → 100644
View file @
e22cc6fb
<?php
namespace
Portal\Timesheet\Model
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Notifications\Notifiable
;
class
VwOverheadSummary
extends
Model
{
use
Notifiable
;
/**
* The database table used by the model.
*
* @var string
*/
protected
$table
=
'vw_overhead_hours_summary'
;
/**
* undocumented function
*
* @return void
* @author
**/
public
function
info
()
{
}
}
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