public function afterDelete() { $finv = FinvInvoice::model()->findByPk($this->fiit_finv_id); $finv->save(); parent::afterDelete(); }