diff --git a/General/RepIndicadorResumen.aspx b/General/RepIndicadorResumen.aspx index 6b1c27c79..6606fafa5 100644 --- a/General/RepIndicadorResumen.aspx +++ b/General/RepIndicadorResumen.aspx @@ -418,6 +418,21 @@ + + + + + + + Saldo conjunto de Cuentas por Pagar + + + + + + + + diff --git a/General/RepIndicadorResumen.aspx.vb b/General/RepIndicadorResumen.aspx.vb index b2bf87ec9..8808e6002 100644 --- a/General/RepIndicadorResumen.aspx.vb +++ b/General/RepIndicadorResumen.aspx.vb @@ -83,6 +83,8 @@ Partial Class General_RepIndicadorResumen GvCxC.HeaderRow.Cells(2).Text = "Recuperado" End If + Dim SaldoConjCxP = 0 + 'Mostrar gráficos y totales en portlets solo si hay datos en su respectiva tabla If GvVxP.Rows.Count > 0 Then UPGraficaVxP.Visible = True @@ -110,26 +112,38 @@ Partial Class General_RepIndicadorResumen 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") - If (Recuper > 0) Then PLCxCTot.InnerHtml += "" + "Rec: " + "" + String.Format("{0:c} MXN", CType(GvCxC.DataSource, DataTable).SUM("RecuperadoMN", "CveCliente IS NOT NULL")) + If (Recuper > 0) Then PLCxCTot.InnerHtml += "" + "Rec: " + "" + String.Format("{0:c} MXN", Recuper) Else UPGraficaCxC.Visible = False PLCxCTot.InnerHtml = Nothing End If If GvCxP192.Rows.Count > 0 Then UPGraficaCxP192.Visible = True - PLCxP192Tot.InnerHtml = "" + "Saldo: " + "" + String.Format("{0:c} MXN", CType(GvCxP192.DataSource, DataTable).SUM("SaldoMN", "CveProveedor IS NOT NULL")) + Dim SaldoCxP192 = CType(GvCxP192.DataSource, DataTable).SUM("SaldoMN", "CveProveedor IS NOT NULL") + SaldoConjCxP += SaldoCxP192 + PLCxP192Tot.InnerHtml = "" + "Saldo: " + "" + String.Format("{0:c} MXN", SaldoCxP192) Else UPGraficaCxP192.Visible = False PLCxP192Tot.InnerHtml = Nothing End If If GvCxP.Rows.Count > 0 Then UPGraficaCxP.Visible = True - PLCxPTot.InnerHtml = "" + "Saldo: " + "" + String.Format("{0:c} MXN", CType(GvCxP.DataSource, DataTable).SUM("SaldoMN", "CveProveedor IS NOT NULL")) + Dim SaldoCxP = CType(GvCxP.DataSource, DataTable).SUM("SaldoMN", "CveProveedor IS NOT NULL") + SaldoConjCxP += SaldoCxP + PLCxPTot.InnerHtml = "" + "Saldo: " + "" + String.Format("{0:c} MXN", SaldoCxP) Else UPGraficaCxP.Visible = False PLCxPTot.InnerHtml = Nothing End If + If SaldoConjCxP > 0 Then + UPSaldoCxP.Visible = True + PLSaldoCxPTot.InnerHtml = String.Format("{0:c} MXN", SaldoConjCxP) + Else + UPSaldoCxP.Visible = False + PLSaldoCxPTot.InnerHtml = Nothing + End If + '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 _