/**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = DebtCollector::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
 public function getDebterInfo()
 {
     $debter = DebtCollector::model()->findAll();
     $list = CHtml::listData($debter, 'id', 'ConcateDebtorInfo');
     return $list;
 }
 protected function gridDebterColumn($data, $row)
 {
     $debter_client = DebterClientRef::model()->find('client_id=:clientID', array(':clientID' => $data->client_id));
     if ($debter_client) {
         $debter = DebtCollector::model()->find('id=:debterID', array(':debterID' => $debter_client->debter_id));
         print_r($debter->fullname);
     } else {
         print_r('N/A');
     }
 }