Commit 9fbaa1d3 by Andre Sihombing

Melakukan Perbaikan Semua Fungsi

parent 53dbc9a3
......@@ -4,25 +4,28 @@ namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\Satpam;
use backend\modules\ubux\models\Hrdxpegawai;
use backend\modules\ubux\models\JamKerja;
use backend\modules\ubux\models\search\SatpamSearch;
use backend\modules\ubux\models\search\LaporanSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\data\ActiveDataProvider;
/**
* SatpamController implements the CRUD actions for Satpam model.
*/
class DataSatpamController extends Controller
class SatpamController extends Controller
{
public function behaviors()
{
{
return [
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
'delete' => ['post'],
],
],
];
......@@ -34,7 +37,7 @@ class DataSatpamController extends Controller
*/
public function actionIndex()
{
$searchModel = new SatpamSearch();
$searchModel = new LaporanSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
......@@ -43,27 +46,18 @@ class DataSatpamController extends Controller
]);
}
public function actionViewSatpam()
{
$searchModel = new SatpamSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('view_satpam', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single Satpam model.
* @param integer $id
* @return mixed
*/
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
public function actionView($laporan_id)
{
$model = JamKerja::find()->where(['laporan_id' => $laporan_id])->All();
return $this->render('view',
array('model' => $this->findModel($laporan_id), 'satpamModel' => $model)
);
}
/**
......@@ -111,7 +105,7 @@ class DataSatpamController extends Controller
*/
public function actionDelete($id)
{
$this->findModel($id)->softDelete();
$this->findModel($id)->softdelete();
return $this->redirect(['index']);
}
......@@ -131,16 +125,16 @@ class DataSatpamController extends Controller
throw new NotFoundHttpException('The requested page does not exist.');
}
}
public function actionAddGaji($satpam_id)
{
$model = $this->findModel($satpam_id);
public function showSatpam(){
$id = "satpam";
$dataProvider = new ActiveDataProvider([
'query' => Hrdxpegawai::find()->where("posisi = 'satpam'"),
'pagination' => [
'pageSize' => 20,
],
]);
return $dataProvider;
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['laporan/view', 'id' => $model->laporan_id]);
} else {
return $this->render('add-gaji', [
'model' => $model,
]);
}
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
<?php
namespace backend\modules\ubux\assets;
use yii\web\AssetBundle;
class ubuxAsset extends AssetBundle{
public $sourcePath = '@backend/modules/ubux/assets/web';
public $css = [
'css/jquery.datepick.css',
'css/smoothness.datepick.css'
];
public $js = [
'js/jquery.plugin.js',
'js/jquery.datepick.js',
'js/jscript.js',
];
public $depends = [
'backend\themes\v2\assets\V2Asset'
];
public $publishOptions = [
'forceCopy' => true,
];
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/* Default styling for jQuery Datepicker v5.0.1. */
.datepick {
background-color: #fff;
color: #000;
border: 1px solid #444;
border-radius: 0.25em;
-moz-border-radius: 0.25em;
-webkit-border-radius: 0.25em;
font-family: Arial,Helvetica,Sans-serif;
font-size: 90%;
}
.datepick-rtl {
direction: rtl;
}
.datepick-popup {
z-index: 1000;
}
.datepick-disable {
position: absolute;
z-index: 100;
background-color: white;
opacity: 0.5;
filter: alpha(opacity=50);
}
.datepick a {
color: #fff;
text-decoration: none;
}
.datepick a.datepick-disabled {
color: #888;
cursor: auto;
}
.datepick button {
margin: 0.25em;
padding: 0.125em 0em;
background-color: #fcc;
border: none;
border-radius: 0.25em;
-moz-border-radius: 0.25em;
-webkit-border-radius: 0.25em;
font-weight: bold;
}
.datepick-nav, .datepick-ctrl {
float: left;
width: 100%;
background-color: #000;
color: #fff;
font-size: 90%;
font-weight: bold;
}
.datepick-ctrl {
background-color: #600;
}
.datepick-cmd {
width: 30%;
}
.datepick-cmd:hover {
background-color: #777;
}
.datepick-ctrl .datepick-cmd:hover {
background-color: #f08080;
}
.datepick-cmd-prevJump, .datepick-cmd-nextJump {
width: 8%;
}
a.datepick-cmd {
height: 1.5em;
}
button.datepick-cmd {
text-align: center;
}
.datepick-cmd-prev, .datepick-cmd-prevJump, .datepick-cmd-clear {
float: left;
padding-left: 2%;
}
.datepick-cmd-current, .datepick-cmd-today {
float: left;
width: 35%;
text-align: center;
}
.datepick-cmd-next, .datepick-cmd-nextJump, .datepick-cmd-close {
float: right;
padding-right: 2%;
text-align: right;
}
.datepick-rtl .datepick-cmd-prev, .datepick-rtl .datepick-cmd-prevJump,
.datepick-rtl .datepick-cmd-clear {
float: right;
padding-left: 0%;
padding-right: 2%;
text-align: right;
}
.datepick-rtl .datepick-cmd-current, .datepick-rtl .datepick-cmd-today {
float: right;
}
.datepick-rtl .datepick-cmd-next, .datepick-rtl .datepick-cmd-nextJump,
.datepick-rtl .datepick-cmd-close {
float: left;
padding-left: 2%;
padding-right: 0%;
text-align: left;
}
.datepick-month-nav {
float: left;
background-color: #777;
text-align: center;
}
.datepick-month-nav div {
float: left;
width: 12.5%;
margin: 1%;
padding: 1%;
}
.datepick-month-nav span {
color: #888;
}
.datepick-month-row {
clear: left;
}
.datepick-month {
float: left;
width: 15em;
border: 1px solid #444;
text-align: center;
}
.datepick-month-header, .datepick-month-header select, .datepick-month-header input {
height: 1.5em;
background-color: #444;
color: #fff;
font-weight: bold;
}
.datepick-month-header select, .datepick-month-header input {
height: 1.4em;
margin: 0em;
padding: 0em;
border: none;
font-size: 100%;
}
.datepick-month-header input {
position: absolute;
display: none;
}
.datepick-month table {
width: 100%;
border-collapse: collapse;
}
.datepick-month thead {
border-bottom: 1px solid #aaa;
}
.datepick-month th, .datepick-month td {
margin: 0em;
padding: 0em;
font-weight: normal;
text-align: center;
}
.datepick-month th {
border: 1px solid #777;
}
.datepick-month th, .datepick-month th a {
background-color: #777;
color: #fff;
}
.datepick-month td {
background-color: #eee;
border: 1px solid #aaa;
}
.datepick-month td.datepick-week {
border: 1px solid #777;
}
.datepick-month td.datepick-week * {
background-color: #777;
color: #fff;
border: none;
}
.datepick-month a {
display: block;
width: 100%;
padding: 0.125em 0em;
background-color: #eee;
color: #000;
text-decoration: none;
}
.datepick-month span {
display: block;
width: 100%;
padding: 0.125em 0em;
}
.datepick-month td span {
color: #888;
}
.datepick-month td .datepick-other-month {
background-color: #fff;
}
.datepick-month td .datepick-weekend {
background-color: #ddd;
}
.datepick-month td .datepick-today {
background-color: #f0c0c0;
}
.datepick-month td .datepick-highlight {
background-color: #f08080;
}
.datepick-month td .datepick-selected {
background-color: #777;
color: #fff;
}
.datepick-month th.datepick-week {
background-color: #777;
color: #fff;
}
.datepick-status {
clear: both;
background-color: #ddd;
text-align: center;
}
.datepick-clear-fix {
clear: both;
}
/* Smoothness style sheet for jQuery Datepicker v5.0.1. */
.datepick {
background-color: #fff;
color: #222;
border: 1px solid #aaa;
border-radius: 0.25em;
-moz-border-radius: 0.25em;
-webkit-border-radius: 0.25em;
font-family: Arial,Helvetica,Sans-serif;
font-size: 90%;
}
.datepick-rtl {
direction: rtl;
}
.datepick-popup {
z-index: 1000;
}
.datepick-disable {
position: absolute;
z-index: 100;
background-color: white;
opacity: 0.5;
filter: alpha(opacity=50);
}
.datepick a {
color: #222;
text-decoration: none;
}
.datepick a.datepick-disabled {
color: #888;
cursor: auto;
}
.datepick button {
margin: 0.25em;
padding: 0.125em 0em;
background-color: #fcc;
border: none;
border-radius: 0.25em;
-moz-border-radius: 0.25em;
-webkit-border-radius: 0.25em;
font-weight: bold;
}
.datepick-nav, .datepick-ctrl {
float: left;
width: 100%;
background-color: #fff;
font-size: 90%;
font-weight: bold;
}
.datepick-ctrl {
background-color: #fee6e3;
}
.datepick-cmd {
width: 30%;
}
.datepick-cmd:hover {
background-color: #e0e0e0;
}
.datepick-ctrl .datepick-cmd:hover {
background-color: #f08080;
}
.datepick-cmd-prevJump, .datepick-cmd-nextJump {
width: 8%;
}
a.datepick-cmd {
height: 1.5em;
}
button.datepick-cmd {
text-align: center;
}
.datepick-cmd-prev, .datepick-cmd-prevJump, .datepick-cmd-clear {
float: left;
padding-left: 2%;
}
.datepick-cmd-current, .datepick-cmd-today {
float: left;
width: 35%;
text-align: center;
}
.datepick-cmd-next, .datepick-cmd-nextJump, .datepick-cmd-close {
float: right;
padding-right: 2%;
text-align: right;
}
.datepick-rtl .datepick-cmd-prev, .datepick-rtl .datepick-cmd-prevJump,
.datepick-rtl .datepick-cmd-clear {
float: right;
padding-left: 0%;
padding-right: 2%;
text-align: right;
}
.datepick-rtl .datepick-cmd-current, .datepick-rtl .datepick-cmd-today {
float: right;
}
.datepick-rtl .datepick-cmd-next, .datepick-rtl .datepick-cmd-nextJump,
.datepick-rtl .datepick-cmd-close {
float: left;
padding-left: 2%;
padding-right: 0%;
text-align: left;
}
.datepick-month-nav {
float: left;
text-align: center;
}
.datepick-month-nav div {
float: left;
width: 12.5%;
margin: 1%;
padding: 1%;
}
.datepick-month-nav span {
color: #888;
}
.datepick-month-row {
clear: left;
}
.datepick-month {
float: left;
width: 15em;
border: 1px solid #aaa;
text-align: center;
}
.datepick-month-header, .datepick-month-header select, .datepick-month-header input {
height: 1.5em;
background-color: #e0e0e0;
color: #222;
font-weight: bold;
}
.datepick-month-header select, .datepick-month-header input {
height: 1.4em;
border: none;
}
.datepick-month-header input {
position: absolute;
display: none;
}
.datepick-month table {
width: 100%;
border-collapse: collapse;
}
.datepick-month thead {
border-bottom: 1px solid #aaa;
}
.datepick-month th, .datepick-month td {
margin: 0em;
padding: 0em;
font-weight: normal;
text-align: center;
}
.datepick-month thead tr {
border: 1px solid #aaa;
}
.datepick-month td {
background-color: #eee;
border: 1px solid #aaa;
}
.datepick-month td.datepick-week * {
background-color: #e0e0e0;
color: #222;
border: none;
}
.datepick-month a {
display: block;
width: 100%;
padding: 0.125em 0em;
background-color: #eee;
color: #000;
text-decoration: none;
}
.datepick-month span {
display: block;
width: 100%;
padding: 0.125em 0em;
}
.datepick-month td span {
color: #888;
}
.datepick-month td .datepick-other-month {
background-color: #fff;
}
.datepick-month td .datepick-weekend {
background-color: #ddd;
}
.datepick-month td .datepick-today {
background-color: #fbf9ee;
}
.datepick-month td .datepick-highlight {
background-color: #dadada;
}
.datepick-month td .datepick-selected {
background-color: #fcc;
}
.datepick-status {
clear: both;
text-align: center;
}
.datepick-clear-fix {
clear: both;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
$(document).ready(function() {
$('#multidate').datepick({
multiSelect: 200,
dateFormat: 'dd/mm/yyyy',
showTrigger: '#calImg'
});
$('#finsert').submit(function(e) {
var formObj = $(this);
var formURL = formObj.attr('action');
var formData = new FormData(this);
$.blockUI({ css: {
border: 'none',
padding: '15px',
backgroundColor: '#000',
'-webkit-border-radius': '10px',
'-moz-border-radius': '10px',
opacity: .5,
color: '#fff'
} });
$.ajax({
url: formURL,
type: 'POST',
data: formData,
mimeType:"multipart/form-data",
contentType: false,
cache : false,
processData: false,
success: function(data) {
if(data == 1){
$('#gagal').modal('show');
$.unblockUI();
}
if(data == 2){
$('#sukses').modal('show');
window.setTimeout(function() {
location.href = "?p=libur_kalender";
}, 2000);
$.unblockUI();
}
}
});
return false;
});
});
\ No newline at end of file
<?php
namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\Gaji;
use backend\modules\ubux\models\Laporan;
use backend\modules\ubux\models\search\GajiSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* GajiController implements the CRUD actions for Gaji model.
*/
class GajiController extends Controller
{
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
}
/**
* Lists all Gaji models.
* @return mixed
*/
public function actionIndex()
{
$searchModel = new GajiSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single Gaji model.
* @param integer $id
* @return mixed
*/
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
}
/**
* Creates a new Gaji model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate()
{
$model = new Gaji();
if ($model->load(Yii::$app->request->post())) {
if ($model->validate()) {
$model->save();
return $this->redirect(['view', 'id' => $model->gaji_id]);
}else{
$errors = $model->$errors;
print_r(array_values($errors));
}
} else {
return $this->render('create', [
'model' => $model,
]);
}
}
/*public function actionCreate()
{
$model = new Gaji();
if ($model->load(Yii::$app->request->post())) {
$Pmodel = new Laporan();
$Pmodel->bulan_laporan = $model->bulan_laporan;
if($Pmodel->save()){
$model->laporan_id = $Pmodel->laporan_id;
if($model->validate()){
// echo $model->aktif_star . " " . $model->aktif_end . " " . $Pmodel->tgl_lahir . " " . $Pmodel->alamat;
$model->save();
return $this->redirect(['view', 'id' => $model->gaji_id]);
}else{
$errors = $model->errors;
print_r(array_values($errors));
}
}else{
$errors = $Pmodel->errors;
print_r(array_values($errors));
}
} else {
return $this->render('create', [
'model' => $model,
]);
}
}*/
/**
* Updates an existing Gaji model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
* @return mixed
*/
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->gaji_id]);
} else {
return $this->render('update', [
'model' => $model,
]);
}
}
/**
* Deletes an existing Gaji model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
return $this->redirect(['index']);
}
/**
* Finds the Gaji model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return Gaji the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = Gaji::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
public function actionImport($id){
$searchModel = new GajiSearch();
$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\Gaji;
$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,
]);
}
public function actionPrint($id)
{
$pdf_content = $this->renderPartial('view-pdf',[
'model' => $this->findModel($id),
]);
$mpdf = new mPDF();
$mpdf->writeHTML($pdf_content);
$mpdf->Output();
exit();
}
}
......@@ -4,21 +4,19 @@ namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\JamKerja;
use backend\modules\ubux\models\Hrdxpegawai;
use backend\modules\ubux\models\search\JamKerjaSearch;
use backend\modules\ubux\models\Pegawai;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\data\ActiveDataProvider;
use backend\modules\ubux\models\Satpam;
/**
* JamKerjaController implements the CRUD actions for JamKerja model.
*/
class JamKerjaController extends Controller
{
public function behaviors()
{
{
return [
'verbs' => [
'class' => VerbFilter::className(),
......@@ -101,7 +99,7 @@ class JamKerjaController extends Controller
*/
public function actionDelete($id)
{
$this->findModel($id)->softDelete();
$this->findModel($id)->delete();
return $this->redirect(['index']);
}
......@@ -122,15 +120,128 @@ class JamKerjaController extends Controller
}
}
public function showSatpam(){
$id = "satpam";
$dataProvider = new ActiveDataProvider([
'query' => Hrdxpegawai::find()->where("posisi = 'satpam'"),
'pagination' => [
'pageSize' => 20,
],
]);
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;
//$baseRow2 = 3;
while(!empty($sheetData[$baseRow]['A'])){
$model = new \backend\modules\ubux\models\JamKerja;
$model2 = new \backend\modules\ubux\models\Satpam;
$model3 = new \backend\modules\ubux\models\Lembur;
$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;
$model2->nama = (string)$sheetData[$baseRow]['F'];
$model2->nip = (string)$sheetData[$baseRow]['E'];
if(strpos($model2->nip,'H')!==false){
$model2->status='Harian';
}else
$model2->status = 'Tetap';
$idSatpam;
//if(!($sheetData[$baseRow]['F'] == $sheetData[$baseRow-1]['F'])){
//if($)
if(!Satpam::find()->where(['nip'=>$model->nip])->andWhere(['laporan_id'=>$id])->exists()){
$model2->laporan_id = $id;
$model2->save();
$idSatpam=$model2->satpam_id;
}
else{
$satpam=Satpam::find()->where(['nip'=>$model->nip])->andWhere(['laporan_id' => $id])->one();
$idSatpam = $satpam->satpam_id;
}
//}
$model->satpam_id = $idSatpam;
$model->save();
$baseRow++;
}
Yii::$app->getSession()->setFlash('success','Success');
return $this->redirect(['/ubux/laporan/index']);
}else{
Yii::$app->getSession()->setFlash('error','Error');
return $this->redirect(['import']);
}
}
return $dataProvider;
return $this->render('import',[
'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,
// ]);
// }
}
......@@ -4,13 +4,15 @@ namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\Laporan;
use backend\modules\ubux\models\JamKerja;
use backend\modules\ubux\models\Satpam;
use backend\modules\ubux\models\Gaji;
use backend\modules\ubux\models\search\LaporanSearch;
use backend\modules\ubux\models\search\GajiSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use mPDF;
/**
* LaporanController implements the CRUD actions for Laporan model.
*/
......@@ -43,6 +45,7 @@ class LaporanController extends Controller
]);
}
/**
* Displays a single Laporan model.
* @param integer $id
......@@ -50,21 +53,16 @@ class LaporanController extends Controller
*/
public function actionView($id)
{
$model = Gaji::find()->where(['laporan_id' => $id])->All();
// foreach($model as $data){
// echo $data->laporan_id;
// echo $data->nama;
// }
$model = Satpam::find()->where(['laporan_id' => $id])->All();
return $this->render('view',
array('model' => $this->findModel($id), 'gajiModel' => $model)
);
}
public function actionViewDetail($id, $nip)
public function actionViewDetail($id, $satpam_id)
{
$model = Gaji::find()->where(['laporan_id' => $id])->andWhere(['nip' => $nip])->All();
$model = JamKerja::find()->where(['laporan_id' => $id])->andWhere(['satpam_id' => $satpam_id])->All();
return $this->render('view-detail',[
'model' => $model,
......@@ -116,7 +114,7 @@ class LaporanController extends Controller
*/
public function actionDelete($id)
{
$this->findModel($id)->softDelete();
$this->findModel($id)->softdelete();
return $this->redirect(['index']);
}
......@@ -137,18 +135,6 @@ class LaporanController extends Controller
}
}
public function showAbsen(){
//$id = "satpam";
$dataProvider = new ActiveDataProvider([
'query' => Gaji::find()->where("laporan_id = laporan_id"),
'pagination' => [
'pageSize' => 20,
],
]);
return $dataProvider;
}
public function actionPrint($id)
{
$pdf_content = $this->renderPartial('view-pdf',[
......
......@@ -3,48 +3,48 @@
namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\Satpam;
use backend\modules\ubux\models\Hrdxpegawai;
use backend\modules\ubux\models\search\SatpamSearch;
use backend\modules\ubux\models\Lembur;
use backend\modules\ubux\models\search\LemburSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\data\ActiveDataProvider;
/**
* SatpamController implements the CRUD actions for Satpam model.
* LemburController implements the CRUD actions for Lembur model.
*/
class SatpamController extends Controller
class LemburController extends Controller
{
public function behaviors()
{
return [
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
'delete' => ['post'],
],
],
];
}
/**
* Lists all Satpam models.
* Lists all Lembur models.
* @return mixed
*/
public function actionIndex()
{
$searchModel = new SatpamSearch();
$searchModel = new LemburSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('view', [
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single Satpam model.
* Displays a single Lembur model.
* @param integer $id
* @return mixed
*/
......@@ -56,16 +56,25 @@ class SatpamController extends Controller
}
/**
* Creates a new Satpam model.
* Creates a new Lembur model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate()
public function actionCreate($id)
{
$model = new Satpam();
$model = new Lembur();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
if ($model->load(Yii::$app->request->post())) {
// $models = explode(",", $model->tanggal);
// print_r($models);die();
$model->laporan_id = $id;
if($model->validate()){
$model->save();
return $this->redirect(['laporan/view', 'id' => $model->laporan_id]);
}
} else {
return $this->render('create', [
'model' => $model,
......@@ -74,7 +83,7 @@ class SatpamController extends Controller
}
/**
* Updates an existing Satpam model.
* Updates an existing Lembur model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
* @return mixed
......@@ -84,7 +93,7 @@ class SatpamController extends Controller
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
return $this->redirect(['view', 'id' => $model->tanggal_lembur_id]);
} else {
return $this->render('update', [
'model' => $model,
......@@ -93,44 +102,31 @@ class SatpamController extends Controller
}
/**
* Deletes an existing Satpam model.
* Deletes an existing Lembur model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
$this->findModel($id)->softdelete();
return $this->redirect(['index']);
}
/**
* Finds the Satpam model based on its primary key value.
* Finds the Lembur model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return Satpam the loaded model
* @return Lembur the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = Satpam::findOne($id)) !== null) {
if (($model = Lembur::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
public function showSatpam(){
$id = "satpam";
$dataProvider = new ActiveDataProvider([
'query' => Hrdxpegawai::find()->where("posisi = 'satpam'"),
'pagination' => [
'pageSize' => 20,
],
]);
return $dataProvider;
}
}
......@@ -4,12 +4,15 @@ namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\Satpam;
use backend\modules\ubux\models\Hrdxpegawai;
use backend\modules\ubux\models\JamKerja;
use backend\modules\ubux\models\Laporan;
use backend\modules\ubux\models\Lembur;
use backend\modules\ubux\models\Pegawai;
use backend\modules\ubux\models\search\SatpamSearch;
use backend\modules\ubux\models\search\LaporanSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\data\ActiveDataProvider;
/**
* SatpamController implements the CRUD actions for Satpam model.
......@@ -17,12 +20,13 @@ use yii\data\ActiveDataProvider;
class SatpamController extends Controller
{
public function behaviors()
{
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
'delete' => ['post'],
],
],
];
......@@ -34,7 +38,7 @@ class SatpamController extends Controller
*/
public function actionIndex()
{
$searchModel = new SatpamSearch();
$searchModel = new LaporanSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
......@@ -43,27 +47,26 @@ class SatpamController extends Controller
]);
}
public function actionViewSatpam()
{
$searchModel = new SatpamSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('view_satpam', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single Satpam model.
* @param integer $id
* @return mixed
*/
public function actionView($id)
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
$model = Satpam::find()->where(['laporan_id' => $id])->All();
return $this->render('view',
array('model' => $this->findModelLaporan($id), 'gajiModel' => $model)
);
}
protected function findModelLaporan($id)
{
if (($model = Laporan::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
/**
......@@ -111,7 +114,7 @@ class SatpamController extends Controller
*/
public function actionDelete($id)
{
$this->findModel($id)->softDelete();
$this->findModel($id)->softdelete();
return $this->redirect(['index']);
}
......@@ -131,16 +134,136 @@ class SatpamController extends Controller
throw new NotFoundHttpException('The requested page does not exist.');
}
}
public function actionAddGaji($id, $satpam_id)
{
$model = $this->findModel($satpam_id);
if($model->status=='Tetap'){
if($model->total_gaji==NULL){
if ($model->load(Yii::$app->request->post()) && $model->save()) {
\Yii::$app->messenger->addSuccessFlash("Gaji ".$model['nama']." pada bulan ini berhasil dimasukkan");
return $this->redirect(['laporan/view', 'id' => $model->laporan_id]);
}else {
return $this->render('add-gaji', [
'model' => $model,
]);
}
}else{
\Yii::$app->messenger->addWarningFlash("Gaji ".$model->nama." pada bulan ini sudah ada");
return $this->redirect(['laporan/view', 'id' => $model->laporan_id]);
}
}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->total_gaji==NULL){
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 dimasukkan");
return $this->redirect(['laporan/view', 'id' => $model->laporan_id]);
}
}
else{
return $this->render('add-gaji', [
'model' => $model,
'jumlah' => $jlh,
]);
}
}else{
\Yii::$app->messenger->addWarningFlash("Gaji ".$model->nama." pada bulan ini sudah ada");
return $this->redirect(['laporan/view', 'id' => $model->laporan_id]);
}
}
}
public function actionAddLembur($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();
// $models2 = Lembur::find()->where(['laporan_id'=>$id])->All();
$cek = $modelCek->tanggal;
$jlh=0;
$lembur = Lembur::find()->where(['laporan_id' => $id])->one();
$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();
public function showSatpam(){
$id = "satpam";
$dataProvider = new ActiveDataProvider([
'query' => Hrdxpegawai::find()->where("posisi = 'satpam'"),
'pagination' => [
'pageSize' => 20,
],
]);
return $dataProvider;
$data = array();
foreach ($models as $obj) {
$data[$obj->tanggal] = $obj;
}
foreach($data as $val){
foreach ($mod as $val2) {
if($val->tanggal == $val2){
$jlh++;
}
}
}
// echo $jlh;die();
// echo "<br>";
// foreach ($models2 as $key) {
// echo $key->tanggal."<br>";
// }
// die();
if($model->gaji_lembur==NULL){
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 dimasukkan");
return $this->redirect(['laporan/view', 'id' => $model->laporan_id]);
}
}
else{
return $this->render('add-lembur', [
'model' => $model,
]);
}
}else{
\Yii::$app->messenger->addWarningFlash("Gaji lembur".$model->nama." pada bulan ini sudah ada");
return $this->redirect(['laporan/view', 'id' => $model->laporan_id]);
}
}
}
......@@ -3,36 +3,38 @@
namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\Haha;
use backend\modules\ubux\models\search\HahaSearch;
use backend\modules\ubux\models\TanggalLembur;
use backend\modules\ubux\models\search\TanggalLemburSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* HahaController implements the CRUD actions for Haha model.
* TanggalLemburController implements the CRUD actions for TanggalLembur model.
*/
class HahaController extends Controller
class TanggalLemburController extends Controller
{
public function behaviors()
{
return [
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
'delete' => ['post'],
],
],
];
}
}
/**
* Lists all Haha models.
* Lists all TanggalLembur models.
* @return mixed
*/
public function actionIndex()
{
$searchModel = new HahaSearch();
$searchModel = new TanggalLemburSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
......@@ -42,7 +44,7 @@ class HahaController extends Controller
}
/**
* Displays a single Haha model.
* Displays a single TanggalLembur model.
* @param integer $id
* @return mixed
*/
......@@ -54,16 +56,16 @@ class HahaController extends Controller
}
/**
* Creates a new Haha model.
* Creates a new TanggalLembur model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate()
{
$model = new Haha();
$model = new TanggalLembur();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
return $this->redirect(['view', 'id' => $model->tanggal_lembur_id]);
} else {
return $this->render('create', [
'model' => $model,
......@@ -72,7 +74,7 @@ class HahaController extends Controller
}
/**
* Updates an existing Haha model.
* Updates an existing TanggalLembur model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
* @return mixed
......@@ -82,7 +84,7 @@ class HahaController extends Controller
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
return $this->redirect(['view', 'id' => $model->tanggal_lembur_id]);
} else {
return $this->render('update', [
'model' => $model,
......@@ -91,28 +93,28 @@ class HahaController extends Controller
}
/**
* Deletes an existing Haha model.
* Deletes an existing TanggalLembur model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
$this->findModel($id)->softdelete();
return $this->redirect(['index']);
}
/**
* Finds the Haha model based on its primary key value.
* Finds the TanggalLembur model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return Haha the loaded model
* @return TanggalLembur the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = Haha::findOne($id)) !== null) {
if (($model = TanggalLembur::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
......
<?php
namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\TotalGaji;
use backend\modules\ubux\models\Laporan;
use backend\modules\ubux\models\Gaji;
use backend\modules\ubux\models\search\TotalGajiSearch;
use yii\data\ArrayDataProvider;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* TotalGajiController implements the CRUD actions for TotalGaji model.
*/
class TotalGajiController extends Controller
{
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
}
/**
* Lists all TotalGaji models.
* @return mixed
*/
public function actionIndex()
{
$searchModel = new TotalGajiSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single TotalGaji model.
* @param integer $id
* @return mixed
*/
public function actionView($id)
{
// return $this->render('view', [
// 'model' => $this->findModel($id),
// ]);
return $this->redirect(['/ubux/laporan/view', 'id' => $id]);
}
/**
* Creates a new TotalGaji model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate($id, $nip)
{
$model = new TotalGaji();
// $modelSearch = $model->find()->where('nip = '.$id)->one();
$gaji = new Gaji();
$modelCount = $gaji->find()->where('laporan_id = '.$id)->andWhere(['nip' => $nip])->All();
$count = count($modelCount);
if ($model->load(Yii::$app->request->post())) {
$model->laporan_id = $id;
$total_gaji = $count * $model['total_gaji'];
$gajiku = 'Rp.'.$total_gaji;
$model->satpam_id = $nip;
$model->total_gaji = $gajiku;
if ($model->validate()) {
$model->save();
// $modelSearch->save();
return $this->redirect(['view', 'id' => $model->laporan_id]);
} else {
$errors = $model->$errors;
print_r(array_values($errors));
}
} else {
return $this->render('create', [
'model' => $model,
]);
}
}
/**
* Updates an existing TotalGaji model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
* @return mixed
*/
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->total_id]);
} else {
return $this->render('update', [
'model' => $model,
]);
}
}
/**
* Deletes an existing TotalGaji model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
return $this->redirect(['index']);
}
/**
* Finds the TotalGaji model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return TotalGaji the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = TotalGaji::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
}
<?php
namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\Uang;
use backend\modules\ubux\models\search\UangSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* UangController implements the CRUD actions for Uang model.
*/
class UangController extends Controller
{
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
}
/**
* Lists all Uang models.
* @return mixed
*/
public function actionIndex()
{
$searchModel = new UangSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single Uang model.
* @param string $id
* @return mixed
*/
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
}
/**
* Creates a new Uang model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate()
{
$model = new Uang();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->nip]);
} else {
return $this->render('create', [
'model' => $model,
]);
}
}
/**
* Updates an existing Uang model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param string $id
* @return mixed
*/
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->nip]);
} else {
return $this->render('update', [
'model' => $model,
]);
}
}
/**
* Deletes an existing Uang model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param string $id
* @return mixed
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
return $this->redirect(['index']);
}
/**
* Finds the Uang model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param string $id
* @return Uang the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = Uang::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
}
<?php
namespace backend\modules\ubux\models;
use Yii;
use common\behaviors\TimestampBehavior;
use common\behaviors\BlameableBehavior;
use common\behaviors\DeleteBehavior;
/**
* This is the model class for table "ubux_gaji".
*
* @property integer $gaji_id
* @property string $tanggal_scan
* @property string $tanggal
* @property string $jam
* @property string $pin
* @property string $nip
* @property string $nama
* @property string $jabatan
* @property string $departemen
* @property string $kantor
* @property string $verifikasi
* @property string $i_o
* @property string $workcode
* @property string $mesin
* @property integer $deleted
* @property string $deleted_at
* @property string $created_at
* @property string $updated_at
* @property string $deleted_by
* @property string $created_by
* @property string $updated_by
* @property integer $laporan_id
*
* @property UbuxLaporan $laporan
*/
class Gaji extends \yii\db\ActiveRecord
{
/**
* behaviour to add created_at and updatet_at field with current datetime (timestamp)
* and created_by and updated_by field with current user id (blameable)
*/
public function behaviors(){
return [
'timestamp' => [
'class' => TimestampBehavior::className(),
],
'blameable' => [
'class' => BlameableBehavior::className(),
],
'delete' => [
'class' => DeleteBehavior::className(),
]
];
}
/**
* @inheritdoc
*/
public static function tableName()
{
return 'ubux_gaji';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['tanggal_scan'], 'required'],
[['tanggal_scan', 'tanggal', 'jam', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['deleted', 'laporan_id'], 'integer'],
[['pin', 'nip', 'nama', 'jabatan', 'departemen', 'kantor', 'verifikasi', 'i_o', 'workcode', 'mesin'], 'string', 'max' => 45],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['laporan_id'], 'exist', 'skipOnError' => true, 'targetClass' => Laporan::className(), 'targetAttribute' => ['laporan_id' => 'laporan_id']]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'gaji_id' => 'Gaji ID',
'tanggal_scan' => 'Tanggal Scan',
'tanggal' => 'Tanggal',
'jam' => 'Jam',
'pin' => 'Pin',
'nip' => 'Nip',
'nama' => 'Nama',
'jabatan' => 'Jabatan',
'departemen' => 'Departemen',
'kantor' => 'Kantor',
'verifikasi' => 'Verifikasi',
'i_o' => 'I O',
'workcode' => 'Workcode',
'mesin' => 'Mesin',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
'deleted_by' => 'Deleted By',
'created_by' => 'Created By',
'updated_by' => 'Updated By',
'laporan_id' => 'Laporan ID',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getLaporan()
{
return $this->hasOne(Laporan::className(), ['laporan_id' => 'laporan_id']);
}
}
<?php
namespace backend\modules\ubux\models;
use Yii;
use common\behaviors\TimestampBehavior;
use common\behaviors\BlameableBehavior;
use common\behaviors\DeleteBehavior;
/**
* This is the model class for table "ubux_gaji".
*
* @property integer $gaji_id
* @property string $tanggal_scan
* @property string $tanggal
* @property string $jam
* @property integer $pin
* @property integer $nip
* @property string $nama
* @property string $jabatan
* @property string $departemen
* @property string $kantor
* @property integer $verifikasi
* @property integer $i_o
* @property integer $workcode
* @property string $mesin
* @property integer $deleted
* @property string $deleted_at
* @property string $created_at
* @property string $updated_at
* @property string $deleted_by
* @property string $created_by
* @property string $updated_by
* @property integer $laporan_id
*
* @property UbuxLaporan $laporan
*/
class Gaji extends \yii\db\ActiveRecord
{
//public $bulanLaporan;
/**
* behaviour to add created_at and updatet_at field with current datetime (timestamp)
* and created_by and updated_by field with current user id (blameable)
*/
public function behaviors(){
return [
'timestamp' => [
'class' => TimestampBehavior::className(),
],
'blameable' => [
'class' => BlameableBehavior::className(),
],
'delete' => [
'class' => DeleteBehavior::className(),
]
];
}
/**
* @inheritdoc
*/
public static function tableName()
{
return 'ubux_gaji';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['tanggal_scan'], 'required'],
[['tanggal_scan', 'tanggal', 'jam', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['pin', 'nip', 'verifikasi', 'i_o', 'workcode', 'deleted', 'laporan_id'], 'integer'],
[['nama', 'jabatan', 'departemen', 'kantor', 'mesin'], 'string', 'max' => 45],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['laporan_id'], 'exist', 'skipOnError' => true, 'targetClass' => Laporan::className(), 'targetAttribute' => ['laporan_id' => 'laporan_id']]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'gaji_id' => 'Gaji ID',
'tanggal_scan' => 'Tanggal Scan',
'tanggal' => 'Tanggal',
'jam' => 'Jam',
'pin' => 'Pin',
'nip' => 'Nip',
'nama' => 'Nama',
'jabatan' => 'Jabatan',
'departemen' => 'Departemen',
'kantor' => 'Kantor',
'verifikasi' => 'Verifikasi',
'i_o' => 'I O',
'workcode' => 'Workcode',
'mesin' => 'Mesin',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
'deleted_by' => 'Deleted By',
'created_by' => 'Created By',
'updated_by' => 'Updated By',
'laporan_id' => 'Laporan ID',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getLaporan()
{
return $this->hasOne(Laporan::className(), ['laporan_id' => 'laporan_id']);
}
}
<?php
namespace backend\modules\ubux\models;
use Yii;
use common\behaviors\TimestampBehavior;
use common\behaviors\BlameableBehavior;
use common\behaviors\DeleteBehavior;
/**
* This is the model class for table "haha".
*
* @property integer $id
* @property string $nip
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
* @property string $created_at
* @property string $created_by
* @property string $updated_at
* @property string $updated_by
* @property integer $pegawai_id
*
* @property HrdxPegawai $pegawai
*/
class Haha extends \yii\db\ActiveRecord
{
/**
* behaviour to add created_at and updatet_at field with current datetime (timestamp)
* and created_by and updated_by field with current user id (blameable)
*/
public function behaviors(){
return [
'timestamp' => [
'class' => TimestampBehavior::className(),
],
'blameable' => [
'class' => BlameableBehavior::className(),
],
'delete' => [
'class' => DeleteBehavior::className(),
]
];
}
/**
* @inheritdoc
*/
public static function tableName()
{
return 'haha';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['deleted', 'pegawai_id'], 'integer'],
[['deleted_at', 'created_at', 'updated_at'], 'safe'],
[['nip'], 'string', 'max' => 45],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['pegawai_id'], 'exist', 'skipOnError' => true, 'targetClass' => Pegawai::className(), 'targetAttribute' => ['pegawai_id' => 'pegawai_id']]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'nip' => 'Nip',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
'created_at' => 'Created At',
'created_by' => 'Created By',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
'pegawai_id' => 'Pegawai ID',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getPegawai()
{
return $this->hasOne(HrdxPegawai::className(), ['pegawai_id' => 'pegawai_id']);
}
}
......@@ -12,17 +12,29 @@ use common\behaviors\DeleteBehavior;
* This is the model class for table "ubux_jam_kerja".
*
* @property integer $jam_kerja_id
* @property string $total_absen
* @property integer $laporan_id
* @property integer $satpam_id
* @property string $tanggal_scan
* @property string $tanggal
* @property string $jam
* @property string $pin
* @property string $nip
* @property string $nama
* @property string $jabatan
* @property string $departemen
* @property string $kantor
* @property string $verifikasi
* @property string $i_o
* @property string $workcode
* @property string $mesin
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
* @property string $created_at
* @property string $updated_at
* @property string $created_by
* @property string $updated_at
* @property string $updated_by
*
* @property UbuxGaji[] $ubuxGajis
* @property UbuxSatpam $satpam
*/
class JamKerja extends \yii\db\ActiveRecord
......@@ -60,11 +72,10 @@ class JamKerja extends \yii\db\ActiveRecord
public function rules()
{
return [
[['total_absen'], 'required'],
[['satpam_id', 'deleted'], 'integer'],
[['deleted_at', 'created_at', 'updated_at'], 'safe'],
[['total_absen'], 'string', 'max' => 45],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['laporan_id', 'satpam_id', 'deleted'], 'integer'],
[['jam', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['jabatan'], 'required'],
[['tanggal_scan', 'tanggal', 'pin', 'nip', 'nama', 'jabatan', 'departemen', 'kantor', 'verifikasi', 'i_o', 'workcode', 'mesin', 'deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 45],
[['satpam_id'], 'exist', 'skipOnError' => true, 'targetClass' => Satpam::className(), 'targetAttribute' => ['satpam_id' => 'satpam_id']]
];
}
......@@ -76,14 +87,27 @@ class JamKerja extends \yii\db\ActiveRecord
{
return [
'jam_kerja_id' => 'Jam Kerja ID',
'total_absen' => 'Total Absen',
'laporan_id' => 'Laporan ID',
'satpam_id' => 'Satpam ID',
'tanggal_scan' => 'Tanggal Scan',
'tanggal' => 'Tanggal',
'jam' => 'Jam',
'pin' => 'Pin',
'nip' => 'Nip',
'nama' => 'Nama',
'jabatan' => 'Jabatan',
'departemen' => 'Departemen',
'kantor' => 'Kantor',
'verifikasi' => 'Verifikasi',
'i_o' => 'I O',
'workcode' => 'Workcode',
'mesin' => 'Mesin',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
'created_by' => 'Created By',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
];
}
......@@ -91,14 +115,6 @@ class JamKerja extends \yii\db\ActiveRecord
/**
* @return \yii\db\ActiveQuery
*/
public function getUbuxGajis()
{
return $this->hasMany(Gaji::className(), ['jam_kerja_id' => 'jam_kerja_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getSatpam()
{
return $this->hasOne(Satpam::className(), ['satpam_id' => 'satpam_id']);
......
......@@ -12,8 +12,8 @@ use common\behaviors\DeleteBehavior;
* This is the model class for table "ubux_laporan".
*
* @property integer $laporan_id
* @property string $bulan_laporan
* @property string $tahun_laporan
* @property string $bulan
* @property string $tahun
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
......@@ -21,11 +21,6 @@ use common\behaviors\DeleteBehavior;
* @property string $created_by
* @property string $updated_at
* @property string $updated_by
* @property integer $jam_kerja_id
*
* @property UbuxGaji[] $ubuxGajis
* @property UbuxJamKerja $jamKerja
* @property UbuxTotalGaji[] $ubuxTotalGajis
*/
class Laporan extends \yii\db\ActiveRecord
{
......@@ -62,11 +57,10 @@ class Laporan extends \yii\db\ActiveRecord
public function rules()
{
return [
[['tahun_laporan', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['deleted', 'jam_kerja_id'], 'integer'],
[['bulan_laporan'], 'string', 'max' => 45],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['jam_kerja_id'], 'exist', 'skipOnError' => true, 'targetClass' => JamKerja::className(), 'targetAttribute' => ['jam_kerja_id' => 'jam_kerja_id']]
[['tahun', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['deleted'], 'integer'],
[['bulan'], 'string', 'max' => 45],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32]
];
}
......@@ -77,8 +71,8 @@ class Laporan extends \yii\db\ActiveRecord
{
return [
'laporan_id' => 'Laporan ID',
'bulan_laporan' => 'Bulan Laporan',
'tahun_laporan' => 'Tahun Laporan',
'bulan' => 'Bulan',
'tahun' => 'Tahun',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
......@@ -86,31 +80,10 @@ class Laporan extends \yii\db\ActiveRecord
'created_by' => 'Created By',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
'jam_kerja_id' => 'Jam Kerja ID',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getGaji()
{
return $this->hasMany(Gaji::className(), ['laporan_id' => 'laporan_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getJamKerja()
{
return $this->hasOne(JamKerja::className(), ['jam_kerja_id' => 'jam_kerja_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getTotalGaji()
{
return $this->hasMany(TotalGaji::className(), ['laporan_id' => 'laporan_id']);
public function getGaji(){
return $this->hasMany(Gaji::className(),['laporan_id'=>'laporan_id']);
}
}
<?php
namespace backend\modules\ubux\models;
use Yii;
use common\behaviors\TimestampBehavior;
use common\behaviors\BlameableBehavior;
use common\behaviors\DeleteBehavior;
/**
* This is the model class for table "ubux_laporan".
*
* @property integer $laporan_id
* @property string $bulan_laporan
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
* @property string $created_at
* @property string $created_by
* @property string $updated_at
* @property string $updated_by
* @property integer $jam_kerja_id
*
* @property UbuxGaji[] $ubuxGajis
* @property UbuxJamKerja $jamKerja
*/
class Laporan extends \yii\db\ActiveRecord
{
/**
* behaviour to add created_at and updatet_at field with current datetime (timestamp)
* and created_by and updated_by field with current user id (blameable)
*/
public function behaviors(){
return [
'timestamp' => [
'class' => TimestampBehavior::className(),
],
'blameable' => [
'class' => BlameableBehavior::className(),
],
'delete' => [
'class' => DeleteBehavior::className(),
]
];
}
/**
* @inheritdoc
*/
public static function tableName()
{
return 'ubux_laporan';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['laporan_id', 'deleted', 'satpam_id'], 'integer'],
[['laporan_id', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['bulan_laporan', 'tahun_laporan'], 'string', 'max' => 45],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['satpam_id'], 'exist', 'skipOnError' => true, 'targetClass' => Satpam::className(), 'targetAttribute' => ['satpam_id' => 'satpam_id']]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'laporan_id' => 'Laporan ID',
'bulan_laporan' => 'Bulan Laporan',
'tahun_laporan' => 'Tahun Laporan',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
'created_at' => 'Created At',
'created_by' => 'Created By',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
'satpam_id' => 'Satpam ID',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getGaji(){
return $this->hasOne(Gaji::className(), ['laporan_id' => 'laporan_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getJamKerja()
{
return $this->hasOne(jamKerja::className(), ['jam_kerja_id' => 'jam_kerja_id']);
}
}
......@@ -9,22 +9,20 @@ use common\behaviors\BlameableBehavior;
use common\behaviors\DeleteBehavior;
/**
* This is the model class for table "ubux_total_gaji".
* This is the model class for table "ubux_lembur".
*
* @property integer $total_id
* @property string $total_gaji
* @property integer $lembur_id
* @property integer $laporan_id
* @property string $tanggal
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
* @property string $updated_at
* @property string $updated_by
* @property string $created_at
* @property string $created_by
* @property integer $laporan_id
*
* @property UbuxLaporan $laporan
* @property string $updated_at
* @property string $updated_by
*/
class TotalGaji extends \yii\db\ActiveRecord
class Lembur extends \yii\db\ActiveRecord
{
/**
......@@ -50,7 +48,7 @@ class TotalGaji extends \yii\db\ActiveRecord
*/
public static function tableName()
{
return 'ubux_total_gaji';
return 'ubux_lembur';
}
/**
......@@ -59,11 +57,10 @@ class TotalGaji extends \yii\db\ActiveRecord
public function rules()
{
return [
[['deleted', 'laporan_id'], 'integer'],
[['deleted_at', 'updated_at', 'created_at'], 'safe'],
[['total_gaji'], 'string', 'max' => 45],
[['deleted_by', 'updated_by', 'created_by'], 'string', 'max' => 32],
[['laporan_id'], 'exist', 'skipOnError' => true, 'targetClass' => Laporan::className(), 'targetAttribute' => ['laporan_id' => 'laporan_id']]
[['laporan_id', 'deleted'], 'integer'],
[['deleted_at', 'created_at', 'updated_at'], 'safe'],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 45],
[['tanggal'], 'string', 'max' => 500]
];
}
......@@ -73,24 +70,16 @@ class TotalGaji extends \yii\db\ActiveRecord
public function attributeLabels()
{
return [
'total_id' => 'Total ID',
'total_gaji' => 'Total Gaji',
'lembur_id' => 'Lembur ID',
'laporan_id' => 'Laporan ID',
'tanggal' => 'Tanggal',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
'created_at' => 'Created At',
'created_by' => 'Created By',
'laporan_id' => 'Laporan ID',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getLaporan()
{
return $this->hasOne(Laporan::className(), ['laporan_id' => 'laporan_id']);
}
}
......@@ -88,9 +88,8 @@ use common\behaviors\DeleteBehavior;
* @property PrklCourseUnit[] $prklCourseUnits
* @property PrklKrsMhs[] $prklKrsMhs
* @property UbuxSatpam[] $ubuxSatpams
* @property UbuxSatpamn[] $ubuxSatpamns
*/
class HrdxPegawai extends \yii\db\ActiveRecord
class Pegawai extends \yii\db\ActiveRecord
{
/**
......@@ -142,7 +141,7 @@ class HrdxPegawai extends \yii\db\ActiveRecord
[['ext_num'], 'string', 'max' => 3],
[['jabatan', 'status_akhir', 'status'], 'string', 'max' => 1],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
/*[['jenis_kelamin_id'], 'exist', 'skipOnError' => true, 'targetClass' => MrefRJenisKelamin::className(), 'targetAttribute' => ['jenis_kelamin_id' => 'jenis_kelamin_id']],
[['jenis_kelamin_id'], 'exist', 'skipOnError' => true, 'targetClass' => MrefRJenisKelamin::className(), 'targetAttribute' => ['jenis_kelamin_id' => 'jenis_kelamin_id']],
[['agama_id'], 'exist', 'skipOnError' => true, 'targetClass' => MrefRAgama::className(), 'targetAttribute' => ['agama_id' => 'agama_id']],
[['golongan_darah_id'], 'exist', 'skipOnError' => true, 'targetClass' => MrefRGolonganDarah::className(), 'targetAttribute' => ['golongan_darah_id' => 'golongan_darah_id']],
[['jabatan_akademik_id'], 'exist', 'skipOnError' => true, 'targetClass' => MrefRJabatanAkademik::className(), 'targetAttribute' => ['jabatan_akademik_id' => 'jabatan_akademik_id']],
......@@ -151,7 +150,7 @@ class HrdxPegawai extends \yii\db\ActiveRecord
[['status_aktif_pegawai_id'], 'exist', 'skipOnError' => true, 'targetClass' => MrefRStatusAktifPegawai::className(), 'targetAttribute' => ['status_aktif_pegawai_id' => 'status_aktif_pegawai_id']],
[['status_ikatan_kerja_pegawai_id'], 'exist', 'skipOnError' => true, 'targetClass' => MrefRStatusIkatanKerjaPegawai::className(), 'targetAttribute' => ['status_ikatan_kerja_pegawai_id' => 'status_ikatan_kerja_pegawai_id']],
[['status_marital_id'], 'exist', 'skipOnError' => true, 'targetClass' => MrefRStatusMarital::className(), 'targetAttribute' => ['status_marital_id' => 'status_marital_id']],
[['user_id'], 'exist', 'skipOnError' => true, 'targetClass' => SysxUser::className(), 'targetAttribute' => ['user_id' => 'user_id']]*/
[['user_id'], 'exist', 'skipOnError' => true, 'targetClass' => SysxUser::className(), 'targetAttribute' => ['user_id' => 'user_id']]
];
}
......@@ -400,12 +399,4 @@ class HrdxPegawai extends \yii\db\ActiveRecord
{
return $this->hasMany(UbuxSatpam::className(), ['pegawai_id' => 'pegawai_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getUbuxSatpamns()
{
return $this->hasMany(UbuxSatpamn::className(), ['pegawai_id' => 'pegawai_id']);
}
}
......@@ -12,9 +12,12 @@ use common\behaviors\DeleteBehavior;
* This is the model class for table "ubux_satpam".
*
* @property integer $satpam_id
* @property integer $laporan_id
* @property string $total_gaji
* @property string $gaji_lembur
* @property string $nip
* @property string $nama
* @property string $tgl_lahir
* @property string $alamat
* @property string $status
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
......@@ -22,10 +25,9 @@ use common\behaviors\DeleteBehavior;
* @property string $created_by
* @property string $updated_at
* @property string $updated_by
* @property integer $pegawai_id
*
* @property UbuxJamKerja[] $ubuxJamKerjas
* @property HrdxPegawai $pegawai
* @property UbuxLaporan $laporan
*/
class Satpam extends \yii\db\ActiveRecord
{
......@@ -62,11 +64,13 @@ class Satpam extends \yii\db\ActiveRecord
public function rules()
{
return [
[['deleted', 'pegawai_id'], 'integer'],
[['laporan_id', 'nip', 'nama', 'status'], 'required'],
[['laporan_id', 'deleted'], 'integer'],
[['deleted_at', 'created_at', 'updated_at'], 'safe'],
[['nama', 'tgl_lahir', 'alamat'], 'string', 'max' => 45],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['pegawai_id'], 'exist', 'skipOnError' => true, 'targetClass' => HrdxPegawai::className(), 'targetAttribute' => ['pegawai_id' => 'pegawai_id']]
[['total_gaji', 'gaji_lembur'], 'string', 'max' => 45],
[['nip', 'nama'], 'string', 'max' => 100],
[['status', 'deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['laporan_id'], 'exist', 'skipOnError' => true, 'targetClass' => Laporan::className(), 'targetAttribute' => ['laporan_id' => 'laporan_id']]
];
}
......@@ -77,9 +81,12 @@ class Satpam extends \yii\db\ActiveRecord
{
return [
'satpam_id' => 'Satpam ID',
'laporan_id' => 'Laporan ID',
'total_gaji' => 'Total Gaji',
'gaji_lembur' => 'Gaji Lembur',
'nip' => 'Nip',
'nama' => 'Nama',
'tgl_lahir' => 'Tgl Lahir',
'alamat' => 'Alamat',
'status' => 'Status',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
......@@ -87,14 +94,13 @@ class Satpam extends \yii\db\ActiveRecord
'created_by' => 'Created By',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
'pegawai_id' => 'Pegawai ID',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getUbuxJamKerjas()
public function getJamKerja()
{
return $this->hasMany(UbuxJamKerja::className(), ['satpam_id' => 'satpam_id']);
}
......@@ -102,8 +108,13 @@ class Satpam extends \yii\db\ActiveRecord
/**
* @return \yii\db\ActiveQuery
*/
public function getLaporan()
{
return $this->hasOne(Laporan::className(), ['laporan_id' => 'laporan_id']);
}
public function getPegawai()
{
return $this->hasOne(HrdxPegawai::className(), ['pegawai_id' => 'pegawai_id']);
return $this->hasOne(Pegawai::className(), ['pegawai_id' => 'pegawai_id']);
}
}
<?php
namespace backend\modules\ubux\models;
use Yii;
use common\behaviors\TimestampBehavior;
use common\behaviors\BlameableBehavior;
use common\behaviors\DeleteBehavior;
/**
* This is the model class for table "ubux_satpam".
*
* @property integer $id
* @property string $aktif_start
* @property string $aktif_end
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
* @property string $created_at
* @property string $created_by
* @property string $updated_at
* @property string $updated_by
* @property integer $pegawai_id
*
* @property HrdxPegawai $pegawai
*/
class Satpam extends \yii\db\ActiveRecord
{
/**
* behaviour to add created_at and updatet_at field with current datetime (timestamp)
* and created_by and updated_by field with current user id (blameable)
*/
public function behaviors(){
return [
'timestamp' => [
'class' => TimestampBehavior::className(),
],
'blameable' => [
'class' => BlameableBehavior::className(),
],
'delete' => [
'class' => DeleteBehavior::className(),
]
];
}
/**
* @inheritdoc
*/
public static function tableName()
{
return 'ubux_satpam';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['aktif_start', 'aktif_end', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['deleted', 'pegawai_id'], 'integer'],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['pegawai_id'], 'exist', 'skipOnError' => true, 'targetClass' => HrdxPegawai::className(), 'targetAttribute' => ['pegawai_id' => 'pegawai_id']]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'aktif_start' => 'Aktif Start',
'aktif_end' => 'Aktif End',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
'created_at' => 'Created At',
'created_by' => 'Created By',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
'pegawai_id' => 'Pegawai ID',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getPegawai()
{
return $this->hasOne(HrdxPegawai::className(), ['pegawai_id' => 'pegawai_id']);
}
}
<?php
namespace backend\modules\ubux\models;
use Yii;
use common\behaviors\TimestampBehavior;
use common\behaviors\BlameableBehavior;
use common\behaviors\DeleteBehavior;
/**
* This is the model class for table "ubux_total_gaji".
*
* @property integer $total_id
* @property string $satpam_id
* @property string $total_gaji
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
* @property string $updated_at
* @property string $updated_by
* @property string $created_at
* @property string $created_by
* @property integer $laporan_id
*
* @property UbuxLaporan $laporan
*/
class TotalGaji extends \yii\db\ActiveRecord
{
/**
* behaviour to add created_at and updatet_at field with current datetime (timestamp)
* and created_by and updated_by field with current user id (blameable)
*/
public function behaviors(){
return [
'timestamp' => [
'class' => TimestampBehavior::className(),
],
'blameable' => [
'class' => BlameableBehavior::className(),
],
'delete' => [
'class' => DeleteBehavior::className(),
]
];
}
/**
* @inheritdoc
*/
public static function tableName()
{
return 'ubux_total_gaji';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['deleted', 'laporan_id'], 'integer'],
[['deleted_at', 'updated_at', 'created_at'], 'safe'],
[['satpam_id', 'total_gaji'], 'string', 'max' => 45],
[['deleted_by', 'updated_by', 'created_by'], 'string', 'max' => 32],
[['laporan_id'], 'exist', 'skipOnError' => true, 'targetClass' => Laporan::className(), 'targetAttribute' => ['laporan_id' => 'laporan_id']]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'total_id' => 'Total ID',
'satpam_id' => 'Satpam ID',
'total_gaji' => 'Total Gaji',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
'created_at' => 'Created At',
'created_by' => 'Created By',
'laporan_id' => 'Laporan ID',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getLaporan()
{
return $this->hasOne(Laporan::className(), ['laporan_id' => 'laporan_id']);
}
}
<?php
namespace backend\modules\ubux\models;
use Yii;
use common\behaviors\TimestampBehavior;
use common\behaviors\BlameableBehavior;
use common\behaviors\DeleteBehavior;
/**
* This is the model class for table "gaji".
*
* @property string $nip
* @property string $nama
* @property string $gaji_pokok
* @property string $tunjangan
*/
class Uang extends \yii\db\ActiveRecord
{
/**
* behaviour to add created_at and updatet_at field with current datetime (timestamp)
* and created_by and updated_by field with current user id (blameable)
*/
public function behaviors(){
return [
'timestamp' => [
'class' => TimestampBehavior::className(),
],
'blameable' => [
'class' => BlameableBehavior::className(),
],
'delete' => [
'class' => DeleteBehavior::className(),
]
];
}
/**
* @inheritdoc
*/
public static function tableName()
{
return 'gaji';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['nip'], 'required'],
[['gaji_pokok', 'tunjangan'], 'number'],
[['nip'], 'string', 'max' => 5],
[['nama'], 'string', 'max' => 20]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'nip' => 'Nip',
'nama' => 'Nama',
'gaji_pokok' => 'Gaji Pokok',
'tunjangan' => 'Tunjangan',
];
}
public function totalGaji()
{
$total=$this->gaji_pokok + $this->tunjangan;
return $total;
}
public function pajak()
{
$total=$this->gaji_pokok + $this->tunjangan;
$pajak=$total * 5/100;
return $pajak;
}
public function gajiBersih()
{
return $this->totalGaji() - $this->pajak();
}
}
<?php
namespace backend\modules\ubux\models\search;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\modules\ubux\models\Gaji;
/**
* GajiSearch represents the model behind the search form about `backend\modules\ubux\models\Gaji`.
*/
class GajiSearch extends Gaji
{
/**
* @inheritdoc
*/
public function rules()
{
return [
[['gaji_id', 'laporan_id', 'pin', 'nip', 'verifikasi', 'i_o', 'workcode', 'deleted'], 'integer'],
[['tanggal_scan', 'tanggal', 'jam', 'nama', 'jabatan', 'departemen', 'kantor', 'mesin', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
];
}
/**
* @inheritdoc
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = Gaji::find();
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
$query->andFilterWhere([
'gaji_id' => $this->gaji_id,
'laporan_id' => $this->laporan_id,
'tanggal_scan' => $this->tanggal_scan,
'tanggal' => $this->tanggal,
'jam' => $this->jam,
'pin' => $this->pin,
'nip' => $this->nip,
'verifikasi' => $this->verifikasi,
'i_o' => $this->i_o,
'workcode' => $this->workcode,
'deleted' => $this->deleted,
'deleted_at' => $this->deleted_at,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
]);
$query->andFilterWhere(['like', 'nama', $this->nama])
->andFilterWhere(['like', 'jabatan', $this->jabatan])
->andFilterWhere(['like', 'departemen', $this->departemen])
->andFilterWhere(['like', 'kantor', $this->kantor])
->andFilterWhere(['like', 'mesin', $this->mesin])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by]);
return $dataProvider;
}
}
......@@ -18,8 +18,8 @@ class JamKerjaSearch extends JamKerja
public function rules()
{
return [
[['jam_kerja_id', 'satpam_id', 'deleted'], 'integer'],
[['total_absen', 'deleted_at', 'deleted_by', 'created_at', 'updated_at', 'created_by', 'updated_by'], 'safe'],
[['jam_kerja_id', 'laporan_id', 'satpam_id', 'deleted'], 'integer'],
[['tanggal_scan', 'tanggal', 'jam', 'pin', 'nip', 'nama', 'jabatan', 'departemen', 'kantor', 'verifikasi', 'i_o', 'workcode', 'mesin', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
];
}
......@@ -41,7 +41,7 @@ class JamKerjaSearch extends JamKerja
*/
public function search($params)
{
$query = JamKerja::find()->where(['deleted' => NULL]);
$query = JamKerja::find();
$dataProvider = new ActiveDataProvider([
'query' => $query,
......@@ -57,14 +57,27 @@ class JamKerjaSearch extends JamKerja
$query->andFilterWhere([
'jam_kerja_id' => $this->jam_kerja_id,
'laporan_id' => $this->laporan_id,
'satpam_id' => $this->satpam_id,
'jam' => $this->jam,
'deleted' => $this->deleted,
'deleted_at' => $this->deleted_at,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
]);
$query->andFilterWhere(['like', 'total_absen', $this->total_absen])
$query->andFilterWhere(['like', 'tanggal_scan', $this->tanggal_scan])
->andFilterWhere(['like', 'tanggal', $this->tanggal])
->andFilterWhere(['like', 'pin', $this->pin])
->andFilterWhere(['like', 'nip', $this->nip])
->andFilterWhere(['like', 'nama', $this->nama])
->andFilterWhere(['like', 'jabatan', $this->jabatan])
->andFilterWhere(['like', 'departemen', $this->departemen])
->andFilterWhere(['like', 'kantor', $this->kantor])
->andFilterWhere(['like', 'verifikasi', $this->verifikasi])
->andFilterWhere(['like', 'i_o', $this->i_o])
->andFilterWhere(['like', 'workcode', $this->workcode])
->andFilterWhere(['like', 'mesin', $this->mesin])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by]);
......
......@@ -18,8 +18,8 @@ class LaporanSearch extends Laporan
public function rules()
{
return [
[['laporan_id', 'deleted', 'jam_kerja_id'], 'integer'],
[['bulan_laporan', 'tahun_laporan', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
[['laporan_id', 'deleted'], 'integer'],
[['bulan', 'tahun', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
];
}
......@@ -41,7 +41,7 @@ class LaporanSearch extends Laporan
*/
public function search($params)
{
$query = Laporan::find()->where(['deleted' => NULL]);
$query = Laporan::find();
$dataProvider = new ActiveDataProvider([
'query' => $query,
......@@ -57,15 +57,14 @@ class LaporanSearch extends Laporan
$query->andFilterWhere([
'laporan_id' => $this->laporan_id,
'tahun' => $this->tahun,
'deleted' => $this->deleted,
'deleted_at' => $this->deleted_at,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
'jam_kerja_id' => $this->jam_kerja_id,
]);
$query->andFilterWhere(['like', 'bulan_laporan', $this->bulan_laporan])
->andFilterWhere(['like', 'tahun_laporan', $this->tahun_laporan])
$query->andFilterWhere(['like', 'bulan', $this->bulan])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by]);
......
......@@ -5,12 +5,12 @@ namespace backend\modules\ubux\models\search;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\modules\ubux\models\Haha;
use backend\modules\ubux\models\Lembur;
/**
* HahaSearch represents the model behind the search form about `backend\modules\ubux\models\Haha`.
* LemburSearch represents the model behind the search form about `backend\modules\ubux\models\Lembur`.
*/
class HahaSearch extends Haha
class LemburSearch extends Lembur
{
/**
* @inheritdoc
......@@ -18,8 +18,8 @@ class HahaSearch extends Haha
public function rules()
{
return [
[['id', 'deleted', 'pegawai_id'], 'integer'],
[['nip', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
[['lembur_id', 'laporan_id', 'deleted'], 'integer'],
[['tanggal', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
];
}
......@@ -41,7 +41,7 @@ class HahaSearch extends Haha
*/
public function search($params)
{
$query = Haha::find();
$query = Lembur::find();
$dataProvider = new ActiveDataProvider([
'query' => $query,
......@@ -56,15 +56,15 @@ class HahaSearch extends Haha
}
$query->andFilterWhere([
'id' => $this->id,
'lembur_id' => $this->lembur_id,
'laporan_id' => $this->laporan_id,
'deleted' => $this->deleted,
'deleted_at' => $this->deleted_at,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
'pegawai_id' => $this->pegawai_id,
]);
$query->andFilterWhere(['like', 'nip', $this->nip])
$query->andFilterWhere(['like', 'tanggal', $this->tanggal])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by]);
......
......@@ -18,8 +18,8 @@ class SatpamSearch extends Satpam
public function rules()
{
return [
[['satpam_id', 'deleted', 'pegawai_id'], 'integer'],
[['nama', 'tgl_lahir', 'alamat', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
[['satpam_id', 'laporan_id', 'deleted'], 'integer'],
[['total_gaji', 'gaji_lembur', 'nip', 'nama', 'status', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
];
}
......@@ -41,7 +41,7 @@ class SatpamSearch extends Satpam
*/
public function search($params)
{
$query = Satpam::find()->where(['deleted' => NULL]);
$query = Satpam::find();
$dataProvider = new ActiveDataProvider([
'query' => $query,
......@@ -57,16 +57,18 @@ class SatpamSearch extends Satpam
$query->andFilterWhere([
'satpam_id' => $this->satpam_id,
'laporan_id' => $this->laporan_id,
'deleted' => $this->deleted,
'deleted_at' => $this->deleted_at,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
'pegawai_id' => $this->pegawai_id,
]);
$query->andFilterWhere(['like', 'nama', $this->nama])
->andFilterWhere(['like', 'tgl_lahir', $this->tgl_lahir])
->andFilterWhere(['like', 'alamat', $this->alamat])
$query->andFilterWhere(['like', 'total_gaji', $this->total_gaji])
->andFilterWhere(['like', 'gaji_lembur', $this->gaji_lembur])
->andFilterWhere(['like', 'nip', $this->nip])
->andFilterWhere(['like', 'nama', $this->nama])
->andFilterWhere(['like', 'status', $this->status])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by]);
......
<?php
namespace backend\modules\ubux\models\search;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\modules\ubux\models\Satpam;
/**
* SatpamSearch represents the model behind the search form about `backend\modules\ubux\models\Satpam`.
*/
class SatpamSearch extends Satpam
{
/**
* @inheritdoc
*/
public function rules()
{
return [
[['satpam_id', 'deleted', 'pegawai_id'], 'integer'],
[['aktif_start', 'aktif_end', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
];
}
/**
* @inheritdoc
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = Satpam::find();
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
$query->andFilterWhere([
'id' => $this->id,
'aktif_start' => $this->aktif_start,
'aktif_end' => $this->aktif_end,
'deleted' => $this->deleted,
'deleted_at' => $this->deleted_at,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
'pegawai_id' => $this->pegawai_id,
]);
$query->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by]);
return $dataProvider;
}
}
<?php
namespace backend\modules\ubux\models\search;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\modules\ubux\models\TotalGaji;
/**
* TotalGajiSearch represents the model behind the search form about `backend\modules\ubux\models\TotalGaji`.
*/
class TotalGajiSearch extends TotalGaji
{
/**
* @inheritdoc
*/
public function rules()
{
return [
[['total_id', 'deleted', 'laporan_id'], 'integer'],
[['total_gaji', 'deleted_at', 'deleted_by', 'updated_at', 'updated_by', 'created_at', 'created_by'], 'safe'],
];
}
/**
* @inheritdoc
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = TotalGaji::find();
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
$query->andFilterWhere([
'total_id' => $this->total_id,
'deleted' => $this->deleted,
'deleted_at' => $this->deleted_at,
'updated_at' => $this->updated_at,
'created_at' => $this->created_at,
'laporan_id' => $this->laporan_id,
]);
$query->andFilterWhere(['like', 'total_gaji', $this->total_gaji])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by])
->andFilterWhere(['like', 'created_by', $this->created_by]);
return $dataProvider;
}
}
<?php
namespace backend\modules\ubux\models\search;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\modules\ubux\models\Uang;
/**
* UangSearch represents the model behind the search form about `backend\modules\ubux\models\Uang`.
*/
class UangSearch extends Uang
{
/**
* @inheritdoc
*/
public function rules()
{
return [
[['nip', 'nama'], 'safe'],
[['gaji_pokok', 'tunjangan'], 'number'],
];
}
/**
* @inheritdoc
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = Uang::find();
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
$query->andFilterWhere([
'gaji_pokok' => $this->gaji_pokok,
'tunjangan' => $this->tunjangan,
]);
$query->andFilterWhere(['like', 'nip', $this->nip])
->andFilterWhere(['like', 'nama', $this->nama]);
return $dataProvider;
}
}
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Satpam */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="satpam-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'nama')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'tgl_lahir')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'alamat')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'deleted')->textInput() ?>
<?= $form->field($model, 'deleted_at')->textInput() ?>
<?= $form->field($model, 'deleted_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'created_at')->textInput() ?>
<?= $form->field($model, 'created_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'updated_at')->textInput() ?>
<?= $form->field($model, 'updated_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'pegawai_id')->textInput() ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\search\SatpamSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="satpam-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'satpam_id') ?>
<?= $form->field($model, 'nama') ?>
<?= $form->field($model, 'tgl_lahir') ?>
<?= $form->field($model, 'alamat') ?>
<?= $form->field($model, 'deleted') ?>
<?php // echo $form->field($model, 'deleted_at') ?>
<?php // echo $form->field($model, 'deleted_by') ?>
<?php // echo $form->field($model, 'created_at') ?>
<?php // echo $form->field($model, 'created_by') ?>
<?php // echo $form->field($model, 'updated_at') ?>
<?php // echo $form->field($model, 'updated_by') ?>
<?php // echo $form->field($model, 'pegawai_id') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\SatpamSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Satpams';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="satpam-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Create Satpam', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'satpam_id',
'nama',
'tgl_lahir',
'alamat',
'deleted',
// 'deleted_at',
// 'deleted_by',
// 'created_at',
// 'created_by',
// 'updated_at',
// 'updated_by',
// 'pegawai_id',
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>
<?php
use yii\helpers\Html;
use backend\modules\ubux\models\HrdxPegawai;
?>
<div class="col-md-12">
<div class="row">
<div class="col-md-4">
<h4><b>Nama</b></h4>
</div>
<div class="col-md-4">
<h4><b>Posisi</b></h4>
</div>
<div class="col-md-4">
<h4><b>Nip</b></h4>
</div>
</div>
<div class="row">
<div class="col-md-4">
<h3><?=$model->nama;?></h3>
</div>
<div class="col-md-4">
<h4><?=$model->posisi;?></h4>
</div>
<div class="col-md-4">
<h4><?=$model->nip;?></h4>
</div>
</div>
</div>
\ No newline at end of file
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\widgets\listView;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Satpam */
$this->title = 'Data Satpam';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="satpam-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<!-- <p>
<?= Html::a('Create Satpam', ['create'], ['class' => 'btn btn-success']) ?>
</p>
-->
<p>
<?php
echo listView::widget([
'dataProvider'=>$this->context->showSatpam(),
'itemView' => 'list',
]);
?>
</p>
</div>
\ No newline at end of file
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Gaji */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="gaji-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'tanggal_scan')->textInput() ?>
<?= $form->field($model, 'tanggal')->textInput() ?>
<?= $form->field($model, 'jam')->textInput() ?>
<?= $form->field($model, 'pin')->textInput() ?>
<?= $form->field($model, 'nip')->textInput() ?>
<?= $form->field($model, 'nama')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'jabatan')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'departemen')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'kantor')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'verifikasi')->textInput() ?>
<?= $form->field($model, 'i_o')->textInput() ?>
<?= $form->field($model, 'workcode')->textInput() ?>
<?= $form->field($model, 'mesin')->textInput(['maxlength' => true]) ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\search\GajiSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="gaji-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'gaji_id') ?>
<?= $form->field($model, 'laporan_id') ?>
<?= $form->field($model, 'tanggal_scan') ?>
<?= $form->field($model, 'tanggal') ?>
<?= $form->field($model, 'jam') ?>
<?php // echo $form->field($model, 'pin') ?>
<?php // echo $form->field($model, 'nip') ?>
<?php // echo $form->field($model, 'nama') ?>
<?php // echo $form->field($model, 'jabatan') ?>
<?php // echo $form->field($model, 'departemen') ?>
<?php // echo $form->field($model, 'kantor') ?>
<?php // echo $form->field($model, 'verifikasi') ?>
<?php // echo $form->field($model, 'i_o') ?>
<?php // echo $form->field($model, 'workcode') ?>
<?php // echo $form->field($model, 'mesin') ?>
<?php // echo $form->field($model, 'deleted') ?>
<?php // echo $form->field($model, 'deleted_at') ?>
<?php // echo $form->field($model, 'deleted_by') ?>
<?php // echo $form->field($model, 'created_at') ?>
<?php // echo $form->field($model, 'created_by') ?>
<?php // echo $form->field($model, 'updated_at') ?>
<?php // echo $form->field($model, 'update_by') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\Url;
use common\components\ToolsColumn;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\GajiSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Gajis';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="gaji-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Create Gaji', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
// 'gaji_id',
// 'laporan_id',
'tanggal_scan',
//'tanggal',
'jam',
'pin',
'nip',
'nama',
'jabatan',
// 'departemen',
// 'kantor',
// 'verifikasi',
// 'i_o',
// 'workcode',
// 'mesin',
// 'deleted',
// 'deleted_at',
// 'deleted_by',
// 'created_at',
// 'created_by',
// 'updated_at',
// 'updated_by',
['class' => 'common\components\ToolsColumn',
'template' => '{view} {update} {delete}',// {edit} {cancel}',
'header' => 'Aksi',
'buttons' => [
'view' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'View Detail', 'fa fa-eye');
},
'update' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'Update', 'fa fa-gear');
// if($model->status_oleh_hrd == "Accepted" || $model->status_oleh_hrd == "Rejected")
// return "";
// //return ToolsColumn::renderCustomButton($url, $model, 'Accepts', 'fa fa-check');
// else
// return ToolsColumn::renderCustomButton($url, $model, 'Accept', 'fa fa-check');
},
'delete' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'Delete', 'fa fa-trash');
// if($model->status_oleh_hrd == "Rejected" || $model->status_oleh_hrd == "Accepted")
// return "";
// else
// return ToolsColumn::renderCustomButton($url, $model, 'Reject', 'fa fa-close');
},
// 'print' => function ($url, $model){
// return ToolsColumn::renderCustomButton($url, $model, 'Print Form IB', 'fa fa-print');
// }
],
'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'view') {
return Url::toRoute(['view', 'id' => $key]);
}else if ($action === 'update') {
return Url::toRoute(['update', 'id' => $key]);
}else if ($action === 'delete') {
return Url::toRoute(['delete', 'id' => $key]);
}
// else if ($action === 'print') {
// return Url::toRoute(['print-by-mahasiswa', 'id' => $key]);
// }
}
],
],
]); ?>
</div>
<?php
use yii\helpers\Html;
use backend\modules\ubux\models\HrdxPegawai;
?>
<div class="col-md-12">
<!-- <div class="row">
<div class="col-md-4">
<h4><b>Nama</b></h4>
</div>
<div class="col-md-4">
<h4><b>Posisi</b></h4>
</div>
<div class="col-md-4">
<h4><b>Nip</b></h4>
</div>
</div> -->
<div class="row">
<div class="col-md-4">
<h3><?=$model->nama;?></h3>
</div>
<div class="col-md-4">
<h4><?=$model->jabatan;?></h4>
</div>
<div class="col-md-4">
<h4><?=$model->kantor;?></h4>
</div>
</div>
</div>
\ No newline at end of file
1<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Gaji */
//$this->title = $model->gaji_id;
$this->params['breadcrumbs'][] = ['label' => 'Gajis', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="gaji-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a('Update', ['update', 'id' => $model->gaji_id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Delete', ['delete', 'id' => $model->gaji_id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
// 'gaji_id',
// 'laporan_id',
'tanggal_scan',
'tanggal',
'jam',
'pin',
'nip',
'nama',
'jabatan',
'departemen',
'kantor',
'verifikasi',
'i_o',
'workcode',
'mesin',
'deleted',
'deleted_at',
'deleted_by',
'created_at',
'created_by',
'updated_at',
'updated_by',
],
]) ?>
</div>
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Haha */
$this->title = 'Update Haha: ' . ' ' . $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Hahas', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = 'Update';
?>
<div class="haha-update">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
......@@ -12,9 +12,35 @@ use yii\widgets\ActiveForm;
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'total_absen')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'laporan_id')->textInput() ?>
<!-- <?= $form->field($model, 'satpam_id')->textInput() ?>
<?= $form->field($model, 'satpam_id')->textInput() ?>
<?= $form->field($model, 'tanggal_scan')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'tanggal')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'jam')->textInput() ?>
<?= $form->field($model, 'pin')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'nip')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'nama')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'jabatan')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'departemen')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'kantor')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'verifikasi')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'i_o')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'workcode')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'mesin')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'deleted')->textInput() ?>
......@@ -24,12 +50,12 @@ use yii\widgets\ActiveForm;
<?= $form->field($model, 'created_at')->textInput() ?>
<?= $form->field($model, 'updated_at')->textInput() ?>
<?= $form->field($model, 'created_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'updated_at')->textInput() ?>
<?= $form->field($model, 'updated_by')->textInput(['maxlength' => true]) ?>
-->
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
......
......@@ -17,22 +17,48 @@ use yii\widgets\ActiveForm;
<?= $form->field($model, 'jam_kerja_id') ?>
<?= $form->field($model, 'total_absen') ?>
<?= $form->field($model, 'laporan_id') ?>
<?= $form->field($model, 'satpam_id') ?>
<?= $form->field($model, 'deleted') ?>
<?= $form->field($model, 'tanggal_scan') ?>
<?= $form->field($model, 'deleted_at') ?>
<?= $form->field($model, 'tanggal') ?>
<?php // echo $form->field($model, 'jam') ?>
<?php // echo $form->field($model, 'pin') ?>
<?php // echo $form->field($model, 'nip') ?>
<?php // echo $form->field($model, 'nama') ?>
<?php // echo $form->field($model, 'jabatan') ?>
<?php // echo $form->field($model, 'departemen') ?>
<?php // echo $form->field($model, 'kantor') ?>
<?php // echo $form->field($model, 'verifikasi') ?>
<?php // echo $form->field($model, 'i_o') ?>
<?php // echo $form->field($model, 'workcode') ?>
<?php // echo $form->field($model, 'mesin') ?>
<?php // echo $form->field($model, 'deleted') ?>
<?php // echo $form->field($model, 'deleted_at') ?>
<?php // echo $form->field($model, 'deleted_by') ?>
<?php // echo $form->field($model, 'created_at') ?>
<?php // echo $form->field($model, 'updated_at') ?>
<?php // echo $form->field($model, 'created_by') ?>
<?php // echo $form->field($model, 'updated_at') ?>
<?php // echo $form->field($model, 'updated_by') ?>
<div class="form-group">
......
......@@ -15,7 +15,7 @@ $this->params['breadcrumbs'][] = $this->title;
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\widgets\listView;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Satpam */
/* @var $searchModel backend\modules\ubux\models\search\JamKerjaSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Data Satpam';
$this->title = 'Jam Kerjas';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="satpam-index">
<div class="jam-kerja-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Create Satpam', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
......@@ -27,60 +23,33 @@ $this->params['breadcrumbs'][] = $this->title;
'columns' => [
['class' => 'yii\grid\SerialColumn'],
//'jam_kerja_id',
//'laporan_id',
//'satpam_id',
'total_absen',
//'deleted',
//'tanggal_scan',
'nama',
'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',
// 'pegawai_id',
['class' => 'common\components\ToolsColumn',
'template' => '{view} {update} {delete}',// {edit} {cancel}',
'header' => 'Aksi',
'buttons' => [
'view' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'View Detail', 'fa fa-eye');
},
'update' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'Update', 'fa fa-gear');
// if($model->status_oleh_hrd == "Accepted" || $model->status_oleh_hrd == "Rejected")
// return "";
// //return ToolsColumn::renderCustomButton($url, $model, 'Accepts', 'fa fa-check');
// else
// return ToolsColumn::renderCustomButton($url, $model, 'Accept', 'fa fa-check');
},
// 'delete' => function ($url, $model){
// return ToolsColumn::renderCustomButton($url, $model, 'Delete', 'fa fa-trash');
// // if($model->status_oleh_hrd == "Rejected" || $model->status_oleh_hrd == "Accepted")
// return "";
// else
// return ToolsColumn::renderCustomButton($url, $model, 'Reject', 'fa fa-close');
//},
// 'print' => function ($url, $model){
// return ToolsColumn::renderCustomButton($url, $model, 'Print Form IB', 'fa fa-print');
// }
],
'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'view') {
return Url::toRoute(['view', 'id' => $key]);
}else if ($action === 'update') {
return Url::toRoute(['update', 'id' => $key]);
}else if ($action === 'delete') {
return Url::toRoute(['delete', 'id' => $key]);
}
// else if ($action === 'print') {
// return Url::toRoute(['print-by-mahasiswa', 'id' => $key]);
// }
}
],
],
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>
\ No newline at end of file
</div>
<?php
use yii\helpers\Html;
use backend\modules\ubux\models\HrdxPegawai;
?>
<div class="col-md-12">
<div class="row">
<div class="col-md-4">
<h3><?=$model->nama;?></h3>
</div>
<div class="col-md-4">
<h4><?=$model->tempat_lahir;?></h4>
</div>
<div class="col-md-4">
<h4><?=$model->nip;?></h4>
</div>
</div>
</div>
\ No newline at end of file
......@@ -28,17 +28,30 @@ $this->params['breadcrumbs'][] = $this->title;
<?= DetailView::widget([
'model' => $model,
'attributes' => [
//'jam_kerja_id',
'total_absen',
// 'satpam_id',
// 'deleted',
// 'deleted_at',
// 'deleted_by',
// 'created_at',
// 'updated_at',
// 'created_by',
// 'updated_by',
],
'jam_kerja_id',
'laporan_id',
'satpam_id',
'tanggal_scan',
'tanggal',
'jam',
'pin',
'nip',
'nama',
'jabatan',
'departemen',
'kantor',
'verifikasi',
'i_o',
'workcode',
'mesin',
'deleted',
'deleted_at',
'deleted_by',
'created_at',
'created_by',
'updated_at',
'updated_by',
],
]) ?>
</div>
......@@ -2,7 +2,6 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\jui\DatePicker;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Laporan */
......@@ -13,22 +12,19 @@ use yii\jui\DatePicker;
<?php $form = ActiveForm::begin(); ?>
<?php
$thn = date('Y');
foreach(range(2002-2, $thn) as $i) {
$array[] = $i;
}
?>
<?= $form->field($model, 'bulan_laporan')->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, 'tahun_laporan')->dropDownList(
$array, ['prompt' => 'Pilih Tahun']
); ?>
$thn = date('Y');
foreach(range(2002-2, $thn) as $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, 'tahun')->dropDownList(
$array, ['prompt' => 'Pilih Tahun']
); ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
......
......@@ -17,13 +17,15 @@ use yii\widgets\ActiveForm;
<?= $form->field($model, 'laporan_id') ?>
<?= $form->field($model, 'bulan_laporan') ?>
<?= $form->field($model, 'bulan') ?>
<?= $form->field($model, 'tahun') ?>
<?= $form->field($model, 'deleted') ?>
<?= $form->field($model, 'deleted_at') ?>
<?= $form->field($model, 'deleted_by') ?>
<?php // echo $form->field($model, 'deleted_by') ?>
<?php // echo $form->field($model, 'created_at') ?>
......@@ -33,8 +35,6 @@ use yii\widgets\ActiveForm;
<?php // echo $form->field($model, 'updated_by') ?>
<?php // echo $form->field($model, 'jam_kerja_id') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
......
......@@ -9,7 +9,7 @@ use common\components\ToolsColumn;
/* @var $searchModel backend\modules\ubux\models\search\LaporanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Laporans';
$this->title = 'Laporan';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="laporan-index">
......@@ -18,7 +18,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Create Laporan', ['create'], ['class' => 'btn btn-success']) ?>
<?= Html::a('Tambah Bulan', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
......@@ -27,19 +27,9 @@ $this->params['breadcrumbs'][] = $this->title;
'columns' => [
['class' => 'yii\grid\SerialColumn'],
// 'laporan_id',
'bulan_laporan',
'tahun_laporan',
// 'deleted',
// 'deleted_at',
// 'deleted_by',
// 'created_at',
// 'created_by',
// 'updated_at',
// 'updated_by',
// 'jam_kerja_id',
//['class' => 'yii\grid\ActionColumn'],
'bulan',
'tahun',
['class' => 'common\components\ToolsColumn',
'template' => '{view} {update} {delete}',// {edit} {cancel}',
'header' => 'Aksi',
......@@ -49,12 +39,6 @@ $this->params['breadcrumbs'][] = $this->title;
},
'update' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'Update', 'fa fa-gear');
// if($model->status_oleh_hrd == "Accepted" || $model->status_oleh_hrd == "Rejected")
// return "";
// //return ToolsColumn::renderCustomButton($url, $model, 'Accepts', 'fa fa-check');
// else
// return ToolsColumn::renderCustomButton($url, $model, 'Accept', 'fa fa-check');
},
'delete' => function ($url, $model){
return "<li>".Html::a('<span class="fa fa-trash"></span> Hapus', $url, [
......@@ -64,9 +48,7 @@ $this->params['breadcrumbs'][] = $this->title;
'data-pjax' => '0',
])."</li>";
},
// 'print' => function ($url, $model){
// return ToolsColumn::renderCustomButton($url, $model, 'Print Form IB', 'fa fa-print');
// }
],
'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'view') {
......@@ -76,9 +58,6 @@ $this->params['breadcrumbs'][] = $this->title;
}else if ($action === 'delete') {
return Url::toRoute(['delete', 'id' => $key]);
}
// else if ($action === 'print') {
// return Url::toRoute(['print-by-mahasiswa', 'id' => $key]);
// }
}
......
<?php
use yii\helpers\Html;
use backend\modules\ubux\models\Gaji;
?>
<div class="col-md-12">
<!-- <div class="row">
<div class="col-md-4">
<h4><b>Nama</b></h4>
</div>
<div class="col-md-4">
<h4><b>Posisi</b></h4>
</div>
<div class="col-md-4">
<h4><b>Nip</b></h4>
</div>
</div> -->
<div class="row">
<div class="col-md-4">
<h3><?=$model->nama;?></h3>
</div>
<div class="col-md-4">
<h4><?=$model->nip;?></h4>
</div>
</div>
</div>
\ No newline at end of file
......@@ -5,7 +5,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Laporan */
//$this->title = 'Update Laporan: ' . ' ' . $model->laporan_id;
$this->title = 'Update Laporan: ' . ' ' . $model->laporan_id;
$this->params['breadcrumbs'][] = ['label' => 'Laporans', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->laporan_id, 'url' => ['view', 'id' => $model->laporan_id]];
$this->params['breadcrumbs'][] = 'Update';
......
......@@ -30,17 +30,16 @@ $this->params['breadcrumbs'][] = $this->title;
[
'attribute' => 'tanggal',
'label' => 'Tanggal',
'format' => ['date', 'php:d M Y'],
//'format' => ['date', 'php:d M Y'],
'filter' => '',
],
'jam',
'laporan.totalGaji.total_gaji',
]
]);
echo $dataProvider->getTotalCount();
?>
// echo $dataProvider->getTotalCount();
?>
</div>
\ No newline at end of file
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\data\ActiveDataProvider;
use backend\modules\ubux\models\Laporan;
use backend\modules\ubux\models\Satpam;
use yii\grid\GridView;
use yii\helpers\Url;
//use backend\modules\ubux\models\Gaji;
use backend\modules\ubux\models\JamKerja;
//use backend\modules\ubux\models\Satpam;
/* @var $this yii\web\View */
/* @var $model backend\modules\rppx\models\RppxRencanaPengajaran */
$uiHelper=\Yii::$app->uiHelper;
$this->title = 'kontrak kerja';
$this->title = 'Laporan Gaji';
$this->params['breadcrumbs'][] = $this->title;
$dataProvider = new ActiveDataProvider([
'query' => laporan::find()->where("laporan_id = " . $model->laporan_id),
'query' => Satpam::find()->where("laporan_id = " . $model->laporan_id),
'pagination' => [
'pageSize' => 20,
],
]);
$sat = $model->laporan_id;
$sat1 = $model->bulan;
$sat2 = $model->tahun;
$model = Satpam::find()->where(['laporan_id' => $sat])->andwhere(['satpam_id' => $_GET['nip']])->one();
//$models = gaji::find()->where(['laporan_id' => $_GET['id']])->one();
?>
<div class="rppx-rencana-pengajaran-view">
<div>
<table style="width: 100%">
<tr>
<th></th>
<td style="text-align: center">
<div>
<h3>INSTITUT TEKNOLOGI DEL</h3>
<p>
Jl. Sisingamangaraja, Laguboti 22381<br>
Toba Samosir, Sumatera Utara, Laguboti, 22381<br>
Telp : (0634) 331234, Fax : (0632) 331116<br>
<u>info@del.ac.id, www.del.ac.id</u>
</p>
</div>
<h1>Institut Teknologi Del</h1>
</td>
</tr>
</table>
<hr>
<h2 style="text-align: center;"><?= Html::encode($this->title) ?></h2>
<h2 style="text-align: center; margin-top: -10px;">Slip Gaji Satpam</h2>
<h5 style="text-align: center; ">Periode 1 <?php echo $sat1?> <?php echo $sat2 ?> - 30 <?php echo $sat1?> <?php echo $sat2 ?> </h5>
<table style="margin-left: 10px">
<tr>
<td>Saya yang bertanda tangan dibawah ini</td>
<td>NIP</td>
<td>:</td>
<td><?php echo $model['nip']?></td>
</tr>
<tr>
<td>Nama</td>
<td>:</td>
<td></td>
<td width="300px"><?php echo $model['nama']?></td>
</tr>
<tr>
<td>Email</td>
<td>Jabatan</td>
<td>:</td>
<td>Satpam</td>
</tr>
<tr>
<td>NIP</td>
<td>Status</td>
<td>:</td>
</tr>
<br>
<tr>
<td colspan="6">Dengan ini menyetujui pengalokasian pengajaran sebagai berikut : </td>
</tr>
<br>
<td>Pegawai <?php echo $model['status']?></td>
</tr>
<tr>
<td><br><br><b>PENGHASILAN<b></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><br><br><b> POTONGAN<b></td>
</tr>
<tr>
<td>
<?= GridView::widget([
'dataProvider' => $dataProvider,
//'filterModel' => $searchModel,
'summary' => '',
'columns' => [
// ['class' => 'yii\grid\SerialColumn'],
['label'=>'Kode',
'value'=>'bulan_laporan'
],
],
]); ?>
</td>
<td>Gaji Pokok</td>
<td>=</td>
<td>&nbsp; &nbsp; &nbsp;Rp. <?php echo $model['total_gaji']?>,-</td>
<td></td>
<td></td>
<td></td>
<td>Pajak</td>
<td>=</td>
<td></td>
<td>&nbsp; &nbsp; &nbsp;-</td>
</tr>
<br>
<tr>
<td>Demikian surat ini dibuat untuk dipergunakan sepenuhnya.</td>
</tr>
<br><Br>
<td>Gaji Lembur</td>
<td>=</td>
<td>&nbsp; &nbsp; &nbsp;Rp. <?php echo $model['gaji_lembur'];?>,-</td>
<hr>
<td></td>
<td></td>
<td></td>
<td>Asuransi</td>
<td>=</td>
<td></td>
<td>&nbsp; &nbsp; &nbsp;-</td>
<hr>
</tr>
<tr>
<td colspan="6" style="text-align: center">Diketahui</td>
</tr>
<br>
<td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<b>Total(A)<b></td>
<td>=</td>
<td><b>&nbsp;&nbsp;&nbsp;&nbsp;Rp. <?php echo $model['total_gaji']+$model['gaji_lembur']?>,-</b></td>
<td></td>
<td></td>
<td></td>
<td><b>Total(B)<b></td>
<td>=</td>
</tr>
<tr>
<td><br><br><br><b>Penerimaan Bersih (A - B)</b></td>
<td><br><br><br>=</td>
<td><br><br><br><b>&nbsp;&nbsp;&nbsp;&nbsp;Rp. <?php echo $model['total_gaji']+$model['gaji_lembur']?>,-</b> </td>
</tr>
<tr>
<td>Kaprodi</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>Dosen</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><br><br>Diketahui</td>
</tr>
<br><br><br><Br><br><br>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td>Sitoluama, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $sat1." ".$sat2?></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td width="200px"><br><br><br><?php echo $model['nama']?></td>
</tr>
</table>
</div>
......@@ -6,7 +6,8 @@ use yii\grid\GridView;
use yii\data\ArrayDataProvider;
use yii\helpers\Url;
use common\components\ToolsColumn;
use backend\modules\ubux\models\Gaji;
use backend\modules\ubux\models\Satpam;
use backend\modules\ubux\models\Lembur;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Laporan */
......@@ -17,25 +18,32 @@ $this->params['breadcrumbs'][] = $this->title;
?>
<div class="laporan-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<!-- <?= Html::a('Update', ['update', 'id' => $model->laporan_id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Delete', ['delete', 'id' => $model->laporan_id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?> -->
<?= Html::a('Import', ['gaji/import', 'id' => $model->laporan_id], ['class' => 'btn btn-info']) ?>
</p>
<h1><?= Html::encode($this->title) ?></h1>
<h1><strong><?php echo $model['bulan']?> <?php echo $model['tahun']?></strong></h1>
<?php
if(!Lembur::find()->where(['laporan_id'=>$model->laporan_id])->exists()){
\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']);
}
// 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()){
echo "<td> </td>";
echo Html::a('Import', ['jam-kerja/import', 'id' => $model->laporan_id], ['class' => 'btn btn-info']);
}
?>
<?php
$count = 0;
$data = array();
foreach ($gajiModel as $obj) {
$data[$obj->nip] = $obj;
$data[$obj->satpam_id] = $obj;
}
foreach ($data as $key) {
......@@ -58,23 +66,23 @@ $this->params['breadcrumbs'][] = $this->title;
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'nama',
'laporan.totalGaji.total_gaji',
// [
// 'attribute' => 'laporan.totalGaji.total_id',
// 'value' => 'laporan.totalGaji.total_id',
// ],
'nama',
'status',
'total_gaji',
'gaji_lembur',
['class' => 'common\components\ToolsColumn',
'template' => '{view} {update} {total} {print} ',// {edit} {cancel}',
'template' => '{view} {update} {total} {lembur} {print} ',// {edit} {cancel}',
'header' => 'Aksi',
'buttons' => [
'view' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'View Detail', 'fa fa-eye');
},
'total' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'Total', 'fa fa-eye');
return ToolsColumn::renderCustomButton($url, $model, 'Add Gaji', 'fa fa-eye');
},
'lembur' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'Add Gaji Lembur', 'fa fa-eye');
},
'delete' => function ($url, $model){
return "<li>".Html::a('<span class="fa fa-trash"></span> Hapus', $url, [
......@@ -84,45 +92,29 @@ $this->params['breadcrumbs'][] = $this->title;
'data-pjax' => '0',
])."</li>";
},
// 'update' => function ($url, $model){
// return ToolsColumn::renderCustomButton($url, $model, 'Update', 'fa fa-gear');
// if($model->status_oleh_hrd == "Accepted" || $model->status_oleh_hrd == "Rejected")
// return "";
// //return ToolsColumn::renderCustomButton($url, $model, 'Accepts', 'fa fa-check');
// else
// return ToolsColumn::renderCustomButton($url, $model, 'Accept', 'fa fa-check');
// },
// 'delete' => function ($url, $model){
// return ToolsColumn::renderCustomButton($url, $model, 'Delete', 'fa fa-trash');
// if($model->status_oleh_hrd == "Rejected" || $model->status_oleh_hrd == "Accepted")
// return "";
// else
// return ToolsColumn::renderCustomButton($url, $model, 'Reject', 'fa fa-close');
//},
'print' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'Print Gaji', 'fa fa-print');
},
return ToolsColumn::renderCustomButton($url, $model, 'Print Laporan', 'fa fa-print');
}
],
'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'view') {
return Url::toRoute(['view-detail', 'id' => $_GET['id'], 'nip' => $key]);
return Url::toRoute(['view-detail', 'id' => $_GET['id'], 'satpam_id' => $key]);
}else if ($action === 'total') {
return Url::toRoute(['total-gaji/create', 'id' => $_GET['id'], 'nip' => $key]);
return Url::toRoute(['satpam/add-gaji', 'id'=> $_GET['id'],'satpam_id' => $key]);
}else if ($action === 'delete') {
return Url::toRoute(['delete', 'id' => $key]);
}
else if ($action === 'print') {
return Url::toRoute(['print', 'id' => $_GET['id']]);
}else if ($action === 'print') {
return Url::toRoute(['print', 'id' => $_GET['id'], 'nip' => $key]);
}else if ($action === 'lembur'){
return Url::toRoute(['satpam/add-lembur', 'id' => $_GET['id'], 'satpam_id' => $key]);
}
}
],
],
]);
echo "<br>" . $count;
// echo "<br>" . $count;
?>
</div>
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment