Hello
I have column:
array(
'name' => 'price',
'type' => 'raw',
'value' => 'number_format($data->RealPrice, 2,","," ")',
'footer'=>$model->getTotalSellPrice($model->search_ttn_accept($ttn->id)),
'footerHtmlOptions' => array(
'style' => 'text-align: center; font-weight: bold; font-size: 16px; color: green;',
),
),
Price caltulated:
public function getRealPrice(){
$price = $this->price * $this->vat_percent/ 100 + $this->price;
$shop_price = round($price * $this->shop_percent / 100 + $price, 2);
return $shop_price;
}
How can i do filter like that? what can i add to CDbCriteria?
Now my CDbCriteria is:
$criteria = new CDbCriteria;
$criteria->with = array('category', 'brand');
$criteria->compare('id',$this->id);
$criteria->compare('t.title', $this->title, true);
$criteria->compare('quantity', $this->quantity);
$criteria->compare('article', $this->article, true);
$criteria->compare('accept_quantity', $this->accept_quantity);
$criteria->compare('code', $this->code);
$criteria->compare('t.price', $this->price);
$criteria->addSearchCondition('concat(category.title," ",brand.title," ", t.title, " ", t.size, " ", t.notes)', $this->full_product_name);
Thank you very much.