Esempio n. 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Kurir::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(['ID' => $this->ID, 'TOTALWEIGHT' => $this->TOTALWEIGHT, 'HARGA' => $this->HARGA]);
     $query->andFilterWhere(['like', 'KURIR', $this->KURIR])->andFilterWhere(['like', 'KATEGORI', $this->KATEGORI])->andFilterWhere(['like', 'KURIRKATEGORI', $this->KURIRKATEGORI])->andFilterWhere(['like', 'ORIGINPROV', $this->ORIGINPROV])->andFilterWhere(['like', 'DESPROV', $this->DESPROV])->andFilterWhere(['like', 'ORIGINCITY', $this->ORIGINCITY])->andFilterWhere(['like', 'DESCITY', $this->DESCITY])->andFilterWhere(['like', 'POSTALCODEORIGIN', $this->POSTALCODEORIGIN])->andFilterWhere(['like', 'POSTALCODEDESC', $this->POSTALCODEDESC]);
     return $dataProvider;
 }
Esempio n. 2
0
 /**
  * Finds the Kurir model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Kurir the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Kurir::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Esempio n. 3
0
 public function actionHarga($ID)
 {
     // $location=Locations::find()->where(['zip_code'=>$zipId])->one();
     $location = Kurir::findOne($ID);
     echo json::encode($location);
 }
Esempio n. 4
0
}
?>
  </table>
    <div class="row">
      
      <?php 
$form = ActiveForm::begin(['method' => 'post', 'action' => ['site/act']]);
?>

      <div class="col-md-7" style="background-color:#f6f6f6;">
        <table class="table row"style="margin-bottom:0px;">
          <tbody>
            <tr>
              <td>
                  <?php 
echo $form->field($model2, 'KURIR')->widget(Select2::classname(), ['data' => ArrayHelper::map(Kurir::find()->all(), 'ID', 'KURIRKATEGORI'), 'language' => 'en', 'options' => ['placeholder' => '--Pilih Kurir--', 'id' => 'KURIR'], 'pluginOptions' => ['allowClear' => true]]);
?>
                 <?php 
echo $form->field($model2, 'HARGA')->textInput(['maxlength' => true])->label('Values Checking');
?>

              </td> 
            </tr>


          <tr>
            <td>
               <b>Details :</b>
            </td>
          </tr>