Beispiel #1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Kemasan::find();
     $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(['Kemasan_ID' => $this->Kemasan_ID, 'Qty' => $this->Qty]);
     $query->andFilterWhere(['like', 'Nama', $this->Nama]);
     return $dataProvider;
 }
Beispiel #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getKemasan()
 {
     return $this->hasOne(Kemasan::className(), ['Kemasan_ID' => 'Kemasan_ID']);
 }
Beispiel #3
0
?>

    <?php 
echo $form->field($model, 'Kode_Barang')->textInput(['disabled' => false]);
?>

    <?php 
echo $form->field($model, 'Nama_Barang')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'Jenis_Barang')->dropDownList(ArrayHelper::map(JenisBarang::find()->all(), 'Jenis_Barang_ID', 'Nama'), ['prompt' => 'Select Jenis Barang']);
?>

    <?php 
echo $form->field($model, 'Kemasan_ID')->dropDownList(ArrayHelper::map(Kemasan::find()->all(), 'Kemasan_ID', 'Qty', 'Nama'), ['prompt' => 'Select Kemasan']);
?>

    <?php 
echo $form->field($model, 'Blok_ID')->dropDownList(ArrayHelper::map(Blok::find()->all(), 'Blok_ID', 'Nama'), ['prompt' => 'Select Blok']);
?>

    <?php 
echo $form->field($model, 'Kadaluarsa')->textInput(['maxlength' => 255, 'class' => 'form-control input-datepicker class'])->label('Kadaluarsa');
?>

    <?php 
echo $form->field($model, 'Status')->textInput();
?>

    <?php 
 public function actionKemasandelete($id)
 {
     $model = Kemasan::findOne($id)->delete();
     $this->layout = $this->CheckSession();
     return $this->redirect(['warehouse/kemasanindex']);
 }
Beispiel #5
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use app\models\warehouse\Kemasan;
$roleModel = new Kemasan();
/* @var $this yii\web\View */
/* @var $searchModel app\models\KemasanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Data Kemasan';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="side">
    <div class="sub-sidebar-wrapper">
      <ul class="nav">
      <?php 
echo Nav::widget(['items' => [['label' => 'Barang', 'url' => ['/warehouse/barangindex']], ['label' => 'Kemasan', 'url' => ['/warehouse/kemasanindex']], ['label' => 'Jenis Barang', 'url' => ['/warehouse/jenisbarangindex']], ['label' => 'Gudang', 'url' => ['/warehouse/gudangindex']], ['label' => 'Blok', 'url' => ['/warehouse/blokindex']], ['label' => 'Distributor', 'url' => ['warehouse/distributorindex']]]]);
?>
      </ul>
    </div>
</div>
<div class="col-md-12">
    <div class="widget widget-green">
        <div class="widget-title">
            <div class="widget-controls">
                <a href="#" class="widget-control widget-control-full-screen" data-toggle="tooltip" data-placement="top" title="" data-original-title="Full Screen"><i class="fa fa-expand"></i></a>
                <a href="#" class="widget-control widget-control-full-screen widget-control-show-when-full" data-toggle="tooltip" data-placement="left" title="" data-original-title="Exit Full Screen"><i class="fa fa-expand"></i></a>
                <a href="#" class="widget-control widget-control-refresh" data-toggle="tooltip" data-placement="top" title="" data-original-title="Refresh"><i class="fa fa-refresh"></i></a>
                <a href="#" class="widget-control widget-control-minimize" data-toggle="tooltip" data-placement="top" title="" data-original-title="Minimize"><i class="fa fa-minus-circle"></i></a>