예제 #1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Unitbarang::find()->where('STATUS <> 3');
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['ID' => $this->ID, 'WIGHT' => $this->WIGHT, 'CREATED_AT' => $this->CREATED_AT, 'UPDATED_AT' => $this->UPDATED_AT, 'STATUS' => $this->STATUS]);
     $query->andFilterWhere(['like', 'KD_UNIT', $this->KD_UNIT])->andFilterWhere(['like', 'NM_UNIT', $this->NM_UNIT])->andFilterWhere(['like', 'SIZE', $this->SIZE])->andFilterWhere(['like', 'COLOR', $this->COLOR])->andFilterWhere(['like', 'NOTE', $this->NOTE])->andFilterWhere(['like', 'CREATED_BY', $this->CREATED_BY])->andFilterWhere(['like', 'UPDATED_BY', $this->UPDATED_BY]);
     return $dataProvider;
 }
예제 #2
0
파일: _detail.php 프로젝트: C12D/advanced
	    <tr>
	    	<td><?php 
    echo $a;
    ?>
</td>
	      	<td><?php 
    echo $isipo->NM_BARANG;
    ?>
</td>
	      	<td><?php 
    echo $isipo->QTY;
    ?>
</td>
	      	<td>
		      	<?php 
    $brg = Unitbarang::find('NM_UNIT')->where(['KD_UNIT' => $isipo->UNIT])->one();
    echo $brg->NM_UNIT;
    ?>
	      	</td>
	      	<td>
		      	<?php 
    //	$isidet = Purchasedetail::find('ID')->where(['KD_PO'=>$kdpo, 'KD_BARANG'=>$isipo->KD_BARANG,'UNIT'=>$isipo->UNIT])->one();
    // 		$hsl = Podetail::find()->where(['KD_PO'=>$kdpo, 'ID_DET_PO'=>$isidet->ID])->one();
    //	if($hsl->QTY >= $isipo->QTY){ } else{
    ?>
	      		<input type="checkbox" name="selection[]" value="<?php 
    echo $isipo->KD_BARANG . '_' . $isipo->ID;
    ?>
">
	      		<?php 
    //}
예제 #3
0
파일: _update.php 프로젝트: C12D/advanced
$drop = ArrayHelper::map(Tipebarang::find()->where(['STATUS' => 1])->all(), 'KD_TYPE', 'NM_TYPE');
?>
    <?php 
echo $form->field($model, 'KD_TYPE')->dropDownList($drop, ['prompt' => ' -- Pilih Salah Satu --'])->label('Type Barang');
?>
	

	<?php 
$drop = ArrayHelper::map(Kategori::find()->where(['STATUS' => 1])->all(), 'KD_KATEGORI', 'NM_KATEGORI');
?>
    <?php 
echo $form->field($model, 'KD_KATEGORI')->dropDownList($drop, ['prompt' => ' -- Pilih Salah Satu --'])->label('Kategori');
?>

	<?php 
$drop = ArrayHelper::map(Unitbarang::find()->where(['STATUS' => 1])->all(), 'KD_UNIT', 'NM_UNIT');
?>
    <?php 
echo $form->field($model, 'KD_UNIT')->dropDownList($drop, ['prompt' => ' -- Pilih Salah Satu --'])->label('Unit');
?>

	<?php 
$drop = ArrayHelper::map(Suplier::find()->where(['STATUS' => 1])->all(), 'KD_SUPPLIER', 'NM_SUPPLIER');
?>
    <?php 
echo $form->field($model, 'KD_SUPPLIER')->dropDownList($drop, ['prompt' => ' -- Pilih Salah Satu --'])->label('Supplier');
?>

    <?php 
echo $form->field($model, 'PARENT')->textInput(['maxlength' => true]);
?>
예제 #4
0
 public function getUnit()
 {
     return $this->hasOne(Unitbarang::className(), ['KD_UNIT' => 'KD_UNIT']);
 }
예제 #5
0
 /**
  * Finds the Unitbarang model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param string $id
  * @param string $kd_unit
  * @return Unitbarang the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($ID, $KD_UNIT)
 {
     if (($model = Unitbarang::findOne(['ID' => $ID, 'KD_UNIT' => $KD_UNIT])) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
예제 #6
0
파일: _form.php 프로젝트: C12D/advanced
		</div>
	</div>

	<div class="form-group">
		<div class="col-sm-12">
			<br/>
		</div>
	</div>

 </form>
 
 
<?php 
$form = ActiveForm::begin(['method' => 'post', 'action' => ['esm/requestorder/simpan?id=' . $id]]);
$brg = ArrayHelper::map(Barangumum::find()->all(), 'KD_BARANG', 'NM_BARANG');
$unit = ArrayHelper::map(Unitbarang::find()->all(), 'KD_UNIT', 'NM_UNIT');
echo $form->field($rodetail, 'CREATED_AT')->hiddenInput(['value' => date('Y-m-d H:i:s')])->label(false);
?>
	
<?php 
echo $form->field($rodetail, 'NM_BARANG')->hiddenInput(['value' => ''])->label(false);
?>
	

<?php 
echo $form->field($rodetail, 'KD_RO')->textInput(['value' => $id, 'readonly' => true])->label('Kode Request Order');
?>

<div class="row">
  <div class="col-xs-3"><?php 
echo $form->field($rodetail, 'KD_BARANG')->dropDownList($brg, ['prompt' => ' -- Pilih Salah Satu --', 'onchange' => '$("#rodetail-nm_barang").val($(this).find("option:selected").text())'])->label('Nama Barang');