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
8169db45
Commit
8169db45
authored
Nov 04, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
integration webtas -> attendance_status = 3, training
parent
b9ec660e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
5 deletions
+41
-5
packages/portal/timesheet/src/Http/Controllers/FormController.php
+41
-5
No files found.
packages/portal/timesheet/src/Http/Controllers/FormController.php
View file @
8169db45
...
@@ -885,15 +885,13 @@ class FormController extends Controller
...
@@ -885,15 +885,13 @@ class FormController extends Controller
->
groupby
(
'DATE'
)
->
groupby
(
'DATE'
)
->
get
();
->
get
();
// $lat = [];
// dd($lat);
$leave
=
$lat
->
where
(
'attendance_status'
,
2
);
$leave
=
$lat
->
where
(
'attendance_status'
,
2
);
// dd($checklat);
$publichol
=
6
;
$publichol
=
6
;
$mc
=
8
;
$mc
=
8
;
$el
=
10
;
$el
=
10
;
$al
=
7
;
$al
=
7
;
$tr
=
5
;
if
(
count
(
$leave
)
>
0
)
{
if
(
count
(
$leave
)
>
0
)
{
foreach
(
$leave
as
$key
=>
$value
)
foreach
(
$leave
as
$key
=>
$value
)
...
@@ -1084,6 +1082,46 @@ class FormController extends Controller
...
@@ -1084,6 +1082,46 @@ class FormController extends Controller
}
}
}
}
$training
=
$lat
->
where
(
'attendance_status'
,
3
);
// dd($pubhol);
if
(
count
(
$training
)
>
0
)
{
foreach
(
$training
as
$key
=>
$value
)
{
$checktdetailtr
=
Ts_detail
::
where
(
'td_date'
,
data_get
(
$value
,
'DATE'
))
->
where
(
'tm_staff_id'
,
data_get
(
$value
,
'staff_id'
))
->
where
(
'fk_o_id'
,
$tr
)
->
where
(
'fk_tm_id'
,
$fk_tm_id
)
->
first
();
if
(
$checktdetailtr
)
{
}
else
{
//create baru
$trdetail
=
new
Ts_detail
;
$trdetail
->
td_date
=
data_get
(
$value
,
'DATE'
);
$trdetail
->
fk_o_id
=
$tr
;
$trdetail
->
fk_tm_id
=
$fk_tm_id
;
$trdetail
->
tm_staff_id
=
$userId
;
$trdetail
->
tm_month
=
$month
;
$trdetail
->
tm_year
=
$year
;
$trdetail
->
tm_phase
=
$phase
;
$trdetail
->
td_project_type
=
3
;
$trdetail
->
updated_by
=
$userId
;
$project
=
Overhead
::
where
(
'id'
,
$tr
)
->
first
();
$trdetail
->
td_overhead_desc
=
$project
->
o_overhead_desc
;
$trdetail
->
td_overhead_note
=
'Public Holiday'
;
$trdetail
->
td_hours
=
8
;
$trdetail
->
td_timesheet_sts
=
1
;
$trdetail
->
save
();
}
}
}
$pubhol
=
$lat
->
where
(
'attendance_status'
,
4
);
$pubhol
=
$lat
->
where
(
'attendance_status'
,
4
);
// dd($pubhol);
// dd($pubhol);
if
(
count
(
$pubhol
)
>
0
)
{
if
(
count
(
$pubhol
)
>
0
)
{
...
@@ -1124,8 +1162,6 @@ class FormController extends Controller
...
@@ -1124,8 +1162,6 @@ class FormController extends Controller
}
}
}
}
if
(
$fk_tm_id
)
if
(
$fk_tm_id
)
{
{
$hour
=
Ts_detail
::
where
(
'fk_tm_id'
,
$checkoverhead
->
id
)
$hour
=
Ts_detail
::
where
(
'fk_tm_id'
,
$checkoverhead
->
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