Example #1
0
 /**
  * registro Reporte Deposito
  * @param \Zend\ServiceManager\ServiceLocatorInterface $serviceLocator
  * @param \Tesoreria\Models\ERequest $request
  * @return \Tesoreria\Models\EResponse
  */
 public static function registroReporteDeposito($serviceLocator, $request)
 {
     $response = new EResponse();
     $params = array();
     $params["request"] = $request;
     $params = json_encode($params);
     $conexion = $serviceLocator->get(Constants::SCHEMA_1)->getDriver()->getConnection();
     $conexion->beginTransaction();
     try {
         self::init($serviceLocator);
         ExpLog::save($serviceLocator, $request->header->serieEquipo, Constants::LOG_ACTIVIDAD, "", "registro Reporte Deposito", $params, "", $request->header->usuario);
         $objRegistracion = ExpRegistracion::crearRegistracion($serviceLocator, Constants::PA_SIS_REPORTE_DEPOSITO, $request);
         $result = ExpRegistracion::crearDetalle($serviceLocator, $objRegistracion, $request);
         $response->result = json_encode($result);
         $conexion->commit();
         $ticketFinal = ExpTicket::getTicketReporteDeposito($serviceLocator, $objRegistracion);
         $response->param_tickets = $ticketFinal;
         return $response;
     } catch (Exception $e) {
         $conexion->rollback();
         ExpLog::save($serviceLocator, $request->header->serieEquipo, Constants::LOG_ERROR, "", "registro Reporte Deposito", $params, $e->getMessage(), $request->header->usuario);
         $error = new Error();
         $error->setMensaje("Error: no se pudo realizar el Reporte de Deposito.");
         $response->error = $error;
         return $response;
     }
 }
Example #2
0
 /**
  * Test Ticket
  * @return \Tesoreria\Models\EResponse
  */
 public function testTicket()
 {
     $response = new EResponse();
     $tickets = ExpTicket::getTicketReporteDeposito($this->serviceLocator);
     $response->param_tickets = $tickets;
     return $response;
 }