private function extraerFondo() { $t_fondo = strstr($this->text, "Fondo: "); $pos_limite = strpos($t_fondo, "Monto Total"); $fondo_txt = substr($t_fondo, 0, $pos_limite); $fondo_txt = substr($fondo_txt, 7); $fondo_txt = trim($fondo_txt); $fondo_txt = str_replace(PHP_EOL, '', $fondo_txt); $fondo_txt = str_replace(' ', '', $fondo_txt); $fondo_txt = utf8_encode($fondo_txt); $fondo = Fondo::whereDFondo($fondo_txt)->get(); if (count($fondo) > 0) { $this->fondo = $fondo[0]->fondo; } //@todo Agregar mensaje y bandera de error cuando no se encuentre el fondo //@todo Agregar fomulario emergente para dar de alta el fondo $this->d_fondo = $fondo_txt; }