Esempio n. 1
0
 /**
  * Finds the NotaVenta model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return NotaVenta the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = NotaVenta::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Esempio n. 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getNotaVentas()
 {
     return $this->hasMany(NotaVenta::className(), ['id_cliente' => 'id']);
 }
Esempio n. 3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIdNotaVenta()
 {
     return $this->hasOne(NotaVenta::className(), ['id' => 'id_nota_venta']);
 }
Esempio n. 4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getNotaVentas()
 {
     return $this->hasMany(NotaVenta::className(), ['id_empleado' => 'Id']);
 }