[Alba-desarrollo] SVN Alba r5351 - prosistem/alba/trunk/alba/apps/principal/modules/informes/actions

commits en pressenter.com.ar commits en pressenter.com.ar
Mie Dic 26 16:14:45 CET 2007


Author: josx
Date: 2007-12-26 12:14:45 -0300 (Wed, 26 Dec 2007)
New Revision: 5351

Modified:
   prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/actions.class.php
Log:
Se sumo capacidad para listar en los informes los responsables por cuenta o individualmente

Modified: prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/actions.class.php	2007-12-26 15:01:12 UTC (rev 5350)
+++ prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/actions.class.php	2007-12-26 15:14:45 UTC (rev 5351)
@@ -504,6 +504,25 @@
         $aDato = array();
         foreach($aVariable as $idx => $result) { //Recorrer las variables
             switch($idx) { // me fijo que variables debo enviar al template de resultado
+
+                case 'responsable': 
+                    if( array_key_exists('loop', $result) AND $result['loop'] == 1) {
+                        $criteria = new Criteria();
+                        if($this->getRequestParameter('fk_cuenta_id')) {
+                            $criteria->add(ResponsablePeer::FK_CUENTA_ID, $this->getRequestParameter('fk_cuenta_id'));
+                        }
+                        $responsables = ResponsablePeer::doSelect($criteria);
+                        foreach($responsables as $responsable) {
+                            $aDato['responsable'][] = $responsable->toArray();
+                        }
+                    } else {
+                        if($this->getRequestParameter('responsable_id')) {
+                            $responsable = ResponsablePeer::retrieveByPk($this->getRequestParameter('responsable_id'));
+                            $aDato['responsable'] = $responsable->toArray();
+                        }
+                    }
+                    break;
+
                 case 'alumno':
                     //dependiendo si es una variables de cilcos
                     if( array_key_exists('loop', $result) AND $result['loop'] == 1) {
@@ -529,7 +548,6 @@
                             $alumno = AlumnoPeer::retrieveByPk($this->getRequestParameter('alumno_id'));
                             $aDato['alumno'] = $alumno->toArrayInforme();
                         }
-
                     }
                     break;
 




Más información sobre la lista de distribución Alba-desarrollo