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
26191784
Commit
26191784
authored
Dec 01, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update cuti umum daytype 3
parent
8f726ed6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
0 deletions
+68
-0
packages/portal/timesheet/src/Http/Controllers/FormController.php
+68
-0
No files found.
packages/portal/timesheet/src/Http/Controllers/FormController.php
View file @
26191784
...
...
@@ -1382,6 +1382,74 @@ class FormController extends Controller
}
}
$cutiumum
=
$lat
->
where
(
'day_type'
,
3
);
if
(
count
(
$cutiumum
)
>
0
)
{
foreach
(
$cutiumum
as
$key
=>
$value
)
{
$checktdetailph
=
Ts_detail
::
where
(
'td_date'
,
data_get
(
$value
,
'DATE'
))
->
where
(
'tm_staff_id'
,
data_get
(
$value
,
'staff_id'
))
->
where
(
'fk_o_id'
,
$publichol
)
->
where
(
'fk_tm_id'
,
$fk_tm_id
)
->
first
();
if
(
$checktdetailph
)
{
}
else
{
//create baru
$pbdetail
=
new
Ts_detail
;
$pbdetail
->
td_date
=
data_get
(
$value
,
'DATE'
);
$pbdetail
->
fk_o_id
=
$publichol
;
$pbdetail
->
fk_tm_id
=
$fk_tm_id
;
$pbdetail
->
tm_staff_id
=
$userId
;
$pbdetail
->
tm_month
=
$month
;
$pbdetail
->
tm_year
=
$year
;
$pbdetail
->
tm_phase
=
$phase
;
$pbdetail
->
td_project_type
=
3
;
$pbdetail
->
updated_by
=
$userId
;
$project
=
Overhead
::
where
(
'id'
,
$publichol
)
->
first
();
$pbdetail
->
td_overhead_desc
=
$project
->
o_overhead_desc
;
$pbdetail
->
td_overhead_note
=
'Public Holiday'
;
$pbdetail
->
td_hours
=
8
;
$pbdetail
->
td_timesheet_sts
=
1
;
$pbdetail
->
save
();
$checktpph
=
Tproject
::
where
(
'fk_tm_id'
,
$fk_tm_id
)
->
where
(
'fk_o_id'
,
$publichol
)
->
first
();
if
(
$checktpph
)
{
}
else
{
$tpph
=
new
Tproject
;
$tpph
->
staffid
=
$userId
;
$tpph
->
fk_o_id
=
$publichol
;
$tpph
->
fk_tm_id
=
$fk_tm_id
;
$tpph
->
tp_project_type
=
3
;
$tpph
->
tp_year
=
$year
;
$tpph
->
tp_month
=
$month
;
$tpph
->
tp_phase
=
$phase
;
$project
=
Overhead
::
where
(
'id'
,
$publichol
)
->
first
();
$tpph
->
tp_project_name
=
$project
->
o_overhead_desc
;
$tpph
->
tp_hours
=
8
;
$tpph
->
tp_timesheet_sts
=
1
;
$tpph
->
tp_pm
=
data_get
(
$user
,
'penyokong'
);
$tpph
->
tp_pd
=
data_get
(
$user
,
'pelulus'
);
$tpph
->
save
();
}
}
}
}
if
(
$fk_tm_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