diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index 7f2c2e6ca..3b0b13e38 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -949,6 +949,31 @@ Public Class ClsAcumuladores End Try + Return Retorno + End Function + + Public Function GetMovimientosDistribuidorResumen(CveCliente As Integer, CveEmpresa As Integer, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha) As Boolean + Dim Retorno As Boolean = False + 'Data = New DataTable + + SqlDataAdapter("PA_Acum_DistribuidorMovtosResumenGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + + OnError("Ocurrió un error al consultar los movimientos. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + + End Try + Return Retorno End Function diff --git a/Contratos/CatContratosTipos.aspx.vb b/Contratos/CatContratosTipos.aspx.vb index f0bdc4aea..7b36b4837 100644 --- a/Contratos/CatContratosTipos.aspx.vb +++ b/Contratos/CatContratosTipos.aspx.vb @@ -16,8 +16,7 @@ Partial Class Contratos_CatContratosTipos Private Sub CargaDatos() Dim Objeto As New ClsContratos If Objeto.GetContratosTipos(UsuarioActual.CveEmpresa) Then - GvContratos.DataSource = Objeto.DtResultados - GlobalDTContratosTipos(UsuarioActual.CveEmpresa) = Objeto.DtResultados + GvContratos.DataSource = Objeto.DtResultados End If GvContratos.DataBind() Objeto.Dispose() @@ -40,9 +39,10 @@ Partial Class Contratos_CatContratosTipos UpDatos.Update() End If - Objeto.Dispose() - Alert("El Contrato se agregó correctamente.", TipoMensaje.MsgInformacion) + RecargaGlobal() + Alert("El Contrato se agregó correctamente.", TipoMensaje.MsgInformacion) + End Sub @@ -72,6 +72,7 @@ Partial Class Contratos_CatContratosTipos End If GvContratos.EditIndex = -1 CargaDatos() + RecargaGlobal() UpDatos.Update() End Sub @@ -92,10 +93,14 @@ Partial Class Contratos_CatContratosTipos Objeto.Dispose() GvContratos.EditIndex = -1 CargaDatos() - End Sub - - + RecargaGlobal() + End Sub + Private Sub RecargaGlobal() + GlobalDTContratosTipos(-1) = Nothing + End Sub + + #End Region - - + + End Class diff --git a/Sistemas/PopUpAddUsuario.aspx.vb b/Sistemas/PopUpAddUsuario.aspx.vb index 01376ea94..7f11c7288 100644 --- a/Sistemas/PopUpAddUsuario.aspx.vb +++ b/Sistemas/PopUpAddUsuario.aspx.vb @@ -742,7 +742,9 @@ Partial Class Sistemas_PopUpAddUsuario GvModulosPermiso.DataSource = ObjProcesos.DtResultados.FiltraParametros($"CvePlataforma = 6") ElseIf UsuarioActual.Empresa.CvePlataforma = 1 And CveProveedor > 0 Then GvModulosPermiso.DataSource = ObjProcesos.DtResultados.FiltraParametros($"CvePlataforma = 7") - BtnDefaultPWD.Visible = True + If CveUsuario > 0 Then + BtnDefaultPWD.Visible = True + End If ElseIf UsuarioActual.Empresa.CvePlataforma = 3 Then GvModulosPermiso.DataSource = ObjProcesos.DtResultados.FiltraParametros("CveModulo = 433") End If diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 98bb2104e..62d141b39 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -858,8 +858,8 @@ - - + + @@ -1956,63 +1956,63 @@
- + CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-height="300" GridLines="None" DataKeyNames="CveVenta"> + - - - - - - + + + + + + - - - - - - - -   + + + + + + + +   - - - - -   + + + + +   - - - - -   + + + + +   - - - - - - - - - - - - - - - - <%----%> - - - - - - - - + + + + + + + + + + + + + + + + <%----%> + + + + + + + +
-
+ @@ -2046,53 +2046,53 @@ " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> - +

- - + + - - - - - - - - - - -   + + + + + + + + + + +   - - - - -   + + + + +   - - - - -   + + + + +   - - - - - - - - - - - - -
+ + + + + + + + + + + + +
@@ -4188,7 +4188,7 @@ - + @@ -4197,7 +4197,7 @@ - + @@ -4210,6 +4210,31 @@ +
+
+
+
+ + Saldo de Cliente +
+
+
+
+
+
+
+ + + + + + + +
+
+
@@ -4302,8 +4327,8 @@ --%> + - @@ -4577,14 +4602,9 @@

- - + + -
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index f6fcd022c..be55071aa 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -9161,6 +9161,11 @@ Partial Class Clientes End If + If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa, TxtFechaIUsados.Text.ToDate, TxtFechaFUsados.Text.ToDate) Then + GvUsadosResumen.DataSource = ObjAcum.DtResultados + End If + GvUsadosResumen.DataBind() + 'LnkFacturaUsadosCargos.Visible = If(ImporteCargo > 0, True, False) LnkFacturaUsadosBonificacion.Visible = If(ImporteBonificacion > 0, True, False) diff --git a/Ventas/RepVentas.aspx.vb b/Ventas/RepVentas.aspx.vb index 548d83a87..2365c576f 100644 --- a/Ventas/RepVentas.aspx.vb +++ b/Ventas/RepVentas.aspx.vb @@ -428,40 +428,50 @@ Partial Class Ventas_RepVentas Dim FechaIRef As DateTime = FechaI.ToDateTime() Dim FechaFRef As DateTime = FechaF.ToDateTime() - Dim Anio As Integer = FechaFRef.Year - Dim Mes As Integer = e.Row.DBCampo("Mes").ToEntero() - Dim lastDayOfMonth = DateTime.DaysInMonth(Anio, Mes) + If e.Row.DBCampo("Mes").ToEntero() > 0 Then + Dim Anio As Integer = FechaFRef.Year + Dim Mes As Integer = e.Row.DBCampo("Mes").ToEntero() + Dim lastDayOfMonth = DateTime.DaysInMonth(Anio, Mes) - Dim Dia As Integer = FechaFRef.Day + Dim Dia As Integer = FechaFRef.Day - If e.Row.DBCampo("Mes").ToEntero() <> FechaFRef.Month Then - Dia = lastDayOfMonth + If e.Row.DBCampo("Mes").ToEntero() <> FechaFRef.Month Then + Dia = lastDayOfMonth + End If + + If e.Row.DBCampo("Mes").ToEntero() <> FechaIRef.Month Then + FechaInicial = New DateTime(Anio, Mes, 1).ToString("dd/MM/yyyy") + End If + + FechaFinal = New DateTime(Anio, Mes, Dia).ToString("dd/MM/yyyy") End If - If e.Row.DBCampo("Mes").ToEntero() <> FechaIRef.Month Then - FechaInicial = New DateTime(Anio, Mes, 1).ToString("dd/MM/yyyy") - End If - - FechaFinal = New DateTime(Anio, Mes, Dia).ToString("dd/MM/yyyy") Case 3 ' AÑO/MES Dim FechaIRef As DateTime = FechaI.ToDateTime() Dim FechaFRef As DateTime = FechaF.ToDateTime() - Dim Anio As Integer = e.Row.DBCampo("Anio").ToEntero() - Dim Mes As Integer = e.Row.DBCampo("Mes").ToEntero() - Dim lastDayOfMonth = DateTime.DaysInMonth(Anio, Mes) + Dim separator As Char = "/".ToCharArray().FirstOrDefault() + Dim AnioMes = e.Row.DBCampo("AnioMes").Split(separator) - Dim Dia As Integer = FechaFRef.Day + Dim Anio As Integer = AnioMes(0).ToEntero() + Dim Mes As Integer = AnioMes(1).ToEntero() - If e.Row.DBCampo("Mes").ToEntero() <> FechaFRef.Month Then - Dia = lastDayOfMonth + If Anio > 0 AndAlso Mes > 0 Then + Dim lastDayOfMonth = DateTime.DaysInMonth(Anio, Mes) + + Dim Dia As Integer = FechaFRef.Day + + If e.Row.DBCampo("Mes").ToEntero() <> FechaFRef.Month Then + Dia = lastDayOfMonth + End If + + If e.Row.DBCampo("Mes").ToEntero() <> FechaIRef.Month Then + FechaInicial = New DateTime(Anio, Mes, 1).ToString("dd/MM/yyyy") + End If + + FechaFinal = New DateTime(Anio, Mes, Dia).ToString("dd/MM/yyyy") End If - If e.Row.DBCampo("Mes").ToEntero() <> FechaIRef.Month Then - FechaInicial = New DateTime(Anio, Mes, 1).ToString("dd/MM/yyyy") - End If - - FechaFinal = New DateTime(Anio, Mes, Dia).ToString("dd/MM/yyyy") Case 4 ' FECHA FechaInicial = e.Row.DBCampo("Fecha").ToDateTime().ToString("dd/MM/yyyy") FechaFinal = e.Row.DBCampo("Fecha").ToDateTime().ToString("dd/MM/yyyy") diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 9e8be3ff7..e8fc5c8c7 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -4343,11 +4343,11 @@
Agendar
- +
@@ -6255,7 +6255,7 @@
-<%-- + <%-- --%>
@@ -6427,6 +6427,17 @@