Ejemplo n.º 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Factura::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(['idFactura' => $this->idFactura, 'Monto' => $this->Monto, 'RRHH_idRRHH' => $this->RRHH_idRRHH, 'tiporrhh_idTipoRRHH' => $this->tiporrhh_idTipoRRHH, 'Cliente_idCliente' => $this->Cliente_idCliente, 'Fecha' => $this->Fecha, 'Hora' => $this->Hora]);
     return $dataProvider;
 }
Ejemplo n.º 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getFacturas()
 {
     return $this->hasMany(Factura::className(), ['Cliente_idCliente' => 'idCliente']);
 }
Ejemplo n.º 3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getFacturas()
 {
     return $this->hasMany(Factura::className(), ['tiporrhh_idTipoRRHH' => 'idTipoRRHH']);
 }
Ejemplo n.º 4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getFacturas()
 {
     return $this->hasMany(Factura::className(), ['RRHH_idRRHH' => 'idRRHH']);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getFacturas()
 {
     return $this->hasMany(Factura::className(), ['ID_CLIENTE' => 'ID_CLIENTE']);
 }
 /**
  * Finds the Factura model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $idFactura
  * @param integer $RRHH_idRRHH
  * @param integer $tiporrhh_idTipoRRHH
  * @param integer $Cliente_idCliente
  * @return Factura the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($idFactura, $RRHH_idRRHH, $tiporrhh_idTipoRRHH, $Cliente_idCliente)
 {
     if (($model = Factura::findOne(['idFactura' => $idFactura, 'RRHH_idRRHH' => $RRHH_idRRHH, 'tiporrhh_idTipoRRHH' => $tiporrhh_idTipoRRHH, 'Cliente_idCliente' => $Cliente_idCliente])) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }