PHP notice

PHP notice

Undefined offset: 1

/var/www/app/protected/controllers/SiteController.php(487)

475 
476     /**
477      * Publica la factura en pdf para ws y email
478      * @param type $id
479      */
480     public function actionFacturaPdf($id, $ver = null) {
481 
482         $this->layout = 'none';
483 
484         $array = explode('-', $id);
485 
486         $idSyA = $array[0];
487         $idFactura = $array[1];
488 
489         // Apunta a la base de datos de la sucursal
490         Site::setConnDb(substr($idSyA, 0, 5));
491 
492         if (strpos("$idFactura", "C") !== FALSE) {
493             $idFactura = substr($idFactura, 1);
494             $cuenta = Comandas::getCuenta("Cotizacion $idFactura", 0, FALSE, FALSE, null, $idSyA);
495         } else {
496             $sql = "select fecha from comandas where nombreProducto = 'Registro de Control' and idSyA = ?";
497             $fecha = Yii::app()->db->createCommand($sql)->queryScalar(array($idSyA));
498 
499             // Busca si la factura es del d a actual o dias pasados

Stack Trace

#14
+
 /var/www/app/index.php(45): CApplication->run()
40 define("COMANDA_FONT_XLARGE", 14);
41 
42 define("DB_LOCATION", 'REMOTO'); // Define si el software esta local o en la web
43 
44 require_once($yii);
45 Yii::createWebApplication($config)->run();
2026-04-19 23:14:07 Apache/2.4.29 (Ubuntu) Yii Framework/1.1.10