/**
  * @Route("/admin/hotel/update/contrato", name="hotel_update_contrato") todo lo mismo que el metodo anterior
  * @Method("POST")
  */
 public function updateHotelContratoAction(Request $request)
 {
     $serializer = $this->get('serializer');
     try {
         $hotelContratoJson = $request->get('hotelContrato');
         $hotelContratoTO = $serializer->deserialize($hotelContratoJson, 'VisitaYucatanBundle\\utils\\to\\ContractTO', Generalkeys::JSON_STRING);
         $fechasFormat = DateUtil::getDates($hotelContratoTO->getFechaInicio(), $hotelContratoTO->getFechaFin());
         $hotelContratoTO->setFechaInicio($fechasFormat[Generalkeys::NUMBER_ZERO]);
         $hotelContratoTO->setFechaFin($fechasFormat[Generalkeys::NUMBER_ONE]);
         $this->getDoctrine()->getRepository('VisitaYucatanBundle:HotelContrato')->updateContract($hotelContratoTO);
         $response = new ResponseTO(Generalkeys::RESPONSE_TRUE, 'El contrato se ha actualizado correctamente ', Generalkeys::RESPONSE_SUCCESS, Generalkeys::RESPONSE_CODE_OK);
         return new Response($this->get('serializer')->serialize($response, Generalkeys::JSON_STRING));
     } catch (\Exception $e) {
         return new Response($this->get('serializer')->serialize(new ResponseTO(Generalkeys::RESPONSE_FALSE, $e->getMessage(), Generalkeys::RESPONSE_ERROR, $e->getCode()), Generalkeys::JSON_STRING));
     }
 }