/** * Creates data provider instance with search query applied * * @param array $params * * @return ActiveDataProvider */ public function search($params) { $query = MedioPago::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]); $query->andFilterWhere(['like', 'nombre', $this->nombre])->andFilterWhere(['like', 'info', $this->info]); return $dataProvider; }
</div> </div> <div class="center"> <h4>Detalles de pago</h4> <div class="row"> <div class="col-lg-6"><?php echo $form->field($model, 'fecha_pago')->widget(DateControl::className(), ['type' => DateControl::FORMAT_DATE]); ?> </div> </div> <div class="row"> <div class="col-lg-6"><?php echo $form->field($model, 'medio')->dropDownList(ArrayHelper::map(MedioPago::find()->all(), 'id', 'nombre')); ?> </div> </div> <div class="row"> <div class="col-lg-6"><?php echo $form->field($model, 'valor')->widget(MaskMoney::className(), ['pluginOptions' => ['prefix' => '$ ', 'suffix' => '', 'thousands' => '.', 'decimal' => ',', 'allowNegative' => false]]); ?> </div> </div> <div class="row"> <div class="col-lg-6"><?php echo $form->field($model, 'comprobante')->textInput(['maxlength' => true]); ?>