Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function search() {
- $criteria = new CDbCriteria;
- $criteria->with = array(
- 'stockIssuance'=>array(
- 'alias'=>'si',
- 'with'=>array(
- 'keeper'=>array(
- 'alias'=>'sik',
- 'with'=>array(
- 'profile'=>array(
- 'alias'=>'sikp'
- )
- )
- ),
- 'employee'=>array(
- 'alias'=>'sie',
- 'with'=>array(
- 'profile'=>array(
- 'alias'=>'siep'
- )
- )
- ),
- )
- ),
- );
- $alias = 'sid';
- $criteria->alias = $alias;
- $criteria->compare("$alias.id", $this->id);
- $criteria->compare('quantity_whole_on_hand', $this->quantity_whole_on_hand);
- $criteria->compare('quantity_part_on_hand', $this->quantity_part_on_hand);
- $criteria->compare('item_detail_id', $this->item_detail_id, true);
- $criteria->compare('stock_issuance_id', $this->stock_issuance_id);
- $criteria->compare('CONCAT_WS(" ",sikp.first_name, sikp.last_name)',$this->keeper_name,true);
- $criteria->compare('CONCAT_WS(" ",siep.first_name, siep.last_name)',$this->employee_name,true);
- return new CActiveDataProvider($this,array('criteria'=>$criteria));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement