SVN Alba r4171 - in prosistem/alba/trunk/alba/apps/principal/modules: informes/templates locacion/actions
Author: josx Date: 2007-02-09 11:29:48 -0300 (Fri, 09 Feb 2007) New Revision: 4171 Modified: prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/constanciaAlumnoRegularListadoSuccess.php prosistem/alba/trunk/alba/apps/principal/modules/locacion/actions/actions.class.php Log: Actualiza principal en locacion al modificarlo Modified: prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/constanciaAlumnoRegularListadoSuccess.php =================================================================== --- prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/constanciaAlumnoRegularListadoSuccess.php 2007-02-07 21:51:09 UTC (rev 4170) +++ prosistem/alba/trunk/alba/apps/principal/modules/informes/templates/constanciaAlumnoRegularListadoSuccess.php 2007-02-09 14:29:48 UTC (rev 4171) @@ -1,12 +1,14 @@ GOBIERNO DE LA CIUDAD DE BUENOS AIRES<br> SECRETARÍA DE EDUCACIÓN<br> <?=$establecimiento->getNombre()?> <br> -<?=$locacion->getDireccion()?> - Télefono: <?=$locacion->getTelefono()?> (<?=$locacion->getCodigoPostal()?>) <br> <?=$locacion->getCiudad()?><br> +<? if($locacion) { ?><?=$locacion->getDireccion()?> - Télefono: <?=$locacion->getTelefono()?> (<?=$locacion->getCodigoPostal()?>) <br> <?=$locacion->getCiudad()?><br><? } ?> CONSTANCIA DE ALUMNO REGULAR <br><br> Se hace constar de <?=$alumno->getApellido()?>, <?=$alumno->getNombre()?> es un alumno regular de:<br><br> Año: <?=$division->getAnio()->getDescripcion()?> División: <?=$division->getDescripcion()?> Turno: <?=$turnos->getDescripcion();?>, en este establecimiento<br> +<!-- Fecha: Presentar en: Firma: +--> \ No newline at end of file Modified: prosistem/alba/trunk/alba/apps/principal/modules/locacion/actions/actions.class.php =================================================================== --- prosistem/alba/trunk/alba/apps/principal/modules/locacion/actions/actions.class.php 2007-02-07 21:51:09 UTC (rev 4170) +++ prosistem/alba/trunk/alba/apps/principal/modules/locacion/actions/actions.class.php 2007-02-09 14:29:48 UTC (rev 4171) @@ -51,14 +51,17 @@ if ($locacion->getPrincipal()) { - $c1 = new Criteria(); - $c1->add(RelEstablecimientoLocacionPeer::FK_ESTABLECIMIENTO_ID, $this->getUser()->getAttribute('fk_establecimiento_id')); - $c1->addJoin(LocacionPeer::ID, RelEstablecimientoLocacionPeer::FK_LOCACION_ID); - $c2 = new Criteria(); - $c2->add(LocacionPeer::PRINCIPAL,false); +// $c1 = new Criteria(); +// $c1->add(RelEstablecimientoLocacionPeer::FK_ESTABLECIMIENTO_ID, $this->getUser()->getAttribute('fk_establecimiento_id')); +// $c1->addJoin(LocacionPeer::ID, RelEstablecimientoLocacionPeer::FK_LOCACION_ID); +// $c2 = new Criteria(); +// $c2->add(LocacionPeer::PRINCIPAL,false); +// BasePeer::doUpdate($c1,$c2,$con); -// BasePeer::doUpdate($c1,$c2,$con); - + // Aparentemente propel no soporta aun joins dentro del update + $s = "UPDATE rel_establecimiento_locacion,locacion SET locacion.principal = 0 WHERE locacion.id = rel_establecimiento_locacion.fk_locacion_id AND rel_establecimiento_locacion.fk_establecimiento_id = ".$this->getUser()->getAttribute('fk_establecimiento_id'); + $stmt = $con->createStatement(); + $alumnos = $stmt->executeQuery($s); } $locacion->save();
participants (1)
-
commits@pressenter.com.ar