diff --git a/AF/AF.aspx b/AF/AF.aspx
index 39c56b4b3..81fd169d0 100644
--- a/AF/AF.aspx
+++ b/AF/AF.aspx
@@ -1362,7 +1362,55 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb
index 56796b4fa..db5d2faa8 100644
--- a/AF/AF.aspx.vb
+++ b/AF/AF.aspx.vb
@@ -280,8 +280,64 @@ Partial Class AF_AF
End If
CargaAFInv()
+ cargaOrdenesdeservicio()
End If
End Sub
+ Private Sub cargaOrdenesdeservicio()
+ Dim dt As New DataTable()
+ dt.Columns.Add("Folio", GetType(String))
+ dt.Columns.Add("Fecha", GetType(Date))
+ dt.Columns.Add("Obra", GetType(String))
+ dt.Columns.Add("TipodeServicio", GetType(String))
+ dt.Columns.Add("Servicio", GetType(String))
+ dt.Columns.Add("Estatus", GetType(String))
+ dt.Columns.Add("Duracion", GetType(String))
+ dt.Columns.Add("Atendio", GetType(String))
+
+ Dim dr As DataRow = dt.NewRow()
+ dr("Folio") = "101"
+ dr("Fecha") = "2019/08/23"
+ dr("Obra") = "Ganaderos"
+ dr("TipodeServicio") = "Preventivo"
+ dr("Servicio") = "100 Hrs"
+ dr("Estatus") = "Terminada"
+ dr("Duracion") = "5 Hrs"
+ dr("Atendio") = "Juan perez"
+ dt.Rows.Add(dr)
+ dr = dt.NewRow()
+ dr("Folio") = "190"
+ dr("Fecha") = "2019/09/30"
+ dr("Obra") = "Ganaderos"
+ dr("TipodeServicio") = "Preventivo"
+ dr("Servicio") = "200 Hrs"
+ dr("Estatus") = "Terminada"
+ dr("Duracion") = "5 hrs"
+ dr("Atendio") = "Ernesto Lopez"
+ dt.Rows.Add(dr)
+ dr = dt.NewRow()
+ dr("Folio") = "501"
+ dr("Fecha") = "2019/11/30"
+ dr("Obra") = "Vildósola"
+ dr("TipodeServicio") = "Preventivo"
+ dr("Servicio") = "400 Hrs"
+ dr("Estatus") = "Terminada"
+ dr("Duracion") = "8 hrs"
+ dr("Atendio") = "Juan perez"
+ dt.Rows.Add(dr)
+ dr = dt.NewRow()
+ dr("Folio") = "505"
+ dr("Fecha") = "2019/12/14"
+ dr("Obra") = "Vildósola"
+ dr("TipodeServicio") = "Correctivo"
+ dr("Servicio") = "Rep. Mayor motor"
+ dr("Estatus") = "En proceso"
+ dr("Duracion") = "ND"
+ dr("Atendio") = "Juan perez"
+ dt.Rows.Add(dr)
+
+ GVOrdenesdeServicio.DataSource = dt
+ GVOrdenesdeServicio.DataBind()
+ End Sub
Private Sub CargaFechaGPS()
TxtFechaIH.Text = $"01/{DateTime.Now.ToString("MM")}/{DateTime.Now.Year} 00:00"
TxtFechaFH.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59"
@@ -472,7 +528,7 @@ Partial Class AF_AF
Private Sub CargaAFInv()
If UsuarioActual.Empresa.UsaInventarios AndAlso CveActivoFijo <= 0 Then
- HLAFInv.Visible = True
+ HLAFInv.Visible= True
Dim StrAlmacenes As String = "CveTipoAlmacen IN (1,2)"
DdlAFInvAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, CveEmpresaActual, -1).FiltraParametros(StrAlmacenes)
diff --git a/App_Code/WsSigfox.vb b/App_Code/WsSigfox.vb
index 6259ddbee..a3919f0f1 100644
--- a/App_Code/WsSigfox.vb
+++ b/App_Code/WsSigfox.vb
@@ -22,8 +22,8 @@ Namespace Sigfox
Dim ObjGPS As New ClsGPS()
Try
- Dim Datos = GetSigfoxDataSuntechTool(params.data)
- respuesta.Datos = Datos
+ 'Dim Datos = GetSigfoxDataSuntechTool(params.data)
+ 'respuesta.Datos = Datos
Dim DevID As String = params.device
Dim Lat As Double = params.lat.ToDouble()
@@ -32,16 +32,16 @@ Namespace Sigfox
Dim Velocidad As Double = 0
Dim MessageType As Integer = 0
- If Datos IsNot Nothing Then
- If Datos.Item("Tipo-01") IsNot Nothing Then
- If Datos("Tipo-01")("Latitud") IsNot Nothing Then
- Lat = Datos("Tipo-01")("Latitud").ToString().ToDouble()
- End If
- If Datos("Tipo-01")("Longitud") IsNot Nothing Then
- Lng = Datos("Tipo-01")("Longitud").ToString().ToDouble()
- End If
- End If
- End If
+ 'If Datos IsNot Nothing Then
+ ' If Datos.Item("Tipo-01") IsNot Nothing Then
+ ' If Datos("Tipo-01")("Latitud") IsNot Nothing Then
+ ' Lat = Datos("Tipo-01")("Latitud").ToString().ToDouble()
+ ' End If
+ ' If Datos("Tipo-01")("Longitud") IsNot Nothing Then
+ ' Lng = Datos("Tipo-01")("Longitud").ToString().ToDouble()
+ ' End If
+ ' End If
+ 'End If
Dim Trama As String = String.Format("ST730;{0};{1};{2};{3};{4};{5};{6};{7};{8};{9};{10};{11};{12};{13}", params.data, DevID, Lat, Lng, Fecha,
Velocidad, MessageType, params.avgSnr, params.duplicate, params.rssi, params.seqNumber, params.snr,
@@ -65,6 +65,65 @@ Namespace Sigfox
End Function
#Region "F U N C I O N E S"
+
+ Public Function procesatrama(header As String, trama As String) As String
+ Dim retorno As String = ""
+ Dim strbyte As String = ""
+ Dim hexValue As String = ""
+ Dim index As Integer = 3
+ Dim longitud As Integer = trama.Length
+ While longitud > index
+ strbyte = trama.Substring(index, 2)
+ index = index + 2
+ Select Case strbyte
+ Case "01" 'GPS location
+ If longitud > (index + 12) Then
+ hexValue = trama.Substring(index, 6) 'latitud
+ index = index + 6
+ hexValue = trama.Substring(index, 6) 'longitude
+ index = index + 6
+ Else
+ index = index + 12
+ End If
+ Case "02" 'High resolution GPS location
+ If longitud > (index + 16) Then
+ hexValue = trama.Substring(index, 8) 'latitud
+ index = index + 8
+ hexValue = trama.Substring(index, 8) 'longitude
+ index = index + 8
+ Else
+ index = index + 8
+ End If
+ Case "03" 'Temperatura
+ hexValue = trama.Substring(index, 2)
+ index = index + 2
+ Case "04" 'Battery voltage
+ hexValue = trama.Substring(index, 2)
+ index = index + 2
+ Case "05" 'Battery level
+ hexValue = trama.Substring(index, 2)
+ index = index + 2
+ Case "06" 'Wifi Mac address (6 bytes) + 1 byte for RSSI (positive dBm)
+ hexValue = trama.Substring(index, 14)
+ index = index + 14
+ Case "07" 'Wifi Extended: 6 bytes for MAC address, 1 bytes for RSSI and 3 bytes for a NIC that as the same OUI as the 6 bytes MAC address
+ hexValue = trama.Substring(index, 20)
+ index = index + 20
+ Case "08" 'Accelerometer (2 bytes per axis)
+ hexValue = trama.Substring(index, 12)
+ index = index + 12
+ Case "09" 'Speed in km/h
+ hexValue = trama.Substring(index, 2)
+ index = index + 2
+ Case "8x" 'Fence number
+ hexValue = trama.Substring(index, 2)
+ index = index + 2
+ Case Else
+ index = index + 2 'se desconoce pero se avanza 1 bytes
+ End Select
+ End While
+ Return retorno
+ End Function
'''
''' Obtiene los valores de los datos usando la libreria de SigfoxParse.js
'''
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index 3b343b278..b55948612 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -2335,16 +2335,16 @@ Partial Class PopUpVerFactura
Dim ObjCompra As New ClsCompras()
If ObjCompra.GetCompras(CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow = ObjCompra.DtResultados.Rows(0)
- Dim FechaCompra As Date = dr("Fecha").ToString.ToDate
+ Dim FechaCompra As Date = dr("FechaMovto").ToString.ToDate
Dim FechaVencimiento As Date = dr("FechaVencimiento").ToString.ToDate
params.Add(New ReportParameter("Fecha", FechaCompra.ToShortDateString))
params.Add(New ReportParameter("FechaVencimiento", FechaVencimiento.ToShortDateString))
params.Add(New ReportParameter("Plazo", DateDiff(DateInterval.Day, FechaCompra, FechaVencimiento).ToString))
- params.Add(New ReportParameter("Folio", Folio.ToString))
+ 'params.Add(New ReportParameter("Folio", Folio.ToString))
params.Add(New ReportParameter("Serie", dr("Serie").ToString))
'params.Add(New ReportParameter("NumeroOrden", dr("OCVinculada").ToString))
- 'params.Add(New ReportParameter("FacturaProveedor", dr("SerieFolio").ToString))
+ params.Add(New ReportParameter("FacturaProveedor", dr("SerieFolio").ToString))
params.Add(New ReportParameter("NombreProveedor", dr("RazonSocial").ToString))
params.Add(New ReportParameter("DireccionProveedor", dr("Direccion").ToString))
params.Add(New ReportParameter("CiudadProveedor", " "))
diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx
index d3ce5043b..9a90ffba9 100644
--- a/Inventarios/EntradasSalidas.aspx
+++ b/Inventarios/EntradasSalidas.aspx
@@ -1063,7 +1063,8 @@
-
+
+
@@ -1278,7 +1279,7 @@
diff --git a/Nomina/Nomina2.aspx b/Nomina/Nomina2.aspx
index 176fdd0eb..186d56933 100644
--- a/Nomina/Nomina2.aspx
+++ b/Nomina/Nomina2.aspx
@@ -4,6 +4,10 @@