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
0ef4746b
Commit
0ef4746b
authored
Nov 02, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
detect hari bekerja
parent
c9613c8d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
296 additions
and
139 deletions
+296
-139
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
+123
-69
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
+119
-66
packages/portal/timesheet/src/Http/Controllers/FormController.php
+54
-4
No files found.
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
View file @
0ef4746b
...
...
@@ -66,38 +66,58 @@ input[type=number] {
</th>
</tr>
<tr>
<?php
$cday
= [];
for (
$i
=0;
$i
<
$daymonth
;
$i
++) {
$cday
[] = 0;
}
?>
@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
@if(count(
$lat
) > 0)
@foreach(
$lat
as
$key
=>
$date
)
@if(data_get(
$date
,'day_type') == 1 )
<th>{{date_parse_from_format('Y-m-d', data_get(
$date
,'DATE'))['day']}}</th>
@else
<th style="
background
-
color
:
#DCDCDC;">
{{
date_parse_from_format
(
'Y-m-d'
,
data_get
(
$date
,
'DATE'
))[
'day'
]}}
</
th
>
@
endif
@
endforeach
@
else
@
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
@
endif
</
tr
>
<
tr
>
<
th
class
="
single
line
">Project Code</th>
<th class="
single
line
">Project Name</th>
@if(
$phase
== 1)
@if(count(
$lat
) > 0)
@foreach(
$lat
as
$key
=>
$date
)
@if(data_get(
$date
,'day_type') == 1)
<th>
{{ date('D', strtotime(data_get(
$date
,'DATE')) ) }}
</th>
@else
<th style="
background
-
color
:
#DCDCDC;">
{{
date
(
'D'
,
strtotime
(
data_get
(
$date
,
'DATE'
))
)
}}
</
th
>
@
endif
@
endforeach
@
else
@
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
@
for
(
$i
=
0
;
$i
<
15
;
$i
++
)
<
th
>
{{
$strdays
[
$i
]
}}
</
th
>
@
endfor
@
else
@
for
(
$i
=
15
;
$i
<
$daymonth
;
$i
++
)
<
th
>
{{
$strdays
[
$i
]
}}
</
th
>
@
endfor
@endif
@
endif
@
endif
<
th
>
Hours
</
th
>
</
tr
>
</
thead
>
...
...
@@ -111,59 +131,93 @@ input[type=number] {
<?php
$total
=
0
;
?>
<tr>
<td
class=
"single line"
>
{{
$project['td_project_code']
}}
{{$project['td_project_code']}}
</td>
<td
class=
"single line"
>
{{$project['td_project_name']}}
</td>
@if(
$phase
== 1)
@for(
$i
= 0;
$i
< 15 ;
$i
++)
<?php
$valuehour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if(
$hour
)
{
$valuehour
=
$hour->where
('td_date','=',
$date
)
->where('td_project',
$project['td_project']
)
->where('tm_phase',
$phase
)
->first();
$total
+= data_get(
$valuehour
,'td_hours');
}
?>
<td >
<input type="
text
" onkeypress="
onlynumber
(
event
)
" id="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" name="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" value="
@
if
(
$valuehour
){{
$valuehour
->
td_hours
}}
@
else
@
endif
" min="
0
" max="
24
" style="
padding
:
2
px
;
margin
:
unset
" onchange="
limiter
(
this
,
'{{ $project['
td_project
'] }}'
);
">
</td>
@endfor
@else
@for(
$i
= 15;
$i
<
$daymonth
;
$i
++)
<?php
$valuehour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if(
$hour
)
{
$valuehour
=
$hour->where
('td_date','=',
$date
)
->where('td_project',
$project['td_project']
)
->where('tm_phase',
$phase
)
->first();
$total
+= data_get(
$valuehour
,'td_hours');
}
?>
<td>
<input type="
text
" onkeypress="
onlynumber
(
event
)
" id="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" name="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" value="
@
if
(
$valuehour
){{
$valuehour
->
td_hours
}}
@
else
@
endif
" min="
0
" max="
24
" style="
padding
:
2
px
;
margin
:
unset
" onchange="
limiter
(
this
,
'{{$project['
td_project
']}}'
);
">
</td>
@if(count($lat) > 0)
@foreach($lat as $key => $value)
<?php
// dd($value);
$day
=
date_parse_from_format
(
'Y-m-d'
,
data_get
(
$value
,
'DATE'
))[
'day'
];
// dd($day);
$valuehour
=
''
;
$date
=
$year
.
'-'
.
sprintf
(
'%02d'
,
$month
)
.
'-'
.
sprintf
(
'%02d'
,
$day
);
if
(
$hour
)
{
$valuehour
=
$hour
->
where
(
'td_date'
,
'='
,
$date
)
->
where
(
'td_project'
,
$project
[
'td_project'
])
->
where
(
'tm_phase'
,
$phase
)
->
first
();
$total
+=
data_get
(
$valuehour
,
'td_hours'
);
}
?>
@if(data_get($value,'day_type') == 1)
<td>
<input
type=
"text"
onkeypress=
"onlynumber(event)"
id=
"hour[{{$project['td_project']}}][{{$day}}]"
name=
"hour[{{$project['td_project']}}][{{$day}}]"
value=
"@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif"
min=
"0"
max=
"24"
style=
"padding:2px;margin:unset"
onchange=
"limiter(this,'{{ $project['td_project'] }}');"
>
</td>
@else
<td
style=
"background-color: #DCDCDC;"
>
<input
type=
"text"
onkeypress=
"onlynumber(event)"
id=
"hour[{{$project['td_project']}}][{{$day}}]"
name=
"hour[{{$project['td_project']}}][{{$day}}]"
value=
"@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif"
min=
"0"
max=
"24"
style=
"padding:2px;margin:unset;background-color: #DCDCDC;"
onchange=
"limiter(this,'{{ $project['td_project'] }}');"
>
</td>
@endif
@endforeach
@else
@if($phase == 1)
@for($i = 0; $i
<
15
;
$
i
++)
<?php
$valuehour
=
''
;
$date
=
$year
.
'-'
.
sprintf
(
'%02d'
,
$month
)
.
'-'
.
sprintf
(
'%02d'
,
$i
+
1
);
if
(
$hour
)
{
$valuehour
=
$hour
->
where
(
'td_date'
,
'='
,
$date
)
->
where
(
'td_project'
,
$project
[
'td_project'
])
->
where
(
'tm_phase'
,
$phase
)
->
first
();
$total
+=
data_get
(
$valuehour
,
'td_hours'
);
}
?>
<
td
>
<input
type=
"text"
onkeypress=
"onlynumber(event)"
id=
"hour[{{$project['td_project']}}][{{$i+1}}]"
name=
"hour[{{$project['td_project']}}][{{$i+1}}]"
value=
"@if($valuehour){{$valuehour->td_hours}}@else @endif"
min=
"0"
max=
"24"
style=
"padding:2px;margin:unset"
onchange=
"limiter(this,'{{ $project['td_project'] }}');"
>
</td>
@endfor
@else
@for($i = 15; $i
<
$
daymonth
;
$
i
++)
<?php
$valuehour
=
''
;
$date
=
$year
.
'-'
.
sprintf
(
'%02d'
,
$month
)
.
'-'
.
sprintf
(
'%02d'
,
$i
+
1
);
if
(
$hour
)
{
$valuehour
=
$hour
->
where
(
'td_date'
,
'='
,
$date
)
->
where
(
'td_project'
,
$project
[
'td_project'
])
->
where
(
'tm_phase'
,
$phase
)
->
first
();
$total
+=
data_get
(
$valuehour
,
'td_hours'
);
}
?>
<
td
>
<input
type=
"text"
onkeypress=
"onlynumber(event)"
id=
"hour[{{$project['td_project']}}][{{$i+1}}]"
name=
"hour[{{$project['td_project']}}][{{$i+1}}]"
value=
"@if($valuehour){{$valuehour->td_hours}}@else @endif"
min=
"0"
max=
"24"
style=
"padding:2px;margin:unset"
onchange=
"limiter(this,'{{$project['td_project']}}');"
>
</td>
@endfor
@endif
@endif
<td>
<input class="
center
aligned
" type="
text
" name="
total
-
{{
$project
[
'td_project'
]}}
" id="
total
-
{{
$project
[
'td_project'
]}}
" style="
padding
-
right
:
4
px
;
padding
-
left
:
4
px
;
" onchange="
limiter
(
this
,
'{{$project['
td_project
']}}'
);
" readonly="
readonly
" value=
{
{$total}
}
>
<input
class=
"center aligned"
type=
"text"
name=
"total-{{$project['td_project']}}"
id=
"total-{{$project['td_project']}}"
style=
"padding-right: 4px;padding-left: 4px;"
onchange=
"limiter(this,'{{$project['td_project']}}');"
readonly=
"readonly"
value=
"{{number_format($total,'1','.','')}}"
>
</td>
</tr>
<?php
$all
+=
$total
;
?>
...
...
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
View file @
0ef4746b
...
...
@@ -70,28 +70,52 @@ input[type=number] {
</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
@if(count(
$lat
) > 0)
@foreach(
$lat
as
$key
=>
$date
)
@if(data_get(
$date
,'day_type') == 1 )
<th>{{date_parse_from_format('Y-m-d', data_get(
$date
,'DATE'))['day']}}</th>
@else
<th style="
background
-
color
:
#DCDCDC;">
{{
date_parse_from_format
(
'Y-m-d'
,
data_get
(
$date
,
'DATE'
))[
'day'
]}}
</
th
>
@
endif
@
endforeach
@
else
@
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
@
endif
</
tr
>
<
tr
>
@
if
(
count
(
$lat
)
>
0
)
@
foreach
(
$lat
as
$key
=>
$date
)
@
if
(
data_get
(
$date
,
'day_type'
)
==
1
)
<
th
>
{{
date
(
'D'
,
strtotime
(
data_get
(
$date
,
'DATE'
))
)
}}
</
th
>
@
else
<
th
style
=
"background-color: #DCDCDC;"
>
{{
date
(
'D'
,
strtotime
(
data_get
(
$date
,
'DATE'
))
)
}}
</
th
>
@
endif
@
endforeach
@
else
<!--
<
th
>
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
@
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
@
endif
<
th
>
Hours
</
th
>
</
tr
>
...
...
@@ -104,55 +128,84 @@ input[type=number] {
<td>
{{$project['td_project_name']}}
</td>
@if(
$phase
== 1)
@for(
$i
= 0;
$i
< 15 ;
$i
++)
<?php
$valuehour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if(
$hour
)
{
$valuehour
=
$hour->where
('td_date','=',
$date
)
->where('fk_o_id',
$project['td_project']
)
->where('tm_phase',
$phase
)
->first();
$total
+= data_get(
$valuehour
,'td_hours');
}
?>
<td >
<input type="
text
" onkeypress="
onlynumber
(
event
)
" id="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" name="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" value="
@
if
(
$valuehour
){{
data_get
(
$valuehour
,
'td_hours'
)}}
@
else
@
endif
" min="
0
" max="
24
" style="
padding
:
2
px
;
margin
:
unset
" onchange="
limiter
(
this
,
'{{$project['
td_project
']}}'
);
">
</td>
@endfor
@else
@for(
$i
= 15;
$i
<
$daymonth
;
$i
++)
<?php
$valuehour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if(
$hour
)
{
$valuehour
=
$hour->where
('td_date','=',
$date
)
->where('fk_o_id',
$project['td_project']
)
->where('tm_phase',
$phase
)
->first();
$total
+= data_get(
$valuehour
,'td_hours');
}
?>
<td>
<input type="
text
" onkeypress="
onlynumber
(
event
)
" id="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" name="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" value="
@
if
(
$valuehour
){{
data_get
(
$valuehour
,
'td_hours'
)}}
@
else
@
endif
" min="
0
" max="
24
" style="
padding
:
2
px
;
margin
:
unset
" onchange="
limiter
(
this
,
'{{$project['
td_project
']}}'
);
">
</td>
@endfor
@endif
@if(count($lat) > 0)
@foreach($lat as $key => $value)
<?php
// dd($value);
$day
=
date_parse_from_format
(
'Y-m-d'
,
data_get
(
$value
,
'DATE'
))[
'day'
];
// dd($day);
$valuehour
=
''
;
$date
=
$year
.
'-'
.
sprintf
(
'%02d'
,
$month
)
.
'-'
.
sprintf
(
'%02d'
,
$day
);
if
(
$hour
)
{
$valuehour
=
$hour
->
where
(
'td_date'
,
'='
,
$date
)
->
where
(
'fk_o_id'
,
$project
[
'td_project'
])
->
where
(
'tm_phase'
,
$phase
)
->
first
();
$total
+=
data_get
(
$valuehour
,
'td_hours'
);
}
?>
@if(data_get($value,'day_type') == 1)
<td>
<input
type=
"text"
onkeypress=
"onlynumber(event)"
id=
"hour[{{$project['td_project']}}][{{$day}}]"
name=
"hour[{{$project['td_project']}}][{{$day}}]"
value=
"@if($valuehour){{$valuehour->td_hours}}@else @endif"
min=
"0"
max=
"24"
style=
"padding:2px;margin:unset"
onchange=
"limiter(this,'{{ $project['td_project'] }}');"
>
</td>
@else
<td
style=
"background-color: #DCDCDC;"
>
<input
type=
"text"
onkeypress=
"onlynumber(event)"
id=
"hour[{{$project['td_project']}}][{{$day}}]"
name=
"hour[{{$project['td_project']}}][{{$day}}]"
value=
"@if($valuehour){{$valuehour->td_hours}}@else @endif"
min=
"0"
max=
"24"
style=
"padding:2px;margin:unset;background-color: #DCDCDC;"
onchange=
"limiter(this,'{{ $project['td_project'] }}');"
>
</td>
@endif
@endforeach
@else
@if($phase == 1)
@for($i = 0; $i
<
15
;
$
i
++)
<?php
$valuehour
=
''
;
$date
=
$year
.
'-'
.
sprintf
(
'%02d'
,
$month
)
.
'-'
.
sprintf
(
'%02d'
,
$i
+
1
);
if
(
$hour
)
{
$valuehour
=
$hour
->
where
(
'td_date'
,
'='
,
$date
)
->
where
(
'fk_o_id'
,
$project
[
'td_project'
])
->
where
(
'tm_phase'
,
$phase
)
->
first
();
$total
+=
data_get
(
$valuehour
,
'td_hours'
);
}
?>
<
td
>
<input
type=
"text"
onkeypress=
"onlynumber(event)"
id=
"hour[{{$project['td_project']}}][{{$i+1}}]"
name=
"hour[{{$project['td_project']}}][{{$i+1}}]"
value=
"@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif"
min=
"0"
max=
"24"
style=
"padding:2px;margin:unset"
onchange=
"limiter(this,'{{$project['td_project']}}');"
>
</td>
@endfor
@else
@for($i = 15; $i
<
$
daymonth
;
$
i
++)
<?php
$valuehour
=
''
;
$date
=
$year
.
'-'
.
sprintf
(
'%02d'
,
$month
)
.
'-'
.
sprintf
(
'%02d'
,
$i
+
1
);
if
(
$hour
)
{
$valuehour
=
$hour
->
where
(
'td_date'
,
'='
,
$date
)
->
where
(
'fk_o_id'
,
$project
[
'td_project'
])
->
where
(
'tm_phase'
,
$phase
)
->
first
();
$total
+=
data_get
(
$valuehour
,
'td_hours'
);
}
?>
<
td
>
<input
type=
"text"
onkeypress=
"onlynumber(event)"
id=
"hour[{{$project['td_project']}}][{{$i+1}}]"
name=
"hour[{{$project['td_project']}}][{{$i+1}}]"
value=
"@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif"
min=
"0"
max=
"24"
style=
"padding:2px;margin:unset"
onchange=
"limiter(this,'{{$project['td_project']}}');"
>
</td>
@endfor
@endif
@endif
<td>
<input
type=
"text"
onkeypress=
"onlynumber(event)"
name=
"total-{{$project['td_project']}}"
id=
"total-{{$project['td_project']}}"
style=
"padding-right: 4px;padding-left: 4px;"
onchange=
"limiter(this,'{{$project['td_project']}}');"
readonly=
""
value=
{{$total}}
>
</td>
...
...
packages/portal/timesheet/src/Http/Controllers/FormController.php
View file @
0ef4746b
...
...
@@ -11,6 +11,7 @@ use Portal\Timesheet\Model\Ts_detail;
use
Portal\Timesheet\Model\Project
;
use
Portal\Timesheet\Model\Tproject
;
use
Portal\Timesheet\Model\Department
;
use
Portal\Timesheet\Model\LAttendance
;
use
Portal\Timesheet\Model\Pteam
;
use
Portal\Timesheet\Model\Staff_info
;
use
Portal\Timesheet\Model\Overhead
;
...
...
@@ -112,6 +113,7 @@ class FormController extends Controller
$userId
=
users
::
find
(
Auth
::
id
())
->
u_staffID
;
$project
=
Pteam
::
where
(
'pt_staff_id'
,
$userId
)
->
where
(
'pt_project_type'
,
$chargeable
)
->
where
(
'pt_project_task_sts'
,
1
)
...
...
@@ -150,13 +152,14 @@ class FormController extends Controller
}
$daymonth
=
cal_days_in_month
(
CAL_GREGORIAN
,
$month
,
$year
);
// dd($daymonth);
$strdays
=
[];
for
(
$i
=
0
;
$i
<
$daymonth
;
$i
++
)
{
$tempdate
=
$year
.
'-'
.
sprintf
(
'%02d'
,
$month
)
.
'-'
.
sprintf
(
'%02d'
,
$i
+
1
);
$strday
=
Carbon
::
createFromFormat
(
'Y-m-d'
,
$tempdate
)
->
format
(
'l'
);
// dd($strday);
$strdays
[
$i
]
=
substr
(
$strday
,
0
,
3
);
}
...
...
@@ -177,9 +180,33 @@ class FormController extends Controller
$hour
=
null
;
}
// dd($projectlist);
$dt
=
[];
if
(
$phase
==
1
){
for
(
$i
=
0
;
$i
<
15
;
$i
++
)
{
$temp
=
Carbon
::
create
(
$year
,
$month
,
$i
+
1
,
);
$dt
[]
=
$temp
->
toDateString
();
}
}
else
{
for
(
$j
=
15
;
$j
<
$daymonth
;
$j
++
)
{
$temp
=
Carbon
::
create
(
$year
,
$month
,
$j
+
1
,
);
$dt
[]
=
$temp
->
toDateString
();
}
}
// dd($dt);
// echo $dt->toDateTimeString();
$lat
=
LAttendance
::
where
(
'staff_id'
,
$userId
)
->
whereIn
(
'DATE'
,
$dt
)
->
get
();
// dd($lat);
// dd(date('w', strtotime(data_get($lat1,'DATE'))));
// dd(date_parse_from_format('Y-m-d', data_get($lat1,'DATE'))['day']);
// dd(date('d'));
return
view
(
'timesheet::form.chargeableForm'
,
compact
(
'projectlist'
,
'userId'
,
'month'
,
'phase'
,
'daymonth'
,
'year'
,
'hour'
,
'strdays'
));
return
view
(
'timesheet::form.chargeableForm'
,
compact
(
'projectlist'
,
'userId'
,
'month'
,
'phase'
,
'daymonth'
,
'year'
,
'hour'
,
'strdays'
,
'lat'
));
}
public
function
savechargeablehours
(
Request
$request
)
...
...
@@ -814,7 +841,30 @@ class FormController extends Controller
// dd($checkoverhead->id);
return
view
(
'timesheet::form.overheadForm'
,
compact
(
'checkoverhead'
,
'projectlist'
,
'userId'
,
'month'
,
'phase'
,
'daymonth'
,
'year'
,
'hour'
,
'project'
,
'fk_tm_id'
,
'strdays'
));
$dt
=
[];
if
(
$phase
==
1
){
for
(
$i
=
0
;
$i
<
15
;
$i
++
)
{
$temp
=
Carbon
::
create
(
$year
,
$month
,
$i
+
1
,
);
$dt
[]
=
$temp
->
toDateString
();
}
}
else
{
for
(
$j
=
15
;
$j
<
$daymonth
;
$j
++
)
{
$temp
=
Carbon
::
create
(
$year
,
$month
,
$j
+
1
,
);
$dt
[]
=
$temp
->
toDateString
();
}
}
// dd($dt);
// echo $dt->toDateTimeString();
$lat
=
LAttendance
::
where
(
'staff_id'
,
$userId
)
->
whereIn
(
'DATE'
,
$dt
)
->
get
();
// dd($lat);
return
view
(
'timesheet::form.overheadForm'
,
compact
(
'checkoverhead'
,
'projectlist'
,
'userId'
,
'month'
,
'phase'
,
'daymonth'
,
'year'
,
'hour'
,
'project'
,
'fk_tm_id'
,
'strdays'
,
'lat'
));
}
public
function
saveoverheadhours
(
Request
$request
)
...
...
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