-
-
-
-
-
- <%--TODO: Esto se puede meter en el stored procedured, pero me da cosa moverle :S--%>
-
-
- <%--TODO: Esto puede tronar si el valor es DBNull --%>
- <%# If(Convert.ToDecimal(Eval("Cantidad")) = 0, 0.ToString("C"), (Convert.ToDecimal(Eval("SubTotal")) / Convert.ToInt32(Eval("Cantidad"))).ToString("C")) %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Ventas por Productos - Gráfica
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Compras Productores
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%--TODO: Esto se puede meter en el stored procedured, pero me da cosa moverle :S--%>
-
-
- <%--TODO: Esto puede tronar si el valor es DBNull --%>
- <%# If(Convert.ToDecimal(Eval("Cantidad")) = 0, 0.ToString("C"), (Convert.ToDecimal(Eval("SubTotal")) / Convert.ToInt32(Eval("Cantidad"))).ToString("C")) %>
-
-
- <%----%>
-
-
-
-
-
-
-
-
-
-
-
-
-
- Compras Productores - Gráfica por Cantidad(Kg)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Gastos
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Compras por clasificación - Gráfica
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Cuentas por cobrar
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Cuentas por cobrar - Gráfica Saldo VS Recuperado
-
+
+
+
+
+
+ <%--TODO: Esto se puede meter en el stored procedured, pero me da cosa moverle :S--%>
+
+
+ <%--TODO: Esto puede tronar si el valor es DBNull --%>
+ <%# If(Convert.ToDecimal(Eval("Cantidad")) = 0, 0.ToString("C"), (Convert.ToDecimal(Eval("SubTotal")) / Convert.ToInt32(Eval("Cantidad"))).ToString("C")) %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Ventas por Productos - Gráfica
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Compras Productores
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%--TODO: Esto se puede meter en el stored procedured, pero me da cosa moverle :S--%>
+
+
+ <%--TODO: Esto puede tronar si el valor es DBNull --%>
+ <%# If(Convert.ToDecimal(Eval("Cantidad")) = 0, 0.ToString("C"), (Convert.ToDecimal(Eval("SubTotal")) / Convert.ToInt32(Eval("Cantidad"))).ToString("C")) %>
+
+
+ <%----%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Compras Productores - Gráfica por Cantidad(Kg)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Gastos
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Compras por clasificación - Gráfica
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cuentas por cobrar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cuentas por cobrar - Gráfica Saldo VS Recuperado
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cuentas por Pagar productores
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cuentas por Pagar productores - Gráfica
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cuentas por Pagar no productores
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cuentas por Pagar no productores - Gráfica
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Saldo acumulado general (CxC - CxP)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Saldo acumulado de Cuentas por Pagar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<%--
- --%>
- <%----%>
-
+ --%>
+ <%----%>
+
-
-
+
+
+
diff --git a/General/RepIndicadorResumen.aspx.vb b/General/RepIndicadorResumen.aspx.vb
index d76f7677e..aeae30958 100644
--- a/General/RepIndicadorResumen.aspx.vb
+++ b/General/RepIndicadorResumen.aspx.vb
@@ -74,7 +74,8 @@ Partial Class General_RepIndicadorResumen
GvCxC.HeaderRow.Cells(2).Text = "Recuperado"
End If
- Dim SaldoConjCxP = 0
+ Dim SaldoConjCxP As Decimal = 0D
+ Dim SaldoCxC As Decimal = 0D
'Mostrar gráficos y totales en portlets solo si hay datos en su respectiva tabla
If GvVxP.Rows.Count > 0 Then
@@ -101,8 +102,10 @@ Partial Class General_RepIndicadorResumen
End If
If GvCxC.Rows.Count > 0 Then
UPGraficaCxC.Visible = True
- PLCxCTot.InnerHtml = "" + "Saldo: " + "" + String.Format("{0:c} MXN", CType(GvCxC.DataSource, DataTable).SUM("SaldoMN", "CveCliente IS NOT NULL"))
- Dim Recuper As Double = CType(GvCxC.DataSource, DataTable).SUM("RecuperadoMN", "CveCliente IS NOT NULL")
+ SaldoCxC = CType(GvCxC.DataSource, DataTable).SUMD("SaldoMN", "CveCliente IS NOT NULL")
+
+ PLCxCTot.InnerHtml = "" + "Saldo: " + "" + String.Format("{0:c} MXN", SaldoCxC)
+ Dim Recuper As Double = CType(GvCxC.DataSource, DataTable).SUMD("RecuperadoMN", "CveCliente IS NOT NULL")
If (Recuper > 0) Then PLCxCTot.InnerHtml += "" + "Rec: " + "" + String.Format("{0:c} MXN", Recuper)
Else
UPGraficaCxC.Visible = False
@@ -110,7 +113,7 @@ Partial Class General_RepIndicadorResumen
End If
If GvCxP192.Rows.Count > 0 Then
UPGraficaCxP192.Visible = True
- Dim SaldoCxP192 = CType(GvCxP192.DataSource, DataTable).SUM("SaldoMN", "CveProveedor IS NOT NULL")
+ Dim SaldoCxP192 = CType(GvCxP192.DataSource, DataTable).SUMD("SaldoMN", "CveProveedor IS NOT NULL")
SaldoConjCxP += SaldoCxP192
PLCxP192Tot.InnerHtml = "" + "Saldo: " + "" + String.Format("{0:c} MXN", SaldoCxP192)
Else
@@ -119,7 +122,7 @@ Partial Class General_RepIndicadorResumen
End If
If GvCxP.Rows.Count > 0 Then
UPGraficaCxP.Visible = True
- Dim SaldoCxP = CType(GvCxP.DataSource, DataTable).SUM("SaldoMN", "CveProveedor IS NOT NULL")
+ Dim SaldoCxP = CType(GvCxP.DataSource, DataTable).SUMD("SaldoMN", "CveProveedor IS NOT NULL")
SaldoConjCxP += SaldoCxP
PLCxPTot.InnerHtml = "" + "Saldo: " + "" + String.Format("{0:c} MXN", SaldoCxP)
Else
@@ -135,7 +138,9 @@ Partial Class General_RepIndicadorResumen
PLSaldoCxPTot.InnerHtml = Nothing
End If
- 'Si no había datos en ninguna tabla no cargar función de gráficos
+ LblSaldoTotal.InnerHtml = String.Format("{0:C} MXN", (SaldoCxC - SaldoConjCxP))
+
+ 'Si no había datos en ninguna tabla no cargar función de gráficos
If GvVxP.Rows.Count = 0 _
AndAlso GvCompProductores.Rows.Count = 0 _
AndAlso GvCompAcreed.Rows.Count = 0 _