Mostrar saldo general (cxc - cxp) en el reporte indicado resumen
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -74,7 +74,8 @@ Partial Class General_RepIndicadorResumen
|
|||||||
GvCxC.HeaderRow.Cells(2).Text = "<a href=""/Ventas/RepRecuperacion.aspx"" target=""_blank"">Recuperado</a>"
|
GvCxC.HeaderRow.Cells(2).Text = "<a href=""/Ventas/RepRecuperacion.aspx"" target=""_blank"">Recuperado</a>"
|
||||||
End If
|
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
|
'Mostrar gráficos y totales en portlets solo si hay datos en su respectiva tabla
|
||||||
If GvVxP.Rows.Count > 0 Then
|
If GvVxP.Rows.Count > 0 Then
|
||||||
@@ -101,8 +102,10 @@ Partial Class General_RepIndicadorResumen
|
|||||||
End If
|
End If
|
||||||
If GvCxC.Rows.Count > 0 Then
|
If GvCxC.Rows.Count > 0 Then
|
||||||
UPGraficaCxC.Visible = True
|
UPGraficaCxC.Visible = True
|
||||||
PLCxCTot.InnerHtml = "<span style=""font-weight:800"">" + "Saldo: " + "</span>" + String.Format("{0:c} MXN", CType(GvCxC.DataSource, DataTable).SUM("SaldoMN", "CveCliente IS NOT NULL"))
|
SaldoCxC = CType(GvCxC.DataSource, DataTable).SUMD("SaldoMN", "CveCliente IS NOT NULL")
|
||||||
Dim Recuper As Double = CType(GvCxC.DataSource, DataTable).SUM("RecuperadoMN", "CveCliente IS NOT NULL")
|
|
||||||
|
PLCxCTot.InnerHtml = "<span style=""font-weight:800"">" + "Saldo: " + "</span>" + 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 += "<span style="" font-weight:800; margin-left:1em"">" + "Rec: " + "</span>" + String.Format("{0:c} MXN", Recuper)
|
If (Recuper > 0) Then PLCxCTot.InnerHtml += "<span style="" font-weight:800; margin-left:1em"">" + "Rec: " + "</span>" + String.Format("{0:c} MXN", Recuper)
|
||||||
Else
|
Else
|
||||||
UPGraficaCxC.Visible = False
|
UPGraficaCxC.Visible = False
|
||||||
@@ -110,7 +113,7 @@ Partial Class General_RepIndicadorResumen
|
|||||||
End If
|
End If
|
||||||
If GvCxP192.Rows.Count > 0 Then
|
If GvCxP192.Rows.Count > 0 Then
|
||||||
UPGraficaCxP192.Visible = True
|
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
|
SaldoConjCxP += SaldoCxP192
|
||||||
PLCxP192Tot.InnerHtml = "<span style=""font-weight:800"">" + "Saldo: " + "</span>" + String.Format("{0:c} MXN", SaldoCxP192)
|
PLCxP192Tot.InnerHtml = "<span style=""font-weight:800"">" + "Saldo: " + "</span>" + String.Format("{0:c} MXN", SaldoCxP192)
|
||||||
Else
|
Else
|
||||||
@@ -119,7 +122,7 @@ Partial Class General_RepIndicadorResumen
|
|||||||
End If
|
End If
|
||||||
If GvCxP.Rows.Count > 0 Then
|
If GvCxP.Rows.Count > 0 Then
|
||||||
UPGraficaCxP.Visible = True
|
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
|
SaldoConjCxP += SaldoCxP
|
||||||
PLCxPTot.InnerHtml = "<span style=""font-weight:800"">" + "Saldo: " + "</span>" + String.Format("{0:c} MXN", SaldoCxP)
|
PLCxPTot.InnerHtml = "<span style=""font-weight:800"">" + "Saldo: " + "</span>" + String.Format("{0:c} MXN", SaldoCxP)
|
||||||
Else
|
Else
|
||||||
@@ -135,7 +138,9 @@ Partial Class General_RepIndicadorResumen
|
|||||||
PLSaldoCxPTot.InnerHtml = Nothing
|
PLSaldoCxPTot.InnerHtml = Nothing
|
||||||
End If
|
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 _
|
If GvVxP.Rows.Count = 0 _
|
||||||
AndAlso GvCompProductores.Rows.Count = 0 _
|
AndAlso GvCompProductores.Rows.Count = 0 _
|
||||||
AndAlso GvCompAcreed.Rows.Count = 0 _
|
AndAlso GvCompAcreed.Rows.Count = 0 _
|
||||||
|
|||||||
Reference in New Issue
Block a user