se agregaron indicadores de perdida, ganancia y final en compras
This commit is contained in:
@@ -3,6 +3,112 @@
|
|||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
<style>
|
||||||
|
.dataTables_scrollBody table th {
|
||||||
|
padding: 0px !important;
|
||||||
|
padding-right: 4px !important;
|
||||||
|
padding-left: 4px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-scrollable {
|
||||||
|
margin: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollFoot {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scroll {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table.dataTable {
|
||||||
|
margin-top: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table table-striped table-hover dataTable no-footer {
|
||||||
|
margin-top: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Excede {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.psagregar > div.comboxes {
|
||||||
|
display: inline-block;
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.psagregar > div.codigo input {
|
||||||
|
width: 79px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.psagregar > div.codigo {
|
||||||
|
display: inline-block;
|
||||||
|
width: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.psagregar > div.codigo > input[type="submit"] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.widget-thumb {
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-thumb.bordered {
|
||||||
|
border: 3px solid whitesmoke;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-thumb .widget-thumb-heading {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #8e9daa;
|
||||||
|
margin: 0px 5px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-thumb .widget-thumb-wrap {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-thumb .widget-thumb-wrap .widget-thumb-icon {
|
||||||
|
float: left;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 41px;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
padding: 10px;
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-thumb .widget-thumb-body {
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-thumb .widget-thumb-body .widget-thumb-subtitle {
|
||||||
|
padding-top: 2px;
|
||||||
|
display: block;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #8e9daa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-thumb .widget-thumb-body .widget-thumb-body-stat {
|
||||||
|
display: block;
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #3e4f5e;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -40,7 +146,7 @@
|
|||||||
<h5>TC:<asp:Literal runat="server" ID="LtTipoCambioActual"></asp:Literal></h5>
|
<h5>TC:<asp:Literal runat="server" ID="LtTipoCambioActual"></asp:Literal></h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<asp:TextBox ID="TxtConceptoFluctuacion" runat="server" ></asp:TextBox>
|
<asp:TextBox ID="TxtConceptoFluctuacion" runat="server"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -59,6 +165,62 @@
|
|||||||
<ajax:TabContainer runat="server" ID="T">
|
<ajax:TabContainer runat="server" ID="T">
|
||||||
<ajax:TabPanel runat="server" ID="TabCompras" HeaderText="Compras">
|
<ajax:TabPanel runat="server" ID="TabCompras" HeaderText="Compras">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
<asp:UpdatePanel ID="UpIndicadores" UpdateMode="Conditional" runat="server" Visible ="False">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div id="DivIndicadores" visible="true" class="row" runat="server">
|
||||||
|
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||||
|
<div class="widget-thumb text-uppercase bordered">
|
||||||
|
<h4 class="widget-thumb-heading">PERDIDA</h4>
|
||||||
|
<div class="widget-thumb-wrap">
|
||||||
|
<i class="widget-thumb-icon bg-red fa fa-money"></i>
|
||||||
|
<div class="widget-thumb-body">
|
||||||
|
<span class="widget-thumb-subtitle">MXN</span>
|
||||||
|
<span class="widget-thumb-body-stat">
|
||||||
|
<asp:Literal ID="LtIndicador_ExistenciaPerdida" Text="" runat="server" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||||
|
<div class="widget-thumb text-uppercase bordered">
|
||||||
|
<h4 class="widget-thumb-heading">GANANCIA</h4>
|
||||||
|
<div class="widget-thumb-wrap">
|
||||||
|
<i class="widget-thumb-icon bg-green fa fa-money"></i>
|
||||||
|
<div class="widget-thumb-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<span class="widget-thumb-subtitle">MXN</span>
|
||||||
|
<span class="widget-thumb-body-stat">
|
||||||
|
<asp:Literal ID="LtIndicador_ValorPesosGanancia" Text="" runat="server" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||||
|
<div class="widget-thumb text-uppercase bordered">
|
||||||
|
<h4 class="widget-thumb-heading">FINAL</h4>
|
||||||
|
<div class="widget-thumb-wrap">
|
||||||
|
<i id="IImagenResultado" runat="server" class=""></i>
|
||||||
|
<div class="widget-thumb-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<span class="widget-thumb-subtitle">MXN</span>
|
||||||
|
<span class="widget-thumb-body-stat">
|
||||||
|
<asp:Literal ID="LtIndicador_CPPesosFinal" Text="" runat="server" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
<div style="float: right; margin-right: 50px;">
|
<div style="float: right; margin-right: 50px;">
|
||||||
<asp:Button Text="Generar Proveedores" runat="server" ID="BtnGeneraCompras" OnClick="BtnGeneraCompras_Click" Style="margin-left: 30px;" class="btn btn-primary" />
|
<asp:Button Text="Generar Proveedores" runat="server" ID="BtnGeneraCompras" OnClick="BtnGeneraCompras_Click" Style="margin-left: 30px;" class="btn btn-primary" />
|
||||||
</div>
|
</div>
|
||||||
@@ -115,9 +277,9 @@
|
|||||||
EmptyDataText="No se Encontraron Cuentas Bancarias." ToolTip="Listado de Cuentas Bancarias"
|
EmptyDataText="No se Encontraron Cuentas Bancarias." ToolTip="Listado de Cuentas Bancarias"
|
||||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField ItemStyle-Width="50" >
|
<asp:TemplateField ItemStyle-Width="50">
|
||||||
<ItemTemplate >
|
<ItemTemplate>
|
||||||
<asp:CheckBox ID="ChkGenerarBancos" runat="server"/>
|
<asp:CheckBox ID="ChkGenerarBancos" runat="server" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField HeaderText="Banco" DataField="Banco" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Banco" DataField="Banco" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left" />
|
||||||
@@ -140,10 +302,10 @@
|
|||||||
<asp:GridView ID="GvDeudores" Width="99%" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvDeudores" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="IdCtaAfectable,TipoCambio,Fluctuacion,RazonSocial,CveIE"
|
DataKeyNames="IdCtaAfectable,TipoCambio,Fluctuacion,RazonSocial,CveIE"
|
||||||
EmptyDataText="No se Encontraron Cuentas Bancarias." ToolTip="Listado de Cuentas Bancarias"
|
EmptyDataText="No se Encontraron Cuentas Bancarias." ToolTip="Listado de Cuentas Bancarias"
|
||||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None" >
|
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Deudor" DataField="RazonSocial" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Deudor" DataField="RazonSocial" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:HyperLinkField HeaderText="Folio" DataTextField="Folio" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString ="/Bancos/IE.aspx?CveIE={0}" ItemStyle-Width="150" ItemStyle-HorizontalAlign="Left" />
|
<asp:HyperLinkField HeaderText="Folio" DataTextField="Folio" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" ItemStyle-Width="150" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="Importe" DataField="Importe" ItemStyle-Width="100" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Importe" DataField="Importe" ItemStyle-Width="100" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Saldo" DataField="Saldo" ItemStyle-Width="100" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Saldo" DataField="Saldo" ItemStyle-Width="100" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="T.C. último ajuste" DataField="TipoCambio" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="T.C. último ajuste" DataField="TipoCambio" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||||
@@ -152,7 +314,7 @@
|
|||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
<asp:Label ID="LblTotalDeudores" runat="server" Text=""></asp:Label>
|
<asp:Label ID="LblTotalDeudores" runat="server" Text=""></asp:Label>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
<ajax:TabPanel runat="server" ID="TabAcreedores" HeaderText="Compras Acreedores">
|
<ajax:TabPanel runat="server" ID="TabAcreedores" HeaderText="Compras Acreedores">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div style="float: right; margin-right: 50px;">
|
<div style="float: right; margin-right: 50px;">
|
||||||
@@ -187,7 +349,7 @@
|
|||||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Acreedor" DataField="RazonSocial" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Acreedor" DataField="RazonSocial" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:HyperLinkField HeaderText="Folio" DataTextField="Folio" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString ="/Bancos/IE.aspx?CveIE={0}" ItemStyle-Width="150" ItemStyle-HorizontalAlign="Left" />
|
<asp:HyperLinkField HeaderText="Folio" DataTextField="Folio" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" ItemStyle-Width="150" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="Importe" DataField="Importe" ItemStyle-Width="100" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Importe" DataField="Importe" ItemStyle-Width="100" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Saldo" DataField="Saldo" ItemStyle-Width="100" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Saldo" DataField="Saldo" ItemStyle-Width="100" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="T.C. último ajuste" DataField="TipoCambio" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="T.C. último ajuste" DataField="TipoCambio" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
|||||||
@@ -71,6 +71,20 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
If ObjBancos.GetFluctuaciones(TxtFecha.Text.ToDate, 1, UsuarioActual.CveEmpresa) Then
|
If ObjBancos.GetFluctuaciones(TxtFecha.Text.ToDate, 1, UsuarioActual.CveEmpresa) Then
|
||||||
GvCompras.DataSource = ObjBancos.DtResultados
|
GvCompras.DataSource = ObjBancos.DtResultados
|
||||||
'LblTotalCompras.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
'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
|
LblTotal = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
||||||
Else
|
Else
|
||||||
GvCompras.DataSource = Nothing
|
GvCompras.DataSource = Nothing
|
||||||
@@ -78,6 +92,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
End If
|
End If
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
GvCompras.DataBind()
|
GvCompras.DataBind()
|
||||||
|
UpIndicadores.Visible = True
|
||||||
If GvCompras.Rows.Count > 0 Then
|
If GvCompras.Rows.Count > 0 Then
|
||||||
GvCompras.Rows(GvCompras.Rows.Count - 1).CssClass = "SubTotales2"
|
GvCompras.Rows(GvCompras.Rows.Count - 1).CssClass = "SubTotales2"
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user