diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 30171da5f..0e131aa7b 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -210,6 +210,21 @@ Public Class ClsGenerales End Try Return retorno End Function + + Public Function SAT_DescargaSolicitudeUUIDSGET(CveSolicitudSat As Int32) As Boolean + Dim retorno As Boolean = False + DataAdapter("[PA_Gral_DescargaSolicitudesUUIDSGET]", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveSolicitudSat", SqlDbType.Int).Value = CveSolicitudSat + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function #Region " I N D I C A D O R E S Y G R A F I C A S" Public Function GetIndicadores(CveEmpresa As Integer) As DataSet 'Dim Retorno As Boolean = False diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 4dcf2318d..e4cb5ef17 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -2862,6 +2862,40 @@ Public Class ClsVentas Return OnError End Function + + Public Function GETVentasPendientesdeTimbrar(CveEmpresa As Integer) As Boolean + Dim OnError As Boolean = False + DataAdapter("PA_Vta_VentasPendientesdeTimbrar") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + OnError = True + Catch ex As Exception + Me.OnError("Ocurrió un error al obtener las facturas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return OnError + End Function + Public Function GETVentasPendientesdeCancelar(CveEmpresa As Integer) As Boolean + Dim OnError As Boolean = False + DataAdapter("PA_Vta_VentasPendientesdeCancelar") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + OnError = True + Catch ex As Exception + Me.OnError("Ocurrió un error al obtener las facturas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return OnError + End Function + Public Function GetFacturasCanceladasPendientes(FoliosFiscales As String, CveEmpresa As Integer) As Boolean Dim OnError As Boolean = False DataAdapter("PA_Vta_FacturasCanceladasPendientesGet") diff --git a/App_Code/WsSigfox.vb b/App_Code/WsSigfox.vb index a3919f0f1..767dcf9e4 100644 --- a/App_Code/WsSigfox.vb +++ b/App_Code/WsSigfox.vb @@ -19,10 +19,11 @@ Namespace Sigfox Public Function CrearTrama( params As DispositivoGPS) As Object Dim respuesta = New With {.Correcto = False, .Mensaje = "", .Datos = New JObject} + Dim datos As String = "" '"0104000000000000" Dim ObjGPS As New ClsGPS() Try - 'Dim Datos = GetSigfoxDataSuntechTool(params.data) + 'Dim Datos = GetSigfoxDataSuntechTool(params.data) se calcula por Base de datos revisar el AddTrama 'respuesta.Datos = Datos Dim DevID As String = params.device @@ -48,6 +49,10 @@ Namespace Sigfox params.station, params.time) If ObjGPS.AddTrama(DevID, Trama, Lat, Lng, Fecha, Velocidad, "ST730") Then + If ObjGPS.DtResultados.Rows.Count > 0 Then + datos = ObjGPS.DtResultados.Rows(0)("Comando").ToString() + 'CveDispositivo = ObjGPS.DtResultados.Rows(0)("CveDispositivo").ToString() + End If respuesta.Correcto = True respuesta.Mensaje = "La trama se agregó correctamente" Else @@ -61,7 +66,16 @@ Namespace Sigfox Finally ObjGPS.Dispose() End Try - Return respuesta + + Dim response As HttpResponseMessage + If datos.Length > 0 Then + Dim jsonString As String = $"{{""{params.device}"":{{""downlinkData"":""{datos}""}}}}" + response = Me.Request.CreateResponse(HttpStatusCode.OK) + response.Content = New StringContent(jsonString, Encoding.UTF8, "application/json") + Else + response = Request.CreateResponse(HttpStatusCode.NoContent, "") + End If + Return response End Function #Region "F U N C I O N E S" diff --git a/Bancos/RegistroPagoIntermediario.aspx.vb b/Bancos/RegistroPagoIntermediario.aspx.vb index cd7f32ce5..17e4bc86e 100644 --- a/Bancos/RegistroPagoIntermediario.aspx.vb +++ b/Bancos/RegistroPagoIntermediario.aspx.vb @@ -246,7 +246,7 @@ Partial Class Bancos_PagosIntermediarios Else ObjIE.RollBack() Alert(String.Format("Ocurrió un error al registrar el movimiento."), TipoMensaje.MsgError) - GuardaLog(MsgError) + GuardaLog($"RegistroPagoIntermediario --> {MsgError}") End If ObjIE.Dispose() diff --git a/Inicio.aspx b/Inicio.aspx index bc2192868..d7c9313e4 100644 --- a/Inicio.aspx +++ b/Inicio.aspx @@ -800,7 +800,93 @@ + + +