From 22fe25651a7a6197b27463325b3f4c632188022d Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 16 Jan 2020 13:08:37 -0700 Subject: [PATCH] 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