/**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = LgPenjadwalan::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(['kode' => $this->kode, 'tgl_pengiriman' => $this->tgl_pengiriman, 'tgl_terima' => $this->tgl_terima, 'kendaraan' => $this->kendaraan, 'kurir' => $this->kurir, 'status_approve' => $this->status_approve, 'status_pengiriman' => $this->status_pengiriman, 'ongkir' => $this->ongkir]);
     //$query->andFilterWhere(['like', 'tujuan', $this->tujuan]);
     return $dataProvider;
 }
Beispiel #2
0
 protected function findModelPenjadwalan($id)
 {
     if (($model = LgPenjadwalan::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Beispiel #3
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use app\models\logistic\LgPenjadwalan;
use app\models\logistic\LgPenjadwalanSearch;
/* @var $this yii\web\View */
/* @var $searchModel app\models\logistic\LgPengirimanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Logistik Penjadwalan';
$this->params['breadcrumbs'][] = $this->title;
$a = new LgPenjadwalan();
?>
<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>
            </div>
            <h3><i class="fa fa-ok-circle"></i><?php 
echo Html::encode($this->title);
?>
</h3>
        </div>
            <div class="widget-content">
                <div class="row">
                    <div class="col-md-12">
                        <table class="table">
Beispiel #4
0
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use app\models\logistic\LgPenjadwalan;
use app\models\logistic\LgKendaraan;
use app\models\logistic\LgPegawai;
/* @var $this yii\web\View */
/* @var $model app\models\logistic\LgPengiriman */
/* @var $form yii\widgets\ActiveForm */
$model = new LgPenjadwalan();
foreach ($model->findPenjadwalan() as $key => $value) {
}
$kode = $value['kode'];
$tgl1 = $value['date_order_placed'];
$tgl2 = date('Y-m-d', strtotime('+3 days', strtotime($tgl1)));
?>

    <?php 
$form = ActiveForm::begin();
?>
   
    <?php 
echo $form->field($model, 'tgl_pengiriman')->textInput(['readonly' => true, 'value' => $tgl2]);
?>

    <?php 
echo $form->field($model, 'kendaraan')->dropdownList(LgKendaraan::find()->select(['nomor_polisi', 'kode'])->indexBy('kode')->column(), ['prompt' => 'Select Kendaraan']);
?>

    <?php