示例#1
0
 public function caripo($params)
 {
     $query = Requestorder::find()->where("r0001.status <> 3 and r0001.status <> 0");
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $dataProvider->setSort(['attributes' => ['KD_RO']]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['like', 'KD_RO', $this->KD_RO]);
     return $dataProvider;
 }
示例#2
0
 public function actionCreate($kdpo)
 {
     $model = new Purchaseorder();
     $qq = Purchaseorder::find()->where(['KD_PO' => $kdpo])->count();
     if ($qq == 0) {
         return $this->redirect([' ']);
     }
     if ($kdpo == '') {
         return $this->redirect([' ']);
     }
     if ($kdpo == null) {
         return $this->redirect([' ']);
     }
     $que = Requestorder::find()->where('STATUS <> 3 and STATUS <> 0')->all();
     $searchModel = new RequestorderSearch();
     $dataProvider = $searchModel->caripo(Yii::$app->request->queryParams);
     $podet = Purchasedetail::find()->where(['KD_PO' => $kdpo])->andWhere('STATUS <> 3')->all();
     $quer = Purchaseorder::find()->where(['KD_PO' => $kdpo])->one();
     return $this->render('create', ['model' => $model, 'que' => $que, 'quer' => $quer, 'podet' => $podet, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
示例#3
0
 public function cari($params)
 {
     $empId = Yii::$app->user->identity->EMP_ID;
     $dt = Employe::find()->where(['EMP_ID' => $empId])->all();
     $crp = $dt[0]['EMP_CORP_ID'];
     if ($dt[0]['JAB_ID'] == 'MGR') {
         $query = Requestorder::find()->where("r0001.status <> 3 and r0001.status <> 0 and r0001.KD_CORP = '{$crp}' ");
     } else {
         $query = Requestorder::find()->where("r0001.status <> 3 and r0001.status <> 0 and r0001.KD_CORP = '{$crp}' and r0001.ID_USER = '******' ");
     }
     $query->joinWith(['employe' => function ($q) {
         $q->where('a0001.EMP_NM LIKE "%' . $this->nmemp . '%"');
     }]);
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $dataProvider->setSort(['attributes' => ['KD_RO', 'KD_CORP', 'nmemp' => ['asc' => ['a0001.EMP_NM' => SORT_ASC], 'desc' => ['a0001.EMP_NM' => SORT_DESC], 'label' => 'Pembuat']]]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['like', 'a0001.EMP_NM', $this->EMP_NM])->andFilterWhere(['like', 'KD_RO', $this->KD_RO])->andFilterWhere(['like', 'KD_CORP', $this->KD_CORP]);
     return $dataProvider;
 }
 /**
  * Finds the Requestorder model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param string $id
  * @return Requestorder the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Requestorder::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
示例#5
0
文件: _buat.php 项目: C12D/advanced
					<thead style="background-color:#FF8533;">
						<tr>
							<th>Kode RO</th>
							<th>Devisi</th>
							<th>Quantity</th>
							<th></th>
						</tr>
					</thead>

					<tbody>
						<?php 
    $pod = Podetail::find()->where(['ID_DET_PO' => $rows->ID])->andWhere('STATUS <> 3')->all();
    $b = 0;
    foreach ($pod as $pods => $pode) {
        $b = $b + 1;
        $ro_dep = Requestorder::find('KD_DEP')->where(['KD_RO' => $pode->KD_RO])->one();
        ?>
						<tr>
							<td><?php 
        echo $pode->KD_RO;
        ?>
</td>
							<td><?php 
        echo $ro_dep->KD_DEP;
        ?>
</td>
							<td id="<?php 
        echo 'a' . $a . '' . $b;
        ?>
" onclick="edit(<?php 
        echo $a . '' . $b;
示例#6
0
文件: _form.php 项目: C12D/advanced
	'rows'=>[
        [
            'contentBefore'=>'<legend class="text-info"><small>Buat Permintaan Barang</small></legend>',
            'attributes'=>[       // 2 column layout
				'NO_URUT' => ['type' => Form::INPUT_TEXT],
				'KD_BARANG' => ['type' => Form::INPUT_TEXT],
//				'NM_BARANG' => ['type' => Form::INPUT_TEXT],
				'QTY' => ['type' => Form::INPUT_TEXT],
            ]
        ],
		
	],		
]);
*/
$id = $_GET['id'];
$ros = Requestorder::find()->joinWith('employe')->where(['KD_RO' => $id])->asArray()->all();
?>

<div class="requestorder-form" style="margin:0px 20px;">
<form class="form-horizontal">

	<div class="form-group">
		<div class="col-sm-12">
			<br/>
		</div>
	</div>
	
	<div class="form-group">
		<label class="col-sm-2 control-label">Nama User</label>
		<div class="col-sm-5">
			<input type="email" class="form-control" id="inputEmail3" value="<?php