public function TS_GET_BLOQUEOS_PROG_DETALLE($sql, $inc = false)
 {
     $datos = $this->_db->consulta($sql);
     if ($this->_db->numRows($datos) > 0) {
         $objetosPack = array();
         $arrayPackages = $this->_db->fetchAll($datos);
         foreach ($arrayPackages as $packDB) {
             $hotel = array();
             $codHotel = array();
             $PA = array();
             $TH = array();
             $codTH = array();
             $cat = array();
             $ciudad = array();
             $incluye = array();
             $valorHab = array();
             $tipoHab = array();
             $planAli = array();
             $objPackages = new bloqueoDTO();
             /* echo "ERROR: " . $packDB['Error']; echo "<br>";
                echo "Linea: " . $packDB['Linea'];echo "<br>";
                echo "Mensaje: " . $packDB['Mensaje']; exit; */
             if (trim(isset($packDB['Error']))) {
                 $objPackages->setERROR(trim($packDB['Error']));
                 $objPackages->setLINEA(trim($packDB['Linea']));
                 $objPackages->setMSG(trim($packDB['Mensaje']));
             } else {
                 $objPackages->setId(trim($packDB['idPRG']));
                 $objPackages->setCodigo(trim($packDB['codigoPRG']));
                 $objPackages->setNota(trim($packDB['notaPRG']));
                 $objPackages->setIdOpc(trim($packDB['idOpcion']));
                 $objPackages->setDesde(trim($packDB['desde']));
                 $objPackages->setTramo(trim($packDB['Tramo']));
                 $objPackages->setNotaOpc(trim($packDB['notaOPC']));
                 $objPackages->setMoneda(trim($packDB['moneda']));
                 $objPackages->setItiVuelo(trim($packDB['itinerarioVuelo']));
                 $objPackages->setRecordC(trim($packDB['record_c']));
                 $objPackages->setNoches(trim($packDB['nochesPRG']));
                 if (file_exists(ROOT . 'public' . DS . 'pdf' . DS . 'upl_' . str_replace(' ', '_', trim($packDB['codigoPRG'])) . '.pdf')) {
                     $objPackages->setPDF(BASE_URL . 'public/pdf/upl_' . str_replace(' ', '_', trim($packDB['codigoPRG'])) . '.pdf');
                     //$objPackages->setPDF(trim($packDB['codigoPRG']));
                 } else {
                     $objPackages->setPDF('');
                 }
                 /* VALOR HABITACION */
                 for ($i = 1; $i <= 3; $i++) {
                     $valorHab[] = trim($packDB['vHab_' . $i]);
                     if (trim($packDB['tipoHab_' . $i]) != '') {
                         $tipoHab[] = str_replace('SGL', ' SINGLE ', str_replace('DBL', ' DOBLE ', str_replace('TPL', ' TRIPLE ', str_replace('QUA', ' CUADRUPLE ', str_replace('DEP', ' DEPARTAMENTO ', str_replace('CHD', ' CHILD ', str_replace('CH2', ' CHILD ', trim($packDB['tipoHab_' . $i]))))))));
                     }
                 }
                 $objPackages->setValorHab($valorHab);
                 $objPackages->setTipoHab($tipoHab);
                 /* VALOR HABITACION */
                 /* HOTELES */
                 for ($i = 1; $i <= 5; $i++) {
                     if (trim($packDB['hotel_' . $i])) {
                         $hotel[] = trim($packDB['hotel_' . $i]);
                         $codHotel[] = trim($packDB['codHotel_' . $i]);
                         $PA[] = trim($packDB['PlanAlimenticio_' . $i]);
                         $TH[] = trim($packDB['TipoHabitacion_' . $i]);
                         $codTH[] = trim($packDB['codTipoHabitacion_' . $i]);
                         $cat[] = trim($packDB['cat_' . $i]);
                         $ciudad[] = trim($packDB['ciudad_' . $i]);
                         $planAli[] = trim($packDB['PlanAlimenticio_' . $i]);
                     }
                 }
                 $objPackages->setHoteles($hotel);
                 $objPackages->setCodHoteles($codHotel);
                 $objPackages->setPA($PA);
                 $objPackages->setTH($TH);
                 $objPackages->setCodTH($codTH);
                 $objPackages->setCat($cat);
                 $objPackages->setCiudad($ciudad);
                 $objPackages->setPlanAL($planAli);
                 /* HOTELES */
                 if ($inc) {
                     $incluye[] = $this->getIncluye(trim($packDB['idPRG']));
                     $objPackages->setIncluye($incluye);
                 }
                 //$objPackages->setXXXX(trim($packDB['xxxxx']));
             }
             $objetosPack[] = $objPackages;
             //sleep(1);
         }
         return $objetosPack;
     } else {
         return false;
     }
 }