Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Satpam
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
Andre Sihombing
Satpam
Commits
3af54720
Commit
3af54720
authored
May 25, 2018
by
Andre Sihombing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Memperbaiki semua fungsi
parent
9fbaa1d3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
267 additions
and
283 deletions
+267
-283
JamKerjaController.php
backend/modules/ubux/controllers/JamKerjaController.php
+9
-59
LaporanController.php
backend/modules/ubux/controllers/LaporanController.php
+5
-5
LemburController.php
backend/modules/ubux/controllers/LemburController.php
+6
-10
SatpamController.php
backend/modules/ubux/controllers/SatpamController.php
+87
-39
Pegawai.php
backend/modules/ubux/models/Pegawai.php
+0
-0
add.php
backend/modules/ubux/views/jam-kerja/add.php
+1
-1
edit.php
backend/modules/ubux/views/jam-kerja/edit.php
+1
-1
index.php
backend/modules/ubux/views/jam-kerja/index.php
+1
-24
_form.php
backend/modules/ubux/views/laporan/_form.php
+16
-5
_search.php
backend/modules/ubux/views/laporan/_search.php
+32
-23
add.php
backend/modules/ubux/views/laporan/add.php
+1
-1
edit.php
backend/modules/ubux/views/laporan/edit.php
+3
-3
index.php
backend/modules/ubux/views/laporan/index.php
+7
-5
view-detail.php
backend/modules/ubux/views/laporan/view-detail.php
+5
-7
view-pdf.php
backend/modules/ubux/views/laporan/view-pdf.php
+16
-16
view.php
backend/modules/ubux/views/laporan/view.php
+25
-21
_form.php
backend/modules/ubux/views/lembur/_form.php
+1
-5
add.php
backend/modules/ubux/views/lembur/add.php
+0
-0
edit.php
backend/modules/ubux/views/lembur/edit.php
+1
-1
index.php
backend/modules/ubux/views/lembur/index.php
+0
-5
_form-add-gaji.php
backend/modules/ubux/views/satpam/_form-add-gaji.php
+6
-6
_form-add-lembur.php
backend/modules/ubux/views/satpam/_form-add-lembur.php
+6
-3
_search.php
backend/modules/ubux/views/satpam/_search.php
+29
-27
add.php
backend/modules/ubux/views/satpam/add.php
+0
-0
edit.php
backend/modules/ubux/views/satpam/edit.php
+1
-1
index.php
backend/modules/ubux/views/satpam/index.php
+6
-5
view.php
backend/modules/ubux/views/satpam/view.php
+0
-8
main.php
backend/themes/v2/layouts/main.php
+2
-2
No files found.
backend/modules/ubux/controllers/JamKerjaController.php
View file @
3af54720
...
@@ -59,14 +59,14 @@ class JamKerjaController extends Controller
...
@@ -59,14 +59,14 @@ class JamKerjaController extends Controller
* If creation is successful, the browser will be redirected to the 'view' page.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
* @return mixed
*/
*/
public
function
action
Create
()
public
function
action
Add
()
{
{
$model
=
new
JamKerja
();
$model
=
new
JamKerja
();
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
jam_kerja_id
]);
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
jam_kerja_id
]);
}
else
{
}
else
{
return
$this
->
render
(
'
create
'
,
[
return
$this
->
render
(
'
add
'
,
[
'model'
=>
$model
,
'model'
=>
$model
,
]);
]);
}
}
...
@@ -78,14 +78,14 @@ class JamKerjaController extends Controller
...
@@ -78,14 +78,14 @@ class JamKerjaController extends Controller
* @param integer $id
* @param integer $id
* @return mixed
* @return mixed
*/
*/
public
function
action
Update
(
$id
)
public
function
action
Edit
(
$id
)
{
{
$model
=
$this
->
findModel
(
$id
);
$model
=
$this
->
findModel
(
$id
);
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
jam_kerja_id
]);
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
jam_kerja_id
]);
}
else
{
}
else
{
return
$this
->
render
(
'
update
'
,
[
return
$this
->
render
(
'
edit
'
,
[
'model'
=>
$model
,
'model'
=>
$model
,
]);
]);
}
}
...
@@ -97,7 +97,7 @@ class JamKerjaController extends Controller
...
@@ -97,7 +97,7 @@ class JamKerjaController extends Controller
* @param integer $id
* @param integer $id
* @return mixed
* @return mixed
*/
*/
public
function
actionDel
ete
(
$id
)
public
function
actionDel
(
$id
)
{
{
$this
->
findModel
(
$id
)
->
delete
();
$this
->
findModel
(
$id
)
->
delete
();
...
@@ -165,9 +165,7 @@ class JamKerjaController extends Controller
...
@@ -165,9 +165,7 @@ class JamKerjaController extends Controller
}
else
}
else
$model2
->
status
=
'Tetap'
;
$model2
->
status
=
'Tetap'
;
$idSatpam
;
$idSatpam
;
//if(!($sheetData[$baseRow]['F'] == $sheetData[$baseRow-1]['F'])){
//if($)
if
(
!
Satpam
::
find
()
->
where
([
'nip'
=>
$model
->
nip
])
->
andWhere
([
'laporan_id'
=>
$id
])
->
exists
()){
if
(
!
Satpam
::
find
()
->
where
([
'nip'
=>
$model
->
nip
])
->
andWhere
([
'laporan_id'
=>
$id
])
->
exists
()){
$model2
->
laporan_id
=
$id
;
$model2
->
laporan_id
=
$id
;
$model2
->
save
();
$model2
->
save
();
...
@@ -176,8 +174,7 @@ class JamKerjaController extends Controller
...
@@ -176,8 +174,7 @@ class JamKerjaController extends Controller
else
{
else
{
$satpam
=
Satpam
::
find
()
->
where
([
'nip'
=>
$model
->
nip
])
->
andWhere
([
'laporan_id'
=>
$id
])
->
one
();
$satpam
=
Satpam
::
find
()
->
where
([
'nip'
=>
$model
->
nip
])
->
andWhere
([
'laporan_id'
=>
$id
])
->
one
();
$idSatpam
=
$satpam
->
satpam_id
;
$idSatpam
=
$satpam
->
satpam_id
;
}
}
//}
$model
->
satpam_id
=
$idSatpam
;
$model
->
satpam_id
=
$idSatpam
;
$model
->
save
();
$model
->
save
();
...
@@ -185,7 +182,7 @@ class JamKerjaController extends Controller
...
@@ -185,7 +182,7 @@ class JamKerjaController extends Controller
$baseRow
++
;
$baseRow
++
;
}
}
Yii
::
$app
->
getSession
()
->
setFlash
(
'success'
,
'Success'
);
Yii
::
$app
->
getSession
()
->
setFlash
(
'success'
,
'Success'
);
return
$this
->
redirect
([
'/ubux/laporan/
index'
]);
return
$this
->
redirect
([
'/ubux/laporan/
view'
,
'id'
=>
$id
]);
}
else
{
}
else
{
Yii
::
$app
->
getSession
()
->
setFlash
(
'error'
,
'Error'
);
Yii
::
$app
->
getSession
()
->
setFlash
(
'error'
,
'Error'
);
return
$this
->
redirect
([
'import'
]);
return
$this
->
redirect
([
'import'
]);
...
@@ -196,52 +193,5 @@ class JamKerjaController extends Controller
...
@@ -196,52 +193,5 @@ class JamKerjaController extends Controller
'modelImport'
=>
$modelImport
,
'modelImport'
=>
$modelImport
,
]);
]);
}
}
// public function actionImport($id){
// $searchModel = new JamKerjaSearch();
// $modelImport = new \yii\base\DynamicModel([
// 'fileImport'=>'File Import',
// ]);
// $modelImport->addRule(['fileImport'],'required');
// $modelImport->addRule(['fileImport'],'file',['extensions'=>'ods,xls,xlsx'],['maxSize'=>1024*1024]);
// if(Yii::$app->request->post()){
// $modelImport->fileImport = \yii\web\UploadedFile::getInstance($modelImport,'fileImport');
// if($modelImport->fileImport && $modelImport->validate()){
// $inputFileType = \PHPExcel_IOFactory::identify($modelImport->fileImport->tempName);
// $objReader = \PHPExcel_IOFactory::createReader($inputFileType);
// $objPHPExcel = $objReader->load($modelImport->fileImport->tempName);
// $sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
// $baseRow = 3;
// while(!empty($sheetData[$baseRow]['A'])){
// $model = new \backend\modules\ubux\models\JamKerja;
// $model->tanggal_scan = (string)$sheetData[$baseRow]['A'];
// $model->tanggal = (string)$sheetData[$baseRow]['B'];
// $model->jam = (string)$sheetData[$baseRow]['C'];
// $model->pin = (string)$sheetData[$baseRow]['D'];
// $model->nip = (string)$sheetData[$baseRow]['E'];
// $model->nama = (string)$sheetData[$baseRow]['F'];
// $model->jabatan = (string)$sheetData[$baseRow]['G'];
// $model->departemen = (string)$sheetData[$baseRow]['H'];
// $model->kantor = (string)$sheetData[$baseRow]['I'];
// $model->verifikasi = (string)$sheetData[$baseRow]['J'];
// $model->i_o = (string)$sheetData[$baseRow]['K'];
// $model->workcode = (string)$sheetData[$baseRow]['L'];
// $model->mesin = (string)$sheetData[$baseRow]['M'];
// $model->laporan_id = $id;
// $model->save();
// $baseRow++;
// }
// Yii::$app->getSession()->setFlash('success','Success');
// return $this->redirect(['/ubux/laporan/view', 'id' => $id]);
// }else{
// Yii::$app->getSession()->setFlash('error','Error');
// return $this->redirect(['import']);
// }
// }
// return $this->render('import',[
// 'modelImport' => $modelImport,
// ]);
// }
}
}
backend/modules/ubux/controllers/LaporanController.php
View file @
3af54720
...
@@ -74,14 +74,14 @@ class LaporanController extends Controller
...
@@ -74,14 +74,14 @@ class LaporanController extends Controller
* If creation is successful, the browser will be redirected to the 'view' page.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
* @return mixed
*/
*/
public
function
action
Create
()
public
function
action
Add
()
{
{
$model
=
new
Laporan
();
$model
=
new
Laporan
();
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
laporan_id
]);
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
laporan_id
]);
}
else
{
}
else
{
return
$this
->
render
(
'
create
'
,
[
return
$this
->
render
(
'
add
'
,
[
'model'
=>
$model
,
'model'
=>
$model
,
]);
]);
}
}
...
@@ -93,14 +93,14 @@ class LaporanController extends Controller
...
@@ -93,14 +93,14 @@ class LaporanController extends Controller
* @param integer $id
* @param integer $id
* @return mixed
* @return mixed
*/
*/
public
function
action
Update
(
$id
)
public
function
action
Edit
(
$id
)
{
{
$model
=
$this
->
findModel
(
$id
);
$model
=
$this
->
findModel
(
$id
);
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
laporan_id
]);
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
laporan_id
]);
}
else
{
}
else
{
return
$this
->
render
(
'
update
'
,
[
return
$this
->
render
(
'
edit
'
,
[
'model'
=>
$model
,
'model'
=>
$model
,
]);
]);
}
}
...
@@ -112,7 +112,7 @@ class LaporanController extends Controller
...
@@ -112,7 +112,7 @@ class LaporanController extends Controller
* @param integer $id
* @param integer $id
* @return mixed
* @return mixed
*/
*/
public
function
actionDel
ete
(
$id
)
public
function
actionDel
(
$id
)
{
{
$this
->
findModel
(
$id
)
->
softdelete
();
$this
->
findModel
(
$id
)
->
softdelete
();
...
...
backend/modules/ubux/controllers/LemburController.php
View file @
3af54720
...
@@ -60,15 +60,11 @@ class LemburController extends Controller
...
@@ -60,15 +60,11 @@ class LemburController extends Controller
* If creation is successful, the browser will be redirected to the 'view' page.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
* @return mixed
*/
*/
public
function
action
Create
(
$id
)
public
function
action
Add
(
$id
)
{
{
$model
=
new
Lembur
();
$model
=
new
Lembur
();
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
()))
{
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
()))
{
// $models = explode(",", $model->tanggal);
// print_r($models);die();
$model
->
laporan_id
=
$id
;
$model
->
laporan_id
=
$id
;
if
(
$model
->
validate
()){
if
(
$model
->
validate
()){
$model
->
save
();
$model
->
save
();
...
@@ -76,7 +72,7 @@ class LemburController extends Controller
...
@@ -76,7 +72,7 @@ class LemburController extends Controller
}
}
}
else
{
}
else
{
return
$this
->
render
(
'
create
'
,
[
return
$this
->
render
(
'
add
'
,
[
'model'
=>
$model
,
'model'
=>
$model
,
]);
]);
}
}
...
@@ -88,14 +84,14 @@ class LemburController extends Controller
...
@@ -88,14 +84,14 @@ class LemburController extends Controller
* @param integer $id
* @param integer $id
* @return mixed
* @return mixed
*/
*/
public
function
action
Update
(
$id
)
public
function
action
Edit
(
$id
)
{
{
$model
=
$this
->
findModel
(
$id
);
$model
=
$this
->
findModel
(
$id
);
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
tanggal_lembur_id
]);
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
tanggal_lembur_id
]);
}
else
{
}
else
{
return
$this
->
render
(
'
update
'
,
[
return
$this
->
render
(
'
edit
'
,
[
'model'
=>
$model
,
'model'
=>
$model
,
]);
]);
}
}
...
@@ -107,7 +103,7 @@ class LemburController extends Controller
...
@@ -107,7 +103,7 @@ class LemburController extends Controller
* @param integer $id
* @param integer $id
* @return mixed
* @return mixed
*/
*/
public
function
actionDel
ete
(
$id
)
public
function
actionDel
(
$id
)
{
{
$this
->
findModel
(
$id
)
->
softdelete
();
$this
->
findModel
(
$id
)
->
softdelete
();
...
...
backend/modules/ubux/controllers/SatpamController.php
View file @
3af54720
...
@@ -74,7 +74,7 @@ class SatpamController extends Controller
...
@@ -74,7 +74,7 @@ class SatpamController extends Controller
* If creation is successful, the browser will be redirected to the 'view' page.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
* @return mixed
*/
*/
public
function
action
Create
()
public
function
action
Add
()
{
{
$model
=
new
Satpam
();
$model
=
new
Satpam
();
...
@@ -93,7 +93,7 @@ class SatpamController extends Controller
...
@@ -93,7 +93,7 @@ class SatpamController extends Controller
* @param integer $id
* @param integer $id
* @return mixed
* @return mixed
*/
*/
public
function
action
Update
(
$id
)
public
function
action
Edit
(
$id
)
{
{
$model
=
$this
->
findModel
(
$id
);
$model
=
$this
->
findModel
(
$id
);
...
@@ -112,7 +112,7 @@ class SatpamController extends Controller
...
@@ -112,7 +112,7 @@ class SatpamController extends Controller
* @param integer $id
* @param integer $id
* @return mixed
* @return mixed
*/
*/
public
function
actionDel
ete
(
$id
)
public
function
actionDel
(
$id
)
{
{
$this
->
findModel
(
$id
)
->
softdelete
();
$this
->
findModel
(
$id
)
->
softdelete
();
...
@@ -187,36 +187,59 @@ class SatpamController extends Controller
...
@@ -187,36 +187,59 @@ class SatpamController extends Controller
}
}
}
}
public
function
actionEditGaji
(
$id
,
$satpam_id
)
{
$model
=
$this
->
findModel
(
$satpam_id
);
if
(
$model
->
status
==
'Tetap'
){
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
\Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Gaji "
.
$model
[
'nama'
]
.
" pada bulan ini berhasil diupdate"
);
return
$this
->
redirect
([
'laporan/view'
,
'id'
=>
$model
->
laporan_id
]);
}
else
{
return
$this
->
render
(
'add-gaji'
,
[
'model'
=>
$model
,
]);
}
}
else
{
$modelCek
=
JamKerja
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
andWhere
([
'satpam_id'
=>
$satpam_id
])
->
one
();
$models
=
JamKerja
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
andWhere
([
'satpam_id'
=>
$satpam_id
])
->
All
();
$cek
=
$modelCek
->
tanggal
;
$jlh
=
1
;
foreach
(
$models
as
$data
)
{
if
(
$cek
!=
$data
->
tanggal
){
$jlh
++
;
$cek
=
$data
->
tanggal
;
}
}
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())){
$model
->
total_gaji
*=
$jlh
;
if
(
$model
->
save
(
false
)){
\Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Gaji "
.
$model
[
'nama'
]
.
" pada bulan ini berhasil diupdate"
);
return
$this
->
redirect
([
'laporan/view'
,
'id'
=>
$model
->
laporan_id
]);
}
}
else
{
return
$this
->
render
(
'add-gaji'
,
[
'model'
=>
$model
,
'jumlah'
=>
$jlh
,
]);
}
}
}
public
function
actionAddLembur
(
$id
,
$satpam_id
){
public
function
actionAddLembur
(
$id
,
$satpam_id
){
$model
=
$this
->
findModel
(
$satpam_id
);
$model
=
$this
->
findModel
(
$satpam_id
);
$modelCek
=
JamKerja
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
andWhere
([
'satpam_id'
=>
$satpam_id
])
->
one
();
$modelCek
=
JamKerja
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
andWhere
([
'satpam_id'
=>
$satpam_id
])
->
one
();
$models
=
JamKerja
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
andWhere
([
'satpam_id'
=>
$satpam_id
])
->
All
();
$models
=
JamKerja
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
andWhere
([
'satpam_id'
=>
$satpam_id
])
->
All
();
// $models2 = Lembur::find()->where(['laporan_id'=>$id])->All();
$cek
=
$modelCek
->
tanggal
;
$cek
=
$modelCek
->
tanggal
;
$jlh
=
0
;
$jlh
=
0
;
$lembur
=
Lembur
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
one
();
$lembur
=
Lembur
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
one
();
$mod
=
explode
(
","
,
$lembur
->
tanggal
);
$mod
=
explode
(
","
,
$lembur
->
tanggal
);
// print_r($mod);die();
// foreach ($models as $data ) {
// if($cek != $data->tanggal){
// $cek = $data->tanggal;h
// echo $data->tanggal.'1<br>';
// foreach ($models2 as $data2) {
// echo $data2->tanggal.'2<br>';
// if ($data->tanggal == $data2->tanggal) {
// $jlh++;
// }
// }
// }
// }echo $jlh;die();
$data
=
array
();
$data
=
array
();
foreach
(
$models
as
$obj
)
{
foreach
(
$models
as
$obj
)
{
...
@@ -229,21 +252,7 @@ class SatpamController extends Controller
...
@@ -229,21 +252,7 @@ class SatpamController extends Controller
$jlh
++
;
$jlh
++
;
}
}
}
}
}
}
// echo $jlh;die();
// echo "<br>";
// foreach ($models2 as $key) {
// echo $key->tanggal."<br>";
// }
// die();
if
(
$model
->
gaji_lembur
==
NULL
){
if
(
$model
->
gaji_lembur
==
NULL
){
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())){
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())){
$model
->
gaji_lembur
*=
$jlh
;
$model
->
gaji_lembur
*=
$jlh
;
...
@@ -260,10 +269,49 @@ class SatpamController extends Controller
...
@@ -260,10 +269,49 @@ class SatpamController extends Controller
]);
]);
}
}
}
else
{
}
else
{
\Yii
::
$app
->
messenger
->
addWarningFlash
(
"Gaji lembur"
.
$model
->
nama
.
" pada bulan ini sudah ada"
);
\Yii
::
$app
->
messenger
->
addWarningFlash
(
"Gaji lembur
"
.
$model
->
nama
.
" pada bulan ini sudah ada"
);
return
$this
->
redirect
([
'laporan/view'
,
'id'
=>
$model
->
laporan_id
]);
return
$this
->
redirect
([
'laporan/view'
,
'id'
=>
$model
->
laporan_id
]);
}
}
}
}
public
function
actionEditLembur
(
$id
,
$satpam_id
){
$model
=
$this
->
findModel
(
$satpam_id
);
$modelCek
=
JamKerja
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
andWhere
([
'satpam_id'
=>
$satpam_id
])
->
one
();
$models
=
JamKerja
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
andWhere
([
'satpam_id'
=>
$satpam_id
])
->
All
();
$cek
=
$modelCek
->
tanggal
;
$jlh
=
0
;
$lembur
=
Lembur
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
one
();
$mod
=
explode
(
","
,
$lembur
->
tanggal
);
$data
=
array
();
foreach
(
$models
as
$obj
)
{
$data
[
$obj
->
tanggal
]
=
$obj
;
}
foreach
(
$data
as
$val
){
foreach
(
$mod
as
$val2
)
{
if
(
$val
->
tanggal
==
$val2
){
$jlh
++
;
}
}
}
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())){
$model
->
gaji_lembur
*=
$jlh
;
if
(
$model
->
save
(
false
)){
\Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Gaji lembur "
.
$model
[
'nama'
]
.
" pada bulan ini berhasil diupdate"
);
return
$this
->
redirect
([
'laporan/view'
,
'id'
=>
$model
->
laporan_id
]);
}
}
else
{
return
$this
->
render
(
'add-lembur'
,
[
'model'
=>
$model
,
]);
}
}
}
}
backend/modules/ubux/models/Pegawai.php
deleted
100644 → 0
View file @
9fbaa1d3
This diff is collapsed.
Click to expand it.
backend/modules/ubux/views/jam-kerja/
create
.php
→
backend/modules/ubux/views/jam-kerja/
add
.php
View file @
3af54720
...
@@ -6,7 +6,7 @@ use yii\helpers\Html;
...
@@ -6,7 +6,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\JamKerja */
/* @var $model backend\modules\ubux\models\JamKerja */
$this
->
title
=
'
Create
Jam Kerja'
;
$this
->
title
=
'
Add
Jam Kerja'
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Jam Kerjas'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Jam Kerjas'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
?>
?>
...
...
backend/modules/ubux/views/jam-kerja/
update
.php
→
backend/modules/ubux/views/jam-kerja/
edit
.php
View file @
3af54720
...
@@ -5,7 +5,7 @@ use yii\helpers\Html;
...
@@ -5,7 +5,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\JamKerja */
/* @var $model backend\modules\ubux\models\JamKerja */
$this
->
title
=
'
Update
Jam Kerja: '
.
' '
.
$model
->
jam_kerja_id
;
$this
->
title
=
'
Edit
Jam Kerja: '
.
' '
.
$model
->
jam_kerja_id
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Jam Kerjas'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Jam Kerjas'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
jam_kerja_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
jam_kerja_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
jam_kerja_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
jam_kerja_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
'Update'
;
$this
->
params
[
'breadcrumbs'
][]
=
'Update'
;
...
...
backend/modules/ubux/views/jam-kerja/index.php
View file @
3af54720
...
@@ -21,32 +21,9 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -21,32 +21,9 @@ $this->params['breadcrumbs'][] = $this->title;
'dataProvider'
=>
$dataProvider
,
'dataProvider'
=>
$dataProvider
,
'filterModel'
=>
$searchModel
,
'filterModel'
=>
$searchModel
,
'columns'
=>
[
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
[
'class'
=>
'yii\grid\SerialColumn'
],
//'jam_kerja_id',
//'laporan_id',
//'satpam_id',
//'tanggal_scan',
'nama'
,
'nama'
,
'tanggal'
,
'tanggal'
,
// 'jam',
// 'pin',
// 'nip',
// 'jabatan',
// 'departemen',
// 'kantor',
// 'verifikasi',
// 'i_o',
// 'workcode',
// 'mesin',
// 'deleted',
// 'deleted_at',
// 'deleted_by',
// 'created_at',
// 'created_by',
// 'updated_at',
// 'updated_by',
[
'class'
=>
'yii\grid\ActionColumn'
],
[
'class'
=>
'yii\grid\ActionColumn'
],
],
],
...
...
backend/modules/ubux/views/laporan/_form.php
View file @
3af54720
...
@@ -8,25 +8,36 @@ use yii\widgets\ActiveForm;
...
@@ -8,25 +8,36 @@ use yii\widgets\ActiveForm;
/* @var $form yii\widgets\ActiveForm */
/* @var $form yii\widgets\ActiveForm */
?>
?>
<div
class=
"laporan-form"
>
<div
class=
"laporan-form"
>
<?php
$form
=
ActiveForm
::
begin
();
?>
<?php
$form
=
ActiveForm
::
begin
();
?>
<?php
<?php
$thn
=
date
(
'Y'
);
$thn
=
date
(
'Y'
);
foreach
(
range
(
200
2
-
2
,
$thn
)
as
$i
)
{
foreach
(
range
(
200
0
,
$thn
)
as
$i
)
{
$array
[]
=
$i
;
$array
[]
=
$i
;
}
}
?>
?>
<?=
$form
->
field
(
$model
,
'bulan'
)
->
dropDownlist
([
'Januari'
=>
'Januari'
,
'Februari'
=>
'Februari'
,
'Maret'
=>
'Maret'
,
'April'
=>
'April'
,
'Mei'
=>
'Mei'
,
'Juni'
=>
'Juni'
,
'Juli'
=>
'Juli'
,
'Agustus'
=>
'Agustus'
,
'September'
=>
'September'
,
'Oktober'
=>
'Oktober'
,
'November'
=>
'November'
,
'Desember'
=>
'Desember'
],
[
'prompt'
=>
'Pilih Bulan'
])
?>
<?=
$form
->
field
(
$model
,
'bulan'
)
->
dropDownlist
(
[
'Januari'
=>
'Januari'
,
'Februari'
=>
'Februari'
,
'Maret'
=>
'Maret'
,
'April'
=>
'April'
,
'Mei'
=>
'Mei'
,
'Juni'
=>
'Juni'
,
'Juli'
=>
'Juli'
,
'Agustus'
=>
'Agustus'
,
'September'
=>
'September'
,
'Oktober'
=>
'Oktober'
,
'November'
=>
'November'
,
'Desember'
=>
'Desember'
],
[
'prompt'
=>
'Pilih Bulan'
,
'required'
=>
true
,
]
)
?>
<?=
$form
->
field
(
$model
,
'tahun'
)
->
dropDownList
(
<?=
$form
->
field
(
$model
,
'tahun'
)
->
dropDownList
(
$array
,
[
'prompt'
=>
'Pilih Tahun'
]
$array
,
[
'prompt'
=>
'Pilih Tahun'
,
'required'
=>
true
,
]
);
?>
);
?>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
'
Create'
:
'Update
'
,
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
'
Add'
:
'Edit
'
,
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
</div>
</div>
<?php
ActiveForm
::
end
();
?>
<?php
ActiveForm
::
end
();
?>
...
...
backend/modules/ubux/views/laporan/_search.php
View file @
3af54720
...
@@ -13,31 +13,40 @@ use yii\widgets\ActiveForm;
...
@@ -13,31 +13,40 @@ use yii\widgets\ActiveForm;
<?php
$form
=
ActiveForm
::
begin
([
<?php
$form
=
ActiveForm
::
begin
([
'action'
=>
[
'index'
],
'action'
=>
[
'index'
],
'method'
=>
'get'
,
'method'
=>
'get'
,
]);
?>
]);
?>
<?=
$form
->
field
(
$model
,
'laporan_id'
)
?>
<?php
$thn
=
date
(
'Y'
);
<?=
$form
->
field
(
$model
,
'bulan'
)
?>
foreach
(
range
(
2000
,
$thn
)
as
$i
)
{
$array
[]
=
$i
;
<?=
$form
->
field
(
$model
,
'tahun'
)
?>
}
?>
<?=
$form
->
field
(
$model
,
'deleted'
)
?>
<h2><i
class=
"fa fa-search"
>
Cari Bulan Laporan
</i></h2>
<?=
$form
->
field
(
$model
,
'deleted_at'
)
?>
<div
class=
"page-line"
></div>
<div
class=
"row"
>
<?php
// echo $form->field($model, 'deleted_by') ?>
<div
class=
"col-md-4"
>
<?=
$form
->
field
(
$model
,
'bulan'
)
->
dropDownlist
(
<?
php
// echo $form->field($model, 'created_at') ?>
[
'Januari'
=>
'Januari'
,
'Februari'
=>
'Februari'
,
'Maret'
=>
'Maret'
,
'April'
=>
'April'
,
'Mei'
=>
'Mei'
,
'Juni'
=>
'Juni'
,
'Juli'
=>
'Juli'
,
'Agustus'
=>
'Agustus'
,
'September'
=>
'September'
,
'Oktober'
=>
'Oktober'
,
'November'
=>
'November'
,
'Desember'
=>
'Desember'
],
[
<?
php
// echo $form->field($model, 'created_by') ?>
'prompt'
=>
'Pilih Bulan'
,
]
<?
php
// echo $form->field($model, 'updated_at') ?>
)
?>
<?
php
// echo $form->field($model, 'updated_by') ?>
</div>
<div
class=
"col-md-4"
>
<?=
$form
->
field
(
$model
,
'tahun'
)
->
dropDownList
(
$array
,
[
'prompt'
=>
'Pilih Tahun'
,
]
);
?>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<?= Html::submitButton('
Search
', ['class' => 'btn btn-primary']) ?>
<?=
Html
::
submitButton
(
'
Cari
'
,
[
'class'
=>
'btn btn-primary'
])
?>
<
?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?
>
<
!--
<?=
Html
::
resetButton
(
'Reset'
,
[
'class'
=>
'btn btn-default'
])
?>
--
>
</div>
</div>
<?php
ActiveForm
::
end
();
?>
<?php
ActiveForm
::
end
();
?>
...
...
backend/modules/ubux/views/laporan/
create
.php
→
backend/modules/ubux/views/laporan/
add
.php
View file @
3af54720
...
@@ -6,7 +6,7 @@ use yii\helpers\Html;
...
@@ -6,7 +6,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Laporan */
/* @var $model backend\modules\ubux\models\Laporan */
$this
->
title
=
'
Create
Laporan'
;
$this
->
title
=
'
Add
Laporan'
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Laporans'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Laporans'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
?>
?>
...
...
backend/modules/ubux/views/laporan/
update
.php
→
backend/modules/ubux/views/laporan/
edit
.php
View file @
3af54720
...
@@ -5,12 +5,12 @@ use yii\helpers\Html;
...
@@ -5,12 +5,12 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Laporan */
/* @var $model backend\modules\ubux\models\Laporan */
$this
->
title
=
'
Update Laporan: '
.
' '
.
$model
->
laporan_id
;
$this
->
title
=
'
Edit Laporan '
.
' '
.
$model
->
bulan
.
' '
.
$model
->
tahun
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Laporans'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Laporans'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
laporan_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
laporan_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
laporan_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
laporan_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
'
Update
'
;
$this
->
params
[
'breadcrumbs'
][]
=
'
Edit
'
;
?>
?>
<div
class=
"laporan-
update
"
>
<div
class=
"laporan-
edit
"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
...
...
backend/modules/ubux/views/laporan/index.php
View file @
3af54720
...
@@ -9,21 +9,23 @@ use common\components\ToolsColumn;
...
@@ -9,21 +9,23 @@ use common\components\ToolsColumn;
/* @var $searchModel backend\modules\ubux\models\search\LaporanSearch */
/* @var $searchModel backend\modules\ubux\models\search\LaporanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this
->
title
=
'Laporan'
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'header'
]
=
'Laporan'
;
?>
?>
<div
class=
"laporan-index"
>
<div
class=
"laporan-index"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
//
echo $this->render('_search', ['model' => $searchModel]); ?>
<?php
echo
$this
->
render
(
'_search'
,
[
'model'
=>
$searchModel
]);
?>
<h2
style=
"margin-top: 40px"
><i
class=
"fa fa-list"
>
List Laporan
</i></h2>
<div
class=
"page-line"
></div>
<p>
<p>
<?=
Html
::
a
(
'Tambah Bulan'
,
[
'
create
'
],
[
'class'
=>
'btn btn-success'
])
?>
<?=
Html
::
a
(
'Tambah Bulan'
,
[
'
add
'
],
[
'class'
=>
'btn btn-success'
])
?>
</p>
</p>
<?=
GridView
::
widget
([
<?=
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'dataProvider'
=>
$dataProvider
,
'filterModel'
=>
$searchModel
,
//
'filterModel' => $searchModel,
'columns'
=>
[
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
[
'class'
=>
'yii\grid\SerialColumn'
],
...
@@ -54,7 +56,7 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -54,7 +56,7 @@ $this->params['breadcrumbs'][] = $this->title;
if
(
$action
===
'view'
)
{
if
(
$action
===
'view'
)
{
return
Url
::
toRoute
([
'view'
,
'id'
=>
$key
]);
return
Url
::
toRoute
([
'view'
,
'id'
=>
$key
]);
}
else
if
(
$action
===
'update'
)
{
}
else
if
(
$action
===
'update'
)
{
return
Url
::
toRoute
([
'
update
'
,
'id'
=>
$key
]);
return
Url
::
toRoute
([
'
edit
'
,
'id'
=>
$key
]);
}
else
if
(
$action
===
'delete'
)
{
}
else
if
(
$action
===
'delete'
)
{
return
Url
::
toRoute
([
'delete'
,
'id'
=>
$key
]);
return
Url
::
toRoute
([
'delete'
,
'id'
=>
$key
]);
}
}
...
...
backend/modules/ubux/views/laporan/view-detail.php
View file @
3af54720
...
@@ -13,9 +13,11 @@ use common\components\ToolsColumn;
...
@@ -13,9 +13,11 @@ use common\components\ToolsColumn;
//$this->title = $model->laporan_id;
//$this->title = $model->laporan_id;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Laporans'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Laporans'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'header'
]
=
'Detail Laporan'
;
?>
?>
<div
class=
"laporan-view"
>
<div
class=
"laporan-view"
>
<h2><i
class=
"fa fa-list"
>
List Detail
</i></
<
div
class="page-line"
></div>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
<?php
...
@@ -29,16 +31,12 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -29,16 +31,12 @@ $this->params['breadcrumbs'][] = $this->title;
'nama'
,
'nama'
,
[
[
'attribute'
=>
'tanggal'
,
'attribute'
=>
'tanggal'
,
'label'
=>
'Tanggal'
,
'label'
=>
'Tanggal'
,
//'format' => ['date', 'php:d M Y'],
'filter'
=>
''
,
'filter'
=>
''
,
],
],
'jam'
,
'jam'
,
]
]
]);
]);
// echo $dataProvider->getTotalCount();
?>
?>
...
...
backend/modules/ubux/views/laporan/view-pdf.php
View file @
3af54720
...
@@ -29,6 +29,7 @@ $dataProvider = new ActiveDataProvider([
...
@@ -29,6 +29,7 @@ $dataProvider = new ActiveDataProvider([
$sat2
=
$model
->
tahun
;
$sat2
=
$model
->
tahun
;
$model
=
Satpam
::
find
()
->
where
([
'laporan_id'
=>
$sat
])
->
andwhere
([
'satpam_id'
=>
$_GET
[
'nip'
]])
->
one
();
$model
=
Satpam
::
find
()
->
where
([
'laporan_id'
=>
$sat
])
->
andwhere
([
'satpam_id'
=>
$_GET
[
'nip'
]])
->
one
();
//$models = gaji::find()->where(['laporan_id' => $_GET['id']])->one();
//$models = gaji::find()->where(['laporan_id' => $_GET['id']])->one();
$total
=
$model
[
'total_gaji'
]
+
$model
[
'gaji_lembur'
];
?>
?>
<div>
<div>
...
@@ -72,47 +73,46 @@ $dataProvider = new ActiveDataProvider([
...
@@ -72,47 +73,46 @@ $dataProvider = new ActiveDataProvider([
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><br><br><b>
POTONGAN
<b></td>
<td><br><br><b><b></td>
</tr>
</tr>
<tr>
<tr>
<td>
Gaji Pokok
</td>
<td>
Gaji Pokok
</td>
<td>
=
</td>
<td>
=
</td>
<td>
Rp.
<?php
echo
$model
[
'total_gaji'
]
?>
,-
</td>
<td>
Rp.
<?php
echo
$model
[
'total_gaji'
]
?>
,-
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>
Pajak
</td>
<td>
=
</td>
<td></td>
<td></td>
<td>
-
</td>
<td></td>
<td></td>
<td>
</td>
</tr>
</tr>
<tr>
<tr>
<td>
Gaji Lembur
</td>
<td>
Gaji Lembur
</td>
<td>
=
</td>
<td>
=
</td>
<td>
Rp.
<?php
echo
$model
[
'gaji_lembur'
];
?>
,-
</td>
<td>
Rp.
<?php
echo
$model
[
'gaji_lembur'
];
?>
,-
</td>
<hr>
<hr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>
Asuransi
</td>
<td>
=
</td>
<td></td>
<td></td>
<td>
-
</td>
<td></td>
<hr>
<td></td>
<td>
</td>
</tr>
</tr>
<tr>
<tr>
<td>
<b>
Total(A)
<b></td>
<td>
<b>
Total
<b></td>
<td>
=
</td>
<td>
=
</td>
<td><b>
Rp.
<?php
echo
$model
[
'total_gaji'
]
+
$model
[
'gaji_lembur'
]
?>
,-
</b></td>
<td><b>
Rp.
<?php
echo
$model
[
'total_gaji'
]
+
$model
[
'gaji_lembur'
]
?>
,-
</b></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><b>
Total(B)
<b></td>
<td><b><b></td>
<td>
=
</td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td><br><br><br><b>
Penerimaan Bersih
(A - B)
</b></td>
<td><br><br><br><b>
Penerimaan Bersih
</b></td>
<td><br><br><br>
=
</td>
<td><br><br><br></td>
<td><br><br><br><b>
Rp.
<?php
echo
$model
[
'total_gaji'
]
+
$model
[
'gaji_lembur'
]
?>
,-
</b>
</td>
<td><br><br><br><b>
Rp.
<?php
echo
$model
[
'total_gaji'
]
+
$model
[
'gaji_lembur'
]
?>
,-
</b>
</td>
</tr>
</tr>
<tr>
<tr>
...
...
backend/modules/ubux/views/laporan/view.php
View file @
3af54720
...
@@ -15,21 +15,18 @@ use backend\modules\ubux\models\Lembur;
...
@@ -15,21 +15,18 @@ use backend\modules\ubux\models\Lembur;
//$this->title = $model->laporan_id;
//$this->title = $model->laporan_id;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Laporans'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Laporans'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'header'
]
=
'Laporan'
;
?>
?>
<div
class=
"laporan-view"
>
<div
class=
"laporan-view"
>
<h2><i
class=
"fa fa-list"
>
List Laporan
<?php
echo
$model
[
'bulan'
]
?>
<?php
echo
$model
[
'tahun'
]
?>
</i></h2>
<div
class=
"page-line"
></div>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<h1><strong>
<?php
echo
$model
[
'bulan'
]
?>
<?php
echo
$model
[
'tahun'
]
?>
</strong></h1>
<?php
<?php
if
(
!
Lembur
::
find
()
->
where
([
'laporan_id'
=>
$model
->
laporan_id
])
->
exists
()){
if
(
!
Lembur
::
find
()
->
where
([
'laporan_id'
=>
$model
->
laporan_id
])
->
exists
()){
\Yii
::
$app
->
messenger
->
addWarningFlash
(
"Masukkan tanggal libur pada "
.
$model
[
'bulan'
]
.
" "
.
$model
[
'tahun'
]);
\Yii
::
$app
->
messenger
->
addWarningFlash
(
"Masukkan tanggal libur pada "
.
$model
[
'bulan'
]
.
" "
.
$model
[
'tahun'
]);
echo
Html
::
a
(
'Tambah Tanggal Libur'
,
[
'lembur/
create
'
,
'id'
=>
$model
->
laporan_id
],
[
'class'
=>
'btn btn-info'
]);
echo
Html
::
a
(
'Tambah Tanggal Libur'
,
[
'lembur/
add
'
,
'id'
=>
$model
->
laporan_id
],
[
'class'
=>
'btn btn-info'
]);
}
}
// else{
// echo Html::a('Tambah Tanggal Libur', ['lembur/create', 'id' => $model->laporan_id], ['class' => 'btn btn-info']);
// }
if
(
!
Satpam
::
find
()
->
where
([
'laporan_id'
=>
$model
->
laporan_id
])
->
exists
()){
if
(
!
Satpam
::
find
()
->
where
([
'laporan_id'
=>
$model
->
laporan_id
])
->
exists
()){
...
@@ -54,14 +51,6 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -54,14 +51,6 @@ $this->params['breadcrumbs'][] = $this->title;
'allModels'
=>
$data
,
'allModels'
=>
$data
,
]);
]);
// echo GridView::widget([
// 'dataProvider' => $dataProvider,
// 'columns' => [
// 'nama',
// 'nip',
// ]
// ]);
echo
GridView
::
widget
([
echo
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'dataProvider'
=>
$dataProvider
,
'columns'
=>
[
'columns'
=>
[
...
@@ -79,10 +68,18 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -79,10 +68,18 @@ $this->params['breadcrumbs'][] = $this->title;
return
ToolsColumn
::
renderCustomButton
(
$url
,
$model
,
'View Detail'
,
'fa fa-eye'
);
return
ToolsColumn
::
renderCustomButton
(
$url
,
$model
,
'View Detail'
,
'fa fa-eye'
);
},
},
'total'
=>
function
(
$url
,
$model
){
'total'
=>
function
(
$url
,
$model
){
return
ToolsColumn
::
renderCustomButton
(
$url
,
$model
,
'Add Gaji'
,
'fa fa-eye'
);
if
(
$model
->
total_gaji
==
null
)
{
return
ToolsColumn
::
renderCustomButton
(
$url
,
$model
,
'Add Gaji Pokok'
,
'fa fa-eye'
);
}
else
{
return
ToolsColumn
::
renderCustomButton
(
$url
,
$model
,
'Update Gaji Pokok'
,
'fa fa-eye'
);
}
},
},
'lembur'
=>
function
(
$url
,
$model
){
'lembur'
=>
function
(
$url
,
$model
){
return
ToolsColumn
::
renderCustomButton
(
$url
,
$model
,
'Add Gaji Lembur'
,
'fa fa-eye'
);
if
(
$model
->
gaji_lembur
==
null
)
{
return
ToolsColumn
::
renderCustomButton
(
$url
,
$model
,
'Add Gaji Lembur'
,
'fa fa-eye'
);
}
else
{
return
ToolsColumn
::
renderCustomButton
(
$url
,
$model
,
'Update Gaji Lembur'
,
'fa fa-eye'
);
}
},
},
'delete'
=>
function
(
$url
,
$model
){
'delete'
=>
function
(
$url
,
$model
){
return
"<li>"
.
Html
::
a
(
'<span class="fa fa-trash"></span> Hapus'
,
$url
,
[
return
"<li>"
.
Html
::
a
(
'<span class="fa fa-trash"></span> Hapus'
,
$url
,
[
...
@@ -100,20 +97,27 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -100,20 +97,27 @@ $this->params['breadcrumbs'][] = $this->title;
if
(
$action
===
'view'
)
{
if
(
$action
===
'view'
)
{
return
Url
::
toRoute
([
'view-detail'
,
'id'
=>
$_GET
[
'id'
],
'satpam_id'
=>
$key
]);
return
Url
::
toRoute
([
'view-detail'
,
'id'
=>
$_GET
[
'id'
],
'satpam_id'
=>
$key
]);
}
else
if
(
$action
===
'total'
)
{
}
else
if
(
$action
===
'total'
)
{
return
Url
::
toRoute
([
'satpam/add-gaji'
,
'id'
=>
$_GET
[
'id'
],
'satpam_id'
=>
$key
]);
if
(
$model
->
total_gaji
==
null
)
{
return
Url
::
toRoute
([
'satpam/add-gaji'
,
'id'
=>
$_GET
[
'id'
],
'satpam_id'
=>
$key
]);
}
else
{
return
Url
::
toRoute
([
'satpam/edit-gaji'
,
'id'
=>
$_GET
[
'id'
],
'satpam_id'
=>
$key
]);
}
}
else
if
(
$action
===
'delete'
)
{
}
else
if
(
$action
===
'delete'
)
{
return
Url
::
toRoute
([
'delete'
,
'id'
=>
$key
]);
return
Url
::
toRoute
([
'delete'
,
'id'
=>
$key
]);
}
else
if
(
$action
===
'print'
)
{
}
else
if
(
$action
===
'print'
)
{
return
Url
::
toRoute
([
'print'
,
'id'
=>
$_GET
[
'id'
],
'nip'
=>
$key
]);
return
Url
::
toRoute
([
'print'
,
'id'
=>
$_GET
[
'id'
],
'nip'
=>
$key
]);
}
else
if
(
$action
===
'lembur'
){
}
else
if
(
$action
===
'lembur'
){
return
Url
::
toRoute
([
'satpam/add-lembur'
,
'id'
=>
$_GET
[
'id'
],
'satpam_id'
=>
$key
]);
if
(
$model
->
total_gaji
==
null
)
{
return
Url
::
toRoute
([
'satpam/add-lembur'
,
'id'
=>
$_GET
[
'id'
],
'satpam_id'
=>
$key
]);
}
else
{
return
Url
::
toRoute
([
'satpam/edit-lembur'
,
'id'
=>
$_GET
[
'id'
],
'satpam_id'
=>
$key
]);
}
}
}
}
}
],
],
],
],
]);
]);
// echo "<br>" . $count;
?>
?>
...
...
backend/modules/ubux/views/lembur/_form.php
View file @
3af54720
...
@@ -13,11 +13,7 @@ $uiHelper = \Yii::$app->uiHelper;
...
@@ -13,11 +13,7 @@ $uiHelper = \Yii::$app->uiHelper;
<div
class=
"lembur-form"
>
<div
class=
"lembur-form"
>
<?php
$form
=
ActiveForm
::
begin
();
?>
<?php
$form
=
ActiveForm
::
begin
();
?>
<!--
<?=
$form
->
field
(
$model
,
'tanggal'
)
->
textInput
()
?>
-->
<?=
$form
->
field
(
$model
,
'tanggal'
)
->
textarea
([
<?=
$form
->
field
(
$model
,
'tanggal'
)
->
textarea
([
'maxlength'
=>
true
,
'maxlength'
=>
true
,
...
...
backend/modules/ubux/views/lembur/
create
.php
→
backend/modules/ubux/views/lembur/
add
.php
View file @
3af54720
File moved
backend/modules/ubux/views/lembur/
update
.php
→
backend/modules/ubux/views/lembur/
edit
.php
View file @
3af54720
...
@@ -5,7 +5,7 @@ use yii\helpers\Html;
...
@@ -5,7 +5,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Lembur */
/* @var $model backend\modules\ubux\models\Lembur */
$this
->
title
=
'
Update
Lembur: '
.
' '
.
$model
->
tanggal_lembur_id
;
$this
->
title
=
'
Edit
Lembur: '
.
' '
.
$model
->
tanggal_lembur_id
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Lembur'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Lembur'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
tanggal_lembur_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
tanggal_lembur_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
tanggal_lembur_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
tanggal_lembur_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
'Update'
;
$this
->
params
[
'breadcrumbs'
][]
=
'Update'
;
...
...
backend/modules/ubux/views/lembur/index.php
View file @
3af54720
...
@@ -30,11 +30,6 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -30,11 +30,6 @@ $this->params['breadcrumbs'][] = $this->title;
'tanggal'
,
'tanggal'
,
'deleted'
,
'deleted'
,
'deleted_at'
,
'deleted_at'
,
// 'deleted_by',
// 'created_at',
// 'created_by',
// 'updated_at',
// 'updated_by',
[
'class'
=>
'yii\grid\ActionColumn'
],
[
'class'
=>
'yii\grid\ActionColumn'
],
],
],
...
...
backend/modules/ubux/views/satpam/_form-add-gaji.php
View file @
3af54720
...
@@ -3,18 +3,18 @@
...
@@ -3,18 +3,18 @@
use
yii\helpers\Html
;
use
yii\helpers\Html
;
use
yii\widgets\ActiveForm
;
use
yii\widgets\ActiveForm
;
$gaji
=
80000
;
?>
?>
<div
class=
"laporan-form"
>
<div
class=
"laporan-form"
>
<?php
$form
=
ActiveForm
::
begin
();
?>
<?php
$form
=
ActiveForm
::
begin
();
?>
<?=
$form
->
field
(
$model
,
'total_gaji'
)
->
textInput
(
[
'maxlength'
=>
true
,
<?=
$form
->
field
(
$model
,
'total_gaji'
)
->
textInput
([
'maxlength'
=>
true
,
'value'
=>
$gaji
]);
?>
'placeholder'
=>
"Masukkan Gaji Pokok"
,
'required'
=>
true
,
]);
?>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
'Create'
:
'Add Gaji'
,
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
'Create'
:
'Add Gaji'
,
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
...
...
backend/modules/ubux/views/satpam/_form-add-lembur.php
View file @
3af54720
...
@@ -3,15 +3,18 @@
...
@@ -3,15 +3,18 @@
use
yii\helpers\Html
;
use
yii\helpers\Html
;
use
yii\widgets\ActiveForm
;
use
yii\widgets\ActiveForm
;
$gaji
=
80000
;
?>
?>
<div
class=
"laporan-form"
>
<div
class=
"laporan-form"
>
<?php
$form
=
ActiveForm
::
begin
();
?>
<?php
$form
=
ActiveForm
::
begin
();
?>
<?=
$form
->
field
(
$model
,
'gaji_lembur'
)
->
textInput
([
'maxlength'
=>
true
,
'value'
=>
$gaji
]);
?>
<?=
$form
->
field
(
$model
,
'gaji_lembur'
)
->
textInput
(
[
'maxlength'
=>
true
,
'placeholder'
=>
"Masukkan Gaji Lembur"
,
'required'
=>
true
,
]);
?>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
'Create'
:
'Add Gaji'
,
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
'Create'
:
'Add Gaji'
,
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
...
...
backend/modules/ubux/views/satpam/_search.php
View file @
3af54720
...
@@ -15,35 +15,37 @@ use yii\widgets\ActiveForm;
...
@@ -15,35 +15,37 @@ use yii\widgets\ActiveForm;
'method'
=>
'get'
,
'method'
=>
'get'
,
]);
?>
]);
?>
<?=
$form
->
field
(
$model
,
'satpam_id'
)
?>
<?php
$thn
=
date
(
'Y'
);
<?=
$form
->
field
(
$model
,
'laporan_id'
)
?>
foreach
(
range
(
2000
,
$thn
)
as
$i
)
{
$array
[]
=
$i
;
<?=
$form
->
field
(
$model
,
'total_gaji'
)
?>
}
?>
<?=
$form
->
field
(
$model
,
'nip'
)
?>
<h2><i
class=
"fa fa-search"
>
Cari Data Satpam
</i></h2>
<?=
$form
->
field
(
$model
,
'nama'
)
?>
<div
class=
"page-line"
></div>
<div
class=
"row"
>
<?php
// echo $form->field($model, 'status') ?>
<div
class=
"col-md-4"
>
<?=
$form
->
field
(
$model
,
'bulan'
)
->
dropDownlist
(
<?
php
// echo $form->field($model, 'deleted') ?>
[
'Januari'
=>
'Januari'
,
'Februari'
=>
'Februari'
,
'Maret'
=>
'Maret'
,
'April'
=>
'April'
,
'Mei'
=>
'Mei'
,
'Juni'
=>
'Juni'
,
'Juli'
=>
'Juli'
,
'Agustus'
=>
'Agustus'
,
'September'
=>
'September'
,
'Oktober'
=>
'Oktober'
,
'November'
=>
'November'
,
'Desember'
=>
'Desember'
],
[
<?
php
// echo $form->field($model, 'deleted_at') ?>
'prompt'
=>
'Pilih Bulan'
,
]
<?
php
// echo $form->field($model, 'deleted_by') ?>
)
?>
<?
php
// echo $form->field($model, 'created_at') ?>
</div>
<div
class=
"col-md-4"
>
<?
php
// echo $form->field($model, 'created_by') ?>
<?=
$form
->
field
(
$model
,
'tahun'
)
->
dropDownList
(
$array
,
<?
php
// echo $form->field($model, 'updated_at') ?>
[
'prompt'
=>
'Pilih Tahun'
,
<?
php
// echo $form->field($model, 'updated_by') ?>
]
);
?>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?=
Html
::
submitButton
(
'Search'
,
[
'class'
=>
'btn btn-primary'
])
?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
</div>
</div>
<?php
ActiveForm
::
end
();
?>
<?php
ActiveForm
::
end
();
?>
...
...
backend/modules/ubux/views/satpam/
create
.php
→
backend/modules/ubux/views/satpam/
add
.php
View file @
3af54720
File moved
backend/modules/ubux/views/satpam/
update
.php
→
backend/modules/ubux/views/satpam/
edit
.php
View file @
3af54720
...
@@ -5,7 +5,7 @@ use yii\helpers\Html;
...
@@ -5,7 +5,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Satpam */
/* @var $model backend\modules\ubux\models\Satpam */
$this
->
title
=
'
Update
Satpam: '
.
' '
.
$model
->
satpam_id
;
$this
->
title
=
'
Edit
Satpam: '
.
' '
.
$model
->
satpam_id
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Satpams'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Satpams'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
satpam_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
satpam_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
satpam_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
satpam_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
'Update'
;
$this
->
params
[
'breadcrumbs'
][]
=
'Update'
;
...
...
backend/modules/ubux/views/satpam/index.php
View file @
3af54720
...
@@ -9,19 +9,20 @@ use common\components\ToolsColumn;
...
@@ -9,19 +9,20 @@ use common\components\ToolsColumn;
/* @var $searchModel backend\modules\ubux\models\search\SatpamSearch */
/* @var $searchModel backend\modules\ubux\models\search\SatpamSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this
->
title
=
'Data Satpam Per Bulan dan Tahun'
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'header'
]
=
'Data Satpam Per Bulan dan Tahun'
;
?>
?>
<div
class=
"satpam-index"
>
<div
class=
"satpam-index"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
//
echo $this->render('_search', ['model' => $searchModel]); ?>
<?php
echo
$this
->
render
(
'_search'
,
[
'model'
=>
$searchModel
]);
?>
<h2><i
class=
"fa fa-list"
>
List Data Satpam Perbulan
</i></h2>
<div
class=
"page-line"
></div>
<?=
GridView
::
widget
([
<?=
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'dataProvider'
=>
$dataProvider
,
'filterModel'
=>
$searchModel
,
//
'filterModel' => $searchModel,
'columns'
=>
[
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
[
'class'
=>
'yii\grid\SerialColumn'
],
...
...
backend/modules/ubux/views/satpam/view.php
View file @
3af54720
...
@@ -37,14 +37,6 @@ $model2 = Laporan::find()->where(['laporan_id' => $id])->one();
...
@@ -37,14 +37,6 @@ $model2 = Laporan::find()->where(['laporan_id' => $id])->one();
'allModels'
=>
$data
,
'allModels'
=>
$data
,
]);
]);
// echo GridView::widget([
// 'dataProvider' => $dataProvider,
// 'columns' => [
// 'nama',
// 'nip',
// ]
// ]);
echo
GridView
::
widget
([
echo
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'dataProvider'
=>
$dataProvider
,
'columns'
=>
[
'columns'
=>
[
...
...
backend/themes/v2/layouts/main.php
View file @
3af54720
...
@@ -129,8 +129,8 @@ $this->beginPage();
...
@@ -129,8 +129,8 @@ $this->beginPage();
<?php
<?php
MenuRenderer
::
renderSidebarMenu
(
\Yii
::
$app
->
params
[
'sidebarMenu'
]);
MenuRenderer
::
renderSidebarMenu
(
\Yii
::
$app
->
params
[
'sidebarMenu'
]);
?>
?>
<li><a
href=
"/
ulang2
/backend/web/index.php/ubux/laporan"
><i
class=
"fa fa-circle-o text-red"
></i>
<span>
Laporan Satpam
</span></a></li>
<li><a
href=
"/
cis-lite
/backend/web/index.php/ubux/laporan"
><i
class=
"fa fa-circle-o text-red"
></i>
<span>
Laporan Satpam
</span></a></li>
<li><a
href=
"/
ulang2
/backend/web/index.php/ubux/satpam"
><i
class=
"fa fa-circle-o text-red"
></i>
<span>
Data Satpam
</span></a></li>
<li><a
href=
"/
cis-lite
/backend/web/index.php/ubux/satpam"
><i
class=
"fa fa-circle-o text-red"
></i>
<span>
Data Satpam
</span></a></li>
<!-- <li class="header">LABELS</li>
<!-- <li class="header">LABELS</li>
<li><a href="#"><i class="fa fa-circle-o text-red"></i> <span>Important</span></a></li>
<li><a href="#"><i class="fa fa-circle-o text-red"></i> <span>Important</span></a></li>
<li><a href="#"><i class="fa fa-circle-o text-yellow"></i> <span>Warning</span></a></li>
<li><a href="#"><i class="fa fa-circle-o text-yellow"></i> <span>Warning</span></a></li>
...
...
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