Exemplo n.º 1
0
 public function ClientDetailsById(Gyuser_Model_User $obj)
 {
     $row = $this->getDbTable()->fetchRow($this->getDbTable()->select()->where('id = ?', $obj->getId()));
     $CUIL = $row->CUIL;
     $CUIL1 = substr($CUIL, 0, 2);
     $CUIL2 = substr($CUIL, 2, 8);
     $CUIL3 = substr($CUIL, 10, 1);
     $CUIL = $CUIL1 . '-' . $CUIL2 . '-' . $CUIL3;
     //$tel_cell = $this->CellPhoneFormat($row->tel_cell);
     //$tel_otro = $this->CellPhoneFormat($row->tel_otro);
     $tel_cell = $this->LandPhoneFormat($row->tel_cell);
     $tel_otro = $this->LandPhoneFormat($row->tel_otro);
     $tel_lab = $this->LandPhoneFormat($row->tel_lab);
     $tel_part = $this->LandPhoneFormat($row->tel_part);
     //$tel_cell_code = $this->areaCodeOut($row->tel_cell_code);
     $tel_otro_code = $this->areaCodeOut($row->tel_otro_code, $tel_otro);
     $tel_lab_code = $this->areaCodeOut($row->tel_lab_code, $tel_lab);
     $tel_part_code = $this->areaCodeOut($row->tel_part_code, $tel_part);
     $entry = new Gyuser_Model_User();
     $entry->setId($row->id);
     $entry->setClient_type($row->client_type);
     $entry->setFirst_name($row->first_name);
     $entry->setLast_name($row->last_name);
     $entry->setDNI($row->DNI);
     $entry->setCUIL($CUIL);
     $entry->setTel_cell($tel_cell);
     $entry->setTel_lab($tel_lab);
     $entry->setTel_otro($tel_otro);
     $entry->setTel_part($tel_part);
     //$entry->setTel_cell_code($tel_cell_code);
     $entry->setTel_lab_code($tel_lab_code);
     $entry->setTel_otro_code($tel_otro_code);
     $entry->setTel_part_code($tel_part_code);
     $entry->setEmail($row->email);
     $entry->setActivity($row->activity);
     $entry->setDate_added(date("d/m/Y", strtotime($row->date_added)));
     $entry->setOperator($row->operator);
     $entry->setContact_point($row->contact_point);
     $entry->setExtra_info($row->extra_info);
     $entry->setBusiness($row->business);
     $entry->setBusiness_CUIT($row->business_CUIT);
     $entry->setStatus($row->status);
     return $entry;
 }