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
a563b89f
Commit
a563b89f
authored
Sep 20, 2022
by
hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove nonchargeable in timesheet review, timesheet viewer, chargeable form, overhead form
parent
cf4f9c07
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
252 deletions
+31
-252
packages/portal/timesheet/resources/views/dashboard/timesheetReview.blade.php
+5
-18
packages/portal/timesheet/resources/views/dashboard/timesheetViewer.blade.php
+26
-197
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
+0
-4
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
+0
-33
No files found.
packages/portal/timesheet/resources/views/dashboard/timesheetReview.blade.php
View file @
a563b89f
...
...
@@ -17,7 +17,7 @@
<table class="
ui
unstackable
celled
table
">
<thead>
<tr>
<th colspan="
3
" style="
width
:
60
%
;
"><i class="
dropdown
icon
"></i>{{ data_get(
$staff
,'fullname') }}</th>
<th colspan="
2
" style="
width
:
60
%
;
"><i class="
dropdown
icon
"></i>{{ data_get(
$staff
,'fullname') }}</th>
<th style="
width
:
15
%
;
" class="
center
aligned
">
@if(
$staff->status
== 1 ||
$staff->status
== null) In Preparation
@elseif(
$staff->status
== 2) <i class="
red
attention
icon
"></i> Submitted
...
...
@@ -38,9 +38,8 @@
</th>
</tr>
<tr>
<td style="
width
:
20
%
;
">Chargeable (A) : {{ data_get(
$staff
,'chargeable') }}</td>
<td style="
width
:
20
%
;
">Nonchargeable (B) : {{ data_get(
$staff
,'nonchargeable') }}</td>
<td style="
width
:
20
%
;
">Overhead (C) : {{ data_get(
$staff
,'overhead') }}</td>
<td style="
width
:
30
%
;
">Chargeable (A) : {{ data_get(
$staff
,'chargeable') }}</td>
<td style="
width
:
30
%
;
">Overhead (B) : {{ data_get(
$staff
,'overhead') }}</td>
<td style="
width
:
15
%
;
">Overtime: {{ data_get(
$staff
,'overtime') }}</td>
<td class="
right
aligned
">Total Hours/Days: {{ data_get(
$staff
,'totalhrs')."
hours
/
".number_format(data_get(
$staff
,'totalhrs')/8, 1, '.', '')."
days
" }}</td>
</tr>
...
...
@@ -50,8 +49,7 @@
<?php
$cptype
= "
A
";
$ncptype
= "
B
";
$otype
= "
C
";
$otype
= "
B
";
$td
=
$checktd->where
('tm_staff_id',
$staff->staff_id
);
$detail
=
$details->where
('staffid',
$staff->staff_id
);
$ts
=
$checkts->where
('tm_staff_id',
$staff->staff_id
);
...
...
@@ -82,18 +80,7 @@
</tr>
@endforeach
@endif
@if(
$detail->where
('ptype', 2))
@foreach(
$detail->where
('ptype', 2) as
$key
=>
$nonchargeable
)
<tr>
<td style="
width
:
6
%
;
" class="
center
aligned
">{{
$ncptype
}}</td>
<td style="
width
:
17
%
;
">{{ data_get(
$nonchargeable
, 'pcode') }}</td>
<td style="
width
:
26
%
;
">{{ data_get(
$nonchargeable
, 'pname') }}</td>
<td style="
width
:
26
%
;
">{{ data_get(
$nonchargeable
, 'pmname') }}</td>
<td style="
width
:
12.5
%
;
" class="
center
aligned
">{{ data_get(
$nonchargeable
, 'hours') }}</td>
<td style="
width
:
12.5
%
;
" class="
center
aligned
">{{ number_format(data_get(
$nonchargeable
, 'hours')/8, 1, '.', '') }}</td>
</tr>
@endforeach
@endif
@if(
$detail->where
('ptype', 3))
@foreach(
$detail->where
('ptype', 3) as
$key
=>
$chargeable
)
<tr>
...
...
packages/portal/timesheet/resources/views/dashboard/timesheetViewer.blade.php
View file @
a563b89f
...
...
@@ -199,159 +199,6 @@
</div>
<div class="
ui
segment
">
<table id="
printtable3
" class="
ui
celled
structured
table
unstackable
">
<thead>
<tr>
<th colspan="
2
" rowspan="
2
" class="
center
aligned
">Non-Chargeable</th>
<th colspan="
@
if
(
$phase
==
1
)
15
@
else
{{
$daymonth
-
15
}}
@
endif
" class="
center
aligned
">Date</th>
<th colspan="
2
" rowspan="
2
" class="
center
aligned
">Total</th>
</tr>
<tr>
@if(
$phase
== 1)
@for(
$i
= 0;
$i
< 15 ;
$i
++)
<th>
{
{$i+1}
}
</th>
@endfor
@else
@for(
$i
= 15;
$i
<
$daymonth
;
$i
++)
<th>
{
{$i+1}
}
</th>
@endfor
@endif
</tr>
<tr>
<th style="
width
:
4
%
;
"></th>
<th style="
width
:
23
%
;
">Task</th>
@if(
$phase
== 1)
@for(
$i
= 0;
$i
< 15 ;
$i
++)
<th>
{
{$strdays[$i]}
}
</th>
@endfor
@else
@for(
$i
= 15;
$i
<
$daymonth
;
$i
++)
<th>
{
{$strdays[$i]}
}
</th>
@endfor
@endif
<th>Hours</th>
<th>Days</th>
</tr>
</thead>
<tbody>
@foreach(
$nonchargeablelist
as
$key
=>
$projectnonchargeable
)
<?php
$totalnoncharge
= 0; ?>
<tr>
<td style="
width
:
4
%
;
"></td>
<td style="
width
:
23
%
;
">{{
$projectnonchargeable['pname']
}}</td>
@if(
$phase
== 1)
@for(
$i
= 0;
$i
< 15 ;
$i
++)
<?php
$valnonchargehour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if(
$nonchargehour
)
{
$valnonchargehour
=
$nonchargehour->where
('td_date','=',
$date
)
->where('td_project',
$projectnonchargeable['pid']
)
->where('tm_phase',
$phase
)
->first();
$totalnoncharge
+= data_get(
$valnonchargehour
,'td_hours');
}
?>
@if(
$valnonchargehour
)
<td style="
width
:
4
%
;
">{{ data_get(
$valnonchargehour
,'td_hours') }}</td>
@else
<td style="
width
:
4
%
;
"></td>
@endif
@endfor
@else
@for(
$i
= 15;
$i
<
$daymonth
;
$i
++)
<?php
$valnonchargehour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if(
$nonchargehour
)
{
$valnonchargehour
=
$nonchargehour->where
('td_date','=',
$date
)
->where('td_project',
$projectnonchargeable['pid']
)
->where('tm_phase',
$phase
)
->first();
$totalnoncharge
+= data_get(
$valnonchargehour
,'td_hours');
}
?>
@if(
$valnonchargehour
)
<td style="
width
:
4
%
;
">{{ data_get(
$valnonchargehour
,'td_hours') }}</td>
@else
<td style="
width
:
4
%
;
"></td>
@endif
@endfor
@endif
@if(
$valnonchargehour
)
<td>{{
$totalnoncharge
}}</td>
<td>{{ number_format(
$totalnoncharge
/8, 1, '.', '') }}</td>
@else
<td>0</td>
<td>0</td>
@endif
</tr>
@endforeach
</tbody>
<tfoot>
<th colspan="
2
">Total (B)</th>
@if(
$phase
== 1)
@for(
$i
= 0;
$i
< 15 ;
$i
++)
<?php
$totalncbyday
= 0;
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if (
$nonchargehour
) {
$valncbyday
=
$nonchargehour->where
('td_date','=',
$date
)
->where('tm_phase',
$phase
);
foreach(
$valncbyday
as
$key
=>
$value
) {
$totalncbyday
+= data_get(
$value
,'td_hours');
}
}
?>
<th>{{
$totalncbyday
}}</th>
@endfor
@else
@for(
$i
= 15;
$i
<
$daymonth
;
$i
++)
<?php
$totalncbyday
= 0;
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if (
$nonchargehour
) {
$valncbyday
=
$nonchargehour->where
('td_date','=',
$date
)
->where('tm_phase',
$phase
);
foreach(
$valncbyday
as
$key
=>
$value
) {
$totalncbyday
+= data_get(
$value
,'td_hours');
}
}
?>
<th>{{
$totalncbyday
}}</th>
@endfor
@endif
<th>@if(
$totalnonchargehrs
){{
$totalnonchargehrs
}}@else 0 @endif</th>
<th>@if(
$totalnonchargehrs
){{ number_format(
$totalnonchargehrs
/8, 1, '.', '') }}@else 0 @endif</th>
</tfoot>
</table>
</div>
<div class="
ui
segment
">
<table id="
printtable4
" class="
ui
celled
structured
table
unstackable
">
<thead>
<tr>
...
...
@@ -461,7 +308,7 @@
@endforeach
</tbody>
<tfoot>
<th colspan="
2
">Total (
C
)</th>
<th colspan="
2
">Total (
B
)</th>
@if(
$phase
== 1)
@for(
$i
= 0;
$i
< 15 ;
$i
++)
<?php
...
...
@@ -555,21 +402,21 @@
<tbody>
<tr>
<td style="
width
:
4
%
;
"></td>
<td style="
width
:
23
%
;
">Total (
B) + (C) Non Chargeable
</td>
<td style="
width
:
23
%
;
">Total (
A) + (B)
</td>
@if(
$phase
== 1 )
@for(
$i
= 0;
$i
< 15 ;
$i
++)
<?php
$
b
c
= 0;
$total
n
cbyday
= 0;
$
a
c
= 0;
$totalcbyday
= 0;
$totaloverheadbyday
= 0;
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if (
$
non
chargehour
) {
$val
ncbyday
=
$non
chargehour->where
('td_date','=',
$date
)
if (
$chargehour
) {
$val
cbyday
=
$
chargehour->where
('td_date','=',
$date
)
->where('tm_phase',
$phase
);
foreach(
$val
n
cbyday
as
$key
=>
$value
) {
$total
n
cbyday
+= data_get(
$value
,'td_hours');
foreach(
$valcbyday
as
$key
=>
$value
) {
$totalcbyday
+= data_get(
$value
,'td_hours');
}
}
...
...
@@ -582,25 +429,25 @@
}
}
$
bc
=
$totaln
cbyday
+
$totaloverheadbyday
;
$
ac
=
$total
cbyday
+
$totaloverheadbyday
;
?>
<td style="
width
:
4
%
;
">{{
$
b
c
}}</td>
<td style="
width
:
4
%
;
">{{
$
a
c
}}</td>
@endfor
@else
@for(
$i
= 15;
$i
<
$daymonth
;
$i
++)
<?php
$
b
c
= 0;
$total
n
cbyday
= 0;
$
a
c
= 0;
$totalcbyday
= 0;
$totaloverheadbyday
= 0;
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if (
$
non
chargehour
) {
$val
ncbyday
=
$non
chargehour->where
('td_date','=',
$date
)
if (
$chargehour
) {
$val
cbyday
=
$
chargehour->where
('td_date','=',
$date
)
->where('tm_phase',
$phase
);
foreach(
$val
n
cbyday
as
$key
=>
$value
) {
$total
n
cbyday
+= data_get(
$value
,'td_hours');
foreach(
$valcbyday
as
$key
=>
$value
) {
$totalcbyday
+= data_get(
$value
,'td_hours');
}
}
...
...
@@ -613,27 +460,27 @@
}
}
$
bc
=
$totaln
cbyday
+
$totaloverheadbyday
;
$
ac
=
$total
cbyday
+
$totaloverheadbyday
;
?>
<td style="
width
:
4
%
;
">{{
$
b
c
}}</td>
<td style="
width
:
4
%
;
">{{
$
a
c
}}</td>
@endfor
@endif
<td> @if(
$check
) {{ (
$total
non
chargehrs
+
$totaloverheadhrs
) }} @else 0 @endif </td>
<td> {{ number_format((
$total
non
chargehrs
+
$totaloverheadhrs
)/8, 1, '.', '') }} </td>
<td> @if(
$check
) {{ (
$totalchargehrs
+
$totaloverheadhrs
) }} @else 0 @endif </td>
<td> {{ number_format((
$totalchargehrs
+
$totaloverheadhrs
)/8, 1, '.', '') }} </td>
</tr>
<tr>
<td style="
width
:
4
%
;
"></td>
<td style="
width
:
23
%
;
">Total (A+B
+C
) - 8 Overtime</td>
<td style="
width
:
23
%
;
">Total (A+B) - 8 Overtime</td>
<?php
$totalot
= 0; ?>
@if(
$phase
== 1 )
@for(
$i
= 0;
$i
< 15 ;
$i
++)
<?php
$ot
= 0;
$
b
c
= 0;
$
a
c
= 0;
$totalcbyday
= 0;
$totalncbyday
= 0;
//
$totalncbyday
= 0;
$totaloverheadbyday
= 0;
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
...
...
@@ -645,14 +492,6 @@
}
}
if (
$nonchargehour
) {
$valncbyday
=
$nonchargehour->where
('td_date','=',
$date
)
->where('tm_phase',
$phase
);
foreach(
$valncbyday
as
$key
=>
$value
) {
$totalncbyday
+= data_get(
$value
,'td_hours');
}
}
if (
$overheadhour
) {
$valoverheadbyday
=
$overheadhour->where
('td_date','=',
$date
)
->where('tm_phase',
$phase
);
...
...
@@ -661,7 +500,7 @@
}
}
$ot
= (
$totalcbyday
+
$total
ncbyday
+
$total
overheadbyday
)-8;
$ot
= (
$totalcbyday
+
$totaloverheadbyday
)-8;
if(
$ot
>= 0)
$totalot
+=
$ot
;
...
...
@@ -678,9 +517,7 @@
@for(
$i
= 15;
$i
<
$daymonth
;
$i
++)
<?php
$ot
= 0;
$bc
= 0;
$totalcbyday
= 0;
$totalncbyday
= 0;
$totaloverheadbyday
= 0;
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
...
...
@@ -692,14 +529,6 @@
}
}
if (
$nonchargehour
) {
$valncbyday
=
$nonchargehour->where
('td_date','=',
$date
)
->where('tm_phase',
$phase
);
foreach(
$valncbyday
as
$key
=>
$value
) {
$totalncbyday
+= data_get(
$value
,'td_hours');
}
}
if (
$overheadhour
) {
$valoverheadbyday
=
$overheadhour->where
('td_date','=',
$date
)
->where('tm_phase',
$phase
);
...
...
@@ -708,7 +537,7 @@
}
}
$ot
= (
$totalcbyday
+
$total
ncbyday
+
$total
overheadbyday
)-8;
$ot
= (
$totalcbyday
+
$totaloverheadbyday
)-8;
if(
$ot
>= 0)
$totalot
+=
$ot
;
?>
...
...
@@ -769,7 +598,7 @@
@else
@if(
$check
!= null)
<button type="
button
" class="
ui
green
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
dashboard
.
tsubmit
',[ '
tid
'=> $check->id, '
totalot
'=> $totalot, '
totalchargehrs
'=>$totalchargehrs,
'
totalnonchargehrs
'=> $totalnonchargehrs,
'
totaloverheadhrs
'=>$totaloverheadhrs ]) }}'
;
">Submit</button>
<button type="
button
" class="
ui
green
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
dashboard
.
tsubmit
',[ '
tid
'=> $check->id, '
totalot
'=> $totalot, '
totalchargehrs
'=>$totalchargehrs,'
totaloverheadhrs
'=>$totaloverheadhrs ]) }}'
;
">Submit</button>
@else
<button type="
button
" class="
ui
disabled
green
button
">Submit</button>
@endif
...
...
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
View file @
a563b89f
...
...
@@ -22,10 +22,6 @@ input[type=number] {
<br>
<br>
<!-- <button class="
center
aligned
ui
violet
compact
right
labeled
icon
button
" onclick="
window
.
location
.
href
=
'{ route('
timesheet
::
form
.
nonChargeableForm
', ['
phase
' => $phase, '
month
' => $month, '
year
' => $year]) }'
;
">
<i class="
angle
double
right
icon
"></i>
Non-Chargeable Form
</button> -->
<button class="
center
aligned
ui
purple
compact
right
labeled
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
overheadForm
', ['
phase
' => $phase, '
month
' => $month, '
year
' => $year]) }}'
;
">
<i class="
angle
double
right
icon
"></i>
Overhead Form
...
...
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
View file @
a563b89f
...
...
@@ -24,45 +24,12 @@ input[type=number] {
<div class="
ui
segment
">
<a class="
ui
purple
left
ribbon
label
">Overhead Form</a>
<br>
<!-- <form class="
ui
form
">
<div class="
field
">
<div class="
three
fields
">
<div class="
one
wide
field
">
<label>Phase</label>
<input type="
text
" placeholder="
Year
" value="
{{
$phase
}}
" readonly="
readonly
">
</div>
<div class="
one
wide
field
">
<label>Month</label>
<input type="
text
" placeholder="
Month
" value="
{{
$month
}}
" readonly="
readonly
">
</div>
<div class="
two
wide
field
">
<label>Year</label>
<input type="
text
" placeholder="
Year
" value="
{{
$year
}}
" readonly="
readonly
">
</div>
</div>
</div>
</form> -->
<br>
<!-- @if(
$phase
== 1)
<button class="
center
aligned
ui
green
compact
right
labeled
icon
button
" id="
phase2
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
overheadForm
', ['
phase
' => 2, '
month
' => $month, '
year
' => $year]) }}'
;
">
<i class="
angle
double
right
icon
"></i>
Phase 2
</button>
@else
<button class="
center
aligned
ui
green
compact
labeled
icon
button
" id="
phase1
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
overheadForm
', ['
phase
' => 1, '
month
' => $month,'
year
' => $year]) }}'
;
">
<i class="
angle
double
left
icon
"></i>
Phase 1
</button>
@endif -->
<button class="
center
aligned
ui
blue
compact
labeled
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
chargeableForm
', ['
phase
' => $phase, '
month
' => $month, '
year
' => $year]) }}'
;
">
<i class="
angle
double
left
icon
"></i>
Chargeable Form
</button>
<!-- <button class="
center
aligned
ui
violet
compact
labeled
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
nonChargeableForm
', ['
phase
' => $phase, '
month
' => $month, '
year
' => $year]) }}'
;
">
<i class="
angle
double
left
icon
"></i>
Non-Chargeable Form
</button> -->
@if(
$checkoverhead
)
<button class="
right
floated
aligned
ui
yellow
compact
labeled
icon
button
" id="
notes
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
notelist
', ['
year
'=> $year, '
month
'=> $month, '
phase
'=> $phase, '
fk_tm_id
'=> $fk_tm_id] ) }} '
;
">
...
...
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