From c8ceac00b18bdde74086ffbc791c44ff4079d101 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 17 Nov 2020 09:02:08 -0700 Subject: [PATCH 1/5] Global de tipos de contrato --- Contratos/CatContratosTipos.aspx.vb | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) 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 From 9efd2be4bcb7ecaa110db1b8df389499450cfa90 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 24 Nov 2020 13:47:09 -0700 Subject: [PATCH 2/5] Cambios en rep ventas --- Ventas/RepVentas.aspx.vb | 54 ++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 22 deletions(-) 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") From 4d089b44f3f49e786364515c37764188c3b9e693 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 24 Nov 2020 13:49:07 -0700 Subject: [PATCH 3/5] Concepto de bonificacion en NC, validaciones E72, correcion en series por tipo documento --- Ventas/Ventas.aspx | 138 ++++++++++++++++++++++++------------------ Ventas/Ventas.aspx.vb | 130 +++++++++++++++++++++++++++++++++++---- 2 files changed, 197 insertions(+), 71 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 9b0f018b9..9047719ce 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -4323,11 +4323,11 @@
Agendar
- + @@ -6235,7 +6235,7 @@
-<%-- + <%-- --%>
@@ -6407,6 +6407,17 @@ @@ -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)