diff --git a/GPS/TrayectoDetalle.aspx.vb b/GPS/TrayectoDetalle.aspx.vb index 530b6ad37..dc4fc125d 100644 --- a/GPS/TrayectoDetalle.aspx.vb +++ b/GPS/TrayectoDetalle.aspx.vb @@ -393,10 +393,19 @@ Partial Class GPS_TrayectoDetalle Using ObjGPS As New ClsGPS If ObjGPS.GetTrayectosGeoReferencias(CveTrayecto) Then - Dim Row As DataRow = ObjGPS.DtResultados.FiltroPrimero($"CveEstatusTrayecto = {CveEstatusActual}") - If Row IsNot Nothing Then - CveEstatusSiguiente = Row("CveEstatusSiguiente").ToString().ToEntero() + If CveEstatusActual = 1 Then + 'TOMA LA GEOCERCA DE INICIO + Dim Row As DataRow = ObjGPS.DtResultados.FiltroPrimero($"EsInicio = True") + If Row IsNot Nothing Then + CveEstatusSiguiente = Row("CveEstatusTrayecto").ToString().ToEntero() + End If + Else + Dim Row As DataRow = ObjGPS.DtResultados.FiltroPrimero($"CveEstatusTrayecto = {CveEstatusActual}") + If Row IsNot Nothing Then + CveEstatusSiguiente = Row("CveEstatusSiguiente").ToString().ToEntero() + End If End If + End If If CveEstatusSiguiente > 0 Then