/** * @return \yii\db\ActiveQuery */ public function getMovement() { return $this->hasOne(GoodsMovement::className(), ['id' => 'movement_id']); }
/** * @return \yii\db\ActiveQuery */ public function getGMovement() { return $this->hasOne(\backend\models\inventory\GoodsMovement::className(), ['id' => 'reff_id']); }
/** * @return \yii\db\ActiveQuery */ public function getMovements() { return $this->hasMany(GoodsMovement::className(), ['reff_id' => 'id'])->andOnCondition(['reff_type' => self::REFF_SELF]); }