Ejemplo n.º 1
0
 public function search($params)
 {
     $query = TransferHdrModel::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['id_transfer' => $this->id_transfer, 'id_warehouse_source' => $this->id_warehouse_source, 'id_warehouse_dest' => $this->id_warehouse_dest, 'transfer_date' => $this->transfer_date, 'receive_date' => $this->receive_date, 'status' => $this->status, 'create_by' => $this->create_by, 'update_by' => $this->update_by]);
     $query->andFilterWhere(['like', 'transfer_num', $this->transfer_num])->andFilterWhere(['like', 'create_date', $this->create_date])->andFilterWhere(['like', 'update_date', $this->update_date]);
     return $dataProvider;
 }
Ejemplo n.º 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIdTransfers()
 {
     return $this->hasMany(TransferHdr::className(), ['id_transfer' => 'id_transfer'])->viaTable('transfer_dtl', ['id_product' => 'id_product']);
 }
Ejemplo n.º 3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTransferHdrs()
 {
     return $this->hasMany(TransferHdr::className(), ['id_warehouse_dest' => 'id_warehouse']);
 }
Ejemplo n.º 4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIdTransfer()
 {
     return $this->hasOne(TransferHdr::className(), ['id_transfer' => 'id_transfer']);
 }