From c6eb22000dba2fa5fa19fc82e13f6828931cc327 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 16 Jan 2020 10:58:38 -0700 Subject: [PATCH 1/4] alerta al agregar un usario repetido en las cuentas de sig --- App_Code/ClsContabilidad.vb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 75aaea0c6..6d374654f 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -4653,7 +4653,11 @@ Public Class ClsContabilidad Retorno = SqlAdapter.SelectCommand.Parameters("@CveCuenta").Value.ToString.ToEntero 'Retorno = If(Data IsNot Nothing AndAlso Data.Rows.Count > 0, Data.Rows(0)("CveCuenta").ToString.ToEntero, 0) Catch Ex1 As SqlException - Me.OnError("Ocurrió un error al Guardar la cuenta.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + If Ex1.Message.Contains("IND_Conta_Cuentas_Codigo_CveEmpresa") Then + Me.OnError("No se puede registrar una cuenta ya existente", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Else + Me.OnError("Ocurrió un error al Guardar la cuenta.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If Catch ex As Exception Me.OnError("Ocurrió un error al Guardar la cuenta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try From 22fe25651a7a6197b27463325b3f4c632188022d Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 16 Jan 2020 13:08:37 -0700 Subject: [PATCH 2/4] se agregaron indicadores de perdida, ganancia y final en compras --- Bancos/FluctuacionCambiaria.aspx | 178 ++++++++++++++++++++++++++-- Bancos/FluctuacionCambiaria.aspx.vb | 15 +++ 2 files changed, 185 insertions(+), 8 deletions(-) diff --git a/Bancos/FluctuacionCambiaria.aspx b/Bancos/FluctuacionCambiaria.aspx index 92a134d6d..1d9e3118f 100644 --- a/Bancos/FluctuacionCambiaria.aspx +++ b/Bancos/FluctuacionCambiaria.aspx @@ -3,6 +3,112 @@ + @@ -40,7 +146,7 @@
TC:
- +
@@ -59,6 +165,62 @@ + + +
+
+
+

PERDIDA

+
+ +
+ MXN + + + +
+
+
+
+
+
+

GANANCIA

+
+ +
+
+
+ MXN + + + +
+
+
+
+
+
+
+
+

FINAL

+
+ +
+
+
+ MXN + + + +
+
+
+
+
+
+
+
+
@@ -115,9 +277,9 @@ EmptyDataText="No se Encontraron Cuentas Bancarias." ToolTip="Listado de Cuentas Bancarias" CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None"> - - - + + + @@ -140,10 +302,10 @@ + CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None"> - + @@ -152,7 +314,7 @@
-
+
@@ -187,7 +349,7 @@ CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None"> - + diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index ad9f24a9d..461c8ee82 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -71,6 +71,20 @@ Partial Class Bancos_FluctuacionCambiaria If ObjBancos.GetFluctuaciones(TxtFecha.Text.ToDate, 1, UsuarioActual.CveEmpresa) Then GvCompras.DataSource = ObjBancos.DtResultados 'LblTotalCompras.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero + Dim Perdida As DataTable = ObjBancos.DtResultados.FiltraParametros("GananciaPerdida = 'PERDIDA' AND TipoRow = 2") + Dim Ganancias As DataTable = ObjBancos.DtResultados.FiltraParametros("GananciaPerdida = 'GANANCIA' AND TipoRow = 2") + + Dim PerdidaAux As Double = Perdida.SUM("Fluctuacion").Abs + Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion") + + Dim Final As Double = GanaciaAux - PerdidaAux + '"widget-thumb-icon bg-green-jungle fa fa-usd"widget-thumb-icon bg-red fa fa-usd + IImagenResultado.Attributes("class") = If(Final > 0, "widget-thumb-icon bg-green-jungle fa fa-usd", "widget-thumb-icon bg-red fa fa-usd") + + LtIndicador_ExistenciaPerdida.Text = PerdidaAux.ToString.FormatoNumero + LtIndicador_ValorPesosGanancia.Text = GanaciaAux.ToString.FormatoNumero + LtIndicador_CPPesosFinal.Text = Final.Abs.ToString.FormatoNumero + LblTotal = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero Else GvCompras.DataSource = Nothing @@ -78,6 +92,7 @@ Partial Class Bancos_FluctuacionCambiaria End If ObjBancos.Dispose() GvCompras.DataBind() + UpIndicadores.Visible = True If GvCompras.Rows.Count > 0 Then GvCompras.Rows(GvCompras.Rows.Count - 1).CssClass = "SubTotales2" End If From 3f3994a9d9e1d7b0f9608fb02263d1d4ba58ef14 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 16 Jan 2020 15:45:03 -0700 Subject: [PATCH 3/4] agregando indicadores en ventas --- Bancos/FluctuacionCambiaria.aspx | 58 ++++++++++++++++++++++++++++- Bancos/FluctuacionCambiaria.aspx.vb | 19 +++++++++- 2 files changed, 75 insertions(+), 2 deletions(-) diff --git a/Bancos/FluctuacionCambiaria.aspx b/Bancos/FluctuacionCambiaria.aspx index 1d9e3118f..337683f4a 100644 --- a/Bancos/FluctuacionCambiaria.aspx +++ b/Bancos/FluctuacionCambiaria.aspx @@ -165,7 +165,7 @@ - +
@@ -243,6 +243,62 @@ + + +
+
+
+

PERDIDA

+
+ +
+ MXN + + + +
+
+
+
+
+
+

GANANCIA

+
+ +
+
+
+ MXN + + + +
+
+
+
+
+
+
+
+

FINAL

+
+ +
+
+
+ MXN + + + +
+
+
+
+
+
+
+
+
diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index 461c8ee82..e6f1bf0f3 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -78,7 +78,7 @@ Partial Class Bancos_FluctuacionCambiaria Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion") Dim Final As Double = GanaciaAux - PerdidaAux - '"widget-thumb-icon bg-green-jungle fa fa-usd"widget-thumb-icon bg-red fa fa-usd + IImagenResultado.Attributes("class") = If(Final > 0, "widget-thumb-icon bg-green-jungle fa fa-usd", "widget-thumb-icon bg-red fa fa-usd") LtIndicador_ExistenciaPerdida.Text = PerdidaAux.ToString.FormatoNumero @@ -103,7 +103,24 @@ Partial Class Bancos_FluctuacionCambiaria LblTotalVentas.Text = "0.00" If ObjBancos.GetFluctuaciones(TxtFecha.Text.ToDate, 2, UsuarioActual.CveEmpresa) Then GvVentas.DataSource = ObjBancos.DtResultados + + Dim Perdida As DataTable = ObjBancos.DtResultados.FiltraParametros("Fluctuacion < 0") + Dim Ganancias As DataTable = ObjBancos.DtResultados.FiltraParametros("Fluctuacion > 0") + + Dim PerdidaAux As Double = Perdida.SUM("Fluctuacion").Abs + Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion") + + Dim Final As Double = GanaciaAux - PerdidaAux + + IImagenFinalVentas.Attributes("class") = If(Final > 0, "widget-thumb-icon bg-green-jungle fa fa-usd", "widget-thumb-icon bg-red fa fa-usd") + + LtIndicador_PerdidasVentas.Text = PerdidaAux.ToString.FormatoNumero + LtIndicador_GanaciaVentas.Text = GanaciaAux.ToString.FormatoNumero + LtIndicador_FinalVentas.Text = Final.ToString.FormatoNumero + LblTotalVentas.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero + + UpIndicadoresVentas.Visible = True Else GvVentas.DataSource = Nothing Alert("Ocurrio un error al cargar las compras", TipoMensaje.MsgAdvertencia) From 62edc4e1a3213405f21bb1747c769ba437d4b64c Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 16 Jan 2020 15:48:04 -0700 Subject: [PATCH 4/4] =?UTF-8?q?correcci=C3=B3n=20de=20lo=20anterior?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/FluctuacionCambiaria.aspx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Bancos/FluctuacionCambiaria.aspx b/Bancos/FluctuacionCambiaria.aspx index 337683f4a..51ea90d65 100644 --- a/Bancos/FluctuacionCambiaria.aspx +++ b/Bancos/FluctuacionCambiaria.aspx @@ -170,7 +170,7 @@
-

PERDIDA

+

PÉRDIDA

@@ -202,7 +202,7 @@
-

FINAL

+

PÉRDIDA O GANANCIA

@@ -248,7 +248,7 @@
-

PERDIDA

+

PÉRDIDA

@@ -280,7 +280,7 @@
-

FINAL

+

PÉRDIDA O GANANCIA