diff --git a/AF/RepDepreciacion.aspx b/AF/RepDepreciacion.aspx
index 9d4588dd0..a6faf68bf 100644
--- a/AF/RepDepreciacion.aspx
+++ b/AF/RepDepreciacion.aspx
@@ -42,6 +42,9 @@
")
- SBBody.Append($"
Punto: {row.DataKey("PuntoDeInteres")}
")
+ FechaF = If(txtFechaF.Text.Trim = "", MaxFecha, txtFechaF.Text.Trim.ToDate)
+
+ Dim ObjGPS As New ClsGPS
+ Try
+ For Each row As GridViewRow In GvPuntos.Rows
+ SBBody.Clear()
+ If row.FCCheckBox("chkGR").Checked Then
+ If ObjGPS.RepPuntosGet(row.DataKey("CvePuntoDeInteres").ToEntero, Dispositivos, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, UsuarioActual.CveCliente) Then
+
+ DtDatosReporte = ObjGPS.DtResultados.Copy()
+ GvBarra.DataSource = DtDatosReporte
+
+ Coords = SQLToGmaps(row.DataKey("Punto").ToString, "POINT")
+ SBBody.Append($"
")
+ SBBody.Append($"
Punto: {row.DataKey("PuntoDeInteres")}
")
+
+ If ObjGPS.DtResultados.Rows.Count > 0 Then
+ Color = "#26C281"
+ SBBody.Append($"
")
+ For Each Cve As String In DispositivosLista
+ If ObjGPS.DtResultados.FiltraParametros($"CveDispositivo = {Cve} ").Rows.Count > 0 Then
+ SBBody.Append($"| {ObjGPS.DtResultados.FiltroPrimeroValor("Vehiculo", $"CveDispositivo = {Cve}")}: {ObjGPS.DtResultados.FiltroPrimeroValor("Visitas", $"CveDispositivo = {Cve}")} visitas |
")
+ SBBody.Append($"| Última Visita: {ObjGPS.DtResultados.FiltroPrimeroValor("UltimaVisita", $"CveDispositivo = {Cve}")} |
")
+ End If
+ Next
+ SBBody.Append($"
")
+ Else
+ Color = "#e82929"
+ SBBody.Append($"
| Este punto de interés no fue visitado en las fechas seleccionadas. |
")
+ End If
+ SBBody.Append($"
")
+ RegistraScript($"CreaCirculo({Coords},'{Color}');CreaMarcador({Coords},'{row.DataKey("PuntoDeInteres")}','{SBBody.ToString}');", row.DataKey("CvePuntoDeInteres"))
+ End If
+ End If
+ Next
+ Catch ex As Exception
+ OnError("Ocurrió un error al consultar los puntos de interes", ex)
+ End Try
- If GPS.DtResultados.Rows.Count > 0 Then
- Color = "#26C281"
- SBBody.Append($"
")
- For Each Cve As String In DispositivosLista
- If GPS.DtResultados.FiltraParametros($"CveDispositivo = {Cve} ").Rows.Count > 0 Then
- SBBody.Append($"| {GPS.DtResultados.FiltroPrimeroValor("Vehiculo", $"CveDispositivo = {Cve}")}: {GPS.DtResultados.FiltroPrimeroValor("Visitas", $"CveDispositivo = {Cve}")} visitas |
")
- SBBody.Append($"| Última Visita: {GPS.DtResultados.FiltroPrimeroValor("UltimaVisita", $"CveDispositivo = {Cve}")} |
")
- End If
- Next
- SBBody.Append($"
")
- Else
- Color = "#e82929"
- SBBody.Append($"
| Este punto de interés no fue visitado en las fechas seleccionadas. |
")
- End If
- SBBody.Append($"
")
- RegistraScript($"CreaCirculo({Coords},'{Color}');CreaMarcador({Coords},'{row.DataKey("PuntoDeInteres")}','{SBBody.ToString}');", row.DataKey("CvePuntoDeInteres"))
- End If
- End If
- Next
- GPS.Dispose()
+ ObjGPS.Dispose()
+ GvBarra.DataBind()
+ UPGV.Update()
End Sub
'If GPS.GeoReferenciasEntradasSalidas(GVRow.DataKey("CveDispositivo").ToString.ToEntero, row.DataKey("CveGeoReferencia").ToString.ToEntero, FechaI, FechaF) Then
@@ -152,5 +172,41 @@ Partial Class GPS_RepPuntosDeInteres
GVHistorico.DataBind()
UpdatePanel3.Update()
RegistraScript("$('#dvHistorico').modal()")
+ End Sub
+
+ 'Protected Sub GvBarra_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBarra.RowDataBound
+ ' If e.Row.RowType = DataControlRowType.DataRow Then
+ ' Dim RowID As String = $"row{e.Row.RowIndex}"
+ ' e.Row.Attributes("id") = RowID
+ ' Dim IndexGvBarra As Integer = If(String.IsNullOrEmpty(HdnIndexGvBarra.Value), -1, HdnIndexGvBarra.Value.ToEntero)
+
+ ' RegistraScript($"GetDireccionesGV({e.Row.DBCampo("Posicion").ToString}, {e.Row.RowIndex}, 1);", $"{RowID}")
+
+ ' End If
+ 'End Sub
+
+ Protected Sub btnImprimir_Click(sender As Object, e As EventArgs)
+ Dim Btn As Button = CType(sender, Button)
+ Dim Format = Btn.CommandArgument
+ EnviarReporteProgramado(Format)
+
+ End Sub
+ Public Sub EnviarReporteProgramado(Format As String)
+ Dim RutaReporte = "Empresas/Grales/ReportesProgramados/RPTPuntosInteres.rdlc"
+ Dim NombreReporte = "ReportePuntosInteres"
+
+ Try
+ Dim RptParametro As New List(Of ReportParameter)
+ RptParametro.Add(New ReportParameter("FechaInicio", txtFechaI.Text))
+ RptParametro.Add(New ReportParameter("FechaFin", txtFechaF.Text))
+ RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
+ RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString))
+
+ Dim retorno = StreamPDF(RutaReporte, DtDatosReporte, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
+
+ ImprimirbytesPDF(retorno, $"{NombreReporte}{Date.Now.ToShortDateString}", Format)
+ Catch ex As Exception
+ GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
+ End Try
End Sub
End Class
diff --git a/Global.asax b/Global.asax
index f0d2b275e..11258feff 100644
--- a/Global.asax
+++ b/Global.asax
@@ -620,6 +620,9 @@
Dim EmpresaNotificaciones As New Empresa With {.SendMail = "signotificaciones@adssistemas.mx", .SendMailPassword = "sig123987", .SendMailServer = "mail.adssistemas.mx", .SendMailPuerto = 587}
ClsPaginas.EmpresaNotificaciones = EmpresaNotificaciones
+ Dim EmpresaNotificacionesGPS As New Empresa With {.SendMail = "ALERTAS@SIGNALSGPS.com", .SendMailPassword = "STJ180705IV42021ad", .SendMailServer = "mail.signalsgps.com", .SendMailPuerto = 587}
+ ClsPaginas.EmpresaNotificacionesGPS = EmpresaNotificacionesGPS
+
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'I M P U E S T O S L O C A L E S
diff --git a/Inventarios/AjustesSeccionAlmacen.aspx.vb b/Inventarios/AjustesSeccionAlmacen.aspx.vb
index 262c974ff..3ba282c5d 100644
--- a/Inventarios/AjustesSeccionAlmacen.aspx.vb
+++ b/Inventarios/AjustesSeccionAlmacen.aspx.vb
@@ -174,9 +174,9 @@ Partial Class Inventarios_AjustesSeccionAlmacen
If Lista.ContainsKey(CvePS) Then
ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True)
End If
- 'If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
- ' ErrorMovInv = True
- 'End If
+ If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
+ ErrorMovInv = True
+ End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True
@@ -447,9 +447,9 @@ Partial Class Inventarios_AjustesSeccionAlmacen
'ACTUALIZAMOS EL PS, PARA QUE TENGA EL APLICA SECCION
ErrorMovInv = Not ObjPS.UpdateAplicaSeccionAlmacen(CvePS, UsuarioActual.CveEmpresa, True)
- 'If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
- ' ErrorMovInv = True
- 'End If
+ If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
+ ErrorMovInv = True
+ End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, CantidadEntrada, CveUMEntrada, CvePSEntrada, PUEntrada, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True
diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb
index 021418dfa..35736ad6d 100644
--- a/Inventarios/TraspasoAlmacen.aspx.vb
+++ b/Inventarios/TraspasoAlmacen.aspx.vb
@@ -882,7 +882,7 @@ Partial Class Inventarios_TraspasoAlmacen
dtvirtual = ObjInventario.DtResultados
If dtvirtual.Rows.Count > 0 Then
- CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida)
+ CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida, CveAlmacenDestino:=CveAlmacenVirtualEntrada)
FolioVirtualSalida = ObjInventario.Folio
For Each RowVirtual As DataRow In dtvirtual.Rows
@@ -934,7 +934,7 @@ Partial Class Inventarios_TraspasoAlmacen
If Not ErrorMovInv Then
'VIRTUAL ENTRADA
- If RealizarMovimientoVirtual Then
+ If RealizarMovimientoVirtual AndAlso CveAlmacenVirtualEntrada > 0 Then
Dim dtvirtual As DataTable = Nothing
@@ -963,6 +963,7 @@ Partial Class Inventarios_TraspasoAlmacen
ErrorMovInv = True
End If
End If
+
Dim Concepto As String = TxtObservaciones.Text
If Concepto = "" Then Concepto = "Traspaso"
'AGREGAMOS PREPOLIZAS TRASPASO DIRECTO:
@@ -1743,14 +1744,14 @@ Partial Class Inventarios_TraspasoAlmacen
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImporteDecimal) Then
ErrorMovInv = True
- TextoError = "Ocurrió un erro al cancelar el traspaso"
+ TextoError = "Ocurrió un error al cancelar el traspaso"
End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
- CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImporteDecimal) Then
- ErrorMovInv = True
- TextoError = "Ocurrió un erro al cancelar el traspaso"
- End If
+ 'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
+ ' CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImporteDecimal) Then
+ ' ErrorMovInv = True
+ ' TextoError = "Ocurrió un erro al cancelar el traspaso"
+ 'End If
End If
End If
@@ -1841,7 +1842,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim RealizarMovimientoVirtual As Boolean = False
- If UsuarioActual.Empresa.Funcionalidad(573) = "1" AndAlso TipoAlmacenOrigen.Contiene(1, 27) Then
+ If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
RealizarMovimientoVirtual = True
End If
@@ -1925,10 +1926,10 @@ Partial Class Inventarios_TraspasoAlmacen
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then
- ErrorMovInv = True
- End If
+ ErrorMovInv = True
End If
End If
+ End If
End If
@@ -2857,7 +2858,7 @@ Partial Class Inventarios_TraspasoAlmacen
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
- Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
+ Dim excelFile As ExcelFile = excelFile.Load(flatFilePath)
Dim unnamed As Integer = 0
Dim cols As Integer
@@ -2967,7 +2968,7 @@ Partial Class Inventarios_TraspasoAlmacen
Else
Str = String.Format(" AND CveSubProyecto = {0} ", DrAlmO("CveSubProyecto"))
End If
- DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,27,28) AND Estatus = 'Activo' {0} ", Str))
+ DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,25,28) AND Estatus = 'Activo' {0} ", Str))
DdlAlmacenDestino.DataBind()
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
diff --git a/Ventas/CatMetasVendedores.aspx b/Ventas/CatMetasVendedores.aspx
index 366e385c0..555c0f8b9 100644
--- a/Ventas/CatMetasVendedores.aspx
+++ b/Ventas/CatMetasVendedores.aspx
@@ -22,7 +22,7 @@