Mostrar saldo general (cxc - cxp) en el reporte indicado resumen
This commit is contained in:
@@ -19,22 +19,27 @@
|
||||
background-color: #95A5A6;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin-top: 0px !important;
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
.margenbound {
|
||||
margin-left: 15px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div[id^=chartdiv] {
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.portlet-total {
|
||||
float: right !important;
|
||||
display: inline-block !important;
|
||||
}
|
||||
|
||||
.abbr {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -53,6 +58,7 @@
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
||||
<div class="tools">
|
||||
<asp:Button ID="btnConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" /></td>
|
||||
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
@@ -423,6 +429,20 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpSaldoTotal" runat="server" class="portlet light xspadding bordered " align="center" style="" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet-title" style="border-bottom: none!important; margin-top: 5px">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span id="Span1" runat="server" class="caption-subject bold uppercase">Saldo acumulado general (CxC - CxP)</span>
|
||||
</div>
|
||||
<div class="caption font-green portlet-total">
|
||||
<span id="LblSaldoTotal" class="caption-subject bold uppercase" runat="server" />
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -74,7 +74,8 @@ Partial Class General_RepIndicadorResumen
|
||||
GvCxC.HeaderRow.Cells(2).Text = "<a href=""/Ventas/RepRecuperacion.aspx"" target=""_blank"">Recuperado</a>"
|
||||
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 = "<span style=""font-weight:800"">" + "Saldo: " + "</span>" + 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 = "<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)
|
||||
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 = "<span style=""font-weight:800"">" + "Saldo: " + "</span>" + 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 = "<span style=""font-weight:800"">" + "Saldo: " + "</span>" + String.Format("{0:c} MXN", SaldoCxP)
|
||||
Else
|
||||
@@ -135,6 +138,8 @@ Partial Class General_RepIndicadorResumen
|
||||
PLSaldoCxPTot.InnerHtml = Nothing
|
||||
End If
|
||||
|
||||
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 _
|
||||
|
||||
Reference in New Issue
Block a user