-- unificación de módulos de Contabilidad a una sola carpeta. como principal ContaSIG
This commit is contained in:
@@ -5087,7 +5087,7 @@ Public Class ClsPaginas
|
||||
End If
|
||||
Dim bdir As String = If(RutaReporte.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory)
|
||||
'TOMAR LA RUTA BASE PARA EL DIRECTORIO DE LA EMPRESA
|
||||
If Not String.IsNullOrEmpty(RutaEmpresa) AndAlso Not RutaReporte.Contains("Grales") AndAlso Not RutaReporte.Contains("Contabilidad/Reportes/") AndAlso Not RutaReporte.Contains("Contabilidad2/Reportes/") AndAlso Not RutaReporte.Contains("AC/Reportes/") Then
|
||||
If Not String.IsNullOrEmpty(RutaEmpresa) AndAlso Not RutaReporte.Contains("Grales") AndAlso Not RutaReporte.Contains("Contabilidad/Reportes/") AndAlso Not RutaReporte.Contains("Contabilidad/Reportes/") AndAlso Not RutaReporte.Contains("AC/Reportes/") Then
|
||||
bdir = RutaEmpresa.Replace($"{CveEmpresa}/", "")
|
||||
End If
|
||||
RutaReporte.Replace("/", "\")
|
||||
@@ -9908,18 +9908,17 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Contabilidad/FiltraPolizas.aspx".ToUpper(), 128)
|
||||
PaginaDict.Add("/Contabilidad/RepContabilidadDiaria.aspx".ToUpper(), 504)
|
||||
PaginaDict.Add("/Contabilidad/CatCuentas.aspx".ToUpper(), 178)
|
||||
PaginaDict.Add("/Contabilidad/CatCuentasCI.aspx".ToUpper(), 178)
|
||||
PaginaDict.Add("/Contabilidad/RepOrigenAplicacion.aspx".ToUpper(), 354)
|
||||
PaginaDict.Add("/Contabilidad/RepBalanceGeneralProForma.aspx".ToUpper(), 358)
|
||||
PaginaDict.Add("/Contabilidad/RepEstadoResultadosProForma.aspx".ToUpper(), 359)
|
||||
PaginaDict.Add("/Contabilidad/RepBalanceGeneral.aspx".ToUpper(), 362)
|
||||
PaginaDict.Add("/Contabilidad/RepBalanceGeneralCI.aspx".ToUpper(), 362)
|
||||
PaginaDict.Add("/Contabilidad/RepEstadoResultados.aspx".ToUpper(), 363)
|
||||
PaginaDict.Add("/Contabilidad/RepIVADiferencias.aspx".ToUpper(), 127)
|
||||
PaginaDict.Add("/Contabilidad/PolizasImpresion.aspx".ToUpper(), 380)
|
||||
PaginaDict.Add("/Contabilidad/RegPrePoliza.aspx".ToUpper(), 398)
|
||||
PaginaDict.Add("/Contabilidad/RegPrePoliza1.aspx".ToUpper(), 398)
|
||||
PaginaDict.Add("/Contabilidad/RegPrePolizaS.aspx".ToUpper(), 398)
|
||||
PaginaDict.Add("/Contabilidad/DescargaRespaldos.aspx".ToUpper(), 400)
|
||||
PaginaDict.Add("/Contabilidad/RepBalanceGeneral2.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Contabilidad/CatEjercicios.aspx".ToUpper(), 570)
|
||||
PaginaDict.Add("/Contabilidad/AnalisisVertical.aspx".ToUpper(), 416)
|
||||
PaginaDict.Add("/Contabilidad/FisImpuestos.aspx".ToUpper(), 431)
|
||||
@@ -9937,38 +9936,35 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Contabilidad/RepAnexoCatalogoMes.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Contabilidad/RepAnexoCatalogoSegmento.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Contabilidad/RepAnexoCatalogo.aspx".ToUpper(), 341)
|
||||
PaginaDict.Add("/Contabilidad/RepAnexoCatalogoCI.aspx".ToUpper(), 341)
|
||||
PaginaDict.Add("/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx".ToUpper(), 340)
|
||||
PaginaDict.Add("/Contabilidad/RepMovimientosAuxiliaresCatalogoCI.aspx".ToUpper(), 340)
|
||||
PaginaDict.Add("/Contabilidad/RepBalanzaComprobacion.aspx".ToUpper(), 344)
|
||||
PaginaDict.Add("/Contabilidad/CatCuentasSIG.aspx".ToUpper(), 405)
|
||||
PaginaDict.Add("/Contabilidad/RepBalanzaComprobacionCI.aspx".ToUpper(), 344)
|
||||
PaginaDict.Add("/Contabilidad/RepIEPS.aspx".ToUpper(), 714)
|
||||
PaginaDict.Add("/Contabilidad/CatPeriodosBloqueo.aspx".ToUpper(), 677)
|
||||
PaginaDict.Add("/Contabilidad/CatClasificacionPorcentaje.aspx".ToUpper(), 752)
|
||||
PaginaDict.Add("/Contabilidad/RepFlujoEfectivo.aspx".ToUpper(), 783)
|
||||
#End Region
|
||||
#Region "Contabilidad2"
|
||||
PaginaDict.Add("/Contabilidad2/RepAnexoCatalogo.aspx".ToUpper(), 580)
|
||||
PaginaDict.Add("/Contabilidad2/RepBalanzaComprobacion.aspx".ToUpper(), 582)
|
||||
PaginaDict.Add("/Contabilidad2/RepEstadoActividades.aspx".ToUpper(), 583)
|
||||
PaginaDict.Add("/Contabilidad2/RepFlujoEfectivo.aspx".ToUpper(), 584)
|
||||
PaginaDict.Add("/Contabilidad2/RepCambiosSituacionFinanciera.aspx".ToUpper(), 585)
|
||||
PaginaDict.Add("/Contabilidad2/RepSituacionFinanciera.aspx".ToUpper(), 586)
|
||||
PaginaDict.Add("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx".ToUpper(), 587)
|
||||
PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoMensual.aspx".ToUpper(), 589)
|
||||
PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoAnual.aspx".ToUpper(), 593)
|
||||
PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoCC.aspx".ToUpper(), 594)
|
||||
PaginaDict.Add("/Contabilidad2/RepVariacionHaciendaPublica.aspx".ToUpper(), 595)
|
||||
PaginaDict.Add("/Contabilidad2/CatCuentas.aspx".ToUpper(), 596)
|
||||
PaginaDict.Add("/Contabilidad2/RepLibroDiario.aspx".ToUpper(), 544)
|
||||
'PaginaDict.Add("/Contabilidad2/RepSituacionFinancieraSAT.aspx".ToUpper(), 615)
|
||||
'PaginaDict.Add("/Contabilidad2/RepEstadoActividadesSAT.aspx".ToUpper(), 616)
|
||||
'PaginaDict.Add("/Contabilidad2/RepBalanzaComprobacionSAT.aspx".ToUpper(), 617)
|
||||
'PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoSAT.aspx".ToUpper(), 618)
|
||||
PaginaDict.Add("/Contabilidad2/MovimientosConProveedores.aspx".ToUpper(), 619)
|
||||
'PaginaDict.Add("/Contabilidad2/RepBalanceGeneral.aspx".ToUpper(), 530)
|
||||
PaginaDict.Add("/Contabilidad2/CatCuentasAsignaciones.aspx".ToUpper(), 724)
|
||||
PaginaDict.Add("/Contabilidad2/CatContaEjercicios.aspx".ToUpper(), 725)
|
||||
PaginaDict.Add("/Contabilidad2/RepEstadoResultadosHorizontal.aspx".ToUpper(), 420)
|
||||
PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoMensualHorizontal.aspx".ToUpper(), -1)
|
||||
|
||||
'PaginaDict.Add("/Contabilidad/RepAnexoCatalogo.aspx".ToUpper(), 580)
|
||||
'PaginaDict.Add("/Contabilidad/RepBalanzaComprobacion.aspx".ToUpper(), 582)
|
||||
PaginaDict.Add("/Contabilidad/RepEstadoActividades.aspx".ToUpper(), 583)
|
||||
'PaginaDict.Add("/Contabilidad/RepFlujoEfectivo.aspx".ToUpper(), 584)
|
||||
PaginaDict.Add("/Contabilidad/RepCambiosSituacionFinanciera.aspx".ToUpper(), 585)
|
||||
'PaginaDict.Add("/Contabilidad/RepSituacionFinanciera.aspx".ToUpper(), 586)
|
||||
'PaginaDict.Add("/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx".ToUpper(), 587)
|
||||
PaginaDict.Add("/Contabilidad/RepAnexoCatalogoMensual.aspx".ToUpper(), 589)
|
||||
PaginaDict.Add("/Contabilidad/RepAnexoCatalogoAnual.aspx".ToUpper(), 593)
|
||||
PaginaDict.Add("/Contabilidad/RepAnexoCatalogoCC.aspx".ToUpper(), 594)
|
||||
PaginaDict.Add("/Contabilidad/RepVariacionHaciendaPublica.aspx".ToUpper(), 595)
|
||||
'PaginaDict.Add("/Contabilidad/CatCuentas.aspx".ToUpper(), 596)
|
||||
PaginaDict.Add("/Contabilidad/RepLibroDiario.aspx".ToUpper(), 544)
|
||||
PaginaDict.Add("/Contabilidad/MovimientosConProveedores.aspx".ToUpper(), 619)
|
||||
'PaginaDict.Add("/Contabilidad/RepBalanceGeneral.aspx".ToUpper(), 530)
|
||||
PaginaDict.Add("/Contabilidad/CatCuentasAsignaciones.aspx".ToUpper(), 724)
|
||||
PaginaDict.Add("/Contabilidad/CatContaEjercicios.aspx".ToUpper(), 725)
|
||||
PaginaDict.Add("/Contabilidad/RepEstadoResultadosHorizontal.aspx".ToUpper(), 420)
|
||||
PaginaDict.Add("/Contabilidad/RepAnexoCatalogoMensualHorizontal.aspx".ToUpper(), -1)
|
||||
#End Region
|
||||
#Region "Contratos"
|
||||
'--------------------- C O N T R A T O S - P R E S U P U E S T O S ---------------------
|
||||
@@ -10656,7 +10652,7 @@ Public Class ClsPaginas
|
||||
'PaginaDict.Add("/ZDG/MensajeAutomatico.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Planeacion/Presupuestos.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Contabilidad2/RepBalanceGeneralHorizontal.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Contabilidad/RepBalanceGeneralHorizontal.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Agropecuaria/CierreCultivo.aspx".ToUpper(), 1326)
|
||||
PaginaDict.Add("/Inventarios/RepRSCO.aspx".ToUpper(), 1328)
|
||||
PaginaDict.Add("/testApi.aspx".ToUpper(), -1)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatCuentas.aspx.vb" Inherits="Contabilidad_CatCuentas" %>
|
||||
<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatCuentas.aspx.vb" Inherits="Contabilidad2_CatCuentas" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -47,26 +47,28 @@
|
||||
font-size: 9px !important;
|
||||
content: "\f040";
|
||||
}
|
||||
|
||||
#select2-C_DdlCuentaContable-results{
|
||||
max-width:300px!important
|
||||
}
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" runat="server"> <i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Cuentas Contables
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirExcel" runat="server" OnClick="LnkImprimirExcel_Click" Style="color: #686868;"><i class="fa fa-file-excel-o" style="color:#686868;"></i> Imprimir Cuentas</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="upcuentas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="updatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="catcuentascontarbol">
|
||||
@@ -81,6 +83,8 @@
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<%-- <asp:Button ID="BtnCambiaAgrupadorSAT" OnClick="BtnCambiaAgrupadorSAT_Click" ClientIDMode="Static" Style="display: none;" runat="server" />--%>
|
||||
|
||||
<div class="catcuentasform">
|
||||
|
||||
|
||||
@@ -94,8 +98,8 @@
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Cuenta</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="Tcuenta" runat="server" Enabled="False" MaxLength="30" Width="140px" ClientIDMode="Static"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender TargetControlID="Tcuenta" ID="MEECuenta" runat="server" MaskType="Number" AutoComplete="True" AutoCompleteValue="0" />
|
||||
<asp:TextBox ID="TxtCuenta" Style="width: 200px" runat="server" MaxLength="30"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender TargetControlID="TxtCuenta" ID="MEECuenta" runat="server" MaskType="Number" AutoComplete="True" AutoCompleteValue="0" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
@@ -105,20 +109,21 @@
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<hr />
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Subcuenta de</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="Tsubcuenta" runat="server" Width="140px" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="Tsubcuenta" runat="server" Enabled="False" Width="140px" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:DropDownList ID="DdlCuentaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" style="max-width:160px"
|
||||
DataValueField="Id" Width="160px" Visible="false">
|
||||
</asp:DropDownList>
|
||||
<br />
|
||||
<asp:Label ID="LblSubCuenta" runat="server" Text="" Font-Italic="True" Font-Size="7pt" ClientIDMode="Static"></asp:Label>
|
||||
<asp:HiddenField ID="HdnSubCuentaDe" ClientIDMode="Static" Value="0" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Tipo de Cuenta</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DTcuenta" CssClass="form-control input-sm input-small select2me" runat="server">
|
||||
<asp:DropDownList ID="DTcuenta" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Seleccione " Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo Deudora " Value="A"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo Acreedora " Value="B"></asp:ListItem>
|
||||
@@ -138,7 +143,7 @@
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Cuenta Mayor</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DcuentaMayor" CssClass="form-control input-sm input-small select2me" runat="server">
|
||||
<asp:DropDownList ID="DcuentaMayor" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Seleccione " Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayor " Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No " Value="2"></asp:ListItem>
|
||||
@@ -150,14 +155,14 @@
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Agrupador SAT</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlAgrupadorSAT" DataTextField="CodigoNombre" DataValueField="Id" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server">
|
||||
<asp:DropDownList ID="DdlAgrupadorSAT" DataTextField="CodigoNombre" DataValueField="CveAgrupadorSAT" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Moneda</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlMoneda" DataTextField="Nombre" DataValueField="Id" CssClass="form-control input-sm input-small select2me" runat="server">
|
||||
<asp:DropDownList ID="DdlMoneda" DataTextField="Moneda" DataValueField="CveMoneda" CssClass="form-control input-sm input-small select2me" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
@@ -168,14 +173,78 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Nombre en inglés</div>
|
||||
<div class="catcuentas left">Nombre en ingles</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="TxtNomIngles" Style="width: 100%;" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<asp:Button ID="Guardar" CssClass="btn btn-primary" Visible="false" tit runat="server" Text="Guardar" />
|
||||
<asp:Button ID="nuevacuenta" CssClass="btn btn-success" Visible="false" runat="server" Text="Guardar" />
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Concepto</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlConcepto" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" AutoPostBack="true" Width="100%"
|
||||
OnSelectedIndexChanged="DdlConcepto_SelectedIndexChanged" CssClass="form-control input-sm input-small select2me" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<asp:Panel runat="server" ID="PnlOpcion1" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Proveedor:"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" data-metodo="getproveedores" UsaWebService="true" Width="100%" CssStyle="width: 100%;" DataTextField="RazonSocial" DataValueField="CveProveedor" ></ADS:Dropdownlost>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion3" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Clasificación"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion4" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Cuenta Bancaria "></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="ddlBancos" Width="100%" CssClass="select2me" DataValueField="CveCuenta" DataTextField="NumCuenta" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion5" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Almacén"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlAlmacen" runat="server" Width="100%" DataValueField="CveAlmacen" DataTextField="Almacen" CssClass="select2me"></asp:DropDownList>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion6" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Cliente:"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" UsaWebService="true" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="min-width: 100px;"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion2" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Porcentaje Impuesto:"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="TxtPorcentaje" runat="server"></asp:TextBox>(0% - 100% )
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion8" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Personal"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlPersonal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione el personal (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
|
||||
<br />
|
||||
<asp:Button ID="Guardar" CssClass="btn btn-primary" Visible="false" runat="server" Text="Guardar" />
|
||||
<asp:Button ID="nuevacuenta" CssClass="btn btn-success" Visible="false" runat="server" Text="Guardar" />
|
||||
<asp:Button ID="BtnEliminar" CssClass="btn btn-danger" Visible="false" runat="server" Text="Eliminar" OnClientClick="return confirm('Esta seguro de eliminar la cuenta?')" />
|
||||
</fieldset>
|
||||
</div>
|
||||
@@ -220,36 +289,20 @@
|
||||
});
|
||||
});
|
||||
|
||||
function ValidaGuardar(SubCuentaAnterior) {
|
||||
$('.popover').remove();
|
||||
$("#C_Guardar").removeAttr("aria-describedby");
|
||||
|
||||
|
||||
|
||||
if ($get('HdnSubCuentaDe').value != $get('Tsubcuenta').value) {
|
||||
|
||||
setTimeout(
|
||||
function () {
|
||||
;
|
||||
var Text = '';
|
||||
|
||||
debugger;
|
||||
if ($("#Tsubcuenta").length) {
|
||||
Text += 'La cuenta sera reasignada a la cuenta padre: <b>' + $get('Tsubcuenta').value + '</b> con sus respectivos saldos <br/>';
|
||||
}
|
||||
|
||||
$('.popover-title').html(Text);
|
||||
}, 10);
|
||||
}
|
||||
else {
|
||||
|
||||
$('.popover-title').html('¿Esta seguro de guardar?');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function Afectable(btn) {
|
||||
debugger;
|
||||
$('#C_nuevacuenta').attr('data-toggle', 'confirmation');
|
||||
$('#C_nuevacuenta').attr('data-popout', 'true');
|
||||
$('#C_nuevacuenta').attr('data-original-title', '<b>Verifique los datos para continuar</b>. <br/><br/> <center>¿Seguro de registrar esta cuenta nueva?</center>');
|
||||
$('#C_nuevacuenta').attr('data-btn-ok-label', 'si');
|
||||
}
|
||||
|
||||
function NoAfectable() {
|
||||
debugger;
|
||||
$('#C_nuevacuenta').attr('data-toggle', '');
|
||||
$('#C_nuevacuenta').attr('data-popout', '');
|
||||
$('#C_nuevacuenta').attr('data-original-title', '');
|
||||
$('#C_nuevacuenta').attr('data-btn-ok-label', '');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad_CatCuentas
|
||||
|
||||
Partial Class Contabilidad2_CatCuentas
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -14,49 +15,127 @@ Partial Class Contabilidad_CatCuentas
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtConceptosconta As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtConceptosconta"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtConceptosconta") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IDSelected As Integer
|
||||
Get
|
||||
Return ViewState("idsel").ToString.ToEntero
|
||||
Return ViewState("idsel").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("idsel") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CvePadre As Integer
|
||||
Get
|
||||
Return ViewState("CvePadre").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePadre") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property Afectable As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("Afectable").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("Afectable") = value
|
||||
End Set
|
||||
End Property
|
||||
#Region "Contabilidadnew"
|
||||
Private Property CveProveedor As Integer
|
||||
Get
|
||||
Return ViewState("CveProveedor").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveProveedor") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveCliente As Integer
|
||||
Get
|
||||
Return ViewState("CveCliente").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCliente") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveClasificacion As Integer
|
||||
Get
|
||||
Return ViewState("CveClasificacion").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveClasificacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveBancoCuenta As Integer
|
||||
Get
|
||||
Return ViewState("CveBancoCuenta").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveBancoCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveAlmacen As Integer
|
||||
Get
|
||||
Return ViewState("CveAlmacen").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveAlmacen") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||
Response.Redirect("/Contabilidad2/CatCuentas.aspx")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
CargaMonedas()
|
||||
CargaAgrupadorSAT()
|
||||
CargaDatos()
|
||||
Else
|
||||
Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia)
|
||||
MEECuenta.Enabled = False
|
||||
LnkPdf.Visible = False
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
DdlAlmacen.DataBind()
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
CargaMonedas()
|
||||
CargaAgrupadorSAT()
|
||||
CargaDatos()
|
||||
Using objconta As New ClsContabilidad
|
||||
objconta.GetConta_ConceptosContables(1)
|
||||
DtConceptosconta = objconta.DtResultados
|
||||
End Using
|
||||
Using ObjBancos As New ClsBancos
|
||||
If ObjBancos.GetBancosCuentas(-1) Then
|
||||
ddlBancos.DataSource = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
ddlBancos.DataBind()
|
||||
ddlBancos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
End Using
|
||||
|
||||
End If
|
||||
|
||||
DdlConcepto.DataSource = DtConceptosconta
|
||||
DdlConcepto.DataBind()
|
||||
DdlConcepto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'Else
|
||||
' Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia)
|
||||
' MEECuenta.Enabled = False
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMonedas()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ObjConta.GetMonedas() Then
|
||||
DdlMoneda.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
DdlMoneda.DataSource = GlobalDTMonedas
|
||||
DdlMoneda.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAgrupadorSAT()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If ObjConta.GetAgrupadoresSAT() Then
|
||||
DdlAgrupadorSAT.DataSource = ObjConta.DtResultados
|
||||
@@ -66,40 +145,49 @@ Partial Class Contabilidad_CatCuentas
|
||||
DdlAgrupadorSAT.DataBind()
|
||||
DdlAgrupadorSAT.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ObjConta.GetCuentas(-1, "-1", -1) Then
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
End If
|
||||
'para obtener la mascara, tomo el primer dato y reemplazo los numeros por cero
|
||||
Dim Mascara As String = "####-####-###"
|
||||
If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 AndAlso DtDatos.FiltraParametros("CtaInicial>0").Rows.Count > 0 Then
|
||||
Mascara = DtDatos.FiltraParametros("CtaInicial>0").Rows(0)("CuentaFormato").ToString.Replace("1", "0").Replace("2", "0").Replace("3", "0").Replace("4", "0").Replace("5", "0").Replace("6", "0").Replace("7", "0").Replace("8", "0").Replace("9", "0")
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
MEECuenta.Mask = Mascara.Replace("0", "9")
|
||||
'para obtener la mascara, tomo el primer dato y reemplazo los numeros por cero
|
||||
Dim Mascara As String = UsuarioActual.Empresa.ContaFormatoCuenta.Replace("X", "9") '"###-##-####"
|
||||
'If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
||||
' Mascara = DtDatos.Rows(0)("Codigo").ToString.Replace("1", "0").Replace("2", "0").Replace("3", "0").Replace("4", "0").Replace("5", "0").Replace("6", "0").Replace("7", "0").Replace("8", "0").Replace("9", "0")
|
||||
'End If
|
||||
|
||||
MEECuenta.Mask = Mascara '.Replace("0", "9")
|
||||
MEECuenta.AutoComplete = True
|
||||
MEECuenta.AutoCompleteValue = Mascara
|
||||
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
ArbolCuentas.nivel = "CtaInicial"
|
||||
ArbolCuentas.nodoid = "id"
|
||||
ArbolCuentas.padre = "IdPadre"
|
||||
ArbolCuentas.titulo = "CtaCodigo"
|
||||
updatos.Update()
|
||||
ObjConta.Dispose()
|
||||
ArbolCuentas.nodoid = "CveCuenta"
|
||||
ArbolCuentas.padre = "CvePadre"
|
||||
ArbolCuentas.titulo = "CuentaFormatoNombre"
|
||||
ArbolCuentas.DataBind()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Function getNodosHijos(nodo As Integer) As DataTable
|
||||
' Return DtDatos.FiltraParametros(String.Format("IdPadre = {0}", nodo))
|
||||
'End Function
|
||||
Private Function getNodospadreHijos(nodo As Integer) As DataTable
|
||||
Return DtDatos.FiltraParametros(String.Format("Id = {0}", nodo))
|
||||
Return DtDatos.FiltraParametros(String.Format("CveCuenta = {0}", nodo))
|
||||
End Function
|
||||
Protected Sub agregar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.addclick
|
||||
LimpiarCampos()
|
||||
|
||||
Tsubcuenta.Visible = True
|
||||
DdlCuentaContable.Visible = False
|
||||
|
||||
Dim dt As New DataTable
|
||||
|
||||
'IDSelected = HdnID.Value.ToEntero() "ul" + itempadre.Cve;
|
||||
Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem)
|
||||
IDSelected = obj.Cve
|
||||
@@ -108,178 +196,453 @@ Partial Class Contabilidad_CatCuentas
|
||||
dt = getNodospadreHijos(IDSelected)
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = dt.Rows(0)
|
||||
'TxtCuenta.Text = Trim(dr("CuentaFormato").ToString.Replace("-", "").ToString)
|
||||
'Tcuenta.Text = Trim(dr("CuentaFormato").ToString.Replace("-", "").ToString)
|
||||
Tsubcuenta.Text = dr("CuentaFormato").ToString()
|
||||
DTcuenta.SelectedValue = dr("Tipo").ToString()
|
||||
DcuentaMayor.SelectedValue = dr("CtaMayor").ToString
|
||||
LblSubCuenta.Text = dr("Nombre").ToString
|
||||
Afectable = CBool(dr("Afectable").ToString)
|
||||
CvePadre = dr("CvePadre").ToString.ToEntero
|
||||
End If
|
||||
|
||||
Tcuenta.Enabled = True
|
||||
If Afectable Then
|
||||
RegistraScript(String.Format("Afectable({0});", nuevacuenta.ClientID))
|
||||
Alert("Se va crear una subcuenta en una cuenta afectable", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
RegistraScript("NoAfectable();")
|
||||
|
||||
End If
|
||||
TxtCuenta.Enabled = True
|
||||
|
||||
'Tcuenta.Enabled = True
|
||||
nuevacuenta.Visible = True
|
||||
updatos.Visible = True
|
||||
updatos.Update()
|
||||
|
||||
End Sub
|
||||
Private Sub limpiavalorescontables()
|
||||
|
||||
|
||||
DdlConcepto.SelectedValueExist(-1)
|
||||
onconceptochange()
|
||||
CveProveedor = -1
|
||||
DdlProveedores.SelectedText = ""
|
||||
DdlProveedores.SelectedValue = CveProveedor.ToString
|
||||
CveCliente = -1
|
||||
DdlClientesWS.SelectedText = ""
|
||||
DdlClientesWS.SelectedValue = CveCliente.ToString
|
||||
Dim PorcentajeImpuesto As Decimal = -1
|
||||
DdlClasificacion.SelectedValueExist(PorcentajeImpuesto)
|
||||
CveClasificacion = -1
|
||||
DdlClasificacion.SelectedValueExist(CveClasificacion)
|
||||
CveBancoCuenta = -1
|
||||
CveAlmacen = -1
|
||||
DdlAlmacen.SelectedValueExist(CveAlmacen)
|
||||
End Sub
|
||||
Protected Sub editar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.editclick
|
||||
LimpiarCampos()
|
||||
limpiavalorescontables()
|
||||
CargaCuentasContables()
|
||||
|
||||
Tsubcuenta.Visible = False
|
||||
DdlCuentaContable.Visible = True
|
||||
|
||||
Dim dt As DataTable
|
||||
Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem)
|
||||
IDSelected = obj.Cve
|
||||
dt = getNodospadreHijos(IDSelected)
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = dt.Rows(0)
|
||||
Tcuenta.Text = dr("CuentaFormato").ToString.Replace("-", "")
|
||||
TxtCuenta.Text = dr("CuentaFormato").ToString.Replace("-", "").ToString
|
||||
'Tcuenta.Text = dr("CuentaFormato").ToString.Replace("-", "").ToString
|
||||
Tnombre.Text = dr("Nombre").ToString()
|
||||
DTcuenta.SelectedValue = dr("Tipo").ToString()
|
||||
DcuentaMayor.SelectedValue = dr("CtaMayor").ToString
|
||||
DdlMoneda.SelectedValueExist(dr("IdMoneda").ToString)
|
||||
DdlMoneda.SelectedValue = If(dr("CveMoneda").ToString = "", "1", dr("CveMoneda").ToString)
|
||||
Using objconta As New ClsContabilidad
|
||||
objconta.GetConta_CuentasDataContabilidad(IDSelected, UsuarioActual.CveEmpresa)
|
||||
If objconta.DtResultados.Rows.Count > 0 Then
|
||||
Dim rowcc As DataRow = objconta.DtResultados.Rows(0)
|
||||
DdlConcepto.SelectedValue = "-1"
|
||||
DdlConcepto.SelectedValueExist(rowcc("CveConceptoAdmin").ToString().ToEntero())
|
||||
onconceptochange()
|
||||
CveProveedor = rowcc("CveProveedor").ToString().ToEntero()
|
||||
DdlProveedores.SelectedText = rowcc("Proveedor").ToString()
|
||||
DdlProveedores.SelectedValue = CveProveedor.ToString
|
||||
CveCliente = rowcc("CveCliente").ToString().ToEntero()
|
||||
DdlClientesWS.SelectedText = rowcc("Cliente").ToString
|
||||
DdlClientesWS.SelectedValue = CveCliente.ToString
|
||||
Dim PorcentajeImpuesto As Decimal = rowcc("PorcentajeImpuesto").ToString().ToDecimal() * 100
|
||||
TxtPorcentaje.Text = PorcentajeImpuesto.ToString
|
||||
CveClasificacion = rowcc("CveClasificacion").ToString().ToEntero()
|
||||
DdlClasificacion.SelectedValueExist(CveClasificacion)
|
||||
CveBancoCuenta = rowcc("CveBancoCuenta").ToString().ToEntero()
|
||||
ddlBancos.SelectedValue = "-1"
|
||||
ddlBancos.SelectedValueExist(CveBancoCuenta)
|
||||
CveAlmacen = rowcc("CveAlmacen").ToString().ToEntero()
|
||||
DdlAlmacen.SelectedValue = "-1"
|
||||
DdlAlmacen.SelectedValueExist(CveAlmacen)
|
||||
DdlPersonal.SelectedValueExist(rowcc("CvePersonal").ToString().ToEntero())
|
||||
End If
|
||||
|
||||
If dr("IdAgrupadorSAT").ToString.ToEntero = 0 Then
|
||||
End Using
|
||||
|
||||
If dr("CveAgrupadorSAT").ToString.ToEntero = 0 Then
|
||||
DdlAgrupadorSAT.SelectedValue = "-1"
|
||||
Else
|
||||
DdlAgrupadorSAT.SelectedValue = dr("IdAgrupadorSAT").ToString
|
||||
DdlAgrupadorSAT.SelectedValueExist(dr("CveAgrupadorSAT").ToString)
|
||||
End If
|
||||
|
||||
|
||||
TxtDigAgrup.Text = dr("DigAgrup").ToString
|
||||
TxtNomIngles.Text = dr("NomIdioma").ToString
|
||||
|
||||
Dim Hijos As Integer = DtDatos.FiltraParametros(String.Format("IdPadre = {0}", IDSelected)).Rows.Count
|
||||
Dim Hijos As Integer = DtDatos.FiltraParametros(String.Format("CvePadre = {0}", IDSelected)).Rows.Count
|
||||
|
||||
If Hijos = 0 Then BtnEliminar.Visible = True
|
||||
|
||||
dt = getNodospadreHijos(dr("IdPadre").ToString.ToEntero)
|
||||
dt = getNodospadreHijos(dr("CvePadre").ToString.ToEntero)
|
||||
If dt.Rows.Count > 0 Then
|
||||
Dim drt As DataRow = dt.Rows(0)
|
||||
Tsubcuenta.Text = drt("Codigo").ToString
|
||||
DdlCuentaContable.SelectedValueExist(drt("CveCuenta").ToString)
|
||||
LblSubCuenta.Text = drt("Nombre").ToString
|
||||
HdnSubCuentaDe.Value = drt("Codigo").ToString
|
||||
|
||||
Guardar.OnClientClick = $"ValidaGuardar('{drt("Codigo").ToString}');"
|
||||
Guardar.Attributes.Add("data-toggle", "confirmation")
|
||||
Guardar.Attributes.Add("data-popout", "true")
|
||||
Guardar.Attributes.Add("data-original-title", "confirmar")
|
||||
Guardar.Attributes.Add("data-btn-ok-label", "Guardar")
|
||||
Guardar.Attributes.Add("data-html", "true")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
TxtCuenta.Enabled = True
|
||||
Guardar.Visible = True
|
||||
updatos.Visible = True
|
||||
updatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentasContables()
|
||||
|
||||
DdlCuentaContable.ClearSelection()
|
||||
DdlCuentaContable.Items.Clear()
|
||||
DdlCuentaContable.SelectedValue = Nothing
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCuentaContable.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
DdlCuentaContable.DataBind()
|
||||
DdlCuentaContable.Items.Insert(0, New ListItem("-", "-1"))
|
||||
DdlCuentaContable.SelectedValueExist("-1")
|
||||
|
||||
End Sub
|
||||
Protected Sub Guardar_Click(sender As Object, e As EventArgs) Handles Guardar.Click
|
||||
|
||||
If Tnombre.Text.Trim = "" Then Alert("Ingrese nombre de la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
|
||||
Dim CveConceptoAdmin As Integer = DdlConcepto.SelectedValue.ToEntero()
|
||||
Dim CveProveedor As Integer = DdlProveedores.SelectedValue.ToEntero()
|
||||
Dim CveCliente As Integer = DdlClientesWS.SelectedValue.ToEntero()
|
||||
Dim CveClasificacion As Integer = DdlClasificacion.SelectedValue.ToEntero()
|
||||
Dim PorcentajeImpuesto As Decimal = TxtPorcentaje.Text.ToDecimal() / 100
|
||||
Dim CveBancoCuenta As Integer = ddlBancos.SelectedValue.ToEntero
|
||||
Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero()
|
||||
|
||||
|
||||
|
||||
If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then
|
||||
If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero,
|
||||
TxtDigAgrup.Text.ToString.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin,
|
||||
CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto,
|
||||
CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen, Codigo:=TxtCuenta.Text.Replace("-", ""), CvePadre:=DdlCuentaContable.SelectedValue.ToEntero) Then
|
||||
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
' Dim ObjContaEmpresa As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
' If Not ObjContaEmpresa.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
|
||||
' DdlMoneda.SelectedValue.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
|
||||
' ObjContaEmpresa.Dispose()
|
||||
' ObjConta.Dispose()
|
||||
' Exit Sub
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}")
|
||||
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
|
||||
' Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
' If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||
' Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero
|
||||
' Dim IdAgrupador As Integer
|
||||
|
||||
' If ObjConta2.GetAgrupadoresSAT() Then
|
||||
' IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
|
||||
' End If
|
||||
' If Id > 0 Then
|
||||
' If ObjConta2.UpdateCuenta(Id, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, IdAgrupador, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End Using
|
||||
'End If
|
||||
|
||||
Dim customerRow As Data.DataRow
|
||||
customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0)
|
||||
customerRow("Nombre") = Tnombre.Text
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
CargaDatos()
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
|
||||
Dim item As CheckBox = DirectCast(ArbolCuentas.FindControl(String.Format("chk{0}", IDSelected)), CheckBox)
|
||||
item.Text = String.Format("{0} - {1}", customerRow("CuentaFormato").ToString, Tnombre.Text)
|
||||
'updatos.Visible = False
|
||||
'Guardar.Visible = False
|
||||
LimpiarCampos()
|
||||
'RegistraScript("$get('BtnCambiaAgrupadorSAT').click();")
|
||||
updatos.Update()
|
||||
GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing
|
||||
Alert("La cuenta se guardo correctamente")
|
||||
|
||||
End If
|
||||
Else
|
||||
Alert("Es necesario agregar el campo 'Agrupador SAT'", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
Dim customerRow As Data.DataRow
|
||||
customerRow = DtDatos.Select(String.Format("Id = {0}", IDSelected))(0)
|
||||
customerRow("Nombre") = Tnombre.Text
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
CargaDatos()
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
ArbolCuentas.DataBind()
|
||||
|
||||
Dim item As CheckBox = DirectCast(ArbolCuentas.FindControl(String.Format("chk{0}", IDSelected)), CheckBox)
|
||||
item.Text = String.Format("{0} - {1}", customerRow("CuentaFormato").ToString, Tnombre.Text)
|
||||
'updatos.Visible = False
|
||||
'Guardar.Visible = False
|
||||
LimpiarCampos()
|
||||
updatos.Update()
|
||||
|
||||
Alert("La cuenta se guardo correctamente")
|
||||
|
||||
End Sub
|
||||
Protected Sub nuevacuenta_Click(sender As Object, e As EventArgs) Handles nuevacuenta.Click
|
||||
|
||||
If Tnombre.Text.Trim = "" Then Alert("Ingrese nombre de la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
|
||||
If Tcuenta.Text.Trim = "" Then Alert("Ingrese la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
If TxtCuenta.Text.Trim = "" Then Alert("Ingrese la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
'If Tcuenta.Text.Trim = "" Then Alert("Ingrese la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
|
||||
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim CuentaEfectivo As Integer = 0
|
||||
'Dim Afectable As Integer = 1 'If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable
|
||||
TxtCuenta.Text.Replace("-", "")
|
||||
Dim idnew As Integer = 0
|
||||
|
||||
Dim CveConceptoContable As Integer = DdlConcepto.SelectedValue.ToEntero()
|
||||
Dim row As DataRow = Nothing
|
||||
Dim CveTipoSaldo As Integer = 0
|
||||
Dim PorcentajeIVA As Decimal = -1
|
||||
Dim drt As DataRow
|
||||
Dim CveConceptoAdmin As Integer
|
||||
Dim CveProveedor As Integer
|
||||
Dim CveCliente As Integer
|
||||
Dim CveClasificacion As Integer
|
||||
Dim PorcentajeImpuesto As Decimal
|
||||
Dim CveBancoCuenta As Integer
|
||||
'Dim CveAlmacen As Integer = -1
|
||||
'Dim CvePersonal As Integer = -1
|
||||
Dim NombreCuenta As String
|
||||
Dim TipoCuenta As String
|
||||
Dim CuentaMayor As Integer
|
||||
Dim CveMoneda As Integer
|
||||
Dim DigAgrup As Integer
|
||||
Dim CveAgrupadorSat As Integer
|
||||
Dim NomIdioma As String
|
||||
Dim TieneError As Boolean = False
|
||||
If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
' [IPP] VIEJO | COMENTADO 9/MARZO/2018
|
||||
'Dim Afectable As Integer = If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable
|
||||
Dim Afectable = 1
|
||||
|
||||
Dim idnew = ObjConta.AddCuenta(Tcuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, CuentaEfectivo, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, TxtNomIngles.Text.Trim, Afectable, IDSelected.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero)
|
||||
If idnew > 0 Then
|
||||
|
||||
Dim dr As DataRow = DtDatos.NewRow
|
||||
dr("id") = idnew
|
||||
dr("CuentaFormato") = Tcuenta.Text
|
||||
dr("Nombre") = Tnombre.Text
|
||||
dr("CtaCodigo") = String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text)
|
||||
dr("Tipo") = DTcuenta.SelectedValue.ToString
|
||||
dr("CtaMayor") = DcuentaMayor.SelectedValue.ToString
|
||||
dr("IdPadre") = IDSelected
|
||||
dr("Codigo") = Tnombre.Text
|
||||
dr("IdMoneda") = DdlMoneda.SelectedValue.ToEntero
|
||||
dr("DigAgrup") = TxtDigAgrup.Text.Trim.ToEntero
|
||||
dr("NomIdioma") = TxtNomIngles.Text.Trim
|
||||
DtDatos.Rows.Add(dr)
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
'.Attributes.Add("data-hijos","0");
|
||||
Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem)
|
||||
item.Attributes.Item("data-hijos") = (item.Attributes.Item("data-hijos").ToEntero + 1).ToString
|
||||
Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", IDSelected)), ADServerControl.DragableUL)
|
||||
If (IsNothing(objul)) Then
|
||||
objul = New ADServerControl.DragableUL
|
||||
objul.ID = String.Format("ul{0}", item.Cve)
|
||||
item.Controls.Add(objul)
|
||||
If CveConceptoContable > 0 Then
|
||||
row = DtConceptosconta.FiltroPrimero(String.Format("CveConceptoContable={0}", CveConceptoContable))
|
||||
CveTipoSaldo = row("CveTipoSaldo").ToString.ToEntero()
|
||||
End If
|
||||
If Not IsNothing(row) Then
|
||||
If CveTipoSaldo = 3 Then
|
||||
PorcentajeIVA = TxtPorcentaje.Text.ToDecimal / 100D
|
||||
End If
|
||||
End If
|
||||
ObjConta.IniciaTransacSQL()
|
||||
If Afectable Then
|
||||
If ObjConta.GetCuentas(IDSelected, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
drt = ObjConta.DtResultados.FiltroPrimero(String.Format("CveCuenta={0}", IDSelected))
|
||||
CveConceptoAdmin = If(drt("CveConceptoAdmin").ToString.ToEntero = 0, -1, drt("CveConceptoAdmin").ToString.ToEntero)
|
||||
CveProveedor = If(drt("CveProveedor").ToString.ToEntero = 0, -1, drt("CveProveedor").ToString.ToEntero)
|
||||
CveCliente = If(drt("CveCliente").ToString.ToEntero = 0, -1, drt("CveCliente").ToString.ToEntero)
|
||||
CveClasificacion = If(drt("CveClasificacion").ToString.ToEntero = 0, -1, drt("CveClasificacion").ToString.ToEntero)
|
||||
PorcentajeImpuesto = If(drt("PorcentajeImpuesto").ToString.ToEntero = 0, -1, drt("PorcentajeImpuesto").ToString.ToEntero)
|
||||
CveBancoCuenta = If(drt("CveBancoCuenta").ToString.ToEntero = 0, -1, drt("CveBancoCuenta").ToString.ToEntero)
|
||||
'CveAlmacen = IIf(drt("CveAlmacen").ToString.ToEntero = 0, -1, drt("CveAlmacen").ToString.ToEntero)
|
||||
'CvePersonal = IIf(drt("CvePersonal").ToString.ToEntero = 0, -1, drt("CvePersonal").ToString.ToEntero)
|
||||
NombreCuenta = If(drt("Nombre").ToString = "", "", drt("Nombre").ToString)
|
||||
TipoCuenta = If(drt("Tipo").ToString = "", "", drt("Tipo").ToString)
|
||||
CuentaMayor = If(drt("CtaMayor").ToString.ToEntero = 0, 0, drt("CtaMayor").ToString.ToEntero)
|
||||
CveMoneda = If(drt("CveMoneda").ToString.ToEntero = -1, -1, drt("CveMoneda").ToString.ToEntero)
|
||||
DigAgrup = If(drt("DigAgrup").ToString.ToEntero = -1, -1, drt("DigAgrup").ToString.ToEntero)
|
||||
CveAgrupadorSat = If(drt("CveAgrupadorSAT").ToString.ToEntero = 0, -1, drt("CveAgrupadorSAT").ToString.ToEntero)
|
||||
NomIdioma = If(drt("NomIdioma").ToString = "", "", drt("NomIdioma").ToString)
|
||||
idnew = ObjConta.AddCuenta(CvePadre, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
|
||||
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente,
|
||||
CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta)
|
||||
If idnew > 0 Then
|
||||
If ObjConta.UpdateTraspasoPrepoliza(UsuarioActual.CveEmpresa, IDSelected, idnew) Then
|
||||
If Not ObjConta.UpdateCuenta(IDSelected.ToEntero, NombreCuenta, TipoCuenta, CuentaMayor, CveMoneda,
|
||||
DigAgrup, CveAgrupadorSat, NomIdioma) Then
|
||||
TieneError = True
|
||||
ObjConta.RollBack()
|
||||
ObjConta.Dispose()
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
Alert("El traspaso de movimientos en la cuenta tuvo un error.", TipoMensaje.MsgError)
|
||||
TieneError = True
|
||||
ObjConta.RollBack()
|
||||
ObjConta.Dispose()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
idnew = ObjConta.AddCuenta(IDSelected, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
|
||||
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, PorcentajeImpuesto:=PorcentajeIVA)
|
||||
End If
|
||||
ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text))
|
||||
|
||||
'updatos.Visible = False
|
||||
'nuevacuenta.Visible = False
|
||||
LimpiarCampos()
|
||||
updatos.Update()
|
||||
CargaDatos()
|
||||
Alert("La cuenta se guardo correctamente")
|
||||
Else
|
||||
Alert("Es necesario agregar el campo 'Agrupador SAT'", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
If idnew > 0 Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim codigoPadre As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text
|
||||
If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||
Dim IdPadre As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero
|
||||
Dim IdAgrupador As Integer
|
||||
|
||||
If ObjConta2.GetAgrupadoresSAT() Then
|
||||
IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
|
||||
End If
|
||||
|
||||
|
||||
codigoPadre = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
ObjConta2 = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjConta2.IniciaTransacSQL()
|
||||
If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||
IdPadre = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero
|
||||
If ObjConta2.GetAgrupadoresSAT() Then
|
||||
IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
|
||||
End If
|
||||
|
||||
If IdPadre > 0 Then
|
||||
Dim idnew2 As Integer = ObjConta2.AddCuenta(TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, CuentaEfectivo, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, TxtNomIngles.Text.Trim, 1, IdPadre, IdAgrupador)
|
||||
|
||||
If idnew2 > 0 Then
|
||||
If Not ObjConta.UpdateCuentaCompaq(idnew, idnew2, UsuarioActual.CveEmpresa) Then
|
||||
TieneError = True
|
||||
ObjConta2.RollBack()
|
||||
ObjConta.RollBack()
|
||||
Alert("Ocurrio un error al vincultar la cuenta con SIG y Compaq", TipoMensaje.MsgError)
|
||||
Else
|
||||
ObjConta2.Commit()
|
||||
End If
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
ObjConta2.RollBack()
|
||||
Alert("Ocurrio un error al crear la cuenta en Compaq", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjConta2.Dispose()
|
||||
End If
|
||||
If Not TieneError Then
|
||||
Dim dr As DataRow = DtDatos.NewRow
|
||||
dr("CveCuenta") = idnew
|
||||
dr("CuentaFormato") = TxtCuenta.Text
|
||||
'dr("CuentaFormato") = Tcuenta.Text
|
||||
dr("Nombre") = Tnombre.Text
|
||||
dr("CuentaFormatoNombre") = String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text)
|
||||
dr("Tipo") = DTcuenta.SelectedValue.ToString
|
||||
dr("CtaMayor") = DcuentaMayor.SelectedValue.ToString
|
||||
dr("CvePadre") = IDSelected
|
||||
dr("Codigo") = Tnombre.Text
|
||||
dr("CveMoneda") = DdlMoneda.SelectedValue.ToEntero
|
||||
dr("DigAgrup") = TxtDigAgrup.Text.Trim.ToEntero
|
||||
dr("NomIdioma") = TxtNomIngles.Text.Trim
|
||||
DtDatos.Rows.Add(dr)
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
'.Attributes.Add("data-hijos","0");
|
||||
Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem)
|
||||
item.Attributes.Item("data-hijos") = (item.Attributes.Item("data-hijos").ToEntero + 1).ToString
|
||||
Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", IDSelected)), ADServerControl.DragableUL)
|
||||
If (IsNothing(objul)) Then
|
||||
objul = New ADServerControl.DragableUL
|
||||
objul.ID = String.Format("ul{0}", item.Cve)
|
||||
item.Controls.Add(objul)
|
||||
End If
|
||||
ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text))
|
||||
|
||||
End If
|
||||
End If
|
||||
If ObjConta2 IsNot Nothing Then ObjConta2.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
ObjConta.RollBack()
|
||||
Alert("Ocurrio un error al crear la cuenta", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
ObjConta.Commit()
|
||||
GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing
|
||||
CargaDatos()
|
||||
LimpiarCampos()
|
||||
updatos.Update()
|
||||
Alert("La cuenta se guardo correctamente", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub LimpiarCampos()
|
||||
Tcuenta.Text = ""
|
||||
TxtCuenta.Text = ""
|
||||
'Tcuenta.Text = ""
|
||||
Tnombre.Text = ""
|
||||
DTcuenta.SelectedValue = "-1"
|
||||
DcuentaMayor.SelectedValue = "-1"
|
||||
DdlAgrupadorSAT.SelectedValue = "-1"
|
||||
Tsubcuenta.Text = ""
|
||||
TxtDigAgrup.Text = ""
|
||||
Guardar.Visible = False
|
||||
nuevacuenta.Visible = False
|
||||
Tcuenta.Enabled = False
|
||||
TxtCuenta.Enabled = False
|
||||
'Tcuenta.Enabled = False
|
||||
DdlCuentaContable.SelectedValueExist(-1)
|
||||
DdlCuentaContable.Visible = False
|
||||
Tsubcuenta.Visible = True
|
||||
BtnEliminar.Visible = False
|
||||
End Sub
|
||||
|
||||
Protected Sub borrar_Click(sender As Object, e As EventArgs) Handles borrar.Click
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjConta.IniciaTransacSQL()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
'ObjConta.IniciaTransacSQL()
|
||||
|
||||
If ObjConta.RemoveCuenta(IDSelected.ToEntero) Then
|
||||
ObjConta.Commit()
|
||||
|
||||
Dim customerRow As Data.DataRow
|
||||
customerRow = DtDatos.Select(String.Format("Id = {0}", IDSelected))(0)
|
||||
customerRow("IdPadre") = "-5"
|
||||
customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0)
|
||||
customerRow("CvePadre") = "-5"
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
@@ -289,30 +652,98 @@ Partial Class Contabilidad_CatCuentas
|
||||
ArbolCuentas.Controls.Remove(item)
|
||||
RegistraScript(String.Format("$('#{0}').click();", editar.ClientID))
|
||||
|
||||
'getNodospadreHijos(IDSelected).Rows(0).Delete()
|
||||
'RegistraScript(String.Format("$('li#{0}').remove();", IDSelected))
|
||||
LimpiarCampos()
|
||||
upcuentas.Update()
|
||||
Alert("La Cuenta ha sido eliminada", TipoMensaje.MsgInformacion)
|
||||
|
||||
Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}")
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||
Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero
|
||||
|
||||
If Id > 0 Then
|
||||
If ObjConta2.RemoveCuenta(Id) Then
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjConta2.Dispose()
|
||||
|
||||
End If
|
||||
GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
Else
|
||||
Alert("La Cuenta no pudo ser eliminada", TipoMensaje.MsgError)
|
||||
ObjConta.RollBack()
|
||||
' ObjConta.RollBack()
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Sub
|
||||
Private Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
'Protected Sub BtnCambiaAgrupadorSAT_Click(sender As Object, e As EventArgs)
|
||||
' CargaAgrupadorSAT()
|
||||
'End Sub
|
||||
Protected Sub DdlConcepto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
onconceptochange()
|
||||
End Sub
|
||||
Private Sub onconceptochange(Optional CveCuenta As Integer = -1)
|
||||
PnlOpcion1.Visible = False
|
||||
pnlOpcion2.Visible = False
|
||||
pnlOpcion3.Visible = False
|
||||
pnlOpcion4.Visible = False
|
||||
pnlOpcion5.Visible = False
|
||||
pnlOpcion6.Visible = False
|
||||
Dim CveConceptoContable As Integer = DdlConcepto.SelectedValue.ToEntero()
|
||||
Dim row As DataRow = Nothing
|
||||
Dim CveTipoSaldo As Integer = 0
|
||||
Dim CveParejaContable As Integer = 0
|
||||
If CveConceptoContable > 0 Then
|
||||
row = DtConceptosconta.FiltroPrimero(String.Format("CveConceptoContable={0}", CveConceptoContable))
|
||||
CveTipoSaldo = row("CveTipoSaldo").ToString.ToEntero()
|
||||
CveParejaContable = row("CveParejaContable").ToString().ToEntero()
|
||||
End If
|
||||
If Not IsNothing(row) Then
|
||||
Select Case CveTipoSaldo
|
||||
Case 1
|
||||
PnlOpcion1.Visible = True
|
||||
Case 2
|
||||
pnlOpcion2.Visible = True
|
||||
Case 3
|
||||
pnlOpcion2.Visible = True
|
||||
pnlOpcion3.Visible = True
|
||||
'If DdlClasificacion.Items.Count < 2 Then
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataBind()
|
||||
'End If
|
||||
Case 4
|
||||
pnlOpcion4.Visible = True
|
||||
Case 5
|
||||
pnlOpcion5.Visible = True
|
||||
|
||||
Case 6
|
||||
pnlOpcion6.Visible = True
|
||||
Case 8
|
||||
pnlOpcion8.Visible = True
|
||||
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlPersonal.DataBind()
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub LnkImprimirExcel_Click(sender As Object, e As EventArgs)
|
||||
Imprime("Excel")
|
||||
End Sub
|
||||
Private Sub Imprime(Formato As String)
|
||||
If DtDatos IsNot Nothing Then
|
||||
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/CatCuentas.rdlc", DtDatos.FiltraParametros("", "Orden ASC"), params, String.Format("Catalogo Cuentas-{0}", NowADS().ToDateTime.ToShortDateString))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Cuentas.rdlc", DtDatos, params, "Cuentas", Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -11,34 +11,34 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
Set
|
||||
ViewState("CveConceptoAsignacion") = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property OpAgregar As Boolean
|
||||
Get
|
||||
If ViewState("OpAgregar") Is Nothing Then
|
||||
ViewState("OpAgregar") = False
|
||||
End If
|
||||
Return Boolean.Parse(ViewState("OpAgregar").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("OpAgregar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
Public Property OpAgregar As Boolean
|
||||
Get
|
||||
If ViewState("OpAgregar") Is Nothing Then
|
||||
ViewState("OpAgregar") = False
|
||||
End If
|
||||
Return Boolean.Parse(ViewState("OpAgregar").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("OpAgregar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
HttpContext.Current.Application("GlobalDTContaConceptosContables") = Nothing
|
||||
DdlConceptos.DataSource = GlobalDTContaConceptosContables(-1)
|
||||
DdlConceptos.DataBind()
|
||||
DdlConceptos.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
HttpContext.Current.Application("GlobalDTContaConceptosContables") = Nothing
|
||||
DdlConceptos.DataSource = GlobalDTContaConceptosContables(-1)
|
||||
DdlConceptos.DataBind()
|
||||
DdlConceptos.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
CargaDatosModal()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs)
|
||||
CargaDatosSistema()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs)
|
||||
CargaDatosSistema()
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Sub CargaDatos()
|
||||
@@ -48,38 +48,38 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
' End If
|
||||
' ObjConta.Dispose()
|
||||
' GvDatos.DataBind()
|
||||
'End Sub
|
||||
|
||||
'End Sub
|
||||
|
||||
Private Sub CargaDatosSistema()
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentasAsignacionesSistema(UsuarioActual.CveEmpresa, DdlTipo.SelectedValue.ToEntero, DdlOpcion.SelectedValue.ToEntero, DdlConceptos.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
GvDatos.Columns(4).Visible = ObjConta.DtResultados.MAX("CveSubProyecto").ToEntero > 0
|
||||
GvDatos.Columns(5).Visible = ObjConta.DtResultados.MAX("PorcentajeIVA").ToDecimal > 0
|
||||
GvDatos.Columns(6).Visible = ObjConta.DtResultados.MAX("TipoGasto") <> ""
|
||||
|
||||
End If
|
||||
GvDatos.Columns(4).Visible = ObjConta.DtResultados.MAX("CveSubProyecto").ToEntero > 0
|
||||
GvDatos.Columns(5).Visible = ObjConta.DtResultados.MAX("PorcentajeIVA").ToDecimal > 0
|
||||
GvDatos.Columns(6).Visible = ObjConta.DtResultados.MAX("TipoGasto") <> ""
|
||||
|
||||
If ObjConta.GetCuentasGlobales(UsuarioActual.CveEmpresa) Then
|
||||
GvGlobal.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
GvDatos.DataBind()
|
||||
GvGlobal.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
GvGlobal.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatosModal()
|
||||
DdlConceptoNomina.DataSource = GlobalDTNomConceptos(UsuarioActual.CveEmpresa)
|
||||
DdlConceptoNomina.DataBind()
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Dim Con As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Con.SincronizaCuentas(UsuarioActual.CveEmpresa)
|
||||
Con.Dispose()
|
||||
End If
|
||||
|
||||
DdlConceptoNomina.DataBind()
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Dim Con As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Con.SincronizaCuentas(UsuarioActual.CveEmpresa)
|
||||
Con.Dispose()
|
||||
End If
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If ObjConta.GetConta_ConceptosContables() Then
|
||||
@@ -91,40 +91,40 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
DdlCuenta.DataSource = ObjConta.DtResultados
|
||||
DdlCuentaGlobal.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
DdlProveedor.setEsWebService(True) 'GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
DdlProveedor.setEsWebService(True) 'GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlClientes.setEsWebService(True)
|
||||
|
||||
DdlPersonal.setEsWebService(True)
|
||||
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlSubProyectos.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=-1)
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem("-", "0"))
|
||||
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlSubProyectos.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=-1)
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem("-", "0"))
|
||||
|
||||
Dim ObjBancos As New ClsBancos
|
||||
If ObjBancos.GetBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||
DdlCuentaBancaria.DataSource = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
|
||||
ObjBancos.Dispose()
|
||||
|
||||
DdlCuentaBancaria.DataBind()
|
||||
DdlCconceptosContables.DataBind()
|
||||
DdlConceptoGlobal.DataBind()
|
||||
DdlConceptoGlobal.DataBind()
|
||||
DdlCuenta.DataBind()
|
||||
DdlCuentaGlobal.DataBind()
|
||||
DdlProveedor.DataBind()
|
||||
'DdlPersonal.DataBind()
|
||||
DdlClasificacion.DataBind()
|
||||
DdlAlmacen.DataBind()
|
||||
DdlSubProyectos.DataBind()
|
||||
|
||||
DdlAlmacen.DataBind()
|
||||
DdlSubProyectos.DataBind()
|
||||
|
||||
DdlCuentaBancaria.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlConceptoNomina.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlCconceptosContables.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
@@ -134,153 +134,153 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Protected Sub ActualizaModulo(sender As Object, e As EventArgs)
|
||||
OpAgregar = False
|
||||
LimpiarDatos()
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim Dr As DataRow = GlobalDTContaConceptosContables(GvRow.DataKey("CveConceptoContable").ToEntero).FiltroPrimero("")
|
||||
Dim CveConceptoContable As Integer = GvRow.DataKey("CveConceptoContable").ToString.ToEntero
|
||||
HdnCveCuentaAsignacion.Value = GvRow.DataKey("CveCuentaAsignacion").ToString
|
||||
|
||||
If Dr IsNot Nothing Then
|
||||
DdlCconceptosContables.Enabled = False
|
||||
DdlSubProyectos.Enabled = False
|
||||
DdlClasificacion.Enabled = False
|
||||
DdlPersonal.Enabled = False
|
||||
RecargaConcepto(CveConceptoContable)
|
||||
|
||||
CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero
|
||||
DdlCconceptosContables.SelectedValueExist(GvRow.DataKey("CveConceptoContable"))
|
||||
DdlCuenta.SelectedValueExist(GvRow.DataKey("CveCuenta"))
|
||||
DdlConceptoNomina.SelectedValueExist(GvRow.DataKey("CveConceptoNomina").ToEntero)
|
||||
If GvRow.DataKey("CveProveedor").ToEntero > 0 Then
|
||||
DdlProveedor.ddl.Items.Clear()
|
||||
DdlProveedor.ddl.ClearSelection()
|
||||
Dim NomProv As String = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, CveProveedor:=GvRow.DataKey("CveProveedor").ToEntero).FiltroPrimeroValor("NombreComercial")
|
||||
DdlProveedor.ddl.Items.Add(New ListItem(NomProv, GvRow.DataKey("CveProveedor")))
|
||||
DdlProveedor.SelectedValue = GvRow.DataKey("CveProveedor")
|
||||
End If
|
||||
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
|
||||
DdlAlmacen.SelectedValueExist(GvRow.DataKey("CveAlmacen"))
|
||||
TxtPorcentajeIVA.Text = GvRow.DataKey("PorcentajeIVA")
|
||||
DdlCuentaBancaria.SelectedValueExist(GvRow.DataKey("CveBancoCuenta"))
|
||||
DdlSubProyectos.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero)
|
||||
DdlTipoGasto.SelectedValueExist(GvRow.DataKey("CveTipoGasto").ToEntero)
|
||||
DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo").ToEntero)
|
||||
DdlActivoFijo.Enabled = False
|
||||
Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero
|
||||
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
|
||||
DdlColectivas.SelectedValueExist(GvRow.DataKey("CveColectiva").ToEntero)
|
||||
|
||||
If CveCliente > 0 Then
|
||||
Dim drp As String = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre")
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem(drp, CveCliente.ToString))
|
||||
DdlClientes.SelectedValue = CveCliente.ToString
|
||||
DdlClientes.SelectedText = drp
|
||||
End If
|
||||
|
||||
If CvePersonal > 0 Then
|
||||
Dim drp As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal).FiltroPrimeroValor("NombreCompleto")
|
||||
DdlPersonal.ddl.Items.Insert(0, New ListItem(drp, CvePersonal.ToString))
|
||||
DdlPersonal.SelectedValue = CvePersonal.ToString
|
||||
DdlPersonal.SelectedText = drp
|
||||
End If
|
||||
|
||||
If GvRow.DataKey("CveCredito").ToEntero > 0 Then
|
||||
DdlCreditos.Items.Clear()
|
||||
DdlCreditos.ClearSelection()
|
||||
Dim ObjCreditos As New ClsBancos
|
||||
If ObjCreditos.GetCreditos(-1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCreditos.DataSource = ObjCreditos.DtResultados.FiltraParametros("", DistinctColumns:={"CveCredito", "Referencia"})
|
||||
End If
|
||||
ObjCreditos.Dispose()
|
||||
DdlCreditos.DataBind()
|
||||
DdlCreditos.SelectedValue = GvRow.DataKey("CveCredito")
|
||||
End If
|
||||
|
||||
LbAgregar.Text = "Actualizar"
|
||||
UpModalModulos.Update()
|
||||
RegistraScript("$('#ModalCat').modal();")
|
||||
End If
|
||||
|
||||
|
||||
Protected Sub ActualizaModulo(sender As Object, e As EventArgs)
|
||||
OpAgregar = False
|
||||
LimpiarDatos()
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim Dr As DataRow = GlobalDTContaConceptosContables(GvRow.DataKey("CveConceptoContable").ToEntero).FiltroPrimero("")
|
||||
Dim CveConceptoContable As Integer = GvRow.DataKey("CveConceptoContable").ToString.ToEntero
|
||||
HdnCveCuentaAsignacion.Value = GvRow.DataKey("CveCuentaAsignacion").ToString
|
||||
|
||||
If Dr IsNot Nothing Then
|
||||
DdlCconceptosContables.Enabled = False
|
||||
DdlSubProyectos.Enabled = False
|
||||
DdlClasificacion.Enabled = False
|
||||
DdlPersonal.Enabled = False
|
||||
RecargaConcepto(CveConceptoContable)
|
||||
|
||||
CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero
|
||||
DdlCconceptosContables.SelectedValueExist(GvRow.DataKey("CveConceptoContable"))
|
||||
DdlCuenta.SelectedValueExist(GvRow.DataKey("CveCuenta"))
|
||||
DdlConceptoNomina.SelectedValueExist(GvRow.DataKey("CveConceptoNomina").ToEntero)
|
||||
If GvRow.DataKey("CveProveedor").ToEntero > 0 Then
|
||||
DdlProveedor.ddl.Items.Clear()
|
||||
DdlProveedor.ddl.ClearSelection()
|
||||
Dim NomProv As String = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, CveProveedor:=GvRow.DataKey("CveProveedor").ToEntero).FiltroPrimeroValor("NombreComercial")
|
||||
DdlProveedor.ddl.Items.Add(New ListItem(NomProv, GvRow.DataKey("CveProveedor")))
|
||||
DdlProveedor.SelectedValue = GvRow.DataKey("CveProveedor")
|
||||
End If
|
||||
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
|
||||
DdlAlmacen.SelectedValueExist(GvRow.DataKey("CveAlmacen"))
|
||||
TxtPorcentajeIVA.Text = GvRow.DataKey("PorcentajeIVA")
|
||||
DdlCuentaBancaria.SelectedValueExist(GvRow.DataKey("CveBancoCuenta"))
|
||||
DdlSubProyectos.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero)
|
||||
DdlTipoGasto.SelectedValueExist(GvRow.DataKey("CveTipoGasto").ToEntero)
|
||||
DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo").ToEntero)
|
||||
DdlActivoFijo.Enabled = False
|
||||
Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero
|
||||
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
|
||||
DdlColectivas.SelectedValueExist(GvRow.DataKey("CveColectiva").ToEntero)
|
||||
|
||||
If CveCliente > 0 Then
|
||||
Dim drp As String = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre")
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem(drp, CveCliente.ToString))
|
||||
DdlClientes.SelectedValue = CveCliente.ToString
|
||||
DdlClientes.SelectedText = drp
|
||||
End If
|
||||
|
||||
If CvePersonal > 0 Then
|
||||
Dim drp As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal).FiltroPrimeroValor("NombreCompleto")
|
||||
DdlPersonal.ddl.Items.Insert(0, New ListItem(drp, CvePersonal.ToString))
|
||||
DdlPersonal.SelectedValue = CvePersonal.ToString
|
||||
DdlPersonal.SelectedText = drp
|
||||
End If
|
||||
|
||||
If GvRow.DataKey("CveCredito").ToEntero > 0 Then
|
||||
DdlCreditos.Items.Clear()
|
||||
DdlCreditos.ClearSelection()
|
||||
Dim ObjCreditos As New ClsBancos
|
||||
If ObjCreditos.GetCreditos(-1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCreditos.DataSource = ObjCreditos.DtResultados.FiltraParametros("", DistinctColumns:={"CveCredito", "Referencia"})
|
||||
End If
|
||||
ObjCreditos.Dispose()
|
||||
DdlCreditos.DataBind()
|
||||
DdlCreditos.SelectedValue = GvRow.DataKey("CveCredito")
|
||||
End If
|
||||
|
||||
LbAgregar.Text = "Actualizar"
|
||||
UpModalModulos.Update()
|
||||
RegistraScript("$('#ModalCat').modal();")
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub RecargaConcepto(CveConceptoContable As Integer)
|
||||
Dim Dr As DataRow = GlobalDTContaConceptosContables(CveConceptoContable).FiltroPrimero("")
|
||||
|
||||
If Dr IsNot Nothing Then
|
||||
|
||||
divCliente.Visible = Boolean.Parse(Dr("AplicaCliente").ToString)
|
||||
divProveedor.Visible = Boolean.Parse(Dr("AplicaProveedor").ToString)
|
||||
divPersonal.Visible = Boolean.Parse(Dr("AplicaPersonal").ToString)
|
||||
divPorcentajeIVA.Visible = Boolean.Parse(Dr("AplicaImpuesto").ToString)
|
||||
divClasificacion.Visible = Boolean.Parse(Dr("AplicaClasificacion").ToString)
|
||||
divBancos.Visible = Boolean.Parse(Dr("AplicaBancos").ToString)
|
||||
divAlmacen.Visible = Boolean.Parse(Dr("AplicaAlmacen").ToString)
|
||||
divSubProyectos.Visible = Boolean.Parse(Dr("AplicaSubProyecto").ToString)
|
||||
divActivoFijo.Visible = Boolean.Parse(Dr("AplicaActivoFijo").ToString)
|
||||
divCredito.Visible = Boolean.Parse(Dr("AplicaCredito").ToString)
|
||||
divColectivas.Visible = Boolean.Parse(Dr("AplicaColectiva").ToString)
|
||||
|
||||
DdlActivoFijo.Enabled = False
|
||||
|
||||
If Dr("AplicaActivoFijo").ToString = "True" Then
|
||||
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
||||
DdlActivoFijo.DataBind() ' DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo"))
|
||||
|
||||
If OpAgregar Then
|
||||
DdlActivoFijo.Enabled = True
|
||||
Else
|
||||
DdlActivoFijo.Enabled = False
|
||||
End If
|
||||
End If
|
||||
|
||||
divConceptoNomina.Visible = Dr("AplicaNomina").ToString = "True"
|
||||
|
||||
If CveConceptoContable = 51 Then
|
||||
divTipoGasto.Visible = True
|
||||
DdlTipoGasto.Items.Clear()
|
||||
DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
||||
DdlTipoGasto.DataBind()
|
||||
DdlTipoGasto.Items.Add(New ListItem("-", "-1"))
|
||||
End If
|
||||
If Dr("CveTipoSaldo").ToString = "1" Then
|
||||
divRegeneraCuenta.Visible = True
|
||||
End If
|
||||
|
||||
If Dr("AplicaCredito").ToString = "True" Then
|
||||
Dim ObjCreditos As New ClsBancos
|
||||
If ObjCreditos.GetCreditos(-1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCreditos.DataSource = ObjCreditos.DtResultados.FiltraParametros("", DistinctColumns:={"CveCredito", "Referencia"})
|
||||
End If
|
||||
ObjCreditos.Dispose()
|
||||
DdlCreditos.DataBind()
|
||||
|
||||
If OpAgregar Then
|
||||
DdlCreditos.Enabled = True
|
||||
Else
|
||||
DdlCreditos.Enabled = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If Dr("AplicaColectiva").ToString = "True" Then
|
||||
Dim ObjG As New ClsGenerales
|
||||
If ObjG.GetColectivas(UsuarioActual.CveEmpresa, CveConceptoContable:=DdlCconceptosContables.SelectedValue.ToEntero) Then
|
||||
DdlColectivas.DataSource = ObjG.DtResultados
|
||||
End If
|
||||
ObjG.Dispose()
|
||||
DdlColectivas.DataBind()
|
||||
DdlColectivas.Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
If OpAgregar Then
|
||||
DdlColectivas.Enabled = True
|
||||
Else
|
||||
DdlColectivas.Enabled = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Private Sub RecargaConcepto(CveConceptoContable As Integer)
|
||||
Dim Dr As DataRow = GlobalDTContaConceptosContables(CveConceptoContable).FiltroPrimero("")
|
||||
|
||||
If Dr IsNot Nothing Then
|
||||
|
||||
divCliente.Visible = Boolean.Parse(Dr("AplicaCliente").ToString)
|
||||
divProveedor.Visible = Boolean.Parse(Dr("AplicaProveedor").ToString)
|
||||
divPersonal.Visible = Boolean.Parse(Dr("AplicaPersonal").ToString)
|
||||
divPorcentajeIVA.Visible = Boolean.Parse(Dr("AplicaImpuesto").ToString)
|
||||
divClasificacion.Visible = Boolean.Parse(Dr("AplicaClasificacion").ToString)
|
||||
divBancos.Visible = Boolean.Parse(Dr("AplicaBancos").ToString)
|
||||
divAlmacen.Visible = Boolean.Parse(Dr("AplicaAlmacen").ToString)
|
||||
divSubProyectos.Visible = Boolean.Parse(Dr("AplicaSubProyecto").ToString)
|
||||
divActivoFijo.Visible = Boolean.Parse(Dr("AplicaActivoFijo").ToString)
|
||||
divCredito.Visible = Boolean.Parse(Dr("AplicaCredito").ToString)
|
||||
divColectivas.Visible = Boolean.Parse(Dr("AplicaColectiva").ToString)
|
||||
|
||||
DdlActivoFijo.Enabled = False
|
||||
|
||||
If Dr("AplicaActivoFijo").ToString = "True" Then
|
||||
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
||||
DdlActivoFijo.DataBind() ' DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo"))
|
||||
|
||||
If OpAgregar Then
|
||||
DdlActivoFijo.Enabled = True
|
||||
Else
|
||||
DdlActivoFijo.Enabled = False
|
||||
End If
|
||||
End If
|
||||
|
||||
divConceptoNomina.Visible = Dr("AplicaNomina").ToString = "True"
|
||||
|
||||
If CveConceptoContable = 51 Then
|
||||
divTipoGasto.Visible = True
|
||||
DdlTipoGasto.Items.Clear()
|
||||
DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
||||
DdlTipoGasto.DataBind()
|
||||
DdlTipoGasto.Items.Add(New ListItem("-", "-1"))
|
||||
End If
|
||||
If Dr("CveTipoSaldo").ToString = "1" Then
|
||||
divRegeneraCuenta.Visible = True
|
||||
End If
|
||||
|
||||
If Dr("AplicaCredito").ToString = "True" Then
|
||||
Dim ObjCreditos As New ClsBancos
|
||||
If ObjCreditos.GetCreditos(-1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCreditos.DataSource = ObjCreditos.DtResultados.FiltraParametros("", DistinctColumns:={"CveCredito", "Referencia"})
|
||||
End If
|
||||
ObjCreditos.Dispose()
|
||||
DdlCreditos.DataBind()
|
||||
|
||||
If OpAgregar Then
|
||||
DdlCreditos.Enabled = True
|
||||
Else
|
||||
DdlCreditos.Enabled = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If Dr("AplicaColectiva").ToString = "True" Then
|
||||
Dim ObjG As New ClsGenerales
|
||||
If ObjG.GetColectivas(UsuarioActual.CveEmpresa, CveConceptoContable:=DdlCconceptosContables.SelectedValue.ToEntero) Then
|
||||
DdlColectivas.DataSource = ObjG.DtResultados
|
||||
End If
|
||||
ObjG.Dispose()
|
||||
DdlColectivas.DataBind()
|
||||
DdlColectivas.Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
If OpAgregar Then
|
||||
DdlColectivas.Enabled = True
|
||||
Else
|
||||
DdlColectivas.Enabled = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub EliminarRow(sender As Object, e As EventArgs)
|
||||
@@ -294,12 +294,12 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarGlobal_Click(sender As Object, e As EventArgs) Handles BtnAgregarGlobal.Click
|
||||
|
||||
Protected Sub BtnAgregarGlobal_Click(sender As Object, e As EventArgs) Handles BtnAgregarGlobal.Click
|
||||
|
||||
UppModalGlobal.Update()
|
||||
RegistraScript("$('#ModalGlobal').modal();")
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub EliminarRowGlobal(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
@@ -309,55 +309,55 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
CargaDatosSistema()
|
||||
UpDatos.Update()
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarAsignacion_Click(sender As Object, e As EventArgs) Handles BtnAgregarAsignacion.Click
|
||||
OpAgregar = True
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarAsignacion_Click(sender As Object, e As EventArgs) Handles BtnAgregarAsignacion.Click
|
||||
OpAgregar = True
|
||||
|
||||
LimpiarDatos()
|
||||
DdlCconceptosContables.Enabled = True
|
||||
DdlSubProyectos.Enabled = True
|
||||
DdlClasificacion.Enabled = True
|
||||
DdlPersonal.Enabled = True
|
||||
DdlSubProyectos.Enabled = True
|
||||
DdlClasificacion.Enabled = True
|
||||
DdlPersonal.Enabled = True
|
||||
LbAgregar.Text = "Agregar"
|
||||
UpModalModulos.Update()
|
||||
RegistraScript("$('#ModalCat').modal();")
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiarDatos()
|
||||
Private Sub LimpiarDatos()
|
||||
CveConceptoAsignacion = -1
|
||||
DdlCconceptosContables.SelectedValue = "-1"
|
||||
DdlCuenta.SelectedValue = "-1"
|
||||
DdlProveedor.SelectedValue = "-1"
|
||||
DdlClasificacion.SelectedValue = "-1"
|
||||
DdlAlmacen.SelectedValue = "-1"
|
||||
DdlConceptoNomina.SelectedValue = "-1"
|
||||
DdlCuentaBancaria.SelectedValueExist("-1")
|
||||
DdlConceptoNomina.SelectedValue = "-1"
|
||||
DdlCuentaBancaria.SelectedValueExist("-1")
|
||||
TxtPorcentajeIVA.Text = ""
|
||||
DdlClientes.ddl.DataSource = ""
|
||||
DdlClientes.ddl.DataBind()
|
||||
DdlClientes.setEsWebService(True)
|
||||
DdlPersonal.ddl.DataSource = ""
|
||||
DdlPersonal.ddl.DataBind()
|
||||
DdlPersonal.setEsWebService(True)
|
||||
HdnCveCuentaAsignacion.Value = ""
|
||||
|
||||
If OpAgregar Then
|
||||
divCliente.Visible = False
|
||||
divProveedor.Visible = False
|
||||
divPersonal.Visible = False
|
||||
divPorcentajeIVA.Visible = False
|
||||
divClasificacion.Visible = False
|
||||
divBancos.Visible = False
|
||||
divAlmacen.Visible = False
|
||||
divSubProyectos.Visible = False
|
||||
divActivoFijo.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DdlPersonal.setEsWebService(True)
|
||||
HdnCveCuentaAsignacion.Value = ""
|
||||
|
||||
If OpAgregar Then
|
||||
divCliente.Visible = False
|
||||
divProveedor.Visible = False
|
||||
divPersonal.Visible = False
|
||||
divPorcentajeIVA.Visible = False
|
||||
divClasificacion.Visible = False
|
||||
divBancos.Visible = False
|
||||
divAlmacen.Visible = False
|
||||
divSubProyectos.Visible = False
|
||||
divActivoFijo.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||
@@ -365,23 +365,23 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
ObjConta.IniciaTransacSQL()
|
||||
Dim ErrorString As String = ""
|
||||
If HdnCveCuentaAsignacion.Value.ToEntero <= 0 Then
|
||||
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero,
|
||||
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero,
|
||||
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveColectiva:=DdlColectivas.SelectedValue.ToEntero,
|
||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveColectiva:=DdlColectivas.SelectedValue.ToEntero,
|
||||
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
|
||||
ErrorString = "Error al agregar"
|
||||
End If
|
||||
ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then
|
||||
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero,
|
||||
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero,
|
||||
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveColectiva:=DdlColectivas.SelectedValue.ToEntero,
|
||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveColectiva:=DdlColectivas.SelectedValue.ToEntero,
|
||||
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
|
||||
ErrorString = "Error al actualizar"
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If Not ChkSeguirRegistrando.Checked Then RegistraScript("$('#ModalCat').modal('hide');")
|
||||
|
||||
If ErrorString.Length > 0 Then
|
||||
@@ -390,46 +390,46 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
Else
|
||||
ObjConta.Commit()
|
||||
Alert("Agregado correctamente")
|
||||
End If
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
CargaDatosSistema()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LBAgregaGlobal_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ErrorString As String = ""
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If Not ObjConta.AddCuentasGlobales(DdlConceptoGlobal.SelectedValue.ToEntero, DdlCuentaGlobal.SelectedValue.ToEntero, DdlTipoGlobal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
ErrorString = "Error al agregar"
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
Protected Sub LBAgregaGlobal_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ErrorString As String = ""
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If Not ObjConta.AddCuentasGlobales(DdlConceptoGlobal.SelectedValue.ToEntero, DdlCuentaGlobal.SelectedValue.ToEntero, DdlTipoGlobal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
ErrorString = "Error al agregar"
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
If ErrorString.Length > 0 Then
|
||||
Alert(ErrorString)
|
||||
Else
|
||||
Alert("Agregado correctamente")
|
||||
End If
|
||||
CargaDatosSistema()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub DdlCconceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCconceptosContables.SelectedIndexChanged
|
||||
RecargaConcepto(DdlCconceptosContables.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
Private Sub DdlTipoGlobal_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoGlobal.SelectedIndexChanged
|
||||
Dim Afectables As Integer = 1
|
||||
If DdlTipoGlobal.SelectedValue = "2" Then 'cuando es detallado, que de la opción de seleccionar una de mayor y/o no afectable
|
||||
Afectables = -1
|
||||
End If
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentas(-1, "-1", Afectables, UsuarioActual.CveEmpresa) Then
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub DdlCconceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCconceptosContables.SelectedIndexChanged
|
||||
RecargaConcepto(DdlCconceptosContables.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
Private Sub DdlTipoGlobal_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoGlobal.SelectedIndexChanged
|
||||
Dim Afectables As Integer = 1
|
||||
If DdlTipoGlobal.SelectedValue = "2" Then 'cuando es detallado, que de la opción de seleccionar una de mayor y/o no afectable
|
||||
Afectables = -1
|
||||
End If
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentas(-1, "-1", Afectables, UsuarioActual.CveEmpresa) Then
|
||||
DdlCuentaGlobal.DataSource = ObjConta.DtResultados.FiltraParametros("", Orderby:="Codigo")
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
DdlCuentaGlobal.DataBind()
|
||||
End Sub
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
DdlCuentaGlobal.DataBind()
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatCuentas.aspx.vb" Inherits="Contabilidad2_CatCuentas" %>
|
||||
<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatCuentasCI.aspx.vb" Inherits="Contabilidad_CatCuentas" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -47,28 +47,26 @@
|
||||
font-size: 9px !important;
|
||||
content: "\f040";
|
||||
}
|
||||
|
||||
#select2-C_DdlCuentaContable-results{
|
||||
max-width:300px!important
|
||||
}
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" runat="server"> <i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Cuentas Contables
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirExcel" runat="server" OnClick="LnkImprimirExcel_Click" Style="color: #686868;"><i class="fa fa-file-excel-o" style="color:#686868;"></i> Imprimir Cuentas</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="upcuentas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="updatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="catcuentascontarbol">
|
||||
@@ -83,8 +81,6 @@
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<%-- <asp:Button ID="BtnCambiaAgrupadorSAT" OnClick="BtnCambiaAgrupadorSAT_Click" ClientIDMode="Static" Style="display: none;" runat="server" />--%>
|
||||
|
||||
<div class="catcuentasform">
|
||||
|
||||
|
||||
@@ -98,8 +94,8 @@
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Cuenta</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="TxtCuenta" Style="width: 200px" runat="server" MaxLength="30"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender TargetControlID="TxtCuenta" ID="MEECuenta" runat="server" MaskType="Number" AutoComplete="True" AutoCompleteValue="0" />
|
||||
<asp:TextBox ID="Tcuenta" runat="server" Enabled="False" MaxLength="30" Width="140px" ClientIDMode="Static"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender TargetControlID="Tcuenta" ID="MEECuenta" runat="server" MaskType="Number" AutoComplete="True" AutoCompleteValue="0" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
@@ -109,21 +105,20 @@
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<hr />
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Subcuenta de</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="Tsubcuenta" runat="server" Enabled="False" Width="140px" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:DropDownList ID="DdlCuentaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" style="max-width:160px"
|
||||
DataValueField="Id" Width="160px" Visible="false">
|
||||
</asp:DropDownList>
|
||||
<asp:TextBox ID="Tsubcuenta" runat="server" Width="140px" ClientIDMode="Static"></asp:TextBox>
|
||||
<br />
|
||||
<asp:Label ID="LblSubCuenta" runat="server" Text="" Font-Italic="True" Font-Size="7pt" ClientIDMode="Static"></asp:Label>
|
||||
<asp:HiddenField ID="HdnSubCuentaDe" ClientIDMode="Static" Value="0" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Tipo de Cuenta</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DTcuenta" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server">
|
||||
<asp:DropDownList ID="DTcuenta" CssClass="form-control input-sm input-small select2me" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Seleccione " Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo Deudora " Value="A"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo Acreedora " Value="B"></asp:ListItem>
|
||||
@@ -143,7 +138,7 @@
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Cuenta Mayor</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DcuentaMayor" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server">
|
||||
<asp:DropDownList ID="DcuentaMayor" CssClass="form-control input-sm input-small select2me" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Seleccione " Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayor " Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No " Value="2"></asp:ListItem>
|
||||
@@ -155,14 +150,14 @@
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Agrupador SAT</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlAgrupadorSAT" DataTextField="CodigoNombre" DataValueField="CveAgrupadorSAT" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server">
|
||||
<asp:DropDownList ID="DdlAgrupadorSAT" DataTextField="CodigoNombre" DataValueField="Id" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Moneda</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlMoneda" DataTextField="Moneda" DataValueField="CveMoneda" CssClass="form-control input-sm input-small select2me" runat="server">
|
||||
<asp:DropDownList ID="DdlMoneda" DataTextField="Nombre" DataValueField="Id" CssClass="form-control input-sm input-small select2me" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
@@ -173,78 +168,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Nombre en ingles</div>
|
||||
<div class="catcuentas left">Nombre en inglés</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="TxtNomIngles" Style="width: 100%;" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Concepto</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlConcepto" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" AutoPostBack="true" Width="100%"
|
||||
OnSelectedIndexChanged="DdlConcepto_SelectedIndexChanged" CssClass="form-control input-sm input-small select2me" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<asp:Panel runat="server" ID="PnlOpcion1" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Proveedor:"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" data-metodo="getproveedores" UsaWebService="true" Width="100%" CssStyle="width: 100%;" DataTextField="RazonSocial" DataValueField="CveProveedor" ></ADS:Dropdownlost>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion3" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Clasificación"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion4" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Cuenta Bancaria "></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="ddlBancos" Width="100%" CssClass="select2me" DataValueField="CveCuenta" DataTextField="NumCuenta" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion5" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Almacén"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlAlmacen" runat="server" Width="100%" DataValueField="CveAlmacen" DataTextField="Almacen" CssClass="select2me"></asp:DropDownList>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion6" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Cliente:"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" UsaWebService="true" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="min-width: 100px;"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion2" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Porcentaje Impuesto:"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="TxtPorcentaje" runat="server"></asp:TextBox>(0% - 100% )
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion8" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Personal"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlPersonal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione el personal (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
|
||||
<br />
|
||||
<asp:Button ID="Guardar" CssClass="btn btn-primary" Visible="false" runat="server" Text="Guardar" />
|
||||
<asp:Button ID="nuevacuenta" CssClass="btn btn-success" Visible="false" runat="server" Text="Guardar" />
|
||||
<asp:Button ID="Guardar" CssClass="btn btn-primary" Visible="false" tit runat="server" Text="Guardar" />
|
||||
<asp:Button ID="nuevacuenta" CssClass="btn btn-success" Visible="false" runat="server" Text="Guardar" />
|
||||
<asp:Button ID="BtnEliminar" CssClass="btn btn-danger" Visible="false" runat="server" Text="Eliminar" OnClientClick="return confirm('Esta seguro de eliminar la cuenta?')" />
|
||||
</fieldset>
|
||||
</div>
|
||||
@@ -289,20 +220,36 @@
|
||||
});
|
||||
});
|
||||
|
||||
function Afectable(btn) {
|
||||
debugger;
|
||||
$('#C_nuevacuenta').attr('data-toggle', 'confirmation');
|
||||
$('#C_nuevacuenta').attr('data-popout', 'true');
|
||||
$('#C_nuevacuenta').attr('data-original-title', '<b>Verifique los datos para continuar</b>. <br/><br/> <center>¿Seguro de registrar esta cuenta nueva?</center>');
|
||||
$('#C_nuevacuenta').attr('data-btn-ok-label', 'si');
|
||||
function ValidaGuardar(SubCuentaAnterior) {
|
||||
$('.popover').remove();
|
||||
$("#C_Guardar").removeAttr("aria-describedby");
|
||||
|
||||
|
||||
|
||||
if ($get('HdnSubCuentaDe').value != $get('Tsubcuenta').value) {
|
||||
|
||||
setTimeout(
|
||||
function () {
|
||||
;
|
||||
var Text = '';
|
||||
|
||||
debugger;
|
||||
if ($("#Tsubcuenta").length) {
|
||||
Text += 'La cuenta sera reasignada a la cuenta padre: <b>' + $get('Tsubcuenta').value + '</b> con sus respectivos saldos <br/>';
|
||||
}
|
||||
|
||||
$('.popover-title').html(Text);
|
||||
}, 10);
|
||||
}
|
||||
else {
|
||||
|
||||
$('.popover-title').html('¿Esta seguro de guardar?');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function NoAfectable() {
|
||||
debugger;
|
||||
$('#C_nuevacuenta').attr('data-toggle', '');
|
||||
$('#C_nuevacuenta').attr('data-popout', '');
|
||||
$('#C_nuevacuenta').attr('data-original-title', '');
|
||||
$('#C_nuevacuenta').attr('data-btn-ok-label', '');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
318
Contabilidad/CatCuentasCI.aspx.vb
Normal file
318
Contabilidad/CatCuentasCI.aspx.vb
Normal file
@@ -0,0 +1,318 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad_CatCuentas
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "Propiedades"
|
||||
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IDSelected As Integer
|
||||
Get
|
||||
Return ViewState("idsel").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("idsel") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||
Response.Redirect("/Contabilidad/CatCuentas.aspx")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
CargaMonedas()
|
||||
CargaAgrupadorSAT()
|
||||
CargaDatos()
|
||||
Else
|
||||
Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia)
|
||||
MEECuenta.Enabled = False
|
||||
LnkPdf.Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMonedas()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ObjConta.GetMonedas() Then
|
||||
DdlMoneda.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
DdlMoneda.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaAgrupadorSAT()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ObjConta.GetAgrupadoresSAT() Then
|
||||
DdlAgrupadorSAT.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
DdlAgrupadorSAT.DataBind()
|
||||
DdlAgrupadorSAT.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ObjConta.GetCuentas(-1, "-1", -1) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
End If
|
||||
'para obtener la mascara, tomo el primer dato y reemplazo los numeros por cero
|
||||
Dim Mascara As String = "####-####-###"
|
||||
If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 AndAlso DtDatos.FiltraParametros("CtaInicial>0").Rows.Count > 0 Then
|
||||
Mascara = DtDatos.FiltraParametros("CtaInicial>0").Rows(0)("CuentaFormato").ToString.Replace("1", "0").Replace("2", "0").Replace("3", "0").Replace("4", "0").Replace("5", "0").Replace("6", "0").Replace("7", "0").Replace("8", "0").Replace("9", "0")
|
||||
End If
|
||||
|
||||
MEECuenta.Mask = Mascara.Replace("0", "9")
|
||||
MEECuenta.AutoComplete = True
|
||||
MEECuenta.AutoCompleteValue = Mascara
|
||||
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
ArbolCuentas.nivel = "CtaInicial"
|
||||
ArbolCuentas.nodoid = "id"
|
||||
ArbolCuentas.padre = "IdPadre"
|
||||
ArbolCuentas.titulo = "CtaCodigo"
|
||||
updatos.Update()
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
|
||||
'Private Function getNodosHijos(nodo As Integer) As DataTable
|
||||
' Return DtDatos.FiltraParametros(String.Format("IdPadre = {0}", nodo))
|
||||
'End Function
|
||||
Private Function getNodospadreHijos(nodo As Integer) As DataTable
|
||||
Return DtDatos.FiltraParametros(String.Format("Id = {0}", nodo))
|
||||
End Function
|
||||
Protected Sub agregar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.addclick
|
||||
LimpiarCampos()
|
||||
Dim dt As New DataTable
|
||||
'IDSelected = HdnID.Value.ToEntero() "ul" + itempadre.Cve;
|
||||
Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem)
|
||||
IDSelected = obj.Cve
|
||||
'obj.FindControl(String.Format("ul{0}", obj.Cve))
|
||||
'obj.Controls.Add(New TextBox())
|
||||
dt = getNodospadreHijos(IDSelected)
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = dt.Rows(0)
|
||||
Tsubcuenta.Text = dr("CuentaFormato").ToString()
|
||||
DTcuenta.SelectedValue = dr("Tipo").ToString()
|
||||
DcuentaMayor.SelectedValue = dr("CtaMayor").ToString
|
||||
LblSubCuenta.Text = dr("Nombre").ToString
|
||||
End If
|
||||
|
||||
Tcuenta.Enabled = True
|
||||
nuevacuenta.Visible = True
|
||||
updatos.Visible = True
|
||||
updatos.Update()
|
||||
|
||||
End Sub
|
||||
Protected Sub editar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.editclick
|
||||
LimpiarCampos()
|
||||
Dim dt As DataTable
|
||||
Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem)
|
||||
IDSelected = obj.Cve
|
||||
dt = getNodospadreHijos(IDSelected)
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = dt.Rows(0)
|
||||
Tcuenta.Text = dr("CuentaFormato").ToString.Replace("-", "")
|
||||
Tnombre.Text = dr("Nombre").ToString()
|
||||
DTcuenta.SelectedValue = dr("Tipo").ToString()
|
||||
DcuentaMayor.SelectedValue = dr("CtaMayor").ToString
|
||||
DdlMoneda.SelectedValueExist(dr("IdMoneda").ToString)
|
||||
|
||||
If dr("IdAgrupadorSAT").ToString.ToEntero = 0 Then
|
||||
DdlAgrupadorSAT.SelectedValue = "-1"
|
||||
Else
|
||||
DdlAgrupadorSAT.SelectedValue = dr("IdAgrupadorSAT").ToString
|
||||
End If
|
||||
|
||||
|
||||
TxtDigAgrup.Text = dr("DigAgrup").ToString
|
||||
TxtNomIngles.Text = dr("NomIdioma").ToString
|
||||
|
||||
Dim Hijos As Integer = DtDatos.FiltraParametros(String.Format("IdPadre = {0}", IDSelected)).Rows.Count
|
||||
|
||||
If Hijos = 0 Then BtnEliminar.Visible = True
|
||||
|
||||
dt = getNodospadreHijos(dr("IdPadre").ToString.ToEntero)
|
||||
If dt.Rows.Count > 0 Then
|
||||
Dim drt As DataRow = dt.Rows(0)
|
||||
Tsubcuenta.Text = drt("Codigo").ToString
|
||||
LblSubCuenta.Text = drt("Nombre").ToString
|
||||
HdnSubCuentaDe.Value = drt("Codigo").ToString
|
||||
|
||||
Guardar.OnClientClick = $"ValidaGuardar('{drt("Codigo").ToString}');"
|
||||
Guardar.Attributes.Add("data-toggle", "confirmation")
|
||||
Guardar.Attributes.Add("data-popout", "true")
|
||||
Guardar.Attributes.Add("data-original-title", "confirmar")
|
||||
Guardar.Attributes.Add("data-btn-ok-label", "Guardar")
|
||||
Guardar.Attributes.Add("data-html", "true")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Guardar.Visible = True
|
||||
updatos.Visible = True
|
||||
updatos.Update()
|
||||
|
||||
End Sub
|
||||
Protected Sub Guardar_Click(sender As Object, e As EventArgs) Handles Guardar.Click
|
||||
|
||||
If Tnombre.Text.Trim = "" Then Alert("Ingrese nombre de la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
|
||||
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
Dim customerRow As Data.DataRow
|
||||
customerRow = DtDatos.Select(String.Format("Id = {0}", IDSelected))(0)
|
||||
customerRow("Nombre") = Tnombre.Text
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
CargaDatos()
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
ArbolCuentas.DataBind()
|
||||
|
||||
Dim item As CheckBox = DirectCast(ArbolCuentas.FindControl(String.Format("chk{0}", IDSelected)), CheckBox)
|
||||
item.Text = String.Format("{0} - {1}", customerRow("CuentaFormato").ToString, Tnombre.Text)
|
||||
'updatos.Visible = False
|
||||
'Guardar.Visible = False
|
||||
LimpiarCampos()
|
||||
updatos.Update()
|
||||
|
||||
Alert("La cuenta se guardo correctamente")
|
||||
|
||||
End Sub
|
||||
Protected Sub nuevacuenta_Click(sender As Object, e As EventArgs) Handles nuevacuenta.Click
|
||||
|
||||
If Tnombre.Text.Trim = "" Then Alert("Ingrese nombre de la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
|
||||
If Tcuenta.Text.Trim = "" Then Alert("Ingrese la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
|
||||
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim CuentaEfectivo As Integer = 0
|
||||
|
||||
|
||||
' [IPP] VIEJO | COMENTADO 9/MARZO/2018
|
||||
'Dim Afectable As Integer = If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable
|
||||
Dim Afectable = 1
|
||||
|
||||
Dim idnew = ObjConta.AddCuenta(Tcuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, CuentaEfectivo, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, TxtNomIngles.Text.Trim, Afectable, IDSelected.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero)
|
||||
If idnew > 0 Then
|
||||
|
||||
Dim dr As DataRow = DtDatos.NewRow
|
||||
dr("id") = idnew
|
||||
dr("CuentaFormato") = Tcuenta.Text
|
||||
dr("Nombre") = Tnombre.Text
|
||||
dr("CtaCodigo") = String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text)
|
||||
dr("Tipo") = DTcuenta.SelectedValue.ToString
|
||||
dr("CtaMayor") = DcuentaMayor.SelectedValue.ToString
|
||||
dr("IdPadre") = IDSelected
|
||||
dr("Codigo") = Tnombre.Text
|
||||
dr("IdMoneda") = DdlMoneda.SelectedValue.ToEntero
|
||||
dr("DigAgrup") = TxtDigAgrup.Text.Trim.ToEntero
|
||||
dr("NomIdioma") = TxtNomIngles.Text.Trim
|
||||
DtDatos.Rows.Add(dr)
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
'.Attributes.Add("data-hijos","0");
|
||||
Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem)
|
||||
item.Attributes.Item("data-hijos") = (item.Attributes.Item("data-hijos").ToEntero + 1).ToString
|
||||
Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", IDSelected)), ADServerControl.DragableUL)
|
||||
If (IsNothing(objul)) Then
|
||||
objul = New ADServerControl.DragableUL
|
||||
objul.ID = String.Format("ul{0}", item.Cve)
|
||||
item.Controls.Add(objul)
|
||||
End If
|
||||
ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text))
|
||||
|
||||
'updatos.Visible = False
|
||||
'nuevacuenta.Visible = False
|
||||
LimpiarCampos()
|
||||
updatos.Update()
|
||||
CargaDatos()
|
||||
Alert("La cuenta se guardo correctamente")
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub LimpiarCampos()
|
||||
Tcuenta.Text = ""
|
||||
Tnombre.Text = ""
|
||||
DTcuenta.SelectedValue = "-1"
|
||||
DcuentaMayor.SelectedValue = "-1"
|
||||
DdlAgrupadorSAT.SelectedValue = "-1"
|
||||
Tsubcuenta.Text = ""
|
||||
Guardar.Visible = False
|
||||
nuevacuenta.Visible = False
|
||||
Tcuenta.Enabled = False
|
||||
BtnEliminar.Visible = False
|
||||
End Sub
|
||||
Protected Sub borrar_Click(sender As Object, e As EventArgs) Handles borrar.Click
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjConta.IniciaTransacSQL()
|
||||
|
||||
If ObjConta.RemoveCuenta(IDSelected.ToEntero) Then
|
||||
ObjConta.Commit()
|
||||
|
||||
Dim customerRow As Data.DataRow
|
||||
customerRow = DtDatos.Select(String.Format("Id = {0}", IDSelected))(0)
|
||||
customerRow("IdPadre") = "-5"
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem)
|
||||
Dim padre As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", item.CvePadre)), ADServerControl.DragableItem)
|
||||
padre.Attributes.Item("data-hijos") = (padre.Attributes.Item("data-hijos").ToEntero - 1).ToString
|
||||
ArbolCuentas.Controls.Remove(item)
|
||||
RegistraScript(String.Format("$('#{0}').click();", editar.ClientID))
|
||||
|
||||
'getNodospadreHijos(IDSelected).Rows(0).Delete()
|
||||
'RegistraScript(String.Format("$('li#{0}').remove();", IDSelected))
|
||||
LimpiarCampos()
|
||||
upcuentas.Update()
|
||||
Alert("La Cuenta ha sido eliminada", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("La Cuenta no pudo ser eliminada", TipoMensaje.MsgError)
|
||||
ObjConta.RollBack()
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Sub
|
||||
Private Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/CatCuentas.rdlc", DtDatos.FiltraParametros("", "Orden ASC"), params, String.Format("Catalogo Cuentas-{0}", NowADS().ToDateTime.ToShortDateString))
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="LibroDiario.aspx.vb" Inherits="Contabilidad_LibroDiario" %>
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="LibroDiarioCI.aspx.vb" Inherits="Contabilidad_LibroDiario" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="Css" runat="server">
|
||||
<style>
|
||||
@@ -253,7 +253,7 @@ Partial Class MovimientosconProveedores
|
||||
e.Row.FCHyperLink("HLSaldoActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
' e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveSubProyecto={3}&TP={4}", e.Row.DBCampo("CveCuenta"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveSubProyecto, TipoReporte)
|
||||
' e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveSubProyecto={3}&TP={4}", e.Row.DBCampo("CveCuenta"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveSubProyecto, TipoReporte)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1018,8 +1018,8 @@
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvComplementoPagos" runat="server"
|
||||
DataKeyNames="CveComplementoPago,FolioFiscal,SerieFolioPago"
|
||||
AutoGenerateColumns="False" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None" data-sort="true">
|
||||
DataKeyNames="CveComplementoPago,FolioFiscal,SerieFolioPago,RFCReceptor,CvePAC"
|
||||
AutoGenerateColumns="False" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None" data-sort="true">
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField HeaderText="SerieFolio" DataField="SerieFolioPago" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
|
||||
@@ -1029,18 +1029,18 @@
|
||||
<asp:BoundField HeaderText="PDF" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Estatus" Visible="false" DataField="StrEstatus" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
|
||||
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="EstatusSAT" Visible="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEstatusSAT" OnClick="LnkEstatusSAT_Click" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-question'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderText="Cancelar" Visible="false" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkCancelarComplemento" OnClick="LnkCancelarComplemento_Click" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el complemento?" data-btn-ok-label="si"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-minus'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="CancelarComplementoPagos" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
<button id="CerrarComplementoPagos" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2151,7 +2151,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
UpComplementoPagos.Visible = True
|
||||
'GvComplementoPagos.Columns(7).Visible = True
|
||||
' si tiene el permiso para eliminar IE o editar IE
|
||||
'If UsuarioActual.TienePermisoProceso(85) OrElse UsuarioActual.TienePermisoProceso(99) Then GvComplementoPagos.Columns(8).Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(85) OrElse UsuarioActual.TienePermisoProceso(99) Then GvComplementoPagos.Columns(6).Visible = True
|
||||
Else
|
||||
DVGenerarComplementoModal.Visible = True
|
||||
End If
|
||||
@@ -2164,6 +2164,71 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkCancelarComplemento_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
||||
Dim CveMotivoCancelacion As Integer = 2 'GvRow.FCDropDownList("DdlMotivoCancelacion").SelectedValue.ToEntero
|
||||
Dim CveSATMotivoCancelacion As Integer = 2 'GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveMotivoCancelacion:=CveMotivoCancelacion).FiltroPrimeroValor("CveSATMotivoCancelacion").ToEntero()
|
||||
|
||||
If CveMotivoCancelacion <= 0 Or CveSATMotivoCancelacion <= 0 Then
|
||||
Alert("Debe de elegir un motivo de cancelación.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim CveComplementoPagoCancelar As Integer = GvRow.DataKey("CveComplementoPago").ToEntero
|
||||
Dim FolioFiscalCancelar As String = GvRow.DataKey("FolioFiscal").ToString
|
||||
'' Dim RFCEmisor As String = UsuarioActual.Empresa.RFC
|
||||
Dim RFCReceptorCancelar As String = GvRow.DataKey("RFCReceptor")
|
||||
Dim CvePACCancelacion As Integer = GvRow.DataKey("CvePAC").ToEntero
|
||||
|
||||
Dim ObjCancelacion As New Timbrado
|
||||
Dim ObjBanco As New ClsBancos
|
||||
|
||||
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
||||
|
||||
If ObjBanco.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, NowADS(), "", 1) Then
|
||||
CargaComplementosPago()
|
||||
Alert("El complemento se canceló correctamente.")
|
||||
End If
|
||||
|
||||
Else
|
||||
Dim resp As RespuestaCancelacionSAT = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion)
|
||||
If resp.Verificado Then
|
||||
|
||||
If ObjBanco.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
||||
|
||||
Else
|
||||
Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjBanco.Dispose()
|
||||
CargaComplementosPago()
|
||||
|
||||
End Sub
|
||||
|
||||
Function EstatusSATCancelado(FolioFiscal As String, RFCDe As String, RFCReceptor As String) As Boolean
|
||||
|
||||
Dim respuesta As Boolean = False
|
||||
|
||||
Dim Vigencia As Timbrado.AcuseCancelacionSAT = Timbrado.VerificarVigenciaSAT(FolioFiscal, RFCDe, RFCReceptor, "0", True)
|
||||
|
||||
If Vigencia IsNot Nothing Then
|
||||
If Vigencia.Estado.ToUpper = "CANCELADO" Then
|
||||
respuesta = True
|
||||
Else
|
||||
respuesta = False
|
||||
End If
|
||||
Else
|
||||
respuesta = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Return respuesta
|
||||
End Function
|
||||
|
||||
Private Sub GeneraTimbre(CvePrePoliza As Integer)
|
||||
Dim Str As New StringBuilder
|
||||
Dim Banco As New ClsBancos
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogo.aspx.vb" Inherits="AC_RepAnexoCatalogo" %>
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogo.aspx.vb" Inherits="AC2_RepAnexoCatalogo" EnableEventValidation="false" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -17,10 +17,10 @@
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-ad-excel"></i> Excel</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
@@ -29,87 +29,105 @@
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" Enabled="false"/>
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" ValidationGroup="Valida" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>F. I.</li>
|
||||
|
||||
<li style="margin-right: 30px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 93px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>F. F.
|
||||
</li>
|
||||
|
||||
<li style="margin-right: 30px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 94px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</li>
|
||||
<li>Tipo de Cuentas:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList CssClass="form-control input-sm" Width="150px" ID="DdlTipoCuentas" ClientIDMode="Static" runat="server" DataTextField="Nombre" DataValueField="Id" TabIndex="4" onchange="Enable();">
|
||||
<%--<div class="row">--%>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Cuenta
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Cuenta:
|
||||
</li>
|
||||
<li>
|
||||
<asp:HiddenField ID="HdnCveCuenta" runat="server" ClientIDMode="Static" />
|
||||
<asp:TextBox ID="TxtCuenta" runat="server" Width="150px" ClientIDMode="Static" Enabled="false" TabIndex="5" CssClass="form-control input-sm"></asp:TextBox>
|
||||
</li>
|
||||
|
||||
<li runat="server" id="tdTipoReporte" visible="false">Tipo:
|
||||
</li>
|
||||
<li runat="server" id="tdTipoReporte2" visible="false">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server" Width="150px">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<label class="col-md-1">Cuentas</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="form-control input-sm select2me" ID="DdlCuenta" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" Width="100%">
|
||||
<div class="col-md-1 truncate">
|
||||
Tipo Movto
|
||||
</div>
|
||||
<div class="col-md-2 truncate">
|
||||
<asp:DropDownList ID="DdlCuenta" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos y saldo no igual a cero" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 90px; padding-right: 2px;">Segmento de negocio</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="form-control input-sm select2me" ID="DdlSegmentoNegocio" runat="server" DataTextField="Nombre" DataValueField="Id" Width="100%">
|
||||
</div>
|
||||
<div class="col-md-1 truncate" id="tdTipoReporte" visible="false" runat="server">
|
||||
Tipo
|
||||
</div>
|
||||
<div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1" id="divProyecto" runat="server">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -125,13 +143,13 @@
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="160" />
|
||||
<ItemStyle HorizontalAlign="Left" Width="180" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="420" />
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Iniciales">
|
||||
<HeaderTemplate>
|
||||
@@ -151,31 +169,17 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table width="100%" style="margin-left: 35px;">
|
||||
<tr>
|
||||
<td colspan="2">Cargos</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table width="100%" style="margin-left: 35px;">
|
||||
<tr>
|
||||
<td colspan="2">Abonos</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Actuales">
|
||||
<HeaderTemplate>
|
||||
@@ -209,94 +213,97 @@
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
function pageLoad(sender, args) {
|
||||
<%-- function pageLoad(sender, args) {
|
||||
|
||||
$(function () {
|
||||
//Genero las cuentas en el arreglo
|
||||
var ArrCuentas = [<%= WSCuentas()%>];
|
||||
$(function () {
|
||||
//Genero las cuentas en el arreglo
|
||||
var ArrCuentas = [<%= WSCuentas()%>];
|
||||
|
||||
$("#TxtCuenta").autocomplete({
|
||||
minLength: 0,
|
||||
source: ArrCuentas,
|
||||
focus: function (event, ui) {
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
return false;
|
||||
},
|
||||
select: function (event, ui) {
|
||||
$("#TxtCuenta").autocomplete({
|
||||
minLength: 0,
|
||||
source: ArrCuentas,
|
||||
focus: function (event, ui) {
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
return false;
|
||||
},
|
||||
select: function (event, ui) {
|
||||
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
|
||||
//$("#project-description").html(ui.item.desc);
|
||||
//$("#project-icon").attr("src", "images/" + ui.item.icon);
|
||||
//$("#project-description").html(ui.item.desc);
|
||||
//$("#project-icon").attr("src", "images/" + ui.item.icon);
|
||||
|
||||
return false;
|
||||
}
|
||||
})
|
||||
//.autocomplete("instance")._renderItem = function (ul, item) {
|
||||
// return $("<li>")
|
||||
// .append("<a>" + item.label + "</a>")
|
||||
// .appendTo(ul);
|
||||
//};
|
||||
});
|
||||
return false;
|
||||
}
|
||||
})
|
||||
//.autocomplete("instance")._renderItem = function (ul, item) {
|
||||
// return $("<li>")
|
||||
// .append("<a>" + item.label + "</a>")
|
||||
// .appendTo(ul);
|
||||
//};
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('input[type=text]').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('input[type=text]').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('select').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}--%>
|
||||
|
||||
function Enable() {
|
||||
var Producto = $get("DdlTipoCuentas").value;
|
||||
if (Producto == "-2") {
|
||||
//document.getElementById("TxtCuenta").disabled = false;
|
||||
document.getElementById("C_DdlCuentas").disabled = false;
|
||||
//document.getElementById("TxtCuenta").focus();
|
||||
//alert(Producto);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('select').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
else {
|
||||
//document.getElementById("TxtCuenta").value = " ";
|
||||
//document.getElementById("TxtCuenta").disabled = true;
|
||||
$get("C_DdlCuentas").value = "-1";
|
||||
document.getElementById("C_DdlCuentas").disabled = true;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function Enable() {
|
||||
var Producto = $get("DdlTipoCuentas").value;
|
||||
if (Producto == "-2") {
|
||||
document.getElementById("TxtCuenta").disabled = false;
|
||||
//document.getElementById("TxtCuenta").focus();
|
||||
//alert(Producto);
|
||||
}
|
||||
else {
|
||||
document.getElementById("TxtCuenta").value = " ";
|
||||
document.getElementById("TxtCuenta").disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
function Scroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 360;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#<%=GvDatos.ClientID%>').ADScroll({
|
||||
function Scroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 360;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#<%=GvDatos.ClientID%>').ADScroll({
|
||||
height: Alto
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5,9 +5,10 @@ Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepAnexoCatalogo
|
||||
Partial Class AC2_RepAnexoCatalogo
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
@@ -26,7 +27,8 @@ Partial Class AC_RepAnexoCatalogo
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFin As DateTime
|
||||
|
||||
Private Property FechaFin As Date
|
||||
Get
|
||||
FechaFin = ViewState("FechaFin").ToString.ToDate
|
||||
End Get
|
||||
@@ -36,194 +38,165 @@ Partial Class AC_RepAnexoCatalogo
|
||||
End Property
|
||||
Private Property IdCuenta As Integer
|
||||
Get
|
||||
IdCuenta = ViewState("IdCuenta").ToString.ToEntero
|
||||
IdCuenta = ViewState("CveCuenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("IdCuenta") = value
|
||||
ViewState("CveCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IdSegNeg As Integer
|
||||
'Private Property DTCuentas As DataTable
|
||||
' Get
|
||||
' Return CType(ViewState("DTCuentas"), DataTable)
|
||||
' End Get
|
||||
' Set(value As DataTable)
|
||||
' ViewState("DTCuentas") = value
|
||||
' End Set
|
||||
'End Property
|
||||
Private Property CveProyecto As String
|
||||
Get
|
||||
IdSegNeg = ViewState("IdSegNeg").ToString.ToEntero
|
||||
CveProyecto = ViewState("CveProyecto").ToString
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("IdSegNeg") = value
|
||||
Set(value As String)
|
||||
ViewState("CveProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DTCuentas As DataTable
|
||||
Private Property CveSubProyecto As String
|
||||
Get
|
||||
Return CType(ViewState("DTCuentas"), DataTable)
|
||||
CveSubProyecto = ViewState("CveSubProyecto").ToString
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTCuentas") = value
|
||||
Set(value As String)
|
||||
ViewState("CveSubProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TipoReporte").ToString.ToEntero
|
||||
TipoReporte = ViewState("TP").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoReporte") = value
|
||||
ViewState("TP") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
Response.Redirect($"/Contabilidad2/RepAnexoCatalogo.aspx")
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then Response.Redirect($"/Contabilidad/RepAnexoCatalogoCI.aspx")
|
||||
|
||||
Dim ErrorParametros = True
|
||||
DtDatos = Nothing
|
||||
CargaTipoCuentas()
|
||||
|
||||
FechaInicio = NowADS().FirstDayOfMonth
|
||||
FechaFin = NowADS()
|
||||
|
||||
'If UsuarioActual.Empresa.UsaAC Then
|
||||
' TipoReporte = -1
|
||||
'Else
|
||||
' TipoReporte = 1
|
||||
' tdTipoReporte.Visible = True
|
||||
' tdTipoReporte2.Visible = True
|
||||
'End If
|
||||
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
'If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
IdCuenta = Request("CveCuenta").ToEntero
|
||||
'FechaInicio = Request("FI").ToDate
|
||||
FechaFin = Request("FF").ToDate
|
||||
DdlCuentas.SelectedValueExist(IdCuenta)
|
||||
|
||||
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
FechaInicio = Request("FI").ToDate
|
||||
Else
|
||||
If Request("ER") IsNot Nothing AndAlso Request("ER").ToString = "1" Then
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
Else
|
||||
FechaInicio = ("1900/01/01").ToDate
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Request("CM") IsNot Nothing AndAlso IsNumeric(Request("CM")) AndAlso Request("CM").ToEntero > 0 Then
|
||||
DdlCuenta.SelectedValueExist(Request("CM").ToString)
|
||||
End If
|
||||
|
||||
If Request("CveProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveProyecto")) Then
|
||||
CveProyecto = Request("CveProyecto").ToString
|
||||
DdlProyecto.SelectedValueExist(CveProyecto)
|
||||
DdlProyecto_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then
|
||||
CveSubProyecto = Request("CveSubProyecto").ToString
|
||||
DdlSubproyecto.SelectedValueExist(CveSubProyecto)
|
||||
End If
|
||||
|
||||
ErrorParametros = False
|
||||
|
||||
If Request("TP") IsNot Nothing AndAlso IsNumeric(Request("TP")) AndAlso Request("TP").ToEntero > 0 Then
|
||||
TipoReporte = Request("TP").ToEntero
|
||||
|
||||
DdlTipoReporte.SelectedValue = TipoReporte.ToString
|
||||
End If
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
|
||||
InicializaValores()
|
||||
CargaURLParametros()
|
||||
BtnConsultar.Enabled = True
|
||||
Else
|
||||
Alert("La empresa no usa Contabilidad ni Armonización Contable", TipoMensaje.MsgError)
|
||||
|
||||
txtFechaI.Text = FechaInicio.ToShortDateString
|
||||
txtFechaF.Text = FechaFin.ToShortDateString
|
||||
|
||||
If Not ErrorParametros Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
|
||||
#Region " INCIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
DtDatos = Nothing
|
||||
CargaTipoCuentas()
|
||||
CargaSegmentosNegocio()
|
||||
FechaInicio = DateSerial(Year(NowADS()), Month(NowADS()), 1)
|
||||
FechaFin = NowADS()
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
TipoReporte = -1
|
||||
Else
|
||||
TipoReporte = 1
|
||||
tdTipoReporte.Visible = True
|
||||
tdTipoReporte2.Visible = True
|
||||
End If
|
||||
End Sub
|
||||
Public Function WSCuentas() As String
|
||||
Dim Str As New StringBuilder
|
||||
Dim i As Integer = 0
|
||||
Dim dt As DataTable = DTCuentas '.FiltraParametros("Afectable = 1")
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As DataRow In dt.Rows
|
||||
i += 1
|
||||
Str.AppendFormat("{{value:""{0}"",label:""{1}{3}""}}{2}", dr("Id"), dr("CtaCodigo").ToString.Replace("""", ""), If(i < dt.Rows.Count, ",", ""), If(dr("Afectable").ToString = "1", " *", ""))
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Return Str.ToString
|
||||
End Function
|
||||
Private Sub CargaTipoCuentas()
|
||||
Dim ObjTipoCuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
'Dim ObjTipoCuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjTipoCuenta As New ClsContabilidad
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If ObjTipoCuenta.GetCuentas(-1, "-1", -1) Then
|
||||
Dim dr As DataRow = ObjTipoCuenta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
|
||||
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
|
||||
DTCuentas = ObjTipoCuenta.DtResultados '.FiltraParametros("Afectable = 1")
|
||||
DdlTipoCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo IN ('_ACTIVO', '_BPASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
DdlCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
' DdlCuentas.DataSource = ObjTipoCuenta.DtResultados
|
||||
End If
|
||||
ObjTipoCuenta.Dispose()
|
||||
DdlTipoCuentas.DataBind()
|
||||
'If strGlobal.Length > 0 Then DdlTipoCuentas.Items.Insert(0, New ListItem("Todas", strGlobal))
|
||||
DdlTipoCuentas.Items.Insert(0, New ListItem("Todas las Cuentas", "1"))
|
||||
DdlTipoCuentas.Items.Add(New ListItem("Algun específico", "-2"))
|
||||
DdlTipoCuentas.SelectedIndex = 0
|
||||
|
||||
DdlCuentas.DataBind()
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
|
||||
|
||||
End Sub
|
||||
Private Sub CargaSegmentosNegocio()
|
||||
Dim ObjContpaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If ObjContpaq.GetSegmentosNegocio(-1, "-1") Then
|
||||
DdlSegmentoNegocio.DataSource = ObjContpaq.DtResultados
|
||||
DdlSegmentoNegocio.DataBind()
|
||||
End If
|
||||
ObjContpaq.Dispose()
|
||||
DdlSegmentoNegocio.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSegmentoNegocio.SelectedValue = "-1"
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos")
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "CARGA DATOS"
|
||||
Private Sub CargaURLParametros()
|
||||
|
||||
Dim ErrorParametros = True
|
||||
|
||||
If Request("ID") IsNot Nothing AndAlso IsNumeric(Request("ID")) AndAlso Request("ID").ToEntero > 0 Then
|
||||
'If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
IdCuenta = Request("ID").ToEntero
|
||||
'FechaInicio = Request("FI").ToDate
|
||||
FechaFin = Request("FF").ToDate
|
||||
|
||||
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
FechaInicio = Request("FI").ToDate
|
||||
Else
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
End If
|
||||
DdlTipoCuentas.SelectedValueExist("-2")
|
||||
HdnCveCuenta.Value = IdCuenta.ToString
|
||||
TxtCuenta.Text = DTCuentas.FiltroPrimeroValor("CtaCodigo", $"Id={Request("ID")}")
|
||||
|
||||
If Request("CM") IsNot Nothing AndAlso IsNumeric(Request("CM")) AndAlso Request("CM").ToEntero > 0 Then
|
||||
DdlCuenta.SelectedValueExist(Request("CM").ToString)
|
||||
End If
|
||||
|
||||
ErrorParametros = False
|
||||
|
||||
|
||||
If Request("TP") IsNot Nothing AndAlso IsNumeric(Request("TP")) AndAlso Request("TP").ToEntero > 0 Then
|
||||
TipoReporte = Request("TP").ToEntero
|
||||
|
||||
DdlTipoReporte.SelectedValue = TipoReporte.ToString
|
||||
End If
|
||||
|
||||
If Request("IdSegNeg") IsNot Nothing AndAlso IsNumeric(Request("IdSegNeg")) AndAlso Request("IdSegNeg").ToEntero > 0 Then
|
||||
IdSegNeg = Request("IdSegNeg").ToEntero
|
||||
|
||||
DdlSegmentoNegocio.SelectedValue = IdSegNeg.ToString
|
||||
End If
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
|
||||
UPFiltros.Update()
|
||||
TxtFechaDel.Text = FechaInicio.ToShortDateString
|
||||
TxtFechaAl.Text = FechaFin.ToShortDateString
|
||||
|
||||
If Not ErrorParametros Then
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero)
|
||||
CargaDatos()
|
||||
|
||||
RegistraScript("Enable();")
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
If Request("TipoReporte") IsNot Nothing Then
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
Else
|
||||
TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
End If
|
||||
'Dim CveSubProyecto As String
|
||||
|
||||
If ObjConta.GetAnexoCatalogo(IdCuenta, FechaInicio, FechaFin, DdlCuenta.SelectedValue.ToEntero, TipoReporte, DdlSegmentoNegocio.SelectedValue.ToEntero) Then
|
||||
CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero.ToString
|
||||
CveProyecto = DdlProyecto.SelectedValue.ToEntero.ToString
|
||||
|
||||
If Request("ID") IsNot Nothing AndAlso IsNumeric(Request("ID")) AndAlso Request("ID").ToEntero > 0 Then
|
||||
If ObjConta.GetAnexoCatalogo(IdCuenta, FechaInicio, FechaFin, DdlCuenta.SelectedValue.ToEntero, CveProyecto.ToEntero, CveSubProyecto.ToEntero, UsuarioActual.CveEmpresa, TipoReporte) Then
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
DtDatos = ObjConta.DtResultados.FiltraParametros(" SaldoInicial <> 0 OR Cargos <> 0 OR Abonos <> 0")
|
||||
Else
|
||||
DtDatos = ObjConta.DtResultados
|
||||
@@ -232,13 +205,14 @@ Partial Class AC_RepAnexoCatalogo
|
||||
CargaGrid()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
|
||||
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
'GvDatos.Dispose()
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
@@ -248,12 +222,10 @@ Partial Class AC_RepAnexoCatalogo
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "GV ROW DATA BOUND"
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Id").ToEntero = IdCuenta Then
|
||||
If e.Row.DBCampo("CveCuenta").ToEntero = IdCuenta Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
'e.Row.ControlStyle.Font.Size = 9
|
||||
'e.Row.ControlStyle.Height = 30
|
||||
@@ -286,26 +258,21 @@ Partial Class AC_RepAnexoCatalogo
|
||||
e.Row.FCHyperLink("HLSaldoActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx?ID={0}&FI={1}&FF={2}&IdSegNeg={3}", e.Row.DBCampo("ID"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, DdlSegmentoNegocio.SelectedValue.ToEntero)
|
||||
e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveProyecto={3}&CveSubProyecto={4}&TP={5}", e.Row.DBCampo("CveCuenta"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveProyecto, CveSubProyecto, TipoReporte)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " IMPRIMIR "
|
||||
Protected Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte()
|
||||
Else
|
||||
Alert("Primero debe consultar el Anexo del Catálogo", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte("Excel")
|
||||
Else
|
||||
Alert("Primero debe consultar el Anexo del Catálogo", TipoMensaje.MsgAdvertencia)
|
||||
'GvDatos.ExportToExcelG("AnexoCatalogo" & NowADS().ToShortDateString & ".xlsx")
|
||||
'GvDatos.ExportToExcelG("ExistenciasHorizontal.xlsx", "Anexo Catalogo", UsuarioActual, "".ToString, 100, 200)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
@@ -317,15 +284,30 @@ Partial Class AC_RepAnexoCatalogo
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("IdCuenta", IdCuenta.ToString))
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("usuarioImprimio", UsuarioActual.Nombre))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("pFechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
#End Region
|
||||
Public Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
|
||||
If DdlCuentas.SelectedValue.ToEntero = -1 Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate)
|
||||
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate)
|
||||
IdCuenta = DdlCuentas.SelectedValue.ToEntero
|
||||
CargaDatos()
|
||||
End If
|
||||
'RegistraScript("Enable();")
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,409 +1,409 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoAnual.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoAnual" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<style>
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
.fa.fa-bar-chart {
|
||||
width: 16px;
|
||||
height: 14px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Anexo del Catálogo - Anual
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpAcciones">
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpFiltros">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" DefaultButton="BtnCargaAsignados">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaAsignados" runat="server" Text="Consultar" CssClass="btn btn-default" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Cuenta
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoAnual.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoAnual" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<style>
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
.fa.fa-bar-chart {
|
||||
width: 16px;
|
||||
height: 14px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Anexo del Catálogo - Anual
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpAcciones">
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpFiltros">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" DefaultButton="BtnCargaAsignados">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaAsignados" runat="server" Text="Consultar" CssClass="btn btn-default" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Cuenta
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Ejercicio Inicio:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 80px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 80px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Ejercicio Fin:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicio2" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 80px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
<label class="col-md-2" style="width: 80px;" runat="server" id="LiPeriodoLbl">Periodo: </label>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" CssClass="select2me">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1" id="divProyecto" runat="server">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1" id="div1" runat="server">
|
||||
<asp:Label ID="LblDiv" runat="server">Divisor:</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicio2" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 80px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
<label class="col-md-2" style="width: 80px;" runat="server" id="LiPeriodoLbl">Periodo: </label>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" CssClass="select2me">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1" id="divProyecto" runat="server">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1" id="div1" runat="server">
|
||||
<asp:Label ID="LblDiv" runat="server">Divisor:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
|
||||
<asp:DropDownList ID="DdlDivisor" Width="100px" runat="server" CssClass="form-control input-sm select2me" ClientIDMode="Static">
|
||||
<asp:ListItem Text="1" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000" Value="1000"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<%-- CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true"--%>
|
||||
|
||||
<asp:UpdatePanel ID="UpAnual" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvAnual" runat="server" DataKeyNames="Level,CveCuenta" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none"
|
||||
CssClass="ADSCROLLER2 table table-striped table-advance table-hover" data-cols="2" data-heightmenos="300" data-sort="true" OnDataBound="GvAnual_DataBound" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica gral" NavigateUrl="javascript:void(0);" onclick="return cargaGraficaBarras2();"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="white-space: nowrap">
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" onclick="return HandlerGraf(this, event);"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
<asp:CheckBox ID="chkgraf" CssClass="chkgraf" runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="250px" ControlStyle-Width="250px">
|
||||
<HeaderTemplate>
|
||||
<div style="width: 200px;">Nombre</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblTituloGrafica" CssClass="LblTituloGrafica" runat="server" ClientIDMode="Static" Text=""></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<label class="col-md-1 truncate">Grafica:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrafica" runat="server" AppendDataBoundItems="true" Class="DdlGrafica select2me">
|
||||
<asp:ListItem Selected="True" Text="Barras" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Pastel" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="chartdiv"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
||||
|
||||
<script>
|
||||
let cdatos;
|
||||
let currentid = 1;
|
||||
function HandlerGraf(obj, evt) {
|
||||
$("#DivModalGrafica").modal();
|
||||
cdatos = $(obj).data('values');
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
$('.LblTituloGrafica').text($(obj).closest('tr').text().trim());
|
||||
}
|
||||
function CargaGraficaBarras() {
|
||||
let data = cdatos;
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2,
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": [{
|
||||
"balloonText": "[[category]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"valueField": "Valor"
|
||||
}],
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function CargaGraficaPastel() {
|
||||
let data = cdatos;
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "pie",
|
||||
"theme": "light",
|
||||
"dataProvider":
|
||||
data,
|
||||
"valueField": "Valor",
|
||||
"titleField": "Texto",
|
||||
"outlineAlpha": 0.4,
|
||||
"depth3D": 0,
|
||||
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]% [[Moneda]])</span>",
|
||||
"angle": 0,
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
function ADSBegin() {
|
||||
$('.DdlGrafica').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
currentid = data.id;
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
});
|
||||
$('.DdlGrafica').removeClass('DdlGrafica');
|
||||
initamgrafica();
|
||||
}
|
||||
|
||||
|
||||
<asp:DropDownList ID="DdlDivisor" Width="100px" runat="server" CssClass="form-control input-sm select2me" ClientIDMode="Static">
|
||||
<asp:ListItem Text="1" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000" Value="1000"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<%-- CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true"--%>
|
||||
|
||||
<asp:UpdatePanel ID="UpAnual" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvAnual" runat="server" DataKeyNames="Level,CveCuenta" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none"
|
||||
CssClass="ADSCROLLER2 table table-striped table-advance table-hover" data-cols="2" data-heightmenos="300" data-sort="true" OnDataBound="GvAnual_DataBound" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica gral" NavigateUrl="javascript:void(0);" onclick="return cargaGraficaBarras2();"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="white-space: nowrap">
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" onclick="return HandlerGraf(this, event);"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
<asp:CheckBox ID="chkgraf" CssClass="chkgraf" runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="250px" ControlStyle-Width="250px">
|
||||
<HeaderTemplate>
|
||||
<div style="width: 200px;">Nombre</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblTituloGrafica" CssClass="LblTituloGrafica" runat="server" ClientIDMode="Static" Text=""></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<label class="col-md-1 truncate">Grafica:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrafica" runat="server" AppendDataBoundItems="true" Class="DdlGrafica select2me">
|
||||
<asp:ListItem Selected="True" Text="Barras" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Pastel" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="chartdiv"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
||||
|
||||
<script>
|
||||
let cdatos;
|
||||
let currentid = 1;
|
||||
function HandlerGraf(obj, evt) {
|
||||
$("#DivModalGrafica").modal();
|
||||
cdatos = $(obj).data('values');
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
$('.LblTituloGrafica').text($(obj).closest('tr').text().trim());
|
||||
}
|
||||
function CargaGraficaBarras() {
|
||||
let data = cdatos;
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2,
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": [{
|
||||
"balloonText": "[[category]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"valueField": "Valor"
|
||||
}],
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function CargaGraficaPastel() {
|
||||
let data = cdatos;
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "pie",
|
||||
"theme": "light",
|
||||
"dataProvider":
|
||||
data,
|
||||
"valueField": "Valor",
|
||||
"titleField": "Texto",
|
||||
"outlineAlpha": 0.4,
|
||||
"depth3D": 0,
|
||||
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]% [[Moneda]])</span>",
|
||||
"angle": 0,
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
function ADSBegin() {
|
||||
$('.DdlGrafica').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
currentid = data.id;
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
});
|
||||
$('.DdlGrafica').removeClass('DdlGrafica');
|
||||
initamgrafica();
|
||||
}
|
||||
|
||||
function cargaGraficaBarras2() {
|
||||
//Hypgrafica
|
||||
$("#DivModalGrafica").modal();
|
||||
//Hypgrafica
|
||||
$("#DivModalGrafica").modal();
|
||||
$('.LblTituloGrafica').text('grafica');
|
||||
let items = []
|
||||
let data;
|
||||
let series = [];
|
||||
$('.chkgraf input:checked').each(function () {
|
||||
data = $(this).closest('tr').find('.Hypgrafica').data('values')
|
||||
data = $(this).closest('tr').find('.Hypgrafica').data('values')
|
||||
let name = $(this).closest('tr').text().trim()
|
||||
items.push({ data: data, name: name })
|
||||
items.push({ data: data, name: name })
|
||||
});
|
||||
if (items) {
|
||||
data = items[0].data;
|
||||
@@ -415,12 +415,12 @@
|
||||
"type": "column",
|
||||
"title": items[0].name,
|
||||
"valueField": 'Valor'
|
||||
})
|
||||
})
|
||||
for (var indexcol = 1; indexcol < items.length; indexcol++) {
|
||||
let cdatos = items[indexcol].data;
|
||||
let valueField = 'Valor' + indexcol;
|
||||
for (var i = 0; i < cdatos.length; i++) {
|
||||
data[i][valueField] = cdatos[i].Valor
|
||||
let cdatos = items[indexcol].data;
|
||||
let valueField = 'Valor' + indexcol;
|
||||
for (var i = 0; i < cdatos.length; i++) {
|
||||
data[i][valueField] = cdatos[i].Valor
|
||||
}
|
||||
series.push({
|
||||
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
|
||||
@@ -462,8 +462,8 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function initamgrafica() {
|
||||
}
|
||||
function initamgrafica() {
|
||||
AmCharts.addInitHandler(function (chart) {
|
||||
function handleCustomMarkerToggle(legendEvent) {
|
||||
var dataProvider = legendEvent.chart.dataProvider;
|
||||
@@ -511,10 +511,10 @@
|
||||
chart.legend.switchable = true;
|
||||
chart.legend.addListener("clickMarker", handleCustomMarkerToggle);
|
||||
|
||||
}, ["serial"]);
|
||||
}
|
||||
|
||||
</script>
|
||||
}, ["serial"]);
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
function LimpiaCeros() {
|
||||
|
||||
@@ -563,7 +563,7 @@
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -22,9 +22,9 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
|
||||
Set(value As Integer)
|
||||
ViewState("EsVertical") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
Private Property listacolores As List(Of String)
|
||||
Get
|
||||
Return DirectCast(ViewState("listacolores"), List(Of String))
|
||||
@@ -32,7 +32,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
|
||||
Set(value As List(Of String))
|
||||
ViewState("listacolores") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
Private Property listaCamposanios As List(Of String())
|
||||
Get
|
||||
Return DirectCast(ViewState("listaCamposanios"), List(Of String()))
|
||||
@@ -40,93 +40,93 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
|
||||
Set(value As List(Of String()))
|
||||
ViewState("listaCamposanios") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
Public Property DtHeadersCount As Integer
|
||||
Get
|
||||
If ViewState("DtHeadersCount") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("DtHeadersCount").ToString.ToEntero
|
||||
End If
|
||||
|
||||
|
||||
If ViewState("DtHeadersCount") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("DtHeadersCount").ToString.ToEntero
|
||||
End If
|
||||
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("DtHeadersCount") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
Private Property DTHeaders As DataTable
|
||||
|
||||
Get
|
||||
|
||||
If ViewState("DTHeaders") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTHeaders"), DataTable)
|
||||
End If
|
||||
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTHeaders") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
Private Property DTDatos As DataTable
|
||||
|
||||
Get
|
||||
|
||||
If ViewState("DTDatos") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTDatos"), DataTable)
|
||||
End If
|
||||
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTDatos") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
Private Property DTHeaders As DataTable
|
||||
|
||||
Get
|
||||
|
||||
If ViewState("DTHeaders") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTHeaders"), DataTable)
|
||||
End If
|
||||
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTHeaders") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
Private Property DTDatos As DataTable
|
||||
|
||||
Get
|
||||
|
||||
If ViewState("DTDatos") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTDatos"), DataTable)
|
||||
End If
|
||||
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTDatos") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
listacolores = New List(Of String)
|
||||
listaCamposanios = New List(Of String())
|
||||
listacolores.Add("#FF0F00")
|
||||
listacolores.Add("#FF6600")
|
||||
listacolores.Add("#F8FF01")
|
||||
listacolores.Add("#04D215")
|
||||
listacolores.Add("#2A0CD0")
|
||||
listacolores.Add("#8A0CCF")
|
||||
listacolores.Add("#CD0D74")
|
||||
listacolores.Add("#754DEB")
|
||||
listacolores.Add("#DDDDDD")
|
||||
listacolores.Add("#999999")
|
||||
listacolores.Add("#000000")
|
||||
If Not IsPostBack Then
|
||||
|
||||
listacolores = New List(Of String)
|
||||
listaCamposanios = New List(Of String())
|
||||
listacolores.Add("#FF0F00")
|
||||
Dim EjercicioParametro, EjercicioParametroFinal, SubProyectoParametro, DivisorParametro, Periodo As Integer
|
||||
|
||||
listacolores.Add("#FF6600")
|
||||
listacolores.Add("#F8FF01")
|
||||
listacolores.Add("#04D215")
|
||||
listacolores.Add("#2A0CD0")
|
||||
listacolores.Add("#8A0CCF")
|
||||
listacolores.Add("#CD0D74")
|
||||
listacolores.Add("#754DEB")
|
||||
listacolores.Add("#DDDDDD")
|
||||
listacolores.Add("#999999")
|
||||
listacolores.Add("#000000")
|
||||
listacolores.Add("#FF0F00")
|
||||
Dim EjercicioParametro, EjercicioParametroFinal, SubProyectoParametro, DivisorParametro, Periodo As Integer
|
||||
|
||||
CveCuenta = IfNull(Request("CveCuenta"), "-1").ToString.ToEntero
|
||||
EjercicioParametro = IfNull(Request("Ejercicio"), "-1").ToString.ToEntero
|
||||
|
||||
EjercicioParametro = IfNull(Request("Ejercicio"), "-1").ToString.ToEntero
|
||||
|
||||
EjercicioParametroFinal = IfNull(Request("EjercicioFinal"), "-1").ToString.ToEntero
|
||||
SubProyectoParametro = IfNull(Request("CveSubproyecto"), "-1").ToString.ToEntero
|
||||
DivisorParametro = IfNull(Request("Divisor"), "-1").ToString.ToEntero
|
||||
Periodo = IfNull(Request("Periodo"), "-1").ToString.ToEntero
|
||||
DivisorParametro = IfNull(Request("Divisor"), "-1").ToString.ToEntero
|
||||
Periodo = IfNull(Request("Periodo"), "-1").ToString.ToEntero
|
||||
EsVertical = IfNull(Request("V"), "-1").ToString.ToEntero
|
||||
|
||||
InicializaValores()
|
||||
@@ -137,11 +137,11 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
|
||||
DdlSubProyecto.SelectedValueExist(SubProyectoParametro.ToString)
|
||||
DdlDivisor.SelectedValueExist(DivisorParametro.ToString)
|
||||
|
||||
DdlPeriodo.SelectedValueExist(Periodo)
|
||||
|
||||
If CveCuenta > 0 Then
|
||||
DdlCuentas.SelectedValueExist(CveCuenta)
|
||||
CargaDatos()
|
||||
DdlPeriodo.SelectedValueExist(Periodo)
|
||||
|
||||
If CveCuenta > 0 Then
|
||||
DdlCuentas.SelectedValueExist(CveCuenta)
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -161,14 +161,14 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
DdlEjercicio2.DataSource = Nothing
|
||||
End If
|
||||
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If Conta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim dr As DataRow = Conta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
|
||||
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
|
||||
DdlCuentas.DataSource = Conta.DtResultados
|
||||
End If
|
||||
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If Conta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim dr As DataRow = Conta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
|
||||
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
|
||||
DdlCuentas.DataSource = Conta.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
@@ -193,17 +193,17 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
|
||||
Protected Sub BtnCargaAsignados_Click(sender As Object, e As EventArgs) Handles BtnCargaAsignados.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
If Not DdlCuentas.SelectedValue.ToEntero > 0 Then
|
||||
Alert("Debe de seleccionar una cuenta.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
DTHeaders = New DataTable
|
||||
DTDatos = New DataTable
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
If Not DdlCuentas.SelectedValue.ToEntero > 0 Then
|
||||
Alert("Debe de seleccionar una cuenta.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
DTHeaders = New DataTable
|
||||
DTDatos = New DataTable
|
||||
|
||||
Dim Conta As New ClsContabilidad
|
||||
|
||||
DtHeadersCount = 0
|
||||
@@ -227,7 +227,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
|
||||
For Each Dr As DataRow In DTHeaders.Rows
|
||||
GvAnual.Columns(Index).Visible = True
|
||||
CType(GvAnual.Columns(Index), BoundField).DataField = String.Format("Ejercicio{0}", Dr("Ejercicio"))
|
||||
GvAnual.Columns(Index).HeaderText = Dr("Ejercicio").ToString
|
||||
GvAnual.Columns(Index).HeaderText = Dr("Ejercicio").ToString
|
||||
listaCamposanios.Add(New String() {String.Format("Ejercicio{0}", Dr("Ejercicio")), Dr("Ejercicio").ToString()})
|
||||
|
||||
If Not DdlEjercicio.SelectedValue = Dr("Ejercicio").ToString Then
|
||||
@@ -238,7 +238,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
|
||||
End If
|
||||
|
||||
GvAnual.Columns(Index + 2).Visible = True
|
||||
CType(GvAnual.Columns(Index + 2), BoundField).DataField = String.Format("Ejercicio{0}{1}Porcentaje", Dr("Ejercicio"), If(EsVertical = 1, "", "Variacion"))
|
||||
CType(GvAnual.Columns(Index + 2), BoundField).DataField = String.Format("Ejercicio{0}{1}Porcentaje", Dr("Ejercicio"), If(EsVertical = 1, "", "Variacion"))
|
||||
GvAnual.Columns(Index + 2).HeaderText = "%"
|
||||
End If
|
||||
|
||||
@@ -259,179 +259,179 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
|
||||
|
||||
'RegistraScript($"LimpiaCeros();")
|
||||
|
||||
Conta.Dispose()
|
||||
|
||||
|
||||
|
||||
If GvAnual.Rows.Count > 0 Then
|
||||
|
||||
LnkExportar.Visible = True
|
||||
UpAcciones.Update()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Conta.Dispose()
|
||||
|
||||
|
||||
|
||||
If GvAnual.Rows.Count > 0 Then
|
||||
|
||||
LnkExportar.Visible = True
|
||||
UpAcciones.Update()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GV ROW DATABOUND "
|
||||
Protected Sub GvAnual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvAnual.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
setgraficaCC(e)
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DataKey("Level").ToEntero = 0 Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("Level").ToEntero = 1 Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
|
||||
|
||||
Dim inicial As Boolean = True
|
||||
Dim Index As Integer = 2
|
||||
|
||||
For Each DRow As DataRow In DTHeaders.Rows
|
||||
|
||||
Dim Importe As Decimal = e.Row.DBCampo($"Ejercicio{DRow("Ejercicio")}").ToDecimal
|
||||
Dim Anio As Integer = DRow("Ejercicio").ToString.ToEntero
|
||||
|
||||
If Importe <> 0 Then
|
||||
e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF=31/12/{Anio}&FI=01/01/{Anio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue.ToEntero}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>"
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.Cells(Index + 1).Text.ToDecimal = 0 Then
|
||||
|
||||
e.Row.Cells(Index + 1).Text = "-"
|
||||
|
||||
ElseIf e.Row.Cells(Index + 1).Text.ToDecimal < 0 Then
|
||||
e.Row.Cells(Index + 1).ForeColor = Drawing.Color.Red
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.Cells(Index + 2).Text.Replace("%", "").ToDecimal = 0 Then
|
||||
e.Row.Cells(Index + 2).Text = "-"
|
||||
ElseIf e.Row.Cells(Index + 2).Text.Replace("%", "").ToDecimal < 0 Then
|
||||
e.Row.Cells(Index + 2).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
|
||||
'If inicial Then
|
||||
' Index = Indice + 1
|
||||
' inicial = False
|
||||
' Continue For
|
||||
'End If
|
||||
|
||||
Index += 3
|
||||
Next
|
||||
|
||||
|
||||
|
||||
'e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DataKey("Level").ToEntero = 0 Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("Level").ToEntero = 1 Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
|
||||
|
||||
Dim inicial As Boolean = True
|
||||
Dim Index As Integer = 2
|
||||
|
||||
For Each DRow As DataRow In DTHeaders.Rows
|
||||
|
||||
Dim Importe As Decimal = e.Row.DBCampo($"Ejercicio{DRow("Ejercicio")}").ToDecimal
|
||||
Dim Anio As Integer = DRow("Ejercicio").ToString.ToEntero
|
||||
|
||||
If Importe <> 0 Then
|
||||
e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF=31/12/{Anio}&FI=01/01/{Anio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue.ToEntero}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>"
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.Cells(Index + 1).Text.ToDecimal = 0 Then
|
||||
|
||||
e.Row.Cells(Index + 1).Text = "-"
|
||||
|
||||
ElseIf e.Row.Cells(Index + 1).Text.ToDecimal < 0 Then
|
||||
e.Row.Cells(Index + 1).ForeColor = Drawing.Color.Red
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.Cells(Index + 2).Text.Replace("%", "").ToDecimal = 0 Then
|
||||
e.Row.Cells(Index + 2).Text = "-"
|
||||
ElseIf e.Row.Cells(Index + 2).Text.Replace("%", "").ToDecimal < 0 Then
|
||||
e.Row.Cells(Index + 2).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
|
||||
'If inicial Then
|
||||
' Index = Indice + 1
|
||||
' inicial = False
|
||||
' Continue For
|
||||
'End If
|
||||
|
||||
Index += 3
|
||||
Next
|
||||
|
||||
|
||||
|
||||
'e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub setgraficaCC(e As GridViewRowEventArgs)
|
||||
Dim lista As New List(Of Object)
|
||||
Dim colorindex As Integer = 0
|
||||
For Each campo As String() In listaCamposanios
|
||||
lista.Add(New With {.Texto = campo(1), .Valor = e.Row.DBCampo(campo(0)).ToDecimal(), .Color = listacolores(colorindex)})
|
||||
colorindex = colorindex + 1
|
||||
If colorindex >= listacolores.Count Then
|
||||
colorindex = 0
|
||||
End If
|
||||
Next
|
||||
e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
End Sub
|
||||
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
|
||||
Dim SubProyecto As String = ""
|
||||
|
||||
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||
SubProyecto = DdlSubProyecto.SelectedItem.Text
|
||||
End If
|
||||
|
||||
Dim SbFiltros As New StringBuilder()
|
||||
SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio2.SelectedValue}")
|
||||
SbFiltros.AppendFormat("SubProyecto: {0}|", SubProyecto)
|
||||
SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
|
||||
|
||||
|
||||
|
||||
GvAnual.ExportToExcelGembox("AnexoCatálogoAnual", UsuarioActual, "Anexo del Catálogo - Anual", DatoTituloExtra:=$"Periodo{DdlPeriodo.SelectedItem.Text}", DatosFiltros:=SbFiltros.ToString())
|
||||
'GvAnual.ExportToExcelGembox("AnexoCatálogoAnual", UsuarioActual, $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio2.SelectedValue}", "Anexo del Catálogo - Anual", SubProyecto, DdlDivisor.SelectedValue.ToEntero, DatoTituloExtra:=$"Periodo {DdlPeriodo.SelectedItem.Text}")
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub setgraficaCC(e As GridViewRowEventArgs)
|
||||
Dim lista As New List(Of Object)
|
||||
Dim colorindex As Integer = 0
|
||||
For Each campo As String() In listaCamposanios
|
||||
lista.Add(New With {.Texto = campo(1), .Valor = e.Row.DBCampo(campo(0)).ToDecimal(), .Color = listacolores(colorindex)})
|
||||
colorindex = colorindex + 1
|
||||
If colorindex >= listacolores.Count Then
|
||||
colorindex = 0
|
||||
End If
|
||||
Next
|
||||
e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
End Sub
|
||||
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
|
||||
Dim SubProyecto As String = ""
|
||||
|
||||
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||
SubProyecto = DdlSubProyecto.SelectedItem.Text
|
||||
End If
|
||||
|
||||
Dim SbFiltros As New StringBuilder()
|
||||
SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio2.SelectedValue}")
|
||||
SbFiltros.AppendFormat("SubProyecto: {0}|", SubProyecto)
|
||||
SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
|
||||
|
||||
|
||||
|
||||
GvAnual.ExportToExcelGembox("AnexoCatálogoAnual", UsuarioActual, "Anexo del Catálogo - Anual", DatoTituloExtra:=$"Periodo{DdlPeriodo.SelectedItem.Text}", DatosFiltros:=SbFiltros.ToString())
|
||||
'GvAnual.ExportToExcelGembox("AnexoCatálogoAnual", UsuarioActual, $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio2.SelectedValue}", "Anexo del Catálogo - Anual", SubProyecto, DdlDivisor.SelectedValue.ToEntero, DatoTituloExtra:=$"Periodo {DdlPeriodo.SelectedItem.Text}")
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Protected Sub GvAnual_DataBound(sender As Object, e As EventArgs)
|
||||
|
||||
'If DtHeadersCount > 0 Then
|
||||
|
||||
|
||||
' '96 32
|
||||
|
||||
' Dim NColumns As Integer = GvAnual.Columns.Count
|
||||
' Dim row As New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Normal)
|
||||
|
||||
' Dim cell1 As New TableHeaderCell()
|
||||
' cell1.Text = ""
|
||||
' cell1.ColumnSpan = 1
|
||||
' row.Controls.Add(cell1)
|
||||
|
||||
' Dim cell2 As New TableHeaderCell()
|
||||
' cell2.Text = ""
|
||||
' cell2.ColumnSpan = 1
|
||||
' row.Controls.Add(cell2)
|
||||
|
||||
|
||||
' Dim cell3 As New TableHeaderCell()
|
||||
' cell3.Text = ""
|
||||
' cell3.ColumnSpan = 1
|
||||
' row.Controls.Add(cell3)
|
||||
|
||||
' Dim cell4 As New TableHeaderCell()
|
||||
' cell4.Text = ""
|
||||
' cell4.ColumnSpan = 1
|
||||
' row.Controls.Add(cell4)
|
||||
|
||||
' For x = 0 To DtHeadersCount
|
||||
|
||||
' Dim cell As New TableHeaderCell()
|
||||
' cell.Text = ""
|
||||
' cell.ColumnSpan = 1
|
||||
' row.Controls.Add(cell)
|
||||
|
||||
' Dim cellColspan2 = New TableHeaderCell()
|
||||
' cellColspan2.ColumnSpan = 2
|
||||
' cellColspan2.Text = "Variación"
|
||||
' row.Controls.Add(cellColspan2)
|
||||
|
||||
' x = x + 1
|
||||
|
||||
' Next
|
||||
|
||||
' GvAnual.HeaderRow.Parent.Controls.AddAt(0, row)
|
||||
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub GvAnual_DataBound(sender As Object, e As EventArgs)
|
||||
|
||||
'If DtHeadersCount > 0 Then
|
||||
|
||||
|
||||
' '96 32
|
||||
|
||||
' Dim NColumns As Integer = GvAnual.Columns.Count
|
||||
' Dim row As New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Normal)
|
||||
|
||||
' Dim cell1 As New TableHeaderCell()
|
||||
' cell1.Text = ""
|
||||
' cell1.ColumnSpan = 1
|
||||
' row.Controls.Add(cell1)
|
||||
|
||||
' Dim cell2 As New TableHeaderCell()
|
||||
' cell2.Text = ""
|
||||
' cell2.ColumnSpan = 1
|
||||
' row.Controls.Add(cell2)
|
||||
|
||||
|
||||
' Dim cell3 As New TableHeaderCell()
|
||||
' cell3.Text = ""
|
||||
' cell3.ColumnSpan = 1
|
||||
' row.Controls.Add(cell3)
|
||||
|
||||
' Dim cell4 As New TableHeaderCell()
|
||||
' cell4.Text = ""
|
||||
' cell4.ColumnSpan = 1
|
||||
' row.Controls.Add(cell4)
|
||||
|
||||
' For x = 0 To DtHeadersCount
|
||||
|
||||
' Dim cell As New TableHeaderCell()
|
||||
' cell.Text = ""
|
||||
' cell.ColumnSpan = 1
|
||||
' row.Controls.Add(cell)
|
||||
|
||||
' Dim cellColspan2 = New TableHeaderCell()
|
||||
' cellColspan2.ColumnSpan = 2
|
||||
' cellColspan2.Text = "Variación"
|
||||
' row.Controls.Add(cellColspan2)
|
||||
|
||||
' x = x + 1
|
||||
|
||||
' Next
|
||||
|
||||
' GvAnual.HeaderRow.Parent.Controls.AddAt(0, row)
|
||||
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,8 +4,8 @@ Option Strict On
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Public Property CveCuenta As Integer
|
||||
Get
|
||||
@@ -14,7 +14,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
Private Property listacolores As List(Of String)
|
||||
Get
|
||||
Return DirectCast(ViewState("listacolores"), List(Of String))
|
||||
@@ -22,8 +22,8 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
Set(value As List(Of String))
|
||||
ViewState("listacolores") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
Private Property listaCampos As List(Of String())
|
||||
Get
|
||||
Return DirectCast(ViewState("listaCampos"), List(Of String()))
|
||||
@@ -31,83 +31,83 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
Set(value As List(Of String()))
|
||||
ViewState("listaCampos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property DTHeaders As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("DTHeaders") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTHeaders"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTHeaders") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property DTDatos As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("DTDatos") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTDatos"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
Private Property DTHeaders As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("DTHeaders") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTHeaders"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTHeaders") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property DTDatos As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("DTDatos") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTDatos"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
listacolores = New List(Of String)
|
||||
listaCampos = New List(Of String())
|
||||
listacolores.Add("#FF0F00")
|
||||
listacolores.Add("#FF6600")
|
||||
listacolores.Add("#F8FF01")
|
||||
listacolores.Add("#04D215")
|
||||
listacolores.Add("#2A0CD0")
|
||||
listacolores.Add("#8A0CCF")
|
||||
listacolores.Add("#CD0D74")
|
||||
listacolores.Add("#754DEB")
|
||||
listacolores.Add("#DDDDDD")
|
||||
listacolores.Add("#999999")
|
||||
listacolores.Add("#000000")
|
||||
listacolores.Add("#FF0F00")
|
||||
|
||||
If Not IsPostBack Then
|
||||
|
||||
listacolores = New List(Of String)
|
||||
listaCampos = New List(Of String())
|
||||
listacolores.Add("#FF0F00")
|
||||
listacolores.Add("#FF6600")
|
||||
listacolores.Add("#F8FF01")
|
||||
listacolores.Add("#04D215")
|
||||
listacolores.Add("#2A0CD0")
|
||||
listacolores.Add("#8A0CCF")
|
||||
listacolores.Add("#CD0D74")
|
||||
listacolores.Add("#754DEB")
|
||||
listacolores.Add("#DDDDDD")
|
||||
listacolores.Add("#999999")
|
||||
listacolores.Add("#000000")
|
||||
listacolores.Add("#FF0F00")
|
||||
|
||||
Dim EjercicioParametro, SubProyectoParametro, DivisorParametro, Periodo As Integer
|
||||
CveCuenta = IfNull(Request("CveCuenta"), "-1").ToString.ToEntero
|
||||
EjercicioParametro = IfNull(Request("Ejercicio"), "-1").ToString.ToEntero
|
||||
SubProyectoParametro = IfNull(Request("CveSubProyecto"), "-1").ToString.ToEntero
|
||||
DivisorParametro = IfNull(Request("Divisor"), "-1").ToString.ToEntero
|
||||
DivisorParametro = IfNull(Request("Divisor"), "-1").ToString.ToEntero
|
||||
Periodo = IfNull(Request("Periodo"), "-1").ToString.ToEntero
|
||||
|
||||
InicializaValores()
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
|
||||
InicializaValores()
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
|
||||
DdlSubProyecto.SelectedValueExist(SubProyectoParametro.ToString)
|
||||
DdlDivisor.SelectedValueExist(DivisorParametro.ToString)
|
||||
|
||||
|
||||
If CveCuenta > 0 Then
|
||||
DdlCuentas.SelectedValueExist(CveCuenta)
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
DdlDivisor.SelectedValueExist(DivisorParametro.ToString)
|
||||
|
||||
|
||||
If CveCuenta > 0 Then
|
||||
DdlCuentas.SelectedValueExist(CveCuenta)
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -115,61 +115,61 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
CargaCombos()
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
|
||||
DdlCuentas.DataSource = GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa).FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
DdlCuentas.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaCombos()
|
||||
|
||||
DdlCuentas.DataSource = GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa).FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
DdlCuentas.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnCargaAsignados_Click(sender As Object, e As EventArgs) Handles BtnCargaAsignados.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
If Not DdlCuentas.SelectedValue.ToEntero > 0 Then
|
||||
Alert("Debe de seleccionar una cuenta.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
DTHeaders = New DataTable
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
If Not DdlCuentas.SelectedValue.ToEntero > 0 Then
|
||||
Alert("Debe de seleccionar una cuenta.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
DTHeaders = New DataTable
|
||||
DTDatos = New DataTable
|
||||
Dim Conta As New ClsContabilidad
|
||||
|
||||
If Conta.GetAnexoCatalagoCC(DdlCuentas.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
|
||||
|
||||
If Conta.GetAnexoCatalagoCC(DdlCuentas.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
|
||||
|
||||
DTHeaders = Conta.DSResultados.Tables(0)
|
||||
DTDatos = Conta.DSResultados.Tables(1)
|
||||
DTDatos = Conta.DSResultados.Tables(1)
|
||||
GvCC.DataSource = Conta.DSResultados.Tables(1)
|
||||
|
||||
Dim Index = 4
|
||||
For Index = 4 To GvCC.Columns.Count - 1
|
||||
GvCC.Columns(Index).Visible = False
|
||||
Next Index
|
||||
Next Index
|
||||
listaCampos.Clear()
|
||||
|
||||
Index = 4
|
||||
For Each Dr As DataRow In DTHeaders.Rows
|
||||
GvCC.Columns(Index).Visible = True
|
||||
CType(GvCC.Columns(Index), BoundField).DataField = String.Format("SubProyecto{0}", Dr("SubProyecto"))
|
||||
GvCC.Columns(Index).HeaderText = Dr("SubProyecto").ToString()
|
||||
listaCampos.Add(New String() {String.Format("SubProyecto{0}", Dr("SubProyecto")), Dr("SubProyecto").ToString()})
|
||||
|
||||
'GvCC.Columns(Index + 1).Visible = True
|
||||
'CType(GvCC.Columns(Index + 1), BoundField).DataField = String.Format("SubProyecto{0}Porcentaje", Dr("SubProyecto"))
|
||||
'GvCC.Columns(Index + 1).HeaderText = "%"
|
||||
'Index += 2
|
||||
|
||||
GvCC.Columns(Index).HeaderText = Dr("SubProyecto").ToString()
|
||||
listaCampos.Add(New String() {String.Format("SubProyecto{0}", Dr("SubProyecto")), Dr("SubProyecto").ToString()})
|
||||
|
||||
'GvCC.Columns(Index + 1).Visible = True
|
||||
'CType(GvCC.Columns(Index + 1), BoundField).DataField = String.Format("SubProyecto{0}Porcentaje", Dr("SubProyecto"))
|
||||
'GvCC.Columns(Index + 1).HeaderText = "%"
|
||||
'Index += 2
|
||||
|
||||
Index += 1
|
||||
Next
|
||||
|
||||
@@ -178,113 +178,113 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
|
||||
Else
|
||||
GvCC.DataSource = Nothing
|
||||
End If
|
||||
|
||||
|
||||
If GvCC.Rows.Count > 0 Then
|
||||
|
||||
LnkExportar.Visible = True
|
||||
UpAcciones.Update()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If GvCC.Rows.Count > 0 Then
|
||||
|
||||
LnkExportar.Visible = True
|
||||
UpAcciones.Update()
|
||||
|
||||
End If
|
||||
|
||||
'RegistraScript($"LimpiaCeros({DdlDivisor.SelectedValue});")
|
||||
Conta.Dispose()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GV ROW DATABOUND "
|
||||
Protected Sub GvCC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCC.RowDataBound
|
||||
|
||||
Protected Sub GvCC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCC.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
End If
|
||||
setgraficaCC(e)
|
||||
|
||||
If e.Row.DataKey("Level").ToEntero = 0 Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("Level").ToEntero = 1 Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
|
||||
Dim Index As Integer = 2
|
||||
|
||||
For Each DRow As DataRow In DTHeaders.Rows
|
||||
Dim Importe As Decimal = e.Row.DBCampo($"SubProyecto{DRow("SubProyecto")}").ToDecimal
|
||||
'Dim Anio As Integer = DRow("SubProyecto").ToString.ToEntero
|
||||
|
||||
If e.Row.CssClass = "Totales" And Index = 2 Then
|
||||
e.Row.Cells(Index).ForeColor = Drawing.ColorTranslator.FromHtml("#337ab7")
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.Cells(Index).Text.Replace("%", "").ToDecimal = 0 Then
|
||||
e.Row.Cells(Index).Text = "-"
|
||||
ElseIf e.Row.Cells(Index).Text.Replace("%", "").ToDecimal < 0 Then
|
||||
e.Row.Cells(Index).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
Index += 1
|
||||
Next
|
||||
|
||||
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
|
||||
Dim inicial As Boolean = True
|
||||
Index = 4
|
||||
|
||||
For Each DRow As DataRow In DTHeaders.Rows
|
||||
Dim Importe As Decimal = e.Row.DBCampo($"SubProyecto{DRow("SubProyecto")}").ToDecimal
|
||||
|
||||
If e.Row.Cells(Index).Text.Replace("%", "").ToDecimal = 0 Then
|
||||
e.Row.Cells(Index).Text = "-"
|
||||
ElseIf e.Row.Cells(Index).Text.Replace("%", "").ToDecimal < 0 Then
|
||||
e.Row.Cells(Index).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If Importe <> 0 Then
|
||||
'' pendiente.. ' e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF=31/12/{DdlEjercicio.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={ If(DRow("CveSubProyecto").ToString.ToEntero > 0, DRow("CveSubProyecto").ToString, "-1")}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
Index += 1
|
||||
|
||||
Next
|
||||
|
||||
setgraficaCC(e)
|
||||
|
||||
If e.Row.DataKey("Level").ToEntero = 0 Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("Level").ToEntero = 1 Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
|
||||
Dim Index As Integer = 2
|
||||
|
||||
For Each DRow As DataRow In DTHeaders.Rows
|
||||
Dim Importe As Decimal = e.Row.DBCampo($"SubProyecto{DRow("SubProyecto")}").ToDecimal
|
||||
'Dim Anio As Integer = DRow("SubProyecto").ToString.ToEntero
|
||||
|
||||
If e.Row.CssClass = "Totales" And Index = 2 Then
|
||||
e.Row.Cells(Index).ForeColor = Drawing.ColorTranslator.FromHtml("#337ab7")
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.Cells(Index).Text.Replace("%", "").ToDecimal = 0 Then
|
||||
e.Row.Cells(Index).Text = "-"
|
||||
ElseIf e.Row.Cells(Index).Text.Replace("%", "").ToDecimal < 0 Then
|
||||
e.Row.Cells(Index).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
Index += 1
|
||||
Next
|
||||
|
||||
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
|
||||
Dim inicial As Boolean = True
|
||||
Index = 4
|
||||
|
||||
For Each DRow As DataRow In DTHeaders.Rows
|
||||
Dim Importe As Decimal = e.Row.DBCampo($"SubProyecto{DRow("SubProyecto")}").ToDecimal
|
||||
|
||||
If e.Row.Cells(Index).Text.Replace("%", "").ToDecimal = 0 Then
|
||||
e.Row.Cells(Index).Text = "-"
|
||||
ElseIf e.Row.Cells(Index).Text.Replace("%", "").ToDecimal < 0 Then
|
||||
e.Row.Cells(Index).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If Importe <> 0 Then
|
||||
'' pendiente.. ' e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF=31/12/{DdlEjercicio.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={ If(DRow("CveSubProyecto").ToString.ToEntero > 0, DRow("CveSubProyecto").ToString, "-1")}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
Index += 1
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub setgraficaCC(e As GridViewRowEventArgs)
|
||||
Dim lista As New List(Of Object)
|
||||
Dim colorindex As Integer = 0
|
||||
For Each campo As String() In listaCampos
|
||||
lista.Add(New With {.Texto = campo(1), .Valor = e.Row.DBCampo(campo(0)).ToDecimal(), .Color = listacolores(colorindex)})
|
||||
colorindex = colorindex + 1
|
||||
If colorindex >= listacolores.Count Then
|
||||
colorindex = 0
|
||||
End If
|
||||
Next
|
||||
e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
Public Sub setgraficaCC(e As GridViewRowEventArgs)
|
||||
Dim lista As New List(Of Object)
|
||||
Dim colorindex As Integer = 0
|
||||
For Each campo As String() In listaCampos
|
||||
lista.Add(New With {.Texto = campo(1), .Valor = e.Row.DBCampo(campo(0)).ToDecimal(), .Color = listacolores(colorindex)})
|
||||
colorindex = colorindex + 1
|
||||
If colorindex >= listacolores.Count Then
|
||||
colorindex = 0
|
||||
End If
|
||||
Next
|
||||
e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
|
||||
Dim SbFiltros As New StringBuilder()
|
||||
'SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}")
|
||||
SbFiltros.AppendFormat("SubProyecto : {0}|", DdlSubProyecto.SelectedItem.Text)
|
||||
If DdlDivisor.SelectedValue <> "1" Then SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
|
||||
'SbFiltros.AppendFormat("Ejercicio : {0} Periodo : {1}|", DdlEjercicio.SelectedItem.Text, DdlPeriodo.SelectedItem.Text)
|
||||
|
||||
|
||||
GvCC.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, $"Estado de Resultados Horizontal por {LblSubProyecto.Text}", DatoTituloExtra:="", DatosFiltros:=SbFiltros.ToString())
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
|
||||
Dim SbFiltros As New StringBuilder()
|
||||
'SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}")
|
||||
SbFiltros.AppendFormat("SubProyecto : {0}|", DdlSubProyecto.SelectedItem.Text)
|
||||
If DdlDivisor.SelectedValue <> "1" Then SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
|
||||
'SbFiltros.AppendFormat("Ejercicio : {0} Periodo : {1}|", DdlEjercicio.SelectedItem.Text, DdlPeriodo.SelectedItem.Text)
|
||||
|
||||
|
||||
GvCC.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, $"Estado de Resultados Horizontal por {LblSubProyecto.Text}", DatoTituloExtra:="", DatosFiltros:=SbFiltros.ToString())
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
|
||||
304
Contabilidad/RepAnexoCatalogoCI.aspx
Normal file
304
Contabilidad/RepAnexoCatalogoCI.aspx
Normal file
@@ -0,0 +1,304 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoCI.aspx.vb" Inherits="AC_RepAnexoCatalogo" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.table-VH {
|
||||
padding-top: 58px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label runat="server" ID="LbTitulo" Text="Anexo del Catálogo"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-ad-excel"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" Enabled="false"/>
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>F. I.</li>
|
||||
|
||||
<li style="margin-right: 30px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 93px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>F. F.
|
||||
</li>
|
||||
|
||||
<li style="margin-right: 30px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 94px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</li>
|
||||
<li>Tipo de Cuentas:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList CssClass="form-control input-sm" Width="150px" ID="DdlTipoCuentas" ClientIDMode="Static" runat="server" DataTextField="Nombre" DataValueField="Id" TabIndex="4" onchange="Enable();">
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Cuenta:
|
||||
</li>
|
||||
<li>
|
||||
<asp:HiddenField ID="HdnCveCuenta" runat="server" ClientIDMode="Static" />
|
||||
<asp:TextBox ID="TxtCuenta" runat="server" Width="150px" ClientIDMode="Static" Enabled="false" TabIndex="5" CssClass="form-control input-sm"></asp:TextBox>
|
||||
</li>
|
||||
|
||||
<li runat="server" id="tdTipoReporte" visible="false">Tipo:
|
||||
</li>
|
||||
<li runat="server" id="tdTipoReporte2" visible="false">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server" Width="150px">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<label class="col-md-1">Cuentas</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="form-control input-sm select2me" ID="DdlCuenta" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" Width="100%">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos y saldo no igual a cero" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 90px; padding-right: 2px;">Segmento de negocio</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="form-control input-sm select2me" ID="DdlSegmentoNegocio" runat="server" DataTextField="Nombre" DataValueField="Id" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" CssClass="ScrollAD table table-smallpadding Widthall" data-heighterror="375" data-freezecols="0" data-freezerows="-1"
|
||||
ShowHeader="True" ShowHeaderWhenEmpty="true" AllowPaging="False" ShowFooter="False" EmptyDataText="No se encontraron cuentas con los parametros establecidos." AutoGenerateColumns="False" OnRowDataBound="GvIngresos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="160" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="420" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Iniciales">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Iniciales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
<asp:Label ID="LbSaldoInicial2" runat="server" Width="30px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table width="100%" style="margin-left: 35px;">
|
||||
<tr>
|
||||
<td colspan="2">Cargos</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table width="100%" style="margin-left: 35px;">
|
||||
<tr>
|
||||
<td colspan="2">Abonos</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Actuales">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Actuales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
<asp:Label ID="LbSaldoActual" runat="server" Width="30px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
function pageLoad(sender, args) {
|
||||
|
||||
$(function () {
|
||||
//Genero las cuentas en el arreglo
|
||||
var ArrCuentas = [<%= WSCuentas()%>];
|
||||
|
||||
$("#TxtCuenta").autocomplete({
|
||||
minLength: 0,
|
||||
source: ArrCuentas,
|
||||
focus: function (event, ui) {
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
return false;
|
||||
},
|
||||
select: function (event, ui) {
|
||||
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
|
||||
//$("#project-description").html(ui.item.desc);
|
||||
//$("#project-icon").attr("src", "images/" + ui.item.icon);
|
||||
|
||||
return false;
|
||||
}
|
||||
})
|
||||
//.autocomplete("instance")._renderItem = function (ul, item) {
|
||||
// return $("<li>")
|
||||
// .append("<a>" + item.label + "</a>")
|
||||
// .appendTo(ul);
|
||||
//};
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('input[type=text]').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('select').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function Enable() {
|
||||
var Producto = $get("DdlTipoCuentas").value;
|
||||
if (Producto == "-2") {
|
||||
document.getElementById("TxtCuenta").disabled = false;
|
||||
//document.getElementById("TxtCuenta").focus();
|
||||
//alert(Producto);
|
||||
}
|
||||
else {
|
||||
document.getElementById("TxtCuenta").value = " ";
|
||||
document.getElementById("TxtCuenta").disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
function Scroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 360;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#<%=GvDatos.ClientID%>').ADScroll({
|
||||
height: Alto
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
331
Contabilidad/RepAnexoCatalogoCI.aspx.vb
Normal file
331
Contabilidad/RepAnexoCatalogoCI.aspx.vb
Normal file
@@ -0,0 +1,331 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepAnexoCatalogo
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicio As Date
|
||||
Get
|
||||
FechaInicio = ViewState("FechaInicio").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFin As DateTime
|
||||
Get
|
||||
FechaFin = ViewState("FechaFin").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IdCuenta As Integer
|
||||
Get
|
||||
IdCuenta = ViewState("IdCuenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("IdCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IdSegNeg As Integer
|
||||
Get
|
||||
IdSegNeg = ViewState("IdSegNeg").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("IdSegNeg") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DTCuentas As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTCuentas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTCuentas") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TipoReporte").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoReporte") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
Response.Redirect($"/Contabilidad/RepAnexoCatalogo.aspx")
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
|
||||
InicializaValores()
|
||||
CargaURLParametros()
|
||||
BtnConsultar.Enabled = True
|
||||
Else
|
||||
Alert("La empresa no usa Contabilidad ni Armonización Contable", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " INCIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
DtDatos = Nothing
|
||||
CargaTipoCuentas()
|
||||
CargaSegmentosNegocio()
|
||||
FechaInicio = DateSerial(Year(NowADS()), Month(NowADS()), 1)
|
||||
FechaFin = NowADS()
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
TipoReporte = -1
|
||||
Else
|
||||
TipoReporte = 1
|
||||
tdTipoReporte.Visible = True
|
||||
tdTipoReporte2.Visible = True
|
||||
End If
|
||||
End Sub
|
||||
Public Function WSCuentas() As String
|
||||
Dim Str As New StringBuilder
|
||||
Dim i As Integer = 0
|
||||
Dim dt As DataTable = DTCuentas '.FiltraParametros("Afectable = 1")
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As DataRow In dt.Rows
|
||||
i += 1
|
||||
Str.AppendFormat("{{value:""{0}"",label:""{1}{3}""}}{2}", dr("Id"), dr("CtaCodigo").ToString.Replace("""", ""), If(i < dt.Rows.Count, ",", ""), If(dr("Afectable").ToString = "1", " *", ""))
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Return Str.ToString
|
||||
End Function
|
||||
Private Sub CargaTipoCuentas()
|
||||
Dim ObjTipoCuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If ObjTipoCuenta.GetCuentas(-1, "-1", -1) Then
|
||||
Dim dr As DataRow = ObjTipoCuenta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
|
||||
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
|
||||
DTCuentas = ObjTipoCuenta.DtResultados '.FiltraParametros("Afectable = 1")
|
||||
DdlTipoCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo IN ('_ACTIVO', '_BPASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
End If
|
||||
ObjTipoCuenta.Dispose()
|
||||
DdlTipoCuentas.DataBind()
|
||||
'If strGlobal.Length > 0 Then DdlTipoCuentas.Items.Insert(0, New ListItem("Todas", strGlobal))
|
||||
DdlTipoCuentas.Items.Insert(0, New ListItem("Todas las Cuentas", "1"))
|
||||
DdlTipoCuentas.Items.Add(New ListItem("Algun específico", "-2"))
|
||||
DdlTipoCuentas.SelectedIndex = 0
|
||||
|
||||
End Sub
|
||||
Private Sub CargaSegmentosNegocio()
|
||||
Dim ObjContpaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If ObjContpaq.GetSegmentosNegocio(-1, "-1") Then
|
||||
DdlSegmentoNegocio.DataSource = ObjContpaq.DtResultados
|
||||
DdlSegmentoNegocio.DataBind()
|
||||
End If
|
||||
ObjContpaq.Dispose()
|
||||
DdlSegmentoNegocio.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSegmentoNegocio.SelectedValue = "-1"
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "CARGA DATOS"
|
||||
Private Sub CargaURLParametros()
|
||||
|
||||
Dim ErrorParametros = True
|
||||
|
||||
If Request("ID") IsNot Nothing AndAlso IsNumeric(Request("ID")) AndAlso Request("ID").ToEntero > 0 Then
|
||||
'If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
IdCuenta = Request("ID").ToEntero
|
||||
'FechaInicio = Request("FI").ToDate
|
||||
FechaFin = Request("FF").ToDate
|
||||
|
||||
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
FechaInicio = Request("FI").ToDate
|
||||
Else
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
End If
|
||||
DdlTipoCuentas.SelectedValueExist("-2")
|
||||
HdnCveCuenta.Value = IdCuenta.ToString
|
||||
TxtCuenta.Text = DTCuentas.FiltroPrimeroValor("CtaCodigo", $"Id={Request("ID")}")
|
||||
|
||||
If Request("CM") IsNot Nothing AndAlso IsNumeric(Request("CM")) AndAlso Request("CM").ToEntero > 0 Then
|
||||
DdlCuenta.SelectedValueExist(Request("CM").ToString)
|
||||
End If
|
||||
|
||||
ErrorParametros = False
|
||||
|
||||
|
||||
If Request("TP") IsNot Nothing AndAlso IsNumeric(Request("TP")) AndAlso Request("TP").ToEntero > 0 Then
|
||||
TipoReporte = Request("TP").ToEntero
|
||||
|
||||
DdlTipoReporte.SelectedValue = TipoReporte.ToString
|
||||
End If
|
||||
|
||||
If Request("IdSegNeg") IsNot Nothing AndAlso IsNumeric(Request("IdSegNeg")) AndAlso Request("IdSegNeg").ToEntero > 0 Then
|
||||
IdSegNeg = Request("IdSegNeg").ToEntero
|
||||
|
||||
DdlSegmentoNegocio.SelectedValue = IdSegNeg.ToString
|
||||
End If
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
|
||||
UPFiltros.Update()
|
||||
TxtFechaDel.Text = FechaInicio.ToShortDateString
|
||||
TxtFechaAl.Text = FechaFin.ToShortDateString
|
||||
|
||||
If Not ErrorParametros Then
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero)
|
||||
CargaDatos()
|
||||
|
||||
RegistraScript("Enable();")
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
If ObjConta.GetAnexoCatalogo(IdCuenta, FechaInicio, FechaFin, DdlCuenta.SelectedValue.ToEntero, TipoReporte, DdlSegmentoNegocio.SelectedValue.ToEntero) Then
|
||||
|
||||
If Request("ID") IsNot Nothing AndAlso IsNumeric(Request("ID")) AndAlso Request("ID").ToEntero > 0 Then
|
||||
DtDatos = ObjConta.DtResultados.FiltraParametros(" SaldoInicial <> 0 OR Cargos <> 0 OR Abonos <> 0")
|
||||
Else
|
||||
DtDatos = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
CargaGrid()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
RegistraScript("Scroll();")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "GV ROW DATA BOUND"
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Id").ToEntero = IdCuenta Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
'e.Row.ControlStyle.Font.Size = 9
|
||||
'e.Row.ControlStyle.Height = 30
|
||||
Else
|
||||
e.Row.ControlStyle.Font.Bold = False
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("CtaMayor") = "4" Or e.Row.DBCampo("CtaMayor") = "1" Then
|
||||
' e.Row.ControlStyle.Font.Bold = True
|
||||
'End If
|
||||
|
||||
'Acomoda Deudor y Acreedor
|
||||
If e.Row.DBCampo("Tipo") <> "D" Then
|
||||
'e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0}{1}", e.Row.DBCampo("SaldoInicial").FormatoNumero, " ")
|
||||
e.Row.FCLabel("LbSaldoInicial2").Visible = True
|
||||
e.Row.FCLabel("LbSaldoActual").Visible = True
|
||||
End If
|
||||
|
||||
'Colorea NEGATIVOS
|
||||
If e.Row.DBCampo("SaldoInicial").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Cargos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Abonos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("SaldoActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLSaldoActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx?ID={0}&FI={1}&FF={2}&IdSegNeg={3}", e.Row.DBCampo("ID"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, DdlSegmentoNegocio.SelectedValue.ToEntero)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " IMPRIMIR "
|
||||
Protected Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte()
|
||||
Else
|
||||
Alert("Primero debe consultar el Anexo del Catálogo", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte("Excel")
|
||||
Else
|
||||
Alert("Primero debe consultar el Anexo del Catálogo", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "Contabilidad/Reportes/RepAnexoCatalogo.rdlc"
|
||||
'nombre del reporte
|
||||
Dim fileName As String = "AnexoCatalogo"
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("IdCuenta", IdCuenta.ToString))
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,12 +2,12 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports DocumentFormat.OpenXml.EMMA
|
||||
Imports DocumentFormat.OpenXml.Office2010.ExcelAc
|
||||
Imports DocumentFormat.OpenXml.EMMA
|
||||
Imports DocumentFormat.OpenXml.Office2010.ExcelAc
|
||||
Imports Extensiones
|
||||
Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Public Property CveCuenta As Integer
|
||||
Get
|
||||
@@ -16,8 +16,8 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
Private Property listacolores As List(Of String)
|
||||
Get
|
||||
Return DirectCast(ViewState("listacolores"), List(Of String))
|
||||
@@ -25,8 +25,8 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
Set(value As List(Of String))
|
||||
ViewState("listacolores") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
Private Property listaCampos As List(Of String())
|
||||
Get
|
||||
Return DirectCast(ViewState("listaCampos"), List(Of String()))
|
||||
@@ -34,105 +34,105 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
Set(value As List(Of String()))
|
||||
ViewState("listaCampos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
listacolores = New List(Of String)
|
||||
listaCampos = New List(Of String())
|
||||
listacolores.Add("#FF0F00")
|
||||
listacolores.Add("#FF6600")
|
||||
listacolores.Add("#F8FF01")
|
||||
listacolores.Add("#04D215")
|
||||
listacolores.Add("#2A0CD0")
|
||||
listacolores.Add("#8A0CCF")
|
||||
listacolores.Add("#CD0D74")
|
||||
listacolores.Add("#754DEB")
|
||||
listacolores.Add("#DDDDDD")
|
||||
listacolores.Add("#999999")
|
||||
listacolores.Add("#000000")
|
||||
If Not IsPostBack Then
|
||||
|
||||
listacolores = New List(Of String)
|
||||
listaCampos = New List(Of String())
|
||||
listacolores.Add("#FF0F00")
|
||||
listacolores.Add("#FF6600")
|
||||
listacolores.Add("#F8FF01")
|
||||
listacolores.Add("#04D215")
|
||||
listacolores.Add("#2A0CD0")
|
||||
listacolores.Add("#8A0CCF")
|
||||
listacolores.Add("#CD0D74")
|
||||
listacolores.Add("#754DEB")
|
||||
listacolores.Add("#DDDDDD")
|
||||
listacolores.Add("#999999")
|
||||
listacolores.Add("#000000")
|
||||
listacolores.Add("#FF0F00")
|
||||
|
||||
Dim EjercicioParametro, SubProyectoParametro, DivisorParametro, Periodo, TRCU As Integer
|
||||
CveCuenta = IfNull(Request("CveCuenta"), "-1").ToString.ToEntero
|
||||
EjercicioParametro = IfNull(Request("Ejercicio"), "-1").ToString.ToEntero
|
||||
SubProyectoParametro = IfNull(Request("CveSubProyecto"), "-1").ToString.ToEntero
|
||||
DivisorParametro = IfNull(Request("Divisor"), "-1").ToString.ToEntero
|
||||
Periodo = IfNull(Request("Periodo"), "-1").ToString.ToEntero
|
||||
TRCU = IfNull(Request("TRCU"), "-1").ToString.ToEntero
|
||||
|
||||
DivisorParametro = IfNull(Request("Divisor"), "-1").ToString.ToEntero
|
||||
Periodo = IfNull(Request("Periodo"), "-1").ToString.ToEntero
|
||||
TRCU = IfNull(Request("TRCU"), "-1").ToString.ToEntero
|
||||
|
||||
InicializaValores()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(EjercicioParametro.ToString)
|
||||
DdlSubproyecto.SelectedValueExist(SubProyectoParametro.ToString)
|
||||
DdlDivisor.SelectedValueExist(DivisorParametro.ToString)
|
||||
DdlDivisor.SelectedValueExist(DivisorParametro.ToString)
|
||||
DdlPeriodo.SelectedValueExist(Periodo)
|
||||
DdlTri.SelectedValueExist(TRCU)
|
||||
|
||||
If CveCuenta > 0 Then
|
||||
DdlCuentas.SelectedValueExist(CveCuenta)
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
DdlTri.SelectedValueExist(TRCU)
|
||||
|
||||
If CveCuenta > 0 Then
|
||||
DdlCuentas.SelectedValueExist(CveCuenta)
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
CargaCombos()
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
|
||||
Private Sub CargaCombos()
|
||||
|
||||
Dim Conta As New ClsContabilidad
|
||||
If Conta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = Conta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If Conta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim dr As DataRow = Conta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
|
||||
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
|
||||
DdlCuentas.DataSource = Conta.DtResultados
|
||||
End If
|
||||
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If Conta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim dr As DataRow = Conta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
|
||||
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
|
||||
DdlCuentas.DataSource = Conta.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
Conta.Dispose()
|
||||
|
||||
DdlCuentas.DataBind()
|
||||
DdlEjercicio.DataBind()
|
||||
DdlCuentas.DataBind()
|
||||
DdlEjercicio.DataBind()
|
||||
DdlEjercicio.SelectedValueExist(NowADS().Year.ToString)
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||
|
||||
|
||||
End Sub
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnCargaAsignados_Click(sender As Object, e As EventArgs) Handles BtnCargaAsignados.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
If Not DdlCuentas.SelectedValue.ToEntero > 0 Then
|
||||
Alert("Debe de seleccionar una cuenta.")
|
||||
Exit Sub
|
||||
End If
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
If Not DdlCuentas.SelectedValue.ToEntero > 0 Then
|
||||
Alert("Debe de seleccionar una cuenta.")
|
||||
Exit Sub
|
||||
End If
|
||||
Dim Conta As New ClsContabilidad
|
||||
|
||||
If Conta.GetAnexoCatalogoMensual(DdlCuentas.SelectedValue.ToEntero, DdlEjercicio.SelectedValue.ToEntero, DdlSubproyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlPeriodo.SelectedValue.ToEntero) Then
|
||||
@@ -143,267 +143,267 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
|
||||
GvMensual2.DataBind()
|
||||
|
||||
If DdlTri.SelectedValue.ToEntero = 0 Then
|
||||
|
||||
GvMensual2.Columns(9).Visible = False
|
||||
GvMensual2.Columns(20).Visible = False
|
||||
GvMensual2.Columns(31).Visible = False
|
||||
GvMensual2.Columns(41).Visible = False
|
||||
|
||||
GvMensual2.Columns(13).Visible = False
|
||||
GvMensual2.Columns(27).Visible = False
|
||||
GvMensual2.Columns(42).Visible = False
|
||||
|
||||
ElseIf DdlTri.SelectedValue.ToEntero = 1 Then
|
||||
|
||||
|
||||
GvMensual2.Columns(9).Visible = True
|
||||
GvMensual2.Columns(20).Visible = True
|
||||
GvMensual2.Columns(31).Visible = True
|
||||
GvMensual2.Columns(41).Visible = True
|
||||
|
||||
GvMensual2.Columns(13).Visible = False
|
||||
GvMensual2.Columns(27).Visible = False
|
||||
GvMensual2.Columns(42).Visible = False
|
||||
|
||||
ElseIf DdlTri.SelectedValue.ToEntero = 2 Then
|
||||
|
||||
GvMensual2.Columns(9).Visible = False
|
||||
GvMensual2.Columns(20).Visible = False
|
||||
GvMensual2.Columns(31).Visible = False
|
||||
GvMensual2.Columns(41).Visible = False
|
||||
|
||||
GvMensual2.Columns(13).Visible = True
|
||||
GvMensual2.Columns(27).Visible = True
|
||||
GvMensual2.Columns(42).Visible = True
|
||||
|
||||
End If
|
||||
UpMensual.Update()
|
||||
|
||||
If GvMensual2.Rows.Count > 0 Then
|
||||
|
||||
LnkExportar.Visible = True
|
||||
UpAcciones.Update()
|
||||
|
||||
End If
|
||||
If DdlTri.SelectedValue.ToEntero = 0 Then
|
||||
|
||||
GvMensual2.Columns(9).Visible = False
|
||||
GvMensual2.Columns(20).Visible = False
|
||||
GvMensual2.Columns(31).Visible = False
|
||||
GvMensual2.Columns(41).Visible = False
|
||||
|
||||
GvMensual2.Columns(13).Visible = False
|
||||
GvMensual2.Columns(27).Visible = False
|
||||
GvMensual2.Columns(42).Visible = False
|
||||
|
||||
ElseIf DdlTri.SelectedValue.ToEntero = 1 Then
|
||||
|
||||
|
||||
GvMensual2.Columns(9).Visible = True
|
||||
GvMensual2.Columns(20).Visible = True
|
||||
GvMensual2.Columns(31).Visible = True
|
||||
GvMensual2.Columns(41).Visible = True
|
||||
|
||||
GvMensual2.Columns(13).Visible = False
|
||||
GvMensual2.Columns(27).Visible = False
|
||||
GvMensual2.Columns(42).Visible = False
|
||||
|
||||
ElseIf DdlTri.SelectedValue.ToEntero = 2 Then
|
||||
|
||||
GvMensual2.Columns(9).Visible = False
|
||||
GvMensual2.Columns(20).Visible = False
|
||||
GvMensual2.Columns(31).Visible = False
|
||||
GvMensual2.Columns(41).Visible = False
|
||||
|
||||
GvMensual2.Columns(13).Visible = True
|
||||
GvMensual2.Columns(27).Visible = True
|
||||
GvMensual2.Columns(42).Visible = True
|
||||
|
||||
End If
|
||||
UpMensual.Update()
|
||||
|
||||
If GvMensual2.Rows.Count > 0 Then
|
||||
|
||||
LnkExportar.Visible = True
|
||||
UpAcciones.Update()
|
||||
|
||||
End If
|
||||
Conta.Dispose()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GV ROW DATABOUND "
|
||||
Protected Sub GvMensual1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMensual2.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
setgrafica(e)
|
||||
Protected Sub GvMensual1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMensual2.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
setgrafica(e)
|
||||
End If
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'If e.Row.RowIndex = 0 Then
|
||||
' e.Row.Style.Add("font-weight", "bold")
|
||||
'End If
|
||||
setgrafica(e)
|
||||
|
||||
If e.Row.DataKey("Level") = "0" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
ElseIf e.Row.DataKey("Level") = "1" Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("TipoCuenta").Contiene("3", "4") Then
|
||||
' e.Row.CssClass = "Totales"
|
||||
'ElseIf e.Row.DBCampo("TipoCuenta").Contiene("1") Then
|
||||
' e.Row.CssClass = "SubTotales"
|
||||
'End If
|
||||
|
||||
Dim Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre As Decimal
|
||||
Enero = e.Row.DBCampo("Enero").ToDecimal()
|
||||
Febrero = e.Row.DBCampo("Febrero").ToDecimal()
|
||||
Marzo = e.Row.DBCampo("Marzo").ToDecimal()
|
||||
Abril = e.Row.DBCampo("Abril").ToDecimal()
|
||||
Mayo = e.Row.DBCampo("Mayo").ToDecimal()
|
||||
Junio = e.Row.DBCampo("Junio").ToDecimal()
|
||||
Julio = e.Row.DBCampo("Julio").ToDecimal()
|
||||
Agosto = e.Row.DBCampo("Agosto").ToDecimal()
|
||||
Septiembre = e.Row.DBCampo("Septiembre").ToDecimal()
|
||||
Octubre = e.Row.DBCampo("Octubre").ToDecimal()
|
||||
Noviembre = e.Row.DBCampo("Noviembre").ToDecimal()
|
||||
Diciembre = e.Row.DBCampo("Diciembre").ToDecimal()
|
||||
|
||||
|
||||
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
|
||||
|
||||
|
||||
For x = 2 To GvMensual2.Columns.Count - 1
|
||||
|
||||
If e.Row.Cells(x).Text.Replace("%", "").ToDecimal = 0 Then
|
||||
e.Row.Cells(x).Text = "-"
|
||||
ElseIf e.Row.Cells(x).Text.Replace("%", "").ToDecimal < 0 Then
|
||||
e.Row.Cells(x).ForeColor = Drawing.Color.OrangeRed
|
||||
End If
|
||||
|
||||
|
||||
If x = 2 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/01/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 3 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Febrero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/02/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Febrero.ToString("###,###,##0"), Febrero.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 6 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Marzo < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/03/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Marzo.ToString("###,###,##0"), Marzo.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 10 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Abril < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/04/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Abril.ToString("###,###,##0"), Abril.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 14 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Mayo < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/05/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Mayo.ToString("###,###,##0"), Mayo.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 17 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Junio < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/06/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Junio.ToString("###,###,##0"), Junio.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 21 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Julio < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/07/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Julio.ToString("###,###,##0"), Julio.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 24 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Agosto < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/08/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Agosto.ToString("###,###,##0"), Agosto.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 28 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Septiembre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/09/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Septiembre.ToString("###,###,##0"), Septiembre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 32 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Octubre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/10/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Octubre.ToString("###,###,##0"), Octubre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 35 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Noviembre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/11/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Noviembre.ToString("###,###,##0"), Noviembre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 38 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Diciembre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/12/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Diciembre.ToString("###,###,##0"), Diciembre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
Next
|
||||
If Enero = 0 Then
|
||||
e.Row.Cells(2).Text = "-"
|
||||
End If
|
||||
|
||||
setgrafica(e)
|
||||
|
||||
If e.Row.DataKey("Level") = "0" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
ElseIf e.Row.DataKey("Level") = "1" Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("TipoCuenta").Contiene("3", "4") Then
|
||||
' e.Row.CssClass = "Totales"
|
||||
'ElseIf e.Row.DBCampo("TipoCuenta").Contiene("1") Then
|
||||
' e.Row.CssClass = "SubTotales"
|
||||
'End If
|
||||
|
||||
Dim Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre As Decimal
|
||||
Enero = e.Row.DBCampo("Enero").ToDecimal()
|
||||
Febrero = e.Row.DBCampo("Febrero").ToDecimal()
|
||||
Marzo = e.Row.DBCampo("Marzo").ToDecimal()
|
||||
Abril = e.Row.DBCampo("Abril").ToDecimal()
|
||||
Mayo = e.Row.DBCampo("Mayo").ToDecimal()
|
||||
Junio = e.Row.DBCampo("Junio").ToDecimal()
|
||||
Julio = e.Row.DBCampo("Julio").ToDecimal()
|
||||
Agosto = e.Row.DBCampo("Agosto").ToDecimal()
|
||||
Septiembre = e.Row.DBCampo("Septiembre").ToDecimal()
|
||||
Octubre = e.Row.DBCampo("Octubre").ToDecimal()
|
||||
Noviembre = e.Row.DBCampo("Noviembre").ToDecimal()
|
||||
Diciembre = e.Row.DBCampo("Diciembre").ToDecimal()
|
||||
|
||||
|
||||
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
|
||||
|
||||
|
||||
For x = 2 To GvMensual2.Columns.Count - 1
|
||||
|
||||
If e.Row.Cells(x).Text.Replace("%", "").ToDecimal = 0 Then
|
||||
e.Row.Cells(x).Text = "-"
|
||||
ElseIf e.Row.Cells(x).Text.Replace("%", "").ToDecimal < 0 Then
|
||||
e.Row.Cells(x).ForeColor = Drawing.Color.OrangeRed
|
||||
End If
|
||||
|
||||
|
||||
If x = 2 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/01/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 3 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Febrero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/02/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Febrero.ToString("###,###,##0"), Febrero.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 6 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Marzo < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/03/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Marzo.ToString("###,###,##0"), Marzo.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 10 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Abril < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/04/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Abril.ToString("###,###,##0"), Abril.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 14 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Mayo < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/05/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Mayo.ToString("###,###,##0"), Mayo.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 17 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Junio < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/06/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Junio.ToString("###,###,##0"), Junio.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 21 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Julio < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/07/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Julio.ToString("###,###,##0"), Julio.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 24 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Agosto < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/08/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Agosto.ToString("###,###,##0"), Agosto.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 28 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Septiembre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/09/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Septiembre.ToString("###,###,##0"), Septiembre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 32 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Octubre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/10/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Octubre.ToString("###,###,##0"), Octubre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 35 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Noviembre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/11/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Noviembre.ToString("###,###,##0"), Noviembre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 38 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Diciembre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/12/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Diciembre.ToString("###,###,##0"), Diciembre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
Next
|
||||
If Enero = 0 Then
|
||||
e.Row.Cells(2).Text = "-"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub setgrafica(e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
'Dim Lista2 As New List(Of String)
|
||||
'Lista2.Add($"['{"Enero"}',{e.Row.DBCampo("Enero").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Febrero"}',{e.Row.DBCampo("Febrero").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Marzo"}',{e.Row.DBCampo("Marzo").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Abril"}',{e.Row.DBCampo("Abril").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Mayo"}',{e.Row.DBCampo("Mayo").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Junio"}',{e.Row.DBCampo("Junio").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Julio"}',{e.Row.DBCampo("Julio").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Agosto"}',{e.Row.DBCampo("Agosto").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Septiembre"}',{e.Row.DBCampo("Septiembre").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Octubre"}',{e.Row.DBCampo("Octubre").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Noviembre"}',{e.Row.DBCampo("Noviembre").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Diciembre"}',{e.Row.DBCampo("Diciembre").ToDecimal()}]")
|
||||
|
||||
Dim ListaDatos As New List(Of String)
|
||||
Dim ListaCategorias As New List(Of String)
|
||||
|
||||
ListaDatos.Add(e.Row.DBCampo("Enero").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Febrero").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Marzo").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Abril").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Mayo").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Junio").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Julio").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Agosto").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Septiembre").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Octubre").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Noviembre").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Diciembre").ToDecimal.ToString("###########0.00"))
|
||||
|
||||
ListaCategorias.Add($"""Enero""")
|
||||
ListaCategorias.Add($"""Febrero""")
|
||||
ListaCategorias.Add($"""Marzo""")
|
||||
ListaCategorias.Add($"""Abril""")
|
||||
ListaCategorias.Add($"""Mayo""")
|
||||
ListaCategorias.Add($"""Junio""")
|
||||
ListaCategorias.Add($"""Junio""")
|
||||
ListaCategorias.Add($"""Agosto""")
|
||||
ListaCategorias.Add($"""Septiembre""")
|
||||
ListaCategorias.Add($"""Octubre""")
|
||||
ListaCategorias.Add($"""Noviembre""")
|
||||
ListaCategorias.Add($"""Diciembre""")
|
||||
|
||||
Dim Titulo As String = e.Row.FCLabel("LblNombre").Text
|
||||
Dim SubTitulo As String = ""
|
||||
Dim YReferencia As String = "Valor"
|
||||
Dim Info As String = ""
|
||||
Dim XReferencia As String = "Periodos"
|
||||
Dim Promedio As String = ""
|
||||
|
||||
|
||||
'e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
|
||||
'If e.Row.DataKey("Tipo").ToEntero <> 1 Then
|
||||
'Dim Info = String.Join(",", Lista2)
|
||||
'e.Row.FCHyperLink("Hypgrafica").Attributes.Add("onclick", "$('#DivModalGrafica').modal('show'); " &
|
||||
' String.Format("graficahighchartsFinan('{0}','{1}','{2}','{3}',[{4}],1,'{5}','{6}',[{8}],[{7}],'{9}','{10}');", chartdiv2.ClientID, "", "", "$", Info, "", 0, "", "", e.Row.DBCampo("Nombre"), e.Row.FCHyperLink("Hypgrafica").ClientID))
|
||||
|
||||
|
||||
|
||||
e.Row.FCHyperLink("hpl2").Attributes.Add("onclick", "$('#DivModalGrafica').modal('show'); " &
|
||||
String.Format("graficahighchartsFinan('{0}','{1}','{2}','{3}',[{4}],'{5}','{5}','{6}',[{8}],[{7}],'{9}','{10}');", chartdiv2.ClientID, Titulo, SubTitulo, YReferencia, Info, XReferencia, Promedio, "", "", e.Row.FCCheckBox("chkgraf").ClientID, e.Row.FCHyperLink("hpl2").ClientID))
|
||||
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("class", "chksel")
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("data-name", e.Row.FCLabel("LblNombre").Text)
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("data-data", $"[{String.Join(",", ListaDatos)}]")
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("data-categorias", $"[{String.Join(",", ListaCategorias)}]")
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
e.Row.FCHyperLink("hpl2").Attributes.Add("onclick", "$('#DivModalGrafica').modal('show'); " &
|
||||
String.Format("graficahighchartsFinan('{0}','{1}','{2}','{3}',[{4}],'{5}','{5}','{6}',[{8}],[{7}],'{9}','{10}' );", chartdiv2.ClientID, "Selección multiple", "", "Valores", "", "Periodos", "", "", "", "", e.Row.FCHyperLink("hpl2").ClientID))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'Else
|
||||
' e.Row.FCHyperLink("hpl2").Visible = False
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
Public Sub setgrafica(e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
'Dim Lista2 As New List(Of String)
|
||||
'Lista2.Add($"['{"Enero"}',{e.Row.DBCampo("Enero").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Febrero"}',{e.Row.DBCampo("Febrero").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Marzo"}',{e.Row.DBCampo("Marzo").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Abril"}',{e.Row.DBCampo("Abril").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Mayo"}',{e.Row.DBCampo("Mayo").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Junio"}',{e.Row.DBCampo("Junio").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Julio"}',{e.Row.DBCampo("Julio").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Agosto"}',{e.Row.DBCampo("Agosto").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Septiembre"}',{e.Row.DBCampo("Septiembre").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Octubre"}',{e.Row.DBCampo("Octubre").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Noviembre"}',{e.Row.DBCampo("Noviembre").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Diciembre"}',{e.Row.DBCampo("Diciembre").ToDecimal()}]")
|
||||
|
||||
Dim ListaDatos As New List(Of String)
|
||||
Dim ListaCategorias As New List(Of String)
|
||||
|
||||
ListaDatos.Add(e.Row.DBCampo("Enero").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Febrero").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Marzo").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Abril").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Mayo").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Junio").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Julio").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Agosto").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Septiembre").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Octubre").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Noviembre").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Diciembre").ToDecimal.ToString("###########0.00"))
|
||||
|
||||
ListaCategorias.Add($"""Enero""")
|
||||
ListaCategorias.Add($"""Febrero""")
|
||||
ListaCategorias.Add($"""Marzo""")
|
||||
ListaCategorias.Add($"""Abril""")
|
||||
ListaCategorias.Add($"""Mayo""")
|
||||
ListaCategorias.Add($"""Junio""")
|
||||
ListaCategorias.Add($"""Junio""")
|
||||
ListaCategorias.Add($"""Agosto""")
|
||||
ListaCategorias.Add($"""Septiembre""")
|
||||
ListaCategorias.Add($"""Octubre""")
|
||||
ListaCategorias.Add($"""Noviembre""")
|
||||
ListaCategorias.Add($"""Diciembre""")
|
||||
|
||||
Dim Titulo As String = e.Row.FCLabel("LblNombre").Text
|
||||
Dim SubTitulo As String = ""
|
||||
Dim YReferencia As String = "Valor"
|
||||
Dim Info As String = ""
|
||||
Dim XReferencia As String = "Periodos"
|
||||
Dim Promedio As String = ""
|
||||
|
||||
|
||||
'e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
|
||||
'If e.Row.DataKey("Tipo").ToEntero <> 1 Then
|
||||
'Dim Info = String.Join(",", Lista2)
|
||||
'e.Row.FCHyperLink("Hypgrafica").Attributes.Add("onclick", "$('#DivModalGrafica').modal('show'); " &
|
||||
' String.Format("graficahighchartsFinan('{0}','{1}','{2}','{3}',[{4}],1,'{5}','{6}',[{8}],[{7}],'{9}','{10}');", chartdiv2.ClientID, "", "", "$", Info, "", 0, "", "", e.Row.DBCampo("Nombre"), e.Row.FCHyperLink("Hypgrafica").ClientID))
|
||||
|
||||
|
||||
|
||||
e.Row.FCHyperLink("hpl2").Attributes.Add("onclick", "$('#DivModalGrafica').modal('show'); " &
|
||||
String.Format("graficahighchartsFinan('{0}','{1}','{2}','{3}',[{4}],'{5}','{5}','{6}',[{8}],[{7}],'{9}','{10}');", chartdiv2.ClientID, Titulo, SubTitulo, YReferencia, Info, XReferencia, Promedio, "", "", e.Row.FCCheckBox("chkgraf").ClientID, e.Row.FCHyperLink("hpl2").ClientID))
|
||||
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("class", "chksel")
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("data-name", e.Row.FCLabel("LblNombre").Text)
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("data-data", $"[{String.Join(",", ListaDatos)}]")
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("data-categorias", $"[{String.Join(",", ListaCategorias)}]")
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
e.Row.FCHyperLink("hpl2").Attributes.Add("onclick", "$('#DivModalGrafica').modal('show'); " &
|
||||
String.Format("graficahighchartsFinan('{0}','{1}','{2}','{3}',[{4}],'{5}','{5}','{6}',[{8}],[{7}],'{9}','{10}' );", chartdiv2.ClientID, "Selección multiple", "", "Valores", "", "Periodos", "", "", "", "", e.Row.FCHyperLink("hpl2").ClientID))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'Else
|
||||
' e.Row.FCHyperLink("hpl2").Visible = False
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
|
||||
Dim SbFiltros As New StringBuilder()
|
||||
SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}")
|
||||
SbFiltros.AppendFormat("Cuenta : {0}|", DdlCuentas.SelectedItem.Text)
|
||||
SbFiltros.AppendFormat("Centro Costo : {0}|", If(DdlSubproyecto.SelectedValue.ToEntero > 0, DdlSubproyecto.SelectedItem.Text, "Todos"))
|
||||
SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
|
||||
|
||||
GvMensual2.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, "Anexo del Catálogo - Mensual", DatosFiltros:=SbFiltros.ToString())
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
|
||||
Dim SbFiltros As New StringBuilder()
|
||||
SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}")
|
||||
SbFiltros.AppendFormat("Cuenta : {0}|", DdlCuentas.SelectedItem.Text)
|
||||
SbFiltros.AppendFormat("Centro Costo : {0}|", If(DdlSubproyecto.SelectedValue.ToEntero > 0, DdlSubproyecto.SelectedItem.Text, "Todos"))
|
||||
SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
|
||||
|
||||
GvMensual2.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, "Anexo del Catálogo - Mensual", DatosFiltros:=SbFiltros.ToString())
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
'Protected Sub DdlGrafica_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' RegistraScript("recargaGrafica();")
|
||||
'End Sub
|
||||
|
||||
'Protected Sub DdlGrafica_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' RegistraScript("recargaGrafica();")
|
||||
'End Sub
|
||||
End Class
|
||||
@@ -6,9 +6,9 @@ Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contabilidad_RepAnexoCatalogoMensualHorizontal
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
@@ -68,9 +68,9 @@ Partial Class Contabilidad_RepAnexoCatalogoMensualHorizontal
|
||||
Set(value As Integer)
|
||||
ViewState("TP") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
Dim ErrorParametros = True
|
||||
@@ -142,10 +142,10 @@ Partial Class Contabilidad_RepAnexoCatalogoMensualHorizontal
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
|
||||
|
||||
Private Sub CargaTipoCuentas()
|
||||
'Dim ObjTipoCuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjTipoCuenta As New ClsContabilidad
|
||||
@@ -211,9 +211,9 @@ Partial Class Contabilidad_RepAnexoCatalogoMensualHorizontal
|
||||
RegistraScript("Scroll();")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
@@ -250,7 +250,7 @@ Partial Class Contabilidad_RepAnexoCatalogoMensualHorizontal
|
||||
e.Row.FCHyperLink("HLSaldoActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveSubProyecto={3}&TP={4}", e.Row.DBCampo("CveCuenta"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveSubProyecto, TipoReporte)
|
||||
e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveSubProyecto={3}&TP={4}", e.Row.DBCampo("CveCuenta"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveSubProyecto, TipoReporte)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -277,7 +277,7 @@ Partial Class Contabilidad_RepAnexoCatalogoMensualHorizontal
|
||||
params.Add(New ReportParameter("IdCuenta", IdCuenta.ToString))
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("usuarioImprimio", UsuarioActual.Nombre))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("pFechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
@@ -253,7 +253,7 @@ Partial Class FinanzasSAT_RepAnexoCatalogo
|
||||
e.Row.FCHyperLink("HLSaldoActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
' e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveSubProyecto={3}&TP={4}", e.Row.DBCampo("CveCuenta"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveSubProyecto, TipoReporte)
|
||||
' e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveSubProyecto={3}&TP={4}", e.Row.DBCampo("CveCuenta"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveSubProyecto, TipoReporte)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -527,8 +527,8 @@ Partial Class Contabilidad2_RepBalanceGeneral
|
||||
TotalActivoAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
Else
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
@@ -551,11 +551,11 @@ Partial Class Contabilidad2_RepBalanceGeneral
|
||||
|
||||
'Cuentas
|
||||
Else
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
End If
|
||||
|
||||
|
||||
@@ -583,11 +583,11 @@ Partial Class Contabilidad2_RepBalanceGeneral
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
'e.Row.ControlStyle.Font.Bold = True
|
||||
Else
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
@@ -691,27 +691,27 @@ Partial Class Contabilidad2_RepBalanceGeneral
|
||||
' If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Then
|
||||
' e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
|
||||
' e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/02/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("09/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/11/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/02/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("09/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/11/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
' e.Row.FCHyperLink("HLTrimestral1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLTrimestral2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLTrimestral3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLTrimestral4").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLTrimestral1").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLTrimestral2").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLTrimestral3").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLTrimestral4").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
' e.Row.FCHyperLink("HLCuatrimestral1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLCuatrimestral2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLCuatrimestral3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLCuatrimestral1").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLCuatrimestral2").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLCuatrimestral3").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
' End If
|
||||
|
||||
@@ -797,7 +797,7 @@ Partial Class Contabilidad2_RepBalanceGeneral
|
||||
' e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
|
||||
' For index = 1 To Anos
|
||||
' e.Row.FCHyperLink("HLAno" + index.ToString).NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), String.Format("31/12/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLAno" + index.ToString).NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), String.Format("31/12/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' Next
|
||||
|
||||
' End If
|
||||
935
Contabilidad/RepBalanceGeneralCI.aspx
Normal file
935
Contabilidad/RepBalanceGeneralCI.aspx
Normal file
@@ -0,0 +1,935 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepBalanceGeneralCI.aspx.vb" Inherits="Contabilidad_RepBalanceGeneralCI" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server" Style="margin-left: 2px"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="Imprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="CSS" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="E" runat="Server">
|
||||
BALANCE GENERAL
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" Text="Consultar" runat="server" CssClass="btn btn-default" OnClick="BtnConsultar_Click" Enabled="false" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1" style="width: 70px;">Ejercicio:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm" runat="server">
|
||||
<%-- <asp:ListItem Text="2010" Value="2010"></asp:ListItem>
|
||||
<asp:ListItem Text="2011" Value="2011"></asp:ListItem>
|
||||
<asp:ListItem Text="2012" Value="2012"></asp:ListItem>
|
||||
<asp:ListItem Text="2013" Value="2013"></asp:ListItem>
|
||||
<asp:ListItem Text="2014" Value="2014"></asp:ListItem>
|
||||
<asp:ListItem Text="2015" Value="2015"></asp:ListItem>--%>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="TdPeriodo" visible="false">
|
||||
<div class="row">
|
||||
<label class="col-md-5 truncate">Periodo:</label>
|
||||
<div class="col-md-7">
|
||||
<asp:DropDownList ID="DdlPeriodo" CssClass="form-control input-sm" runat="server">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" runat="server" id="tdTipoReporte" visible="false">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Tipo:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="TdSubTotales" visible="false">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">SubTotales:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlSubtotales" CssClass="form-control input-sm" runat="server">
|
||||
<asp:ListItem Text="Sin Subtotales" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Trimestral" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Cuatrimestral" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 90px; padding-right: 2px;">Segmento de negocio</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="form-control input-sm select2me" ID="DdlSegmentoNegocio" runat="server" DataTextField="Nombre" DataValueField="Id" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<ajax:TabContainer runat="server" ID="Tabs" AutoPostBack="true" OnActiveTabChanged="TabContainer_ActiveTabChanged">
|
||||
|
||||
<%--NORMAL--%>
|
||||
<ajax:TabPanel HeaderText="Balance General" ID="TabNormal" runat="server" Enabled="false">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<table style="width: 100%; float: left; margin-right: 20px;">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
<center>
|
||||
<h3>ACTIVO</h3>
|
||||
|
||||
<asp:UpdatePanel ID="UpActivo" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvActivo" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvActivoNoCirculante" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO NO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvActivoDiferido" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO DIFERIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<table style="width: 100%; float: left;">
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<center>
|
||||
<h3>PASIVO</h3>
|
||||
<asp:UpdatePanel ID="UpPasivo" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvPasivo" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPasivoNoCirculante" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO NO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPasivoDiferido" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO DIFERIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="275px" align="center">
|
||||
<h4>Total del Pasivo:</h4>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPasivo" width="100px" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<center>
|
||||
<h3>
|
||||
<asp:Literal Text="HACIENDA PÚBLICA/PATRIMONIO" ID="LtlTituloHacienda" runat="server" />
|
||||
</h3>
|
||||
|
||||
<asp:UpdatePanel ID="UpPatrimonio" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvPatrimonio" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PATRIMONIO CONTRIBUIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<asp:GridView ID="GvUtilidad" ShowHeader="false" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPatrimonioGenerado" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PATRIMONIO GENERADO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPatrimonioActualizacion" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="EXCESO O INSUFICIENCIA DE ACTUALIZACION"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="50%" style="text-align: center;">
|
||||
<h4>
|
||||
<asp:Literal ID="LtlTotalHacienda" Text="Total Hacienda Pública/Patrimonio:" runat="server" />
|
||||
</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPatrimonioActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPatrimonio" width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPatrimonioAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<center>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="50%" style="text-align: center;">
|
||||
<h4>Total del Activo:</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalActivoActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalActivoAnterior" width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalActivoAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<center>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td style="text-align: center; width: 50%;">
|
||||
<h4>
|
||||
<asp:Literal ID="LtlTotalPasivoPatrimonio" Text="Total del Pasivo y Patrimonio:" runat="server" />
|
||||
</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoPatrimonioActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPasivoAnterior" width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoPatrimonioAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<asp:Label runat="server" ID="LbDescuadre" ForeColor="Red" Font-Bold="false" Font-Size="Small"></asp:Label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<%--MENSUAL--%>
|
||||
<ajax:TabPanel HeaderText="Balance General Mensual" ID="TabMensual" runat="server" Enabled="false">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatosMensual" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatosMensual" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="400" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Enero">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLEnero" runat="server" Text='<%# Eval("Enero", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Febrero">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLFebrero" runat="server" Text='<%# Eval("Febrero", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Marzo">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLMarzo" runat="server" Text='<%# Eval("Marzo", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Subtotal 1er Trimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLTrimestral1" runat="server" Text='<%# Eval("Trimestral1", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abril">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAbril" runat="server" Text='<%# Eval("Abril", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Subtotal 1er Cuatrimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLCuatrimestral1" runat="server" Text='<%# Eval("Cuatrimestral1", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Mayo">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLMayo" runat="server" Text='<%# Eval("Mayo", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Junio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLJunio" runat="server" Text='<%# Eval("Junio", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Subtotal 2do Trimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLTrimestral2" runat="server" Text='<%# Eval("Trimestral2", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Julio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLJulio" runat="server" Text='<%# Eval("Julio", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Agosto">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAgosto" runat="server" Text='<%# Eval("Agosto", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Subtotal 2do Cuatrimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLCuatrimestral2" runat="server" Text='<%# Eval("Cuatrimestral2", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Septiembre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSeptiembre" runat="server" Text='<%# Eval("Septiembre", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Subtotal 3er Trimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLTrimestral3" runat="server" Text='<%# Eval("Trimestral3", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Octubre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLOctubre" runat="server" Text='<%# Eval("Octubre", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Noviembre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLNoviembre" runat="server" Text='<%# Eval("Noviembre", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Diciembre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLDiciembre" runat="server" Text='<%# Eval("Diciembre", "{0:N2}")%>' CssClass="Texto" Target="_blank" Style="margin-right: 20px"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Subtotal 4to Trimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLTrimestral4" runat="server" Text='<%# Eval("Trimestral4", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Subtotal 3er Cuatrimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLCuatrimestral3" runat="server" Text='<%# Eval("Cuatrimestral3", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<%--ANUAL--%>
|
||||
<ajax:TabPanel HeaderText="Balance General Anual" ID="TabAnual" runat="server" Enabled="false">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatosAnual" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatosAnual" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="400" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano1" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno1" runat="server" Text='<%# Eval("Ano1", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano2" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno2" runat="server" Text='<%# Eval("Ano2", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano3" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno3" runat="server" Text='<%# Eval("Ano3", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano4" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno4" runat="server" Text='<%# Eval("Ano4", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano5" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno5" runat="server" Text='<%# Eval("Ano5", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano6" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno6" runat="server" Text='<%# Eval("Ano6", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano7" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno7" runat="server" Text='<%# Eval("Ano7", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano8" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno8" runat="server" Text='<%# Eval("Ano8", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano9" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno9" runat="server" Text='<%# Eval("Ano9", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano10" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno10" runat="server" Text='<%# Eval("Ano10", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano11" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno11" runat="server" Text='<%# Eval("Ano11", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano12" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno12" runat="server" Text='<%# Eval("Ano12", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano13" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno13" runat="server" Text='<%# Eval("Ano13", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano14" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno14" runat="server" Text='<%# Eval("Ano14", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano15" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno15" runat="server" Text='<%# Eval("Ano15", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano16" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno16" runat="server" Text='<%# Eval("Ano16", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano17" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno17" runat="server" Text='<%# Eval("Ano17", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano18" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno18" runat="server" Text='<%# Eval("Ano18", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano19" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno19" runat="server" Text='<%# Eval("Ano19", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano20" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno20" runat="server" Text='<%# Eval("Ano20", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
</ajax:TabContainer>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
function pageLoad() {
|
||||
$(document).ready(function () {
|
||||
gridviewScrollMensual();
|
||||
gridviewScrollAnual();
|
||||
});
|
||||
|
||||
function gridviewScrollMensual() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 210;
|
||||
|
||||
$('#<%=GvDatosMensual.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto,
|
||||
freezesize: 1,
|
||||
headerrowcount: 1
|
||||
});
|
||||
}
|
||||
|
||||
function gridviewScrollAnual() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 210;
|
||||
|
||||
$('#<%=GvDatosAnual.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto,
|
||||
freezesize: 1,
|
||||
headerrowcount: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
1169
Contabilidad/RepBalanceGeneralCI.aspx.vb
Normal file
1169
Contabilidad/RepBalanceGeneralCI.aspx.vb
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -296,7 +296,7 @@ Partial Class Contabilidad_RepBalanceGeneralVertical
|
||||
|
||||
'LIGA SOLO EN DETALLE POR CAMPO CVECUENTA - TEMPORAL
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "1" Then
|
||||
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogoAnual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}&V=1"
|
||||
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad/RepAnexoCatalogoAnual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}&V=1"
|
||||
End If
|
||||
|
||||
|
||||
@@ -1,28 +1,15 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepBalanzaComprobacion.aspx.vb" Inherits="Contabilidad_RepBalanzaComprobacion" %>
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepBalanzaComprobacion.aspx.vb" Inherits="Contabilidad2_RepBalanzaComprobacion" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" >
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" Visible="true" /> --%>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgExcel" />
|
||||
<asp:PostBackTrigger ControlID="BtnImprimir" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" Visible="true" /> --%>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
@@ -36,123 +23,189 @@
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" Enabled="false"/>
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" ValidationGroup="GrpConsulta" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption" style="margin-left:10px;margin-top:2px">
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Fecha Inicio:</label>
|
||||
<label class="col-md-1 ">Fecha Inicio:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVTxtFechaDel" runat="server" ControlToValidate="TxtFechaDel" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaDel" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaDel" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Fecha Fin:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVTxtFechaAl" runat="server" ControlToValidate="TxtFechaAl" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaAl" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaAl" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Cuentas:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="form-control input-sm" runat="server" ID="DdlTipoCuentas" Width="150px" Height="28px">
|
||||
<asp:DropDownList CssClass="form-control input-sm select2me" runat="server" ID="DdlTipoCuentas" Width="150px">
|
||||
<asp:ListItem Text="Todas" Value="1" />
|
||||
<asp:ListItem Text="Con Movimientos" Value="2" />
|
||||
<asp:ListItem Text="Saldo Actual no igual a cero" Value="3" />
|
||||
<asp:ListItem Text="Con Movimientos y saldo no igual a cero" Value="4" />
|
||||
<asp:ListItem Text="Con Movimientos o saldo no igual a cero " Value="5" />
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlTipoCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="display:none;">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-2" style="display:none;">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" runat="server" visible="false">Tipo:</label>
|
||||
<div class="col-md-2" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1" >Nivel: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlNivel" runat="server" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" >
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayores" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Último nivel" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Vista: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlVista" runat="server" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" >
|
||||
<asp:ListItem Selected="True" Text="Contable" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="SAT" Value="1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
<table id="Tbl" runat="server" style="width: 1000px; float: left;">
|
||||
<tr>
|
||||
<td width="100%" padding="0" style="background-color:white!important">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px" align="left;">
|
||||
|
||||
<input type="text" id="TxtBusquedaIndicadores" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaIndicadores','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaIndicadores','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-advance table-striped table-hover Widthall ScrollAD" data-sort="true" runat="server" GridLines="None" EmptyDataText="No se encontraron cuentas con los parametros establecidos." AutoGenerateColumns="False" OnRowDataBound="GvIngresos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="180" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Iniciales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbSaldoInicial" Style="white-space: pre;" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Actuales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSaldoActual" Style="white-space: pre;" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<asp:Label ID="LbSaldoActual" Style="white-space: pre;" runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
|
||||
runat="server" GridLines="None" EmptyDataText="No se encontraron cuentas con los parametros establecidos." AutoGenerateColumns="False" OnRowDataBound="GvIngresos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="180" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Iniciales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbSaldoInicial" Style="white-space: pre;" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Actuales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSaldoActual" Style="white-space: pre;" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<asp:Label ID="LbSaldoActual" Style="white-space: pre;" runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contabilidad_RepBalanzaComprobacion
|
||||
Partial Class Contabilidad2_RepBalanzaComprobacion
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
@@ -53,58 +54,100 @@ Partial Class Contabilidad_RepBalanzaComprobacion
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveProyecto As Integer
|
||||
Get
|
||||
CveProyecto = ViewState("CveProyecto").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveSubProyecto As Integer
|
||||
Get
|
||||
CveSubProyecto = ViewState("CveSubProyecto").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveSubProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
' Response.Redirect($"/Contabilidad/RepBalanzaComprobacion.aspx")
|
||||
'End If
|
||||
|
||||
Dim ErrorParametros = True
|
||||
ModoImpresion = False
|
||||
TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
|
||||
TxtFechaAl.Text = NowADS().ToShortDateString
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then
|
||||
BtnConsultar.Enabled = True
|
||||
If Request("ID") IsNot Nothing AndAlso IsNumeric(Request("ID")) AndAlso Request("ID").ToEntero > 0 Then
|
||||
'If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
IdCuenta = Request("ID").ToEntero
|
||||
'FechaInicio = Request("FI").ToDate
|
||||
FechaFin = Request("FF").ToDate
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
ErrorParametros = False
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
|
||||
If Not ErrorParametros Then
|
||||
CargaDatos()
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
'If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
IdCuenta = Request("CveCuenta").ToEntero
|
||||
'FechaInicio = Request("FI").ToDate
|
||||
FechaFin = Request("FF").ToDate
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
ErrorParametros = False
|
||||
End If
|
||||
|
||||
If IsNothing(DtDatos) Then
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
CargaDatos()
|
||||
End If
|
||||
Else
|
||||
Alert("La empresa no usa Armonización Contable o Contabilidad.", TipoMensaje.MsgAdvertencia)
|
||||
'End If
|
||||
End If
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
If Not ErrorParametros Then
|
||||
CargaDatos()
|
||||
End If
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos")
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
' Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, DdlTipoCuentas.SelectedValue.ToEntero) Then
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero.ToEntero
|
||||
CveProyecto = DdlProyecto.SelectedValue.ToEntero.ToEntero
|
||||
|
||||
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
|
||||
If TipoReporte = 1 Then
|
||||
'mostrar cuales son las cuentas que no tienen asignado el agrupador que sean afectables
|
||||
|
||||
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||
Dim dtt As DataTable = ObjConta.DtResultados.FiltraParametros("CveAgrupadorSAT is null and not Codigo like '_%'")
|
||||
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
||||
Dim str As New StringBuilder
|
||||
For Each dr As DataRow In dtt.Rows
|
||||
str.AppendFormat(" - {0} </br>", dr("CtaCodigo"))
|
||||
Next
|
||||
Alert(str.ToString)
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, DdlTipoCuentas.SelectedValue.ToEntero, TipoReporte, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, DdlVista.SelectedValue.ToEntero, DdlNivel.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
|
||||
CargaGrid()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
CargaGrid()
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
@@ -126,7 +169,7 @@ Partial Class Contabilidad_RepBalanzaComprobacion
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CtaMayor") = "1" Or e.Row.DBCampo("CtaMayor") = "1" Then
|
||||
If e.Row.DBCampo("CtaMayor") = "1" OrElse e.Row.DBCampo("CtaMayor") = "3" OrElse e.Row.DBCampo("CtaMayor") = "4" Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
End If
|
||||
|
||||
@@ -152,6 +195,7 @@ Partial Class Contabilidad_RepBalanzaComprobacion
|
||||
|
||||
'Total general
|
||||
If e.Row.DBCampo("Id") = "" Then
|
||||
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
e.Row.ControlStyle.Font.Size = 9
|
||||
e.Row.ControlStyle.Height = 30
|
||||
@@ -162,51 +206,19 @@ Partial Class Contabilidad_RepBalanzaComprobacion
|
||||
e.Row.FCLabel("LbSaldoActual").Visible = True
|
||||
e.Row.FCLabel("LbSaldoActual").Text = String.Format("{0} <br/>{1}", e.Row.DBCampo("SaldoAD").FormatoNumero, e.Row.DBCampo("SaldoAA").FormatoNumero)
|
||||
Else
|
||||
If ModoImpresion Then e.Row.Cells(5).Text = e.Row.FCHyperLink("HLSaldoActual").Text Else e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("ID"), FechaFin.ToShortDateString)
|
||||
If ModoImpresion Then e.Row.Cells(5).Text = e.Row.FCHyperLink("HLSaldoActual").Text Else e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("ID"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveProyecto, CveSubProyecto)
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click
|
||||
ModoImpresion = True
|
||||
CargaGrid()
|
||||
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
CargaDatos()
|
||||
|
||||
'RegistraScript("Enable();")
|
||||
ImprimirReporte()
|
||||
|
||||
GenerarPDFCrystal()
|
||||
|
||||
'Using sw As New StringWriter()
|
||||
' Using hw As New HtmlTextWriter(sw)
|
||||
|
||||
' Dim style As StringBuilder = New StringBuilder()
|
||||
' style.Append("<style> ")
|
||||
' style.Append(File.ReadAllText(ModExtensiones.DirectorioBaseEmpresas & "Styles\EstilosExcel.css"))
|
||||
' style.Append(" </style> ")
|
||||
' 'To Export all pages
|
||||
' 'Gv.AllowPaging = False
|
||||
' 'Gv.DataBind()
|
||||
' Tbl.RenderControl(hw)
|
||||
' Dim sr As New StringReader(sw.ToString())
|
||||
' Dim pdfDoc As New Document(PageSize.A2, 10.0F, 10.0F, 10.0F, 0.0F)
|
||||
' Dim htmlparser As New HTMLWorker(pdfDoc)
|
||||
' PdfWriter.GetInstance(pdfDoc, Response.OutputStream)
|
||||
' pdfDoc.Open()
|
||||
' htmlparser.Parse(sr)
|
||||
' pdfDoc.Close()
|
||||
|
||||
' Response.ContentType = "application/pdf"
|
||||
' Response.AddHeader("content-disposition", "attachment;filename=BalanzaComprobacion.pdf")
|
||||
' Response.Cache.SetCacheability(HttpCacheability.NoCache)
|
||||
' Response.Write(style.ToString)
|
||||
' Response.Write(pdfDoc)
|
||||
' Response.[End]()
|
||||
' End Using
|
||||
'End Using
|
||||
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
@@ -216,58 +228,25 @@ Partial Class Contabilidad_RepBalanzaComprobacion
|
||||
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'GvDatos.ExportToExcel("BalanzaComprobacion")
|
||||
ModoImpresion = True
|
||||
CargaGrid()
|
||||
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
|
||||
'RegistraScript("Enable();")
|
||||
|
||||
GenerarPDFCrystal("EXCEL")
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
Private Sub GenerarPDFCrystal(Optional Formato As String = "PDF")
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Contabilidad/Reportes/RepBalanzaComprobacion.rpt", Server.MapPath("~")))
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "Contabilidad/Reportes/RepBalanzaComprobacion.rdlc"
|
||||
'nombre del reporte
|
||||
Dim fileName As String = "BalanzaComprobacion"
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
'If UsuarioActual.CveUsuario = 100 Then
|
||||
' Alert(String.Format("{0}Contabilidad/Reportes/RepBalanzaComprobacion.rpt", Server.MapPath("~")))
|
||||
' End If
|
||||
' Exit Sub
|
||||
|
||||
If Not IsNothing(DtDatos) Then
|
||||
'Dim dr As DataRow = DtCxC.Rows(0)
|
||||
Dim lista = New List(Of CrystalParametro)
|
||||
lista.Add(New CrystalParametro("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
lista.Add(New CrystalParametro("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
lista.Add(New CrystalParametro("pFechaIni", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
lista.Add(New CrystalParametro("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
Dim DTTemp As DataTable = DtDatos.Copy
|
||||
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Contabilidad/Reportes/RepBalanzaComprobacion.rpt"), DTTemp, lista, "Balanza de Comprobación", Formato), "Balanza de Comprobación", Formato)
|
||||
|
||||
Else
|
||||
Alert("No se tienen registrados movimientos", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("pFechaIni", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
'Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
' Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
' 'ubicacion del rdlc
|
||||
' Dim reportpath As String = "Contabilidad/Reportes/RepBalanzaComprobacion.rdlc"
|
||||
' 'nombre del reporte
|
||||
' Dim fileName As String = "BalanzaComprobacion"
|
||||
' 'parametros a enviar al reporte
|
||||
' Dim params As New List(Of ReportParameter)
|
||||
' params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
' params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
' params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
' params.Add(New ReportParameter("pFechaIni", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
|
||||
' ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
'End Sub
|
||||
|
||||
End Class
|
||||
|
||||
158
Contabilidad/RepBalanzaComprobacionCI.aspx
Normal file
158
Contabilidad/RepBalanzaComprobacionCI.aspx
Normal file
@@ -0,0 +1,158 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepBalanzaComprobacionCI.aspx.vb" Inherits="Contabilidad_RepBalanzaComprobacion" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" >
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" Visible="true" /> --%>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgExcel" />
|
||||
<asp:PostBackTrigger ControlID="BtnImprimir" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Balanza de Comprobación
|
||||
<asp:Label runat="server" ID="LbTitulo"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" Enabled="false"/>
|
||||
</div>
|
||||
<div class="titlefiltros caption" style="margin-left:10px;margin-top:2px">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Fecha Inicio:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Fecha Fin:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Cuentas:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="form-control input-sm" runat="server" ID="DdlTipoCuentas" Width="150px" Height="28px">
|
||||
<asp:ListItem Text="Todas" Value="1" />
|
||||
<asp:ListItem Text="Con Movimientos" Value="2" />
|
||||
<asp:ListItem Text="Saldo Actual no igual a cero" Value="3" />
|
||||
<asp:ListItem Text="Con Movimientos y saldo no igual a cero" Value="4" />
|
||||
<asp:ListItem Text="Con Movimientos o saldo no igual a cero " Value="5" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
<table id="Tbl" runat="server" style="width: 1000px; float: left;">
|
||||
<tr>
|
||||
<td width="100%" padding="0" style="background-color:white!important">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-advance table-striped table-hover Widthall ScrollAD" data-sort="true" runat="server" GridLines="None" EmptyDataText="No se encontraron cuentas con los parametros establecidos." AutoGenerateColumns="False" OnRowDataBound="GvIngresos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="180" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Iniciales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbSaldoInicial" Style="white-space: pre;" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Actuales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSaldoActual" Style="white-space: pre;" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<asp:Label ID="LbSaldoActual" Style="white-space: pre;" runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
273
Contabilidad/RepBalanzaComprobacionCI.aspx.vb
Normal file
273
Contabilidad/RepBalanzaComprobacionCI.aspx.vb
Normal file
@@ -0,0 +1,273 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contabilidad_RepBalanzaComprobacion
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicio As Date
|
||||
Get
|
||||
FechaInicio = ViewState("FechaInicio").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFin As Date
|
||||
Get
|
||||
FechaFin = ViewState("FechaFin").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IdCuenta As Integer
|
||||
Get
|
||||
IdCuenta = ViewState("IdCuenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("IdCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property ModoImpresion As Boolean
|
||||
Get
|
||||
ModoImpresion = CType(ViewState("ModoImpresion"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ModoImpresion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
Dim ErrorParametros = True
|
||||
ModoImpresion = False
|
||||
TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
|
||||
TxtFechaAl.Text = NowADS().ToShortDateString
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then
|
||||
BtnConsultar.Enabled = True
|
||||
If Request("ID") IsNot Nothing AndAlso IsNumeric(Request("ID")) AndAlso Request("ID").ToEntero > 0 Then
|
||||
'If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
IdCuenta = Request("ID").ToEntero
|
||||
'FechaInicio = Request("FI").ToDate
|
||||
FechaFin = Request("FF").ToDate
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
ErrorParametros = False
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
|
||||
If Not ErrorParametros Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
If IsNothing(DtDatos) Then
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
CargaDatos()
|
||||
End If
|
||||
Else
|
||||
Alert("La empresa no usa Armonización Contable o Contabilidad.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, DdlTipoCuentas.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
|
||||
CargaGrid()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
|
||||
CargaDatos()
|
||||
|
||||
RegistraScript("Enable();")
|
||||
End Sub
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CtaMayor") = "1" Or e.Row.DBCampo("CtaMayor") = "1" Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
End If
|
||||
|
||||
'Acomoda Deudor y Acreedor
|
||||
If e.Row.DBCampo("CveTipo") = "1" Then
|
||||
e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0} ", e.Row.DBCampo("SaldoInicial").FormatoNumero)
|
||||
e.Row.FCLabel("LbSaldoActual").Text = " "
|
||||
End If
|
||||
|
||||
'Colorea NEGATIVOS
|
||||
If e.Row.DBCampo("SaldoInicial").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Cargos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Abonos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("SaldoActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLSaldoActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
'Total general
|
||||
If e.Row.DBCampo("Id") = "" Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
e.Row.ControlStyle.Font.Size = 9
|
||||
e.Row.ControlStyle.Height = 30
|
||||
e.Row.FCLabel("LbNombre").Text = "Sumas Iguales"
|
||||
e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0} <br/>{1}", e.Row.DBCampo("SaldoID").FormatoNumero, e.Row.DBCampo("SaldoIA").FormatoNumero)
|
||||
e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("TotalCargos").FormatoNumero
|
||||
e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("TotalAbonos").FormatoNumero
|
||||
e.Row.FCLabel("LbSaldoActual").Visible = True
|
||||
e.Row.FCLabel("LbSaldoActual").Text = String.Format("{0} <br/>{1}", e.Row.DBCampo("SaldoAD").FormatoNumero, e.Row.DBCampo("SaldoAA").FormatoNumero)
|
||||
Else
|
||||
If ModoImpresion Then e.Row.Cells(5).Text = e.Row.FCHyperLink("HLSaldoActual").Text Else e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("ID"), FechaFin.ToShortDateString)
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click
|
||||
ModoImpresion = True
|
||||
CargaGrid()
|
||||
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
|
||||
'RegistraScript("Enable();")
|
||||
|
||||
GenerarPDFCrystal()
|
||||
|
||||
'Using sw As New StringWriter()
|
||||
' Using hw As New HtmlTextWriter(sw)
|
||||
|
||||
' Dim style As StringBuilder = New StringBuilder()
|
||||
' style.Append("<style> ")
|
||||
' style.Append(File.ReadAllText(ModExtensiones.DirectorioBaseEmpresas & "Styles\EstilosExcel.css"))
|
||||
' style.Append(" </style> ")
|
||||
' 'To Export all pages
|
||||
' 'Gv.AllowPaging = False
|
||||
' 'Gv.DataBind()
|
||||
' Tbl.RenderControl(hw)
|
||||
' Dim sr As New StringReader(sw.ToString())
|
||||
' Dim pdfDoc As New Document(PageSize.A2, 10.0F, 10.0F, 10.0F, 0.0F)
|
||||
' Dim htmlparser As New HTMLWorker(pdfDoc)
|
||||
' PdfWriter.GetInstance(pdfDoc, Response.OutputStream)
|
||||
' pdfDoc.Open()
|
||||
' htmlparser.Parse(sr)
|
||||
' pdfDoc.Close()
|
||||
|
||||
' Response.ContentType = "application/pdf"
|
||||
' Response.AddHeader("content-disposition", "attachment;filename=BalanzaComprobacion.pdf")
|
||||
' Response.Cache.SetCacheability(HttpCacheability.NoCache)
|
||||
' Response.Write(style.ToString)
|
||||
' Response.Write(pdfDoc)
|
||||
' Response.[End]()
|
||||
' End Using
|
||||
'End Using
|
||||
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'GvDatos.ExportToExcel("BalanzaComprobacion")
|
||||
ModoImpresion = True
|
||||
CargaGrid()
|
||||
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
|
||||
'RegistraScript("Enable();")
|
||||
|
||||
GenerarPDFCrystal("EXCEL")
|
||||
End Sub
|
||||
Private Sub GenerarPDFCrystal(Optional Formato As String = "PDF")
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Contabilidad/Reportes/RepBalanzaComprobacion.rpt", Server.MapPath("~")))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
'If UsuarioActual.CveUsuario = 100 Then
|
||||
' Alert(String.Format("{0}Contabilidad/Reportes/RepBalanzaComprobacion.rpt", Server.MapPath("~")))
|
||||
' End If
|
||||
' Exit Sub
|
||||
|
||||
If Not IsNothing(DtDatos) Then
|
||||
'Dim dr As DataRow = DtCxC.Rows(0)
|
||||
Dim lista = New List(Of CrystalParametro)
|
||||
lista.Add(New CrystalParametro("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
lista.Add(New CrystalParametro("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
lista.Add(New CrystalParametro("pFechaIni", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
lista.Add(New CrystalParametro("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
Dim DTTemp As DataTable = DtDatos.Copy
|
||||
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Contabilidad/Reportes/RepBalanzaComprobacion.rpt"), DTTemp, lista, "Balanza de Comprobación", Formato), "Balanza de Comprobación", Formato)
|
||||
|
||||
Else
|
||||
Alert("No se tienen registrados movimientos", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
'Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
' Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
' 'ubicacion del rdlc
|
||||
' Dim reportpath As String = "Contabilidad/Reportes/RepBalanzaComprobacion.rdlc"
|
||||
' 'nombre del reporte
|
||||
' Dim fileName As String = "BalanzaComprobacion"
|
||||
' 'parametros a enviar al reporte
|
||||
' Dim params As New List(Of ReportParameter)
|
||||
' params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
' params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
' params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
' params.Add(New ReportParameter("pFechaIni", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
|
||||
' ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
'End Sub
|
||||
|
||||
End Class
|
||||
500
Contabilidad/RepEstadoActividades.aspx.vb
Normal file
500
Contabilidad/RepEstadoActividades.aspx.vb
Normal file
@@ -0,0 +1,500 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Drawing
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepEstadoActividades
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtIngresos As DataTable
|
||||
Get
|
||||
DtIngresos = DirectCast(ViewState("DtIngresos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtIngresos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtGastos As DataTable
|
||||
Get
|
||||
DtGastos = DirectCast(ViewState("DtGastos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtGastos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActual As Double
|
||||
Get
|
||||
TotalActual = ViewState("TotalActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalAnterior As Double
|
||||
Get
|
||||
TotalAnterior = ViewState("TotalAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaI As String
|
||||
Get
|
||||
Return ViewState("FechaI").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaI") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaF As String
|
||||
Get
|
||||
Return ViewState("FechaF").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaF") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property ReporteComplementario As Boolean
|
||||
Get
|
||||
ReporteComplementario = CBool(ViewState("ReporteComplementario").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ReporteComplementario") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
ReporteComplementario = False
|
||||
Else
|
||||
ReporteComplementario = False
|
||||
DivTipo1.Visible = False
|
||||
DivTipo2.Visible = False
|
||||
LtTitulo.Text = "Estado de Resultados"
|
||||
End If
|
||||
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString
|
||||
'TxtFechaFin.Text = NowADS().ToShortDateString
|
||||
CargaEjercicios()
|
||||
|
||||
CargaDatos()
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.GrupoEmpresa > 0 And UsuarioActual.CveRol = 1 Then
|
||||
DVConsolidado1.Visible = True
|
||||
DVConsolidado2.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
DVSubtotales1.Visible = True
|
||||
DVSubtotales2.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEjercicios()
|
||||
'Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ClsConta As New ClsContabilidad
|
||||
If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
If DdlEjercicio.Items.Count = 0 Then
|
||||
DdlEjercicio.Items.Add(New ListItem(NowADS().Year.ToString, NowADS().Year.ToString))
|
||||
End If
|
||||
DdlPeriodo.SelectedValue = NowADS().Month.ToString
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos")
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero 'If(ReporteComplementario, DdlTipoReporte.SelectedValue.ToEntero, 1)
|
||||
Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
|
||||
Dim CveProyecto As Integer = DdlProyecto.SelectedValue.ToEntero
|
||||
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetEstadoActividades(FechaI.ToDate, FechaF.ToDate, TipoReporte, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, Opcion:=DdlOpcion.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Estado de Actividades", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
CargaGrids()
|
||||
SumaTotales()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGrids()
|
||||
DtIngresos = DtDatos.FiltraParametros("Tipo ='H' ")
|
||||
DtGastos = DtDatos.FiltraParametros("Tipo ='G' ")
|
||||
Dim Row As DataRow = DtIngresos.NewRow
|
||||
|
||||
|
||||
Dim TotalActual = 0.0, TotalAnterior = 0.0
|
||||
If DtIngresos.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As DataRow In DtIngresos.FiltraParametros("NOT CtaMayor in (3,4)").Rows
|
||||
TotalActual += dr("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
|
||||
Next
|
||||
|
||||
Row.Item("Nombre") = "TOTAL INGRESOS "
|
||||
Row.Item("ImporteActual") = TotalActual.ToString
|
||||
Row.Item("PorcentajeActual") = "100.00"
|
||||
Row.Item("ImporteAcumulado") = TotalAnterior.ToString
|
||||
Row.Item("PorcentajeAcumulado") = "100.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtIngresos.Rows.Add(Row)
|
||||
Else
|
||||
Row.Item("Nombre") = "TOTAL INGRESOS "
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAcumulado") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtIngresos.Rows.Add(Row)
|
||||
End If
|
||||
|
||||
Dim T1 = TotalActual, T2 = TotalAnterior
|
||||
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
|
||||
Row = DtGastos.NewRow
|
||||
If DtGastos.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As DataRow In DtGastos.FiltraParametros("NOT CtaMayor in (3,4)").Rows
|
||||
TotalActual += dr("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
|
||||
Next
|
||||
|
||||
Row.Item("Nombre") = "TOTAL GASTOS"
|
||||
Row.Item("ImporteActual") = TotalActual
|
||||
Row.Item("PorcentajeActual") = If(T1 > 0, (TotalActual * 100 / T1).ToString, "0").FormatoNumero
|
||||
Row.Item("ImporteAcumulado") = TotalAnterior.ToString
|
||||
Row.Item("PorcentajeAcumulado") = If(T2 > 0, (TotalAnterior * 100 / T2).ToString, "0").FormatoNumero
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtGastos.Rows.Add(Row)
|
||||
Else
|
||||
Row.Item("Nombre") = "TOTAL GASTOS"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAcumulado") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtGastos.Rows.Add(Row)
|
||||
End If
|
||||
|
||||
DtGastos.AcceptChanges()
|
||||
|
||||
|
||||
If DdlVerConSubTotales.SelectedValue.ToEntero = 1 Then
|
||||
|
||||
Dim idxUtilidadBruta As Integer = 0
|
||||
Dim idxUtilidadOperacion As Integer = 0
|
||||
Dim idxUtilidadAntesImpuestos As Integer = 0
|
||||
|
||||
Dim IndexActual As Integer = 0
|
||||
For Each dRow As DataRow In DtGastos.Rows
|
||||
|
||||
If dRow("Codigo").ToString.Contains("6000000") Then 'Utilidad Bruta indice que se tomara
|
||||
idxUtilidadBruta = IndexActual
|
||||
IndexActual = IndexActual + 2 'Son mas dos por que se esta conciderando el row en blanco
|
||||
End If
|
||||
|
||||
If dRow("Codigo").ToString.Contains("7000000") Then 'Utilidad de Operación
|
||||
idxUtilidadOperacion = IndexActual
|
||||
IndexActual = IndexActual + 2 'Son mas dos por que se esta conciderando el row en blanco
|
||||
End If
|
||||
|
||||
If dRow("Nombre").ToString.Contains("TOTAL GASTOS") Then 'Utilidad antes de impuestos
|
||||
idxUtilidadAntesImpuestos = IndexActual
|
||||
End If
|
||||
|
||||
IndexActual = IndexActual + 1
|
||||
Next
|
||||
|
||||
DtGastos.AcceptChanges()
|
||||
|
||||
|
||||
Dim UtilidadBrutaActual, UtilidadBrutaAcumulada, UtilidadBrutPorcentajeActual, UtilidadBrutPorcentajeAcumulado As Decimal
|
||||
|
||||
Dim UtilidadOperacionActual, UtilidadOperacionAcumulada, UtilidadOperacionPorcentajeActual, UtilidadOperacionPorcentajeAcumulado As Decimal
|
||||
|
||||
Dim UtilidadAntesImpuestosActual, UtilidadAntesImpuestosAcumulada, UtilidadAntesImpuestosPorcentajeActual, UtilidadAntesImpuestosPorcentajeAcumulado As Decimal
|
||||
|
||||
|
||||
Dim IngresoActual As Decimal = DtIngresos.SUMD("ImporteActual", " CtaMayor = 1 ")
|
||||
Dim IngresoAcumulado As Decimal = DtIngresos.SUMD("ImporteAcumulado", " CtaMayor = 1 ")
|
||||
|
||||
Dim CostoActual As Decimal = DtGastos.SUMD("ImporteActual", " Codigo LIKE '5%' AND CtaMayor = 1 ")
|
||||
Dim CostoAcumulado As Decimal = DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '5%' AND CtaMayor = 1")
|
||||
|
||||
Dim GastoActual As Decimal = DtGastos.SUMD("ImporteActual", " Codigo LIKE '6%' AND CtaMayor = 1 ")
|
||||
Dim GastoAcumulado As Decimal = DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '6%' AND CtaMayor = 1 ")
|
||||
|
||||
Dim ResultadoIntegralActual As Decimal = DtGastos.SUMD("ImporteActual", " Codigo LIKE '7%' AND CtaMayor = 1 ")
|
||||
Dim ResultadoIntegralAcumulado As Decimal = DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '7%' AND CtaMayor = 1 ")
|
||||
|
||||
|
||||
UtilidadBrutaActual = IngresoActual - CostoActual
|
||||
UtilidadBrutaAcumulada = IngresoAcumulado - CostoAcumulado
|
||||
|
||||
UtilidadOperacionActual = IngresoActual - CostoActual - GastoActual
|
||||
UtilidadOperacionAcumulada = IngresoAcumulado - CostoAcumulado - GastoAcumulado
|
||||
|
||||
UtilidadAntesImpuestosActual = IngresoActual - CostoActual - GastoActual - ResultadoIntegralActual
|
||||
UtilidadAntesImpuestosAcumulada = IngresoAcumulado - CostoAcumulado - GastoAcumulado - ResultadoIntegralAcumulado
|
||||
|
||||
|
||||
UtilidadBrutPorcentajeActual = If(IngresoActual <> 0 And UtilidadBrutaActual <> 0, (UtilidadBrutaActual / IngresoActual * 100), 0)
|
||||
UtilidadBrutPorcentajeAcumulado = If(IngresoAcumulado <> 0 And UtilidadBrutaAcumulada <> 0, (UtilidadBrutaAcumulada / IngresoAcumulado * 100), 0)
|
||||
|
||||
UtilidadOperacionPorcentajeActual = If(IngresoActual <> 0 And UtilidadOperacionActual <> 0, (UtilidadOperacionActual / IngresoActual * 100), 0)
|
||||
UtilidadOperacionPorcentajeAcumulado = If(IngresoAcumulado <> 0 And UtilidadOperacionAcumulada <> 0, (UtilidadOperacionAcumulada / IngresoAcumulado * 100), 0)
|
||||
|
||||
UtilidadAntesImpuestosPorcentajeActual = If(IngresoActual <> 0 And UtilidadAntesImpuestosActual <> 0, (UtilidadAntesImpuestosActual / IngresoActual * 100), 0)
|
||||
UtilidadAntesImpuestosPorcentajeAcumulado = If(IngresoAcumulado <> 0 And UtilidadAntesImpuestosAcumulada <> 0, (UtilidadAntesImpuestosAcumulada / IngresoAcumulado * 100), 0)
|
||||
|
||||
|
||||
Dim dRowUtilidadBruta As DataRow = DtGastos.NewRow
|
||||
Dim dRowUtilidadBrutaVacio As DataRow = DtGastos.NewRow
|
||||
|
||||
Dim dRowUtilidadOperacion As DataRow = DtGastos.NewRow
|
||||
Dim dRowUtilidadOperacionVacio As DataRow = DtGastos.NewRow
|
||||
|
||||
Dim dRowUtilidadAntesImpuestos As DataRow = DtGastos.NewRow
|
||||
Dim dRowUtilidadAntesImpuestosVacio As DataRow = DtGastos.NewRow
|
||||
|
||||
|
||||
|
||||
dRowUtilidadBruta("Nombre") = "Utilidad Bruta"
|
||||
dRowUtilidadBruta("ImporteActual") = UtilidadBrutaActual
|
||||
dRowUtilidadBruta("ImporteAcumulado") = UtilidadBrutaAcumulada
|
||||
dRowUtilidadBruta("CtaMayor") = -1
|
||||
dRowUtilidadBruta("Orden") = "600"
|
||||
dRowUtilidadBruta("PorcentajeActual") = UtilidadBrutPorcentajeActual
|
||||
dRowUtilidadBruta("PorcentajeAcumulado") = UtilidadBrutPorcentajeAcumulado
|
||||
dRowUtilidadBrutaVacio("CtaMayor") = -1
|
||||
dRowUtilidadBrutaVacio("Orden") = "600"
|
||||
|
||||
dRowUtilidadOperacion("Nombre") = "Utilidad de Operación"
|
||||
dRowUtilidadOperacion("ImporteActual") = UtilidadOperacionActual
|
||||
dRowUtilidadOperacion("ImporteAcumulado") = UtilidadOperacionAcumulada
|
||||
dRowUtilidadOperacion("CtaMayor") = -1
|
||||
dRowUtilidadOperacion("Orden") = "700"
|
||||
dRowUtilidadOperacion("PorcentajeActual") = UtilidadOperacionPorcentajeActual
|
||||
dRowUtilidadOperacion("PorcentajeAcumulado") = UtilidadOperacionPorcentajeAcumulado
|
||||
dRowUtilidadOperacionVacio("CtaMayor") = -1
|
||||
dRowUtilidadOperacionVacio("Orden") = "700"
|
||||
|
||||
dRowUtilidadAntesImpuestos("Nombre") = "Utilidad antes de impuestos"
|
||||
dRowUtilidadAntesImpuestos("ImporteActual") = UtilidadAntesImpuestosActual
|
||||
dRowUtilidadAntesImpuestos("ImporteAcumulado") = UtilidadAntesImpuestosAcumulada
|
||||
dRowUtilidadAntesImpuestos("CtaMayor") = -1
|
||||
dRowUtilidadAntesImpuestos("Orden") = "790"
|
||||
dRowUtilidadAntesImpuestos("PorcentajeActual") = UtilidadAntesImpuestosPorcentajeActual
|
||||
dRowUtilidadAntesImpuestos("PorcentajeAcumulado") = UtilidadAntesImpuestosPorcentajeAcumulado
|
||||
dRowUtilidadAntesImpuestosVacio("CtaMayor") = -1
|
||||
dRowUtilidadAntesImpuestosVacio("Orden") = "790"
|
||||
|
||||
'PorcentajeActual
|
||||
'PorcentajeAcumulado
|
||||
|
||||
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadBruta, idxUtilidadBruta)
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadBrutaVacio, idxUtilidadBruta + 1)
|
||||
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadOperacion, idxUtilidadOperacion)
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadOperacionVacio, idxUtilidadOperacion + 1)
|
||||
|
||||
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadAntesImpuestos, idxUtilidadAntesImpuestos)
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadAntesImpuestosVacio, idxUtilidadAntesImpuestos + 1)
|
||||
|
||||
'ImporteActual
|
||||
'ImporteAcumulado
|
||||
|
||||
DtGastos.AcceptChanges()
|
||||
End If
|
||||
|
||||
|
||||
GvIngresos.DataSource = DtIngresos
|
||||
GvIngresos.DataBind()
|
||||
|
||||
GvGastos.DataSource = DtGastos
|
||||
GvGastos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
|
||||
Private Sub SumaTotales()
|
||||
'Llena Lb´s Totales
|
||||
LbTotalActual.Text = TotalActual.ToString.FormatoNumero
|
||||
LbTotalAnterior.Text = TotalAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalActual.ForeColor = If(TotalActual < 0, Drawing.Color.Red, Color.Black)
|
||||
|
||||
LbTotalAnterior.ForeColor = If(TotalAnterior < 0, Drawing.Color.Red, Color.Black)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "GV´S ROW DATA BOUND"
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 And Not e.Row.DBCampo("Orden").ToString().Contiene("600", "700", "790") Then
|
||||
TotalActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
ElseIf e.Row.DBCampo("CtaMayor").ToString.Contiene("3", "4") Then
|
||||
'e.Row.CssClass = "SubTotales3"
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlProyecto.SelectedValue, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlProyecto.SelectedValue, DdlSubproyecto.SelectedValue)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
e.Row.FCLabel("LblPorcentajeActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
e.Row.FCLabel("LblPorcentajeAcumulado").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToEntero = -1 And e.Row.DBCampo("Nombre").ToString.Length > 0 Then
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin; border-top-color: #000;")
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvGastos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 And Not e.Row.DBCampo("Orden").ToString().Contiene("600", "700", "790") Then
|
||||
TotalActual -= e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior -= e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
ElseIf e.Row.DBCampo("CtaMayor").ToString.Contiene("3", "4") Then
|
||||
'e.Row.CssClass = "SubTotales"
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlProyecto.SelectedValue, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlProyecto.SelectedValue, DdlSubproyecto.SelectedValue)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
e.Row.FCLabel("LblPorcentajeActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
e.Row.FCLabel("LblPorcentajeAcumulado").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToEntero = -1 And e.Row.DBCampo("Nombre").ToString.Length > 0 Then
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin; border-top-color: #000;")
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds As New ReportDataSource
|
||||
rds.Name = "DataSet1"
|
||||
rds.Value = DtIngresos
|
||||
Dim rds2 As New ReportDataSource
|
||||
rds2.Name = "DataSet2"
|
||||
rds2.Value = DtGastos
|
||||
lrds.Add(rds)
|
||||
lrds.Add(rds2)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("TotalActual", TotalActual.ToString))
|
||||
params.Add(New ReportParameter("TotalAnterior", TotalAnterior.ToString))
|
||||
params.Add(New ReportParameter("lbTotalActual", LbTotalActual.Text))
|
||||
params.Add(New ReportParameter("lbTotalAnterior", LbTotalAnterior.Text))
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFirma1", ""))
|
||||
params.Add(New ReportParameter("pFirma2", ""))
|
||||
params.Add(New ReportParameter("periodo", String.Format("de {0} {1}", DdlPeriodo.SelectedItem.Text, DdlEjercicio.SelectedItem.Text)))
|
||||
params.Add(New ReportParameter("SubProyecto", DdlSubproyecto.SelectedItem.Text))
|
||||
ImprimirPDF("AC/Reportes/RepEstadoActividadesConta2.rdlc", lrds, params, "EstadoActividades", Formato)
|
||||
' UsuarioActual.Empresa.GrupoEmpresa
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -251,8 +251,8 @@ Partial Class AC_RepEstadoActividades
|
||||
'End If
|
||||
|
||||
'If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
|
||||
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
'End If
|
||||
|
||||
|
||||
@@ -280,8 +280,8 @@ Partial Class AC_RepEstadoActividades
|
||||
'End If
|
||||
|
||||
'If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
|
||||
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
'End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
File diff suppressed because one or more lines are too long
@@ -4,10 +4,7 @@ Option Strict On
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports System.IO
|
||||
|
||||
Partial Class Contabilidad_RepEstadoResultados
|
||||
Partial Class Contabilidad2_RepEstadoResultados
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
@@ -55,22 +52,6 @@ Partial Class Contabilidad_RepEstadoResultados
|
||||
ViewState("TotalAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property PorcentajeActual As String
|
||||
Get
|
||||
PorcentajeActual = ViewState("PorcentajeActual").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("PorcentajeActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property PorcentajeAcumulado As String
|
||||
Get
|
||||
PorcentajeAcumulado = ViewState("PorcentajeAcumulado").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("PorcentajeAcumulado") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaI As String
|
||||
Get
|
||||
Return ViewState("FechaI").ToString
|
||||
@@ -145,71 +126,46 @@ Partial Class Contabilidad_RepEstadoResultados
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
Response.Redirect($"/Contabilidad2/RepEstadoActividades.aspx")
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then Response.Redirect($"/Contabilidad/RepEstadoResultadosCI.aspx")
|
||||
|
||||
BtnConsultar.Enabled = True
|
||||
TabNormal.Enabled = True
|
||||
TabMensual.Enabled = True
|
||||
TabAnual.Enabled = True
|
||||
CargaSegmentosNegocio()
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
TipoReporte = -1
|
||||
Else
|
||||
TipoReporte = 1
|
||||
tdTipoReporte.Visible = True
|
||||
End If
|
||||
'tdTipoReporte.Visible = True
|
||||
TipoReporte = 1
|
||||
|
||||
CargaDatosGenerales()
|
||||
|
||||
DdlEjercicio.SelectedValue = NowADS().Year.ToString
|
||||
CargaDatosGenerales()
|
||||
|
||||
Anos = 0
|
||||
DdlEjercicio.SelectedValue = NowADS().Year.ToString
|
||||
|
||||
'Normal
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
DdlPeriodo.SelectedValue = NowADS().Month.ToString
|
||||
Anos = 0
|
||||
|
||||
TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty)
|
||||
Else
|
||||
Alert("La empresa no usa Contabilidad ni Armonización Contable", TipoMensaje.MsgError)
|
||||
End If
|
||||
'Normal
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
DdlPeriodo.SelectedValue = NowADS().Month.ToString
|
||||
|
||||
TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatosGenerales()
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
'Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ClsConta As New ClsContabilidad
|
||||
|
||||
If ClsConta.GetEjercicios() Then
|
||||
If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ClsConta.Dispose()
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
DdlEjercicio.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSegmentosNegocio()
|
||||
Dim ObjContpaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If ObjContpaq.GetSegmentosNegocio(-1, "-1") Then
|
||||
DdlSegmentoNegocio.DataSource = ObjContpaq.DtResultados
|
||||
DdlSegmentoNegocio.DataBind()
|
||||
End If
|
||||
ObjContpaq.Dispose()
|
||||
DdlSegmentoNegocio.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSegmentoNegocio.SelectedValue = "-1"
|
||||
End Sub
|
||||
|
||||
#Region " NORMAL "
|
||||
|
||||
Private Sub CargaDatos()
|
||||
@@ -217,8 +173,11 @@ Partial Class Contabilidad_RepEstadoResultados
|
||||
FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConta.GetEstadoActividades(FechaI.ToDate, FechaF.ToDate, TipoReporte, UsuarioActual.Empresa.UsaAC, DdlSegmentoNegocio.SelectedValue.ToEntero) Then
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetEstadoActividades(FechaI.ToDate, FechaF.ToDate, TipoReporte, -1, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
@@ -250,9 +209,9 @@ Partial Class Contabilidad_RepEstadoResultados
|
||||
|
||||
Row.Item("Nombre") = "TOTAL INGRESOS "
|
||||
Row.Item("ImporteActual") = TotalActualLocal.ToString
|
||||
Row.Item("PorcentajeActual") = If(TotalActualLocal > 0, (TotalActualLocal * 100 / TotalActualLocal).ToString, "0").FormatoNumero
|
||||
Row.Item("PorcentajeActual") = "100"
|
||||
Row.Item("ImporteAcumulado") = TotalAnteriorLocal.ToString
|
||||
Row.Item("PorcentajeAcumulado") = If(TotalAnteriorLocal > 0, (TotalAnteriorLocal * 100 / TotalAnteriorLocal).ToString, "0").FormatoNumero
|
||||
Row.Item("PorcentajeAcumulado") = "100"
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtIngresos.Rows.Add(Row)
|
||||
Else
|
||||
@@ -317,10 +276,6 @@ Partial Class Contabilidad_RepEstadoResultados
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
PorcentajeActual = Row.Item("PorcentajeActual").ToString
|
||||
PorcentajeAcumulado = Row.Item("PorcentajeAcumulado").ToString
|
||||
DtGastos.Rows.Remove(Row)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SumaTotales()
|
||||
@@ -337,64 +292,38 @@ Partial Class Contabilidad_RepEstadoResultados
|
||||
|
||||
#Region "GV´S ROW DATA BOUND"
|
||||
|
||||
Protected Sub GvNormal_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top:2px solid black;")
|
||||
|
||||
|
||||
|
||||
End If
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
'METODO ANTERIOR
|
||||
'TotalActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
'TotalAnterior += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||
|
||||
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
'e.Row.CssClass = "SubTotales3"
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&CM=1", e.Row.DBCampo("Id"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&CM=1&FI=01/01/{2}", e.Row.DBCampo("Id"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaFActual").ToDate.Year)
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
|
||||
'UTILIDAD
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = -2 Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
e.Row.Cells(0).Attributes.Add("style", "padding-top:50px;")
|
||||
e.Row.Cells(1).Attributes.Add("style", "padding-top:50px;")
|
||||
e.Row.Cells(2).Attributes.Add("style", "padding-top:50px;")
|
||||
e.Row.Cells(3).Attributes.Add("style", "padding-top:50px;")
|
||||
e.Row.Cells(4).Attributes.Add("style", "padding-top:50px;")
|
||||
e.Row.Font.Size = 12
|
||||
End If
|
||||
|
||||
'TOTALES
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = -1 Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top:2px solid black;")
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("Nombre").ToString.Contiene("INGRESOS", "EGRESOS") Then
|
||||
' e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
' e.Row.ControlStyle.Font.Bold = True
|
||||
' asdasdasdsadasd
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvGastos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
@@ -420,8 +349,8 @@ Partial Class Contabilidad_RepEstadoResultados
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&CM=1", e.Row.DBCampo("Id"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&CM=1", e.Row.DBCampo("Id"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
@@ -441,10 +370,11 @@ Partial Class Contabilidad_RepEstadoResultados
|
||||
#Region " MENSUAL "
|
||||
|
||||
Private Sub CargaDatosMensual()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
If ObjConta.GetEstadoResultadosMensual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, DdlSegmentoNegocio.SelectedValue.ToEntero) Then
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
If ObjConta.GetEstadoResultadosMensual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatosMensual = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatosMensual = Nothing
|
||||
@@ -496,89 +426,17 @@ Partial Class Contabilidad_RepEstadoResultados
|
||||
GvDatosMensual.Columns(38).Visible = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
'Esconde Trimestral
|
||||
GvDatosMensual2.Columns(7).Visible = False
|
||||
GvDatosMensual2.Columns(8).Visible = False
|
||||
GvDatosMensual2.Columns(17).Visible = False
|
||||
GvDatosMensual2.Columns(18).Visible = False
|
||||
GvDatosMensual2.Columns(27).Visible = False
|
||||
GvDatosMensual2.Columns(28).Visible = False
|
||||
GvDatosMensual2.Columns(35).Visible = False
|
||||
GvDatosMensual2.Columns(36).Visible = False
|
||||
|
||||
'Esconde Cuatrimestral
|
||||
GvDatosMensual2.Columns(11).Visible = False
|
||||
GvDatosMensual2.Columns(12).Visible = False
|
||||
GvDatosMensual2.Columns(23).Visible = False
|
||||
GvDatosMensual2.Columns(24).Visible = False
|
||||
GvDatosMensual2.Columns(37).Visible = False
|
||||
GvDatosMensual2.Columns(38).Visible = False
|
||||
|
||||
If DdlSubtotales.SelectedValue = "2" Then
|
||||
GvDatosMensual2.Columns(7).Visible = True
|
||||
GvDatosMensual2.Columns(8).Visible = True
|
||||
GvDatosMensual2.Columns(17).Visible = True
|
||||
GvDatosMensual2.Columns(18).Visible = True
|
||||
GvDatosMensual2.Columns(27).Visible = True
|
||||
GvDatosMensual2.Columns(28).Visible = True
|
||||
GvDatosMensual2.Columns(35).Visible = True
|
||||
GvDatosMensual2.Columns(36).Visible = True
|
||||
ElseIf DdlSubtotales.SelectedValue = "3" Then
|
||||
GvDatosMensual2.Columns(11).Visible = True
|
||||
GvDatosMensual2.Columns(12).Visible = True
|
||||
GvDatosMensual2.Columns(23).Visible = True
|
||||
GvDatosMensual2.Columns(24).Visible = True
|
||||
GvDatosMensual2.Columns(37).Visible = True
|
||||
GvDatosMensual2.Columns(38).Visible = True
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaGridMensual()
|
||||
|
||||
GvDatosMensual.DataSource = DtDatosMensual
|
||||
GvDatosMensual2.DataSource = DtDatosMensual
|
||||
|
||||
|
||||
GvDatosMensual.DataBind()
|
||||
GvDatosMensual2.DataBind()
|
||||
|
||||
FechasReporte()
|
||||
|
||||
For Each GVRow As GridViewRow In GvDatosMensual.Rows
|
||||
|
||||
If GVRow.DataKey("IntSubOrden").ToEntero = 2 Then
|
||||
GVRow.Attributes.Add("style", "border-top:2px solid black")
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
UpDatosMensual.Update()
|
||||
UpDatosExelRederMensualidad.Update()
|
||||
'Fix visual tabla GvDatosMensual
|
||||
RegistraScript("setTimeout(function() {
|
||||
|
||||
$('.adsCol > div').height(29); $('.ADSRow').height(0);
|
||||
$('#C_TabContainer_TabMensual_GvDatosMensual > tbody > tr.ADSRow > td.adsCol > div').height(0);
|
||||
$('#C_TabContainer_TabMensual_GvDatosMensual > tbody > tr:nth-child(2) > td.adsCol > div').height(0);
|
||||
$('#ADColC_TabContainer_TabMensual_GvDatosMensual > tbody > tr.ADSRow').height(1);
|
||||
$('#ADColC_TabContainer_TabMensual_GvDatosMensual > tbody > tr.ADSRow > td:nth-child(1) > div').height(0);
|
||||
$('#ADColC_TabContainer_TabMensual_GvDatosMensual > tbody > tr.ADSRow > td.adsCol > div').height(0);
|
||||
|
||||
$('.UtilidadPerdida').parent().attr('align', 'right');
|
||||
$('#ADColC_TabContainer_TabMensual_GvDatosMensual > tbody > tr:nth-child(35) > td:nth-child(1)').attr('align', 'center');
|
||||
|
||||
}, 1000); ", "FixTables")
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatosMensual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosMensual.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then
|
||||
|
||||
e.Row.FCHyperLink("HLEnero").Text = ""
|
||||
e.Row.FCHyperLink("HLFebrero").Text = ""
|
||||
e.Row.FCHyperLink("HLMarzo").Text = ""
|
||||
@@ -603,213 +461,56 @@ Partial Class Contabilidad_RepEstadoResultados
|
||||
e.Row.Cells(20).Text = ""
|
||||
e.Row.Cells(22).Text = ""
|
||||
e.Row.Cells(24).Text = ""
|
||||
|
||||
End If
|
||||
|
||||
'AGRUPADOR DE CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then
|
||||
e.Row.FCHyperLink("HlNombre").Font.Bold = True
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
'TITULO DE CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
e.Row.FCHyperLink("HlNombre").Attributes.Add("style", "padding-left: 10px;")
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 10px;")
|
||||
End If
|
||||
|
||||
'CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Then
|
||||
e.Row.FCHyperLink("HlNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
e.Row.FCHyperLink("HlNombre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogoMes.aspx?ID={0}&Ejercicio={1}", e.Row.DBCampo("Id"), DdlEjercicio.SelectedValue)
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Or e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}&CM=1", e.Row.DBCampo("Id"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}&CM=1", e.Row.DBCampo("Id"), String.Format("01/02/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}&CM=1", e.Row.DBCampo("Id"), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}&CM=1", e.Row.DBCampo("Id"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}&CM=1", e.Row.DBCampo("Id"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}&CM=1", e.Row.DBCampo("Id"), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}&CM=1", e.Row.DBCampo("Id"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}&CM=1", e.Row.DBCampo("Id"), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}&CM=1", e.Row.DBCampo("Id"), String.Format("09/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}&CM=1", e.Row.DBCampo("Id"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}&CM=1", e.Row.DBCampo("Id"), String.Format("01/11/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}&CM=1", e.Row.DBCampo("Id"), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/02/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("09/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/11/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
e.Row.FCHyperLink("HLTrimestral1").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FI={1}&FF={2}&TP={3}&CM=1", e.Row.DBCampo("Id"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLTrimestral2").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FI={1}&FF={2}&TP={3}&CM=1", e.Row.DBCampo("Id"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLTrimestral3").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FI={1}&FF={2}&TP={3}&CM=1", e.Row.DBCampo("Id"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLTrimestral4").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FI={1}&FF={2}&TP={3}&CM=1", e.Row.DBCampo("Id"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLTrimestral1").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLTrimestral2").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLTrimestral3").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLTrimestral4").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
e.Row.FCHyperLink("HLCuatrimestral1").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FI={1}&FF={2}&TP={3}&CM=1", e.Row.DBCampo("Id"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLCuatrimestral2").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FI={1}&FF={2}&TP={3}&CM=1", e.Row.DBCampo("Id"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLCuatrimestral3").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FI={1}&FF={2}&TP={3}&CM=1", e.Row.DBCampo("Id"), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLCuatrimestral1").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLCuatrimestral2").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLCuatrimestral3").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
''TOTALES
|
||||
If e.Row.DBCampo("IntSubOrden").ToString.ToEntero.Contiene(0, 3) And e.Row.DBCampo("CtaMayor").ToString.ToEntero = -1 Then
|
||||
|
||||
e.Row.Attributes.Add("style", "Height:29px")
|
||||
e.Row.Cells(1).Text = ""
|
||||
e.Row.Cells(2).Text = ""
|
||||
e.Row.Cells(3).Text = ""
|
||||
e.Row.Cells(4).Text = ""
|
||||
e.Row.Cells(5).Text = ""
|
||||
e.Row.Cells(6).Text = ""
|
||||
e.Row.Cells(7).Text = ""
|
||||
e.Row.Cells(8).Text = ""
|
||||
e.Row.Cells(9).Text = ""
|
||||
e.Row.Cells(10).Text = ""
|
||||
e.Row.Cells(11).Text = ""
|
||||
e.Row.Cells(12).Text = ""
|
||||
e.Row.Cells(13).Text = ""
|
||||
e.Row.Cells(14).Text = ""
|
||||
e.Row.Cells(15).Text = ""
|
||||
e.Row.Cells(16).Text = ""
|
||||
e.Row.Cells(17).Text = ""
|
||||
e.Row.Cells(18).Text = ""
|
||||
e.Row.Cells(19).Text = ""
|
||||
e.Row.Cells(20).Text = ""
|
||||
e.Row.Cells(21).Text = ""
|
||||
e.Row.Cells(22).Text = ""
|
||||
e.Row.Cells(23).Text = ""
|
||||
e.Row.Cells(24).Text = ""
|
||||
e.Row.Cells(25).Text = ""
|
||||
e.Row.Cells(26).Text = ""
|
||||
e.Row.Cells(27).Text = ""
|
||||
e.Row.Cells(28).Text = ""
|
||||
e.Row.Cells(29).Text = ""
|
||||
e.Row.Cells(30).Text = ""
|
||||
e.Row.Cells(31).Text = ""
|
||||
e.Row.Cells(32).Text = ""
|
||||
e.Row.Cells(33).Text = ""
|
||||
e.Row.Cells(34).Text = ""
|
||||
|
||||
'TOTALES
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 5 Then
|
||||
e.Row.Attributes.Add("style", "border-top: 1px solid;")
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DBCampo("IntSubOrden").ToString.ToEntero.Contiene(2, 0) Then
|
||||
e.Row.Font.Bold = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = -1 And e.Row.DBCampo("Nombre").ToString.Length > 0 Then
|
||||
|
||||
e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Footer Then
|
||||
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.Font.Size = 12
|
||||
|
||||
e.Row.FCLabel("LblUtiEnero").Text = (DtDatosMensual.SUM("Enero", "CtaMayor = 1 AND Tipo = 'H' ") - DtDatosMensual.SUM("Enero", "CtaMayor = 1 AND Tipo = 'G' ")).ToString("###,###,###.00")
|
||||
e.Row.FCLabel("LblUtiFebrero").Text = (DtDatosMensual.SUM("Febrero", "CtaMayor = 1 AND Tipo = 'H' ") - DtDatosMensual.SUM("Febrero", "CtaMayor = 1 AND Tipo = 'G' ")).ToString("###,###,###.00")
|
||||
e.Row.FCLabel("LblUtiMarzo").Text = (DtDatosMensual.SUM("Marzo", "CtaMayor = 1 AND Tipo = 'H' ") - DtDatosMensual.SUM("Marzo", "CtaMayor = 1 AND Tipo = 'G' ")).ToString("###,###,###.00")
|
||||
e.Row.FCLabel("LblUtiAbril").Text = (DtDatosMensual.SUM("Abril", "CtaMayor = 1 AND Tipo = 'H' ") - DtDatosMensual.SUM("Abril", "CtaMayor = 1 AND Tipo = 'G' ")).ToString("###,###,###.00")
|
||||
e.Row.FCLabel("LblUtiMayo").Text = (DtDatosMensual.SUM("Mayo", "CtaMayor = 1 AND Tipo = 'H' ") - DtDatosMensual.SUM("Mayo", "CtaMayor = 1 AND Tipo = 'G' ")).ToString("###,###,###.00")
|
||||
e.Row.FCLabel("LblUtiJunio").Text = (DtDatosMensual.SUM("Junio", "CtaMayor = 1 AND Tipo = 'H' ") - DtDatosMensual.SUM("Junio", "CtaMayor = 1 AND Tipo = 'G' ")).ToString("###,###,###.00")
|
||||
e.Row.FCLabel("LblUtiJulio").Text = (DtDatosMensual.SUM("Julio", "CtaMayor = 1 AND Tipo = 'H' ") - DtDatosMensual.SUM("Julio", "CtaMayor = 1 AND Tipo = 'G' ")).ToString("###,###,###.00")
|
||||
e.Row.FCLabel("LblUtiAgosto").Text = (DtDatosMensual.SUM("Agosto", "CtaMayor = 1 AND Tipo = 'H' ") - DtDatosMensual.SUM("Agosto", "CtaMayor = 1 AND Tipo = 'G' ")).ToString("###,###,###.00")
|
||||
e.Row.FCLabel("LblUtiSeptiembre").Text = (DtDatosMensual.SUM("Septiembre", "CtaMayor = 1 AND Tipo = 'H' ") - DtDatosMensual.SUM("Septiembre", "CtaMayor = 1 AND Tipo = 'G' ")).ToString("###,###,###.00")
|
||||
e.Row.FCLabel("LblUtiOctubre").Text = (DtDatosMensual.SUM("Octubre", "CtaMayor = 1 AND Tipo = 'H' ") - DtDatosMensual.SUM("Octubre", "CtaMayor = 1 AND Tipo = 'G' ")).ToString("###,###,###.00")
|
||||
e.Row.FCLabel("LblUtiNoviembre").Text = (DtDatosMensual.SUM("Noviembre", "CtaMayor = 1 AND Tipo = 'H' ") - DtDatosMensual.SUM("Noviembre", "CtaMayor = 1 AND Tipo = 'G' ")).ToString("###,###,###.00")
|
||||
e.Row.FCLabel("LblUtiDiciembre").Text = (DtDatosMensual.SUM("Diciembre", "CtaMayor = 1 AND Tipo = 'H' ") - DtDatosMensual.SUM("Diciembre", "CtaMayor = 1 AND Tipo = 'G' ")).ToString("###,###,###.00")
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub FechasReporte()
|
||||
Dim FechaInicio As Date
|
||||
Dim FechaFin As Date
|
||||
|
||||
'' If DdlTipoConsulta.SelectedValue.ToEntero = 1 Then
|
||||
'FechaInicio = New Date(DdlEjercicio.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero, 1)
|
||||
' FechaFin = FechaInicio.LastDayOfMonth()
|
||||
''Else
|
||||
'FechaInicio = New Date(DdlEjercicio.SelectedValue.ToEntero, 1, 1)
|
||||
' FechaFin = New Date(DdlEjercicio.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero, 1).LastDayOfMonth
|
||||
'End If
|
||||
|
||||
Dim UrlImagen = $"http://{ HttpContext.Current.Request.Url.Host}:{HttpContext.Current.Request.Url.Port}/Empresas/{UsuarioActual.CveEmpresa}/Logo.png"
|
||||
|
||||
If File.Exists($"{UsuarioActual.Empresa.Ruta}Logo.png") Then
|
||||
ImgLogoReporte.Attributes.Add("src", UrlImagen)
|
||||
Else
|
||||
ImgLogoReporte.Attributes.Add("src", "")
|
||||
End If
|
||||
|
||||
|
||||
LblTituloAniosRango.Text = $"{ UsuarioActual.Empresa.Empresa }"
|
||||
LblFechas.Text = $"{FechaInicio.ToString("dd/MMMM/yyyy")} al {FechaFin.ToString("dd/MMMM/yyyy")}"
|
||||
LblFechaReporte.Text = NowADS().ToString("dd/MMMM/yyyy")
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkDescarPersonalizados_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
DescargaReporte()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub DescargaReporte()
|
||||
Dim htmlFuente As String = txtDatos.Text
|
||||
|
||||
Dim RutaLogo As String = $"{Server.MapPath("~")}\Empresas\{UsuarioActual.CveEmpresa}\logo.png"
|
||||
|
||||
|
||||
htmlFuente = htmlFuente.Replace("<table ", "<table border='1' ")
|
||||
htmlFuente = htmlFuente.Replace("<a ", "<label ")
|
||||
htmlFuente = htmlFuente.Replace("</a ", "</label ")
|
||||
htmlFuente = htmlFuente.Replace("<th ", "<th style='background-color:#ddd!important'; ")
|
||||
' htmlFuente = Cabera + htmlFuente
|
||||
'Dim buffer As Byte()
|
||||
'Dim memoryStream = New System.IO.MemoryStream()
|
||||
|
||||
|
||||
SpreadsheetInfo.SetLicense(SerialGemBoxSpreadsheet)
|
||||
Dim excel As ExcelFile
|
||||
Dim options = LoadOptions.HtmlDefault
|
||||
Using htmlStream = New MemoryStream(options.Encoding.GetBytes(htmlFuente))
|
||||
excel = ExcelFile.Load(htmlStream, options)
|
||||
End Using
|
||||
|
||||
Dim ws = excel.Worksheets(0)
|
||||
|
||||
ws.Name = "Estado Resultado por Segmento"
|
||||
|
||||
Dim columnCount = ws.CalculateMaxUsedColumns()
|
||||
For i As Integer = 0 To columnCount - 1
|
||||
If i = 0 Then
|
||||
ws.Columns(i).Width = 10000
|
||||
Else
|
||||
ws.Columns(i).Width = 6000
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
excel.Save(Me.Response, $"RepEstadoResultadosMensual_{NowADS().ToString("yyyyMMddhhmmss")}.xlsx")
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -818,10 +519,12 @@ Partial Class Contabilidad_RepEstadoResultados
|
||||
#Region " ANUAL "
|
||||
|
||||
Private Sub CargaDatosAnual()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
If ObjConta.GetEstadoResultadosAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, DdlSegmentoNegocio.SelectedValue.ToEntero) Then
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
If ObjConta.GetEstadoResultadosAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatosAnual = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatosAnual = Nothing
|
||||
@@ -885,7 +588,7 @@ Partial Class Contabilidad_RepEstadoResultados
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Or e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
For index = 1 To Anos
|
||||
e.Row.FCHyperLink("HLAno" + index.ToString).NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FI={1}&FF={2}&TP={3}&CM=1", e.Row.DBCampo("Id"), String.Format("01/01/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), String.Format("31/12/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), TipoReporte)
|
||||
e.Row.FCHyperLink("HLAno" + index.ToString).NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), String.Format("31/12/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
Next
|
||||
End If
|
||||
|
||||
@@ -917,217 +620,19 @@ Partial Class Contabilidad_RepEstadoResultados
|
||||
If TabContainer.ActiveTabIndex = 0 Then
|
||||
|
||||
CargaDatos()
|
||||
ImgExcel.Visible = True
|
||||
Imprimir.Visible = True
|
||||
liLnkDescarPersonalizado.Visible = False
|
||||
|
||||
ElseIf TabContainer.ActiveTabIndex = 1 Then
|
||||
|
||||
CargaDatosMensual()
|
||||
|
||||
|
||||
ImgExcel.Visible = False
|
||||
Imprimir.Visible = False
|
||||
liLnkDescarPersonalizado.Visible = True
|
||||
|
||||
ElseIf TabContainer.ActiveTabIndex = 2 Then
|
||||
|
||||
CargaDatosAnual()
|
||||
|
||||
ImgExcel.Visible = True
|
||||
Imprimir.Visible = True
|
||||
liLnkDescarPersonalizado.Visible = False
|
||||
End If
|
||||
|
||||
UpAcciones.Update()
|
||||
|
||||
End Sub
|
||||
#Region " IMPRESION "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
|
||||
If TabContainer.ActiveTabIndex = 0 Then
|
||||
If Not IsNothing(DtDatos) Then
|
||||
CargaDatos()
|
||||
ImprimirReporte("Excel")
|
||||
Else
|
||||
Alert("No se encontró información para el reporte.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ElseIf TabContainer.ActiveTabIndex = 1 Then
|
||||
If Not IsNothing(DtDatosMensual) Then
|
||||
CargaDatosMensual()
|
||||
ImprimirReporteMensual("Excel")
|
||||
Else
|
||||
Alert("No se encontró información para el reporte.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ElseIf TabContainer.ActiveTabIndex = 2 Then
|
||||
If Not IsNothing(DtDatosAnual) Then
|
||||
CargaDatosAnual()
|
||||
ImprimirReporteAnual("Excel")
|
||||
Else
|
||||
Alert("No se encontró información para el reporte.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
|
||||
If TabContainer.ActiveTabIndex = 0 Then
|
||||
If Not IsNothing(DtDatos) Then
|
||||
CargaDatos()
|
||||
ImprimirReporte()
|
||||
Else
|
||||
Alert("No se encontró información para el reporte.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ElseIf TabContainer.ActiveTabIndex = 1 Then
|
||||
If Not IsNothing(DtDatosMensual) Then
|
||||
CargaDatosMensual()
|
||||
ImprimirReporteMensual()
|
||||
Else
|
||||
Alert("No se encontró información para el reporte.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ElseIf TabContainer.ActiveTabIndex = 2 Then
|
||||
If Not IsNothing(DtDatosAnual) Then
|
||||
CargaDatosAnual()
|
||||
ImprimirReporteAnual()
|
||||
Else
|
||||
Alert("No se encontró información para el reporte.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub ProcesaImpresion()
|
||||
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, NowADS().Year.ToString, DdlEjercicio.SelectedValue)).ToDate
|
||||
Dim FechaF = FechaI.ToDate.LastDayOfMonth
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
Dim IdCuentaAhorroDesahorro = If(UsuarioActual.CveEmpresa = 48, 87, 9999)
|
||||
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConta.GetEstadoActividades(FechaI.ToDate, FechaF.ToDate, TipoReporte, UsuarioActual.Empresa.UsaAC) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del estado de resultados", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
If DtDatos Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'ProcesaDTImprimir(FiltroActivoCirculante, "AC", DtDatos)
|
||||
'ProcesaDTImprimir(FiltroActivoNoCirculante, "ANC", DtDatos)
|
||||
'ProcesaDTImprimir(FiltroActivoDiferido, "AD", DtDatos)
|
||||
|
||||
'ProcesaDTImprimir(FiltroPasivoCirculante, "PC", DtDatos)
|
||||
'ProcesaDTImprimir(FiltroPasivoNoCirculante, "PNC", DtDatos)
|
||||
'ProcesaDTImprimir(FiltroPasivoDiferido, "PD", DtDatos)
|
||||
|
||||
'ProcesaDTImprimir(FiltroCapital, "C", DtDatos)
|
||||
'ProcesaDTImprimir(FiltroUtilidad, "C", DtDatos)
|
||||
|
||||
For Each Row As DataRow In DtDatos.Select("CtaMayor=3")
|
||||
DtDatos.Rows.Remove(Row)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub ProcesaDTImprimir(Filtro As String, Sup As String, ByRef Dt As DataTable)
|
||||
For Each Row As DataRow In Dt.Select(Filtro)
|
||||
Row("Sup") = Sup
|
||||
Next
|
||||
Dt.AcceptChanges()
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
|
||||
ProcesaImpresion()
|
||||
|
||||
'nombre del archivo a generar
|
||||
Dim fileName As String = "EstadoResultados"
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "Contabilidad/Reportes/RepEstadoResultados.rdlc"
|
||||
|
||||
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFirma1", ""))
|
||||
params.Add(New ReportParameter("pFirma2", ""))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaF))
|
||||
|
||||
params.Add(New ReportParameter("lbTotalActual", TotalActual.ToString))
|
||||
params.Add(New ReportParameter("lbTotalAcumulado", TotalAnterior.ToString))
|
||||
|
||||
params.Add(New ReportParameter("TPorcentajeActual", PorcentajeActual))
|
||||
params.Add(New ReportParameter("TPorcentajeAcumulado", PorcentajeAcumulado))
|
||||
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds1 As New ReportDataSource With {.Name = "DataSet1", .Value = If(DtIngresos IsNot Nothing, DtIngresos, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
|
||||
Dim rds2 As New ReportDataSource With {.Name = "DataSet2", .Value = If(DtGastos IsNot Nothing, DtGastos, New DataTable)}
|
||||
|
||||
lrds.Add(rds1)
|
||||
lrds.Add(rds2)
|
||||
|
||||
ImprimirPDF(reportpath, lrds, params, fileName, Formato)
|
||||
End Sub
|
||||
Private Sub ImprimirReporteMensual(Optional Formato As String = "PDF")
|
||||
|
||||
ProcesaImpresion()
|
||||
|
||||
'nombre del archivo a generar
|
||||
Dim fileName As String = "EstadoResultadosMensual"
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = Server.MapPath("~/Empresas/Grales/Formatos/RepEstadoResultadosMensual.rdlc")
|
||||
|
||||
'Dim FechaI = String.Format("01/{0}/{1}", 12, DdlEjercicio.SelectedValue)
|
||||
Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(String.Format("01/{0}/{1}", 12, DdlEjercicio.SelectedValue)))).ToString("dd/MM/yyyy")
|
||||
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaF))
|
||||
params.Add(New ReportParameter("pSubtotal", DdlSubtotales.SelectedValue.ToString))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString))
|
||||
|
||||
ImprimirPDF(reportpath, DtDatosMensual, params, fileName, Formato)
|
||||
End Sub
|
||||
Private Sub ImprimirReporteAnual(Optional Formato As String = "PDF")
|
||||
|
||||
ProcesaImpresion()
|
||||
|
||||
'nombre del archivo a generar
|
||||
Dim fileName As String = "EstadoResultadosAnual"
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = Server.MapPath("~/Empresas/Grales/Formatos/RepEstadoResultadosAnual.rdlc")
|
||||
|
||||
'Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
'Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaI", DdlEjercicio.SelectedValue))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString))
|
||||
|
||||
ImprimirPDF(reportpath, DtDatosAnual, params, fileName, Formato)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub TabContainer_ActiveTabChanged(sender As Object, e As EventArgs)
|
||||
|
||||
'Nota:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="Reporte Flujo de Efectivo" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepFlujoEfectivo.aspx.vb" Inherits="Contabilidad_RepFlujoEfectivo" %>
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepFlujoEfectivo.aspx.vb" Inherits="AC2_RepFlujoEfectivo" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -7,15 +7,22 @@
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte Flujo de Efectivo
|
||||
Estado de Flujo de Efectivo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" /> --%>
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
@@ -24,25 +31,25 @@
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-default" CssClass="btn btn-default" Enabled="false" />
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<%-- <div class="col-md-1 "><span>Fecha Inicio:</span></div>
|
||||
<div class="col-md-2 ">
|
||||
<div class="col-md-1 "><span>Fecha Inicio:</span></div>
|
||||
<div class="col-md-1 ">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;">
|
||||
<asp:TextBox Width="80%" ID="TxtFechaDel" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<asp:TextBox Width="80px" ID="TxtFechaDel" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>--%>
|
||||
</div>
|
||||
<div class="col-md-1 "><span>Fecha Fin:</span></div>
|
||||
<div class="col-md-2 ">
|
||||
<div class="col-md-1 ">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;">
|
||||
<asp:TextBox Width="80%" ID="TxtFechaAl" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<asp:TextBox Width="80px" ID="TxtFechaAl" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
@@ -50,65 +57,97 @@
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1 "><span>Tipo:</span></div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList runat="server" ID="DdlTipo" CssClass="form-control input-sm">
|
||||
<asp:ListItem Text="Tipo 1" Value="1" Selected="True" />
|
||||
<asp:ListItem Text="Tipo 2" Value="1" />
|
||||
<div class="col-md-1 "><span>Divisor:</span></div>
|
||||
<div class="col-md-1 ">
|
||||
<asp:DropDownList runat="server" ID="DdlUnidad" CssClass="form-control input-sm selec2me">
|
||||
<asp:ListItem Text="1" Value="1" Selected="True" />
|
||||
<asp:ListItem Text="1,000" Value="1000" />
|
||||
<asp:ListItem Text="1,000,000" Value="1000000" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" Style="max-width: 200px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="tdTipoReporte" visible="true">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Tipo:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvDatos" runat="server" CssClass="table table-advance table-hover tablenobottomborder" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound" ShowFooter="True">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<div id="Concepto" runat="server">
|
||||
<asp:Literal ID="LtNombre" Text='<%# Eval("Nombre", "{0:N2}")%>' runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="500px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbActual" Text='<%# Eval("ImporteActual", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbPeriodoActual" runat="server" />
|
||||
</HeaderTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAnterior" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbPeriodoAnterior" runat="server" />
|
||||
</HeaderTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:GridView ID="GvDatos" runat="server" CssClass="table table-advance table-hover tablenobottomborder" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound" ShowFooter="True">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<div id="Concepto" runat="server">
|
||||
<asp:Literal ID="LtNombre" Text='<%# Eval("Nombre", "{0:N2}")%>' runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="500px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbActual" Text='<%# Eval("ImporteActual", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbPeriodoActual" runat="server" />
|
||||
</HeaderTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAnterior" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbPeriodoAnterior" runat="server" />
|
||||
</HeaderTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<%-- <asp:BoundField DataField="Nombre" HeaderText="Cuenta" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="300px"/>
|
||||
<asp:BoundField DataField="ImporteActual" DataFormatString="{0:N2}" HeaderText="ImporteActual" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>
|
||||
<asp:BoundField DataField="ImporteAnterior" DataFormatString="{0:N2}" HeaderText="ImporteAnterior" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>--%>
|
||||
</Columns>
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -9,7 +9,7 @@ Imports iTextSharp.text
|
||||
Imports iTextSharp.text.html.simpleparser
|
||||
Imports iTextSharp.text.pdf
|
||||
|
||||
Partial Class Contabilidad_RepFlujoEfectivo
|
||||
Partial Class AC2_RepFlujoEfectivo
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
@@ -52,28 +52,27 @@ Partial Class Contabilidad_RepFlujoEfectivo
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
|
||||
'TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
|
||||
TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
|
||||
TxtFechaAl.Text = NowADS().ToShortDateString
|
||||
|
||||
CargaDatos()
|
||||
|
||||
BtnConsultar.Enabled = True
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
'Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
|
||||
FechaAl = TxtFechaAl.Text
|
||||
|
||||
If ObjConta.GetFlujoEfectivo2(FechaFin, DdlTipo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
If ObjConta.GetFlujoEfectivo(FechaInicio, FechaFin, DdlUnidad.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
@@ -82,12 +81,28 @@ Partial Class Contabilidad_RepFlujoEfectivo
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
'OBTENEMOS TOTALES NETOS DE OPERACIONES PARA INSERTAR DIRECTO
|
||||
If DtDatos IsNot Nothing Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(120) Then
|
||||
TotalActual = DtDatos.FiltraParametros("Codigo = '040000000000000000'").Rows(0)("ImporteActual").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '050000000000000000'").Rows(0)("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior = DtDatos.FiltraParametros("Codigo = '040000000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '050000000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble
|
||||
Else
|
||||
TotalActual = DtDatos.FiltraParametros("Codigo = '000040000000000000'").Rows(0)("ImporteActual").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '000050000000000000'").Rows(0)("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior = DtDatos.FiltraParametros("Codigo = '000040000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '000050000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble
|
||||
End If
|
||||
End If
|
||||
|
||||
CargaGrid()
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
' GvDatos.Caption = String.Format("<div class='Titulos' style='width:100%; height:45px;'>{0}<br/>Estado de Flujo de Efectivo<br/>Al {1}</div>", UsuarioActual.Empresa.Empresa, TxtFechaAl.Text)
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
@@ -110,13 +125,13 @@ Partial Class Contabilidad_RepFlujoEfectivo
|
||||
e.Row.Font.Bold = True
|
||||
|
||||
'CABCERA
|
||||
If e.Row.DBCampo("Id") = "12" Then
|
||||
If e.Row.DBCampo("CveCuenta") = "12" Then
|
||||
e.Row.FCLabel("LbActual").Text = ""
|
||||
e.Row.FCLabel("LbAnterior").Text = ""
|
||||
End If
|
||||
|
||||
'TOTAL OPERACIONES
|
||||
If e.Row.DBCampo("Id") = "123" Then
|
||||
If e.Row.DBCampo("CveCuenta") = "123" Then
|
||||
e.Row.FCLabel("LbActual").Text = TotalActual.ToString.FormatoNumero
|
||||
e.Row.FCLabel("LbAnterior").Text = TotalAnterior.ToString.FormatoNumero
|
||||
End If
|
||||
@@ -161,18 +176,60 @@ Partial Class Contabilidad_RepFlujoEfectivo
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
'Protected Sub GvDatos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowCreated
|
||||
' If (e.Row.RowType = DataControlRowType.Header) Then
|
||||
' Dim HeaderGrid As GridView = DirectCast(sender, GridView)
|
||||
' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert)
|
||||
' Dim HeaderCell As TableCell = New TableCell()
|
||||
' HeaderCell.Text = String.Format("<div class='Titulos' style='width:100%; height:45px;'>{0}<br/>Estado de Flujo de Efectivo<br/>Al {1}</div>", UsuarioActual.Empresa.Empresa, FechaAl)
|
||||
' HeaderCell.ColumnSpan = GvDatos.Columns.Count
|
||||
' HeaderCell.HorizontalAlign = HorizontalAlign.Center
|
||||
' HeaderGridRow.Cells.Add(HeaderCell)
|
||||
|
||||
|
||||
' GvDatos.Controls(0).Controls.AddAt(0, HeaderGridRow)
|
||||
' End If
|
||||
|
||||
' If (e.Row.RowType = DataControlRowType.Footer) Then
|
||||
' Dim HeaderGrid As GridView = DirectCast(sender, GridView)
|
||||
' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Footer, DataControlRowState.Insert)
|
||||
' Dim HeaderCell As TableCell = New TableCell()
|
||||
' HeaderCell.Text = "<table><tr> <td colspan='3' style='height:30px;'> <br/><br/><br/><br/></td></tr><tr><td >_________________________________<br/>C.P. Izelda Angulo Peraza</td><td style='width:75px'> </td><td > _________________________________<br/>Lic. Juan Fortino Leon Robinson</td></tr><tr><td>Subdirector de Contabilidad</td><td style='width:75px'> </td><td>Director General</td></table>"
|
||||
' HeaderCell.ColumnSpan = GvDatos.Columns.Count
|
||||
' HeaderCell.HorizontalAlign = HorizontalAlign.Center
|
||||
' HeaderGridRow.Cells.Add(HeaderCell)
|
||||
|
||||
' e.Row.Cells.Clear()
|
||||
' e.Row.Cells.Add(HeaderCell)
|
||||
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
|
||||
GvDatos.ExportToExcel2("RepFlujosDeEfectivo.xlsx")
|
||||
'GvDatos.ExportToExcel("ReporteFlujoEfectivo" & NowADS().ToShortDateString)
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pAl", FechaAl))
|
||||
params.Add(New ReportParameter("pTotalActual", TotalActual.ToString.FormatoNumero))
|
||||
params.Add(New ReportParameter("pTotalAnterior", TotalAnterior.ToString.FormatoNumero))
|
||||
params.Add(New ReportParameter("pFirma1", String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de Contabilidad", vbCrLf)))
|
||||
params.Add(New ReportParameter("pFirma2", String.Format("Lic. Juan Fortino Leon Robinson{0} Director General", vbCrLf)))
|
||||
ImprimirPDF("AC/Reportes/RepFlujoEfectivo.rdlc", DtDatos, params, "EdoFlujoEfectivo", Formato)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepMovimientosAuxiliaresCatalogo.aspx.vb" Inherits="AC_RepMovimientosAuxiliaresCatalogo" %>
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepMovimientosAuxiliaresCatalogo.aspx.vb" Inherits="Conta_RepMovimientosAuxiliaresCatalogo" EnableEventValidation="false" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="Css" runat="server">
|
||||
<style>
|
||||
@@ -8,6 +8,18 @@
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
table {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
tr {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
td {
|
||||
border: none !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
@@ -16,7 +28,7 @@
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Generar EXCEL</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server" style="margin-left:2%;"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
@@ -25,109 +37,124 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" CssClass="btn btn-default" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" Enabled="false"/>
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" ValidationGroup="Valida" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1" style="margin-left:10px; width: 90px;">Fecha Inicio:</label>
|
||||
<div class="col-md-2" style="width: 140px;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVFechaDel" runat="server" ControlToValidate="TxtFechaDel" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2Del" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDel" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
Cuenta:
|
||||
</div>
|
||||
<label class="col-md-1" style="width: 80px; padding-right: 2px;">Fecha Fin:</label>
|
||||
<div class="col-md-2" style="width: 140px;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVFechaAl" runat="server" ControlToValidate="TxtFechaAl" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2Al" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaAl" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1">Tipo de Cuentas:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoCuentas" CssClass="form-control input-sm" runat="server" DataTextField="Nombre" DataValueField="Id" TabIndex="4" onchange="Enable();" ClientIDMode="Static">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 60px;">Cuenta:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:HiddenField ID="HdnCveCuenta" runat="server" ClientIDMode="Static" />
|
||||
<asp:TextBox ID="TxtCuenta" CssClass="form-control-input" runat="server" ClientIDMode="Static" Enabled="false" TabIndex="5" onclick="this.setSelectionRange(0, this.value.length)"></asp:TextBox>
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<label class="col-md-1" style="margin-left:10px; width: 90px;">Moneda:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlMoneda" CssClass="form-control input-sm" runat="server" DataTextField="Moneda" DataValueField="CveMoneda" TabIndex="5" ClientIDMode="Static" style="margin-top:10%">
|
||||
<div class="col-md-1 truncate">
|
||||
Tipo Movto
|
||||
</div>
|
||||
<div class="col-md-2 truncate">
|
||||
<asp:DropDownList ID="DdlOpcionCuentas" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos y saldo no igual a cero" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 90px; padding-right: 2px;">Segmento de negocio</label>
|
||||
<div class="col-md-1 truncate" id="tdTipoReporte" visible="false" runat="server">
|
||||
Tipo
|
||||
</div>
|
||||
<div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1" id="divProyecto" runat="server">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="form-control input-sm select2me" ID="DdlSegmentoNegocio" runat="server" DataTextField="Nombre" DataValueField="Id" Width="100%">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<%-- <br />
|
||||
<div class="text-right">
|
||||
Buscar :
|
||||
<input type="text" id="Buscar" style="margin-right: 30px;" />
|
||||
</div>--%>
|
||||
|
||||
|
||||
<%-- <div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", TbDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", TbDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server" style="margin-left: 15px; margin-right: 15px;">
|
||||
</asp:UpdatePanel>
|
||||
<div class="row" style="margin-right: 10px; margin-top: 8px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" CssClass="ScrollAD table table-smallpadding Widthall" data-heighterror="375" data-freezecols="0" data-freezerows="-1"
|
||||
ShowHeader="True" ShowHeaderWhenEmpty="true" AllowPaging="False" ShowFooter="False" GridLines="None" EmptyDataText="No se encontrarios movimientos." AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound">
|
||||
<asp:GridView ID="GvDatos" runat="server"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontrarios movimientos."
|
||||
DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField ControlStyle-CssClass="Widthall">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<table width="100%" style="border: none">
|
||||
<tr>
|
||||
<td colspan="3"><font size="2">Cuenta</font></td>
|
||||
<td colspan="1"><font size="2">Nombre</font></td>
|
||||
<td colspan="3"></td>
|
||||
<td colspan="4"></td>
|
||||
<td><font size="2">Saldo Inicial</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -136,16 +163,16 @@
|
||||
<td width="60px" align="center">Número</td>
|
||||
<td width="300px" align="left">Concepto</td>
|
||||
<td width="100px" align="center">Referencia</td>
|
||||
<td width="100px" align="center">Referencia Movto</td>
|
||||
<td width="100px" align="center">SubProyecto</td>
|
||||
<td width="100px" align="center">Cargos</td>
|
||||
<td width="100px" align="center">Abonos</td>
|
||||
<td width="100px" align="center">Saldo</td>
|
||||
</tr>
|
||||
</table>
|
||||
<%--<hr />--%>
|
||||
</HeaderTemplate>
|
||||
<%-- <HeaderStyle />--%>
|
||||
<ItemTemplate>
|
||||
<table width="100%" border="0" style="border-spacing: 0px;">
|
||||
<table width="100%" style="border: none">
|
||||
<tr runat="server" id="tr1">
|
||||
<td colspan="3" align="left" width="180px">
|
||||
<asp:Label ID="LbCuenta" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
@@ -169,16 +196,22 @@
|
||||
</td>
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Text='<%# Eval("Folio")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbNumero" runat="server" Text='<%# Eval("Folio")%>'></asp:Label>--%>
|
||||
</td>
|
||||
|
||||
<td width="300px" align="left">
|
||||
<div class="truncate" style="width: 300px;">
|
||||
<asp:Label ID="LbConcepto" runat="server" CssClass="truncate" Text='<%# Eval("Concepto")%>'></asp:Label>
|
||||
<asp:Label ID="LbConcepto" runat="server" CssClass="truncate" Text='<%# Eval("Concepto")%>' title='<%# Eval("Concepto")%>'></asp:Label>
|
||||
</div>
|
||||
</td>
|
||||
<td width="100px" align="center">
|
||||
<td width="100px">
|
||||
<asp:Label ID="LbReferencia" runat="server" Text='<%# Eval("Referencia")%>'></asp:Label>
|
||||
</td>
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:Literal ID="LtlRefMovto" runat="server" Text='<%# Eval("ReferenciaAdmin")%>'></asp:Literal>
|
||||
</td>
|
||||
<td width="100px">
|
||||
<asp:Label ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Label>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label ID="LbCargos" runat="server"></asp:Label>
|
||||
</td>
|
||||
@@ -194,7 +227,6 @@
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
@@ -203,117 +235,12 @@
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).on('mouseenter', ".truncate", function () {
|
||||
var $this = $(this);
|
||||
if (this.offsetWidth < this.scrollWidth && !$this.attr('title')) {
|
||||
$this.tooltip({
|
||||
title: $this.text(),
|
||||
placement: "top"
|
||||
});
|
||||
$this.tooltip('show');
|
||||
}
|
||||
});
|
||||
|
||||
function pageLoad(sender, args) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$(function () {
|
||||
//Genero las cuentas en el arreglo
|
||||
var ArrCuentas = [<%= WSCuentas()%>];
|
||||
|
||||
|
||||
$("#TxtCuenta").autocomplete({
|
||||
minLength: 0,
|
||||
source: ArrCuentas,
|
||||
focus: function (event, ui) {
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
return false;
|
||||
},
|
||||
select: function (event, ui) {
|
||||
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
|
||||
//$("#project-description").html(ui.item.desc);
|
||||
//$("#project-icon").attr("src", "images/" + ui.item.icon);
|
||||
|
||||
return false;
|
||||
}
|
||||
})
|
||||
//.autocomplete("instance")._renderItem = function (ul, item) {
|
||||
// return $("<li>")
|
||||
// .append("<a>" + item.label + "</a>")
|
||||
// .appendTo(ul);
|
||||
//};
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('input[type=text]').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('select').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
<%-- $('#Buscar').keyup(function () {
|
||||
var texto = $('#Buscar').val();
|
||||
$('#<%=GvDatos.ClientID%> > tbody > tr').css({ 'display': 'none' });
|
||||
$("#<%=GvDatos.ClientID%> > tbody > tr:contains('" + texto + "')").css({ 'display': '' });
|
||||
|
||||
$('#<%=GvDatos.ClientID%> > tbody > tr:nth-child(1)').css({ 'display': 'none' });
|
||||
});--%>
|
||||
|
||||
function Enable() {
|
||||
var Producto = $get("DdlTipoCuentas").value;
|
||||
if (Producto == "-2") {
|
||||
document.getElementById("TxtCuenta").disabled = false;
|
||||
//document.getElementById("TxtCuenta").focus();
|
||||
//alert(Producto);
|
||||
}
|
||||
else {
|
||||
document.getElementById("TxtCuenta").value = " ";
|
||||
document.getElementById("TxtCuenta").disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -5,7 +5,7 @@ Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepMovimientosAuxiliaresCatalogo
|
||||
Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
@@ -44,28 +44,6 @@ Partial Class AC_RepMovimientosAuxiliaresCatalogo
|
||||
ViewState("FechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IdCuenta As Integer
|
||||
Get
|
||||
IdCuenta = ViewState("IdCuenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("IdCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property IdSegNeg As Integer
|
||||
Get
|
||||
If ViewState("IdSegNeg") Is Nothing Then
|
||||
ViewState("IdSegNeg") = -1
|
||||
End If
|
||||
|
||||
Return ViewState("IdSegNeg").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("IdSegNeg") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property TotalPadre As Boolean
|
||||
Get
|
||||
@@ -83,104 +61,110 @@ Partial Class AC_RepMovimientosAuxiliaresCatalogo
|
||||
ViewState("DTCuentas") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TipoReporte As String
|
||||
Get
|
||||
TipoReporte = ViewState("TP").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("TP") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Cuenta As String
|
||||
Get
|
||||
Return ViewState("Cuenta").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Cuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
|
||||
|
||||
BtnConsultar.Enabled = True
|
||||
Dim ErrorParametros As Boolean = True
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.CveEmpresa <> 119 Then
|
||||
' Response.Redirect($"/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx")
|
||||
'End If
|
||||
|
||||
CargaTipoCuentas()
|
||||
CargaMoneda()
|
||||
CargaSegmentosNegocio()
|
||||
Dim ErrorParametros As Boolean = True
|
||||
|
||||
TxtCuenta.Enabled = False
|
||||
CargaTipoCuentas()
|
||||
'TxtCuenta.Enabled = False
|
||||
|
||||
If Request("ID") IsNot Nothing AndAlso IsNumeric(Request("ID")) AndAlso Request("ID").ToEntero > 0 Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
|
||||
|
||||
IdCuenta = Request("ID").ToEntero
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
|
||||
IdSegNeg = If(Request("IdSegNeg") IsNot Nothing AndAlso Request("IdSegNeg").ToString.ToEntero > 0, Request("IdSegNeg").ToString.ToEntero, -1)
|
||||
FechaFin = Request("FF").ToDate
|
||||
txtFechaF.Text = FechaFin.ToShortDateString
|
||||
|
||||
HdnCveCuenta.Value = IdCuenta.ToString
|
||||
|
||||
FechaFin = Request("FF").ToDate
|
||||
TxtFechaAl.Text = FechaFin.ToShortDateString
|
||||
|
||||
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
FechaInicio = Request("FI").ToDate
|
||||
TxtFechaDel.Text = FechaInicio.ToShortDateString
|
||||
Else
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
TxtFechaDel.Text = FechaInicio.ToShortDateString
|
||||
End If
|
||||
|
||||
ErrorParametros = False
|
||||
DdlCuentas.SelectedValueExist(Request("CveCuenta").ToEntero)
|
||||
|
||||
|
||||
If DdlTipoCuentas.Items.FindByValue(IdCuenta.ToString) IsNot Nothing Then
|
||||
DdlTipoCuentas.SelectedValue = IdCuenta.ToString
|
||||
Else
|
||||
DdlTipoCuentas.SelectedValue = "-2"
|
||||
TxtCuenta.Enabled = True
|
||||
|
||||
If DTCuentas.FiltraParametros(String.Format("Id = {0}", IdCuenta)).Rows.Count > 0 Then
|
||||
TxtCuenta.Text = DTCuentas.FiltraParametros(String.Format("Id = {0}", IdCuenta)).Rows(0)("CtaCodigo").ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
DdlSegmentoNegocio.SelectedValueExist(IdSegNeg)
|
||||
|
||||
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
FechaInicio = Request("FI").ToDate
|
||||
txtFechaI.Text = FechaInicio.ToShortDateString
|
||||
Else
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
TxtFechaF.Text = FechaInicio.ToShortDateString
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorParametros Then
|
||||
TotalPadre = True
|
||||
CargaDatos()
|
||||
End If
|
||||
If Request("CveProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveProyecto")) Then
|
||||
DdlProyecto.SelectedValueExist(Request("CveProyecto"))
|
||||
DdlProyecto_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("La empresa no usa Contabilidad ni Armonización Contable", TipoMensaje.MsgError)
|
||||
If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then
|
||||
DdlSubproyecto.SelectedValueExist(Request("CveSubProyecto"))
|
||||
End If
|
||||
|
||||
ErrorParametros = False
|
||||
|
||||
If Request("TP") IsNot Nothing AndAlso IsNumeric(Request("TP")) AndAlso Request("TP").ToEntero > 0 Then
|
||||
TipoReporte = Request("TP").ToString
|
||||
|
||||
' DdlTipoReporte.SelectedValue = TipoReporte.ToString
|
||||
End If
|
||||
|
||||
|
||||
''If DdlTipoCuentas.Items.FindByValue(IdCuenta.ToString) IsNot Nothing Then
|
||||
'' DdlTipoCuentas.SelectedValue = IdCuenta.ToString
|
||||
''Else
|
||||
'' DdlTipoCuentas.SelectedValue = "-2"
|
||||
'' TxtCuenta.Enabled = True
|
||||
|
||||
'' If DTCuentas.FiltraParametros(String.Format("Cvecuenta = {0}", IdCuenta)).Rows.Count > 0 Then
|
||||
'' TxtCuenta.Text = DTCuentas.FiltraParametros(String.Format("CveCuenta = {0}", IdCuenta)).Rows(0)("Codigo").ToString
|
||||
'' End If
|
||||
''End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorParametros Then
|
||||
TotalPadre = True
|
||||
TipoReporte = "1"
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaSegmentosNegocio()
|
||||
Dim ObjContpaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If ObjContpaq.GetSegmentosNegocio(-1, "-1") Then
|
||||
DdlSegmentoNegocio.DataSource = ObjContpaq.DtResultados
|
||||
DdlSegmentoNegocio.DataBind()
|
||||
End If
|
||||
ObjContpaq.Dispose()
|
||||
DdlSegmentoNegocio.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSegmentoNegocio.SelectedValue = "-1"
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaMoneda()
|
||||
DdlMoneda.DataSource = GlobalDTMonedas
|
||||
DdlMoneda.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
If DdlCuentas.SelectedValue.ToEntero = -1 Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate)
|
||||
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate)
|
||||
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero <> -2, DdlTipoCuentas.SelectedValue.ToEntero, HdnCveCuenta.Value.ToEntero)
|
||||
|
||||
CargaDatos()
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
' Imprimir_click(sender, e)
|
||||
RegistraScript("Enable();")
|
||||
'RegistraScript("Enable();")
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A - D A T O S"
|
||||
@@ -189,45 +173,50 @@ Partial Class AC_RepMovimientosAuxiliaresCatalogo
|
||||
Dim i As Integer = 0
|
||||
Dim dt As DataTable = DTCuentas
|
||||
|
||||
|
||||
If dt IsNot Nothing Then
|
||||
For Each dr As DataRow In dt.Rows
|
||||
i += 1
|
||||
Str.AppendFormat("{{value:""{0}"",label:""{1}""}}{2}", dr("Id"), dr("CtaCodigo").ToString.Replace("""", ""), If(i < dt.Rows.Count, ",", ""))
|
||||
Next
|
||||
End If
|
||||
For Each dr As DataRow In dt.Rows
|
||||
i += 1
|
||||
Str.AppendFormat("{{value:""{0}"",label:""{1}""}}{2}", dr("CveCuenta"), dr("Codigo").ToString.Replace("""", ""), If(i < dt.Rows.Count, ",", ""))
|
||||
Next
|
||||
|
||||
Return Str.ToString
|
||||
End Function
|
||||
Private Sub CargaTipoCuentas()
|
||||
Dim ObjTipoCuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If ObjTipoCuenta.GetCuentas(-1, "-1", -1) Then
|
||||
Dim dr As DataRow = ObjTipoCuenta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
|
||||
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
|
||||
Dim ObjTipoCuenta As New ClsContabilidad
|
||||
DdlCuentas.Enabled = True
|
||||
|
||||
If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DTCuentas = ObjTipoCuenta.DtResultados
|
||||
DdlTipoCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo IN ('_ACTIVO', '_BPASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
DdlCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
|
||||
End If
|
||||
ObjTipoCuenta.Dispose()
|
||||
DdlTipoCuentas.DataBind()
|
||||
'If strGlobal.Length > 0 Then DdlTipoCuentas.Items.Insert(0, New ListItem("Todas", strGlobal))
|
||||
DdlTipoCuentas.Items.Insert(0, New ListItem("Todas las Cuentas", "1"))
|
||||
DdlTipoCuentas.Items.Add(New ListItem("Algun específico", "-2"))
|
||||
DdlTipoCuentas.SelectedIndex = 0
|
||||
DdlCuentas.DataBind()
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos")
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa, 60)
|
||||
|
||||
If ObjConta.GetMovimientosAuxiliaresCatalogo(IdCuenta, FechaInicio, FechaFin, DdlMoneda.SelectedValue.ToEntero, DdlSegmentoNegocio.SelectedValue.ToEntero) Then
|
||||
'DtTotales = DtDatos.Clone
|
||||
Dim CveProyecto As Integer = DdlProyecto.SelectedValue.ToEntero
|
||||
Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
|
||||
TipoReporte = DdlTipoReporte.SelectedValue.ToString
|
||||
If TipoReporte = "1" And DdlCuentas.SelectedValue.ToEntero < 0 Then
|
||||
Alert("No ha seleccionado cuenta, Favor de especificar una", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Cuenta = DdlCuentas.SelectedItem.ToString
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetMovimientosAuxiliaresCatalogo(DdlCuentas.SelectedValue.ToEntero, FechaInicio, FechaFin, -1, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte, DdlOpcionCuentas.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
DtTotales = DtDatos.Clone
|
||||
|
||||
CargaGrid()
|
||||
|
||||
|
||||
'InsertaTotales()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
End If
|
||||
@@ -237,20 +226,20 @@ Partial Class AC_RepMovimientosAuxiliaresCatalogo
|
||||
#End Region
|
||||
|
||||
Private Sub InsertaTotales()
|
||||
Dim i = 0
|
||||
Dim Aumento = 0
|
||||
Dim i As Integer = 0
|
||||
Dim Aumento As Integer = 0
|
||||
Dim Row As DataRow
|
||||
Dim Row2 As DataRow
|
||||
|
||||
'Llena DtTotales
|
||||
For Each dr As DataRow In DtDatos.Rows
|
||||
If dr("Fecha").ToString = "" Then
|
||||
If dr("Concepto").ToString = "" Then
|
||||
|
||||
Row = DtTotales.NewRow
|
||||
|
||||
Row("ID") = -1
|
||||
Row("CargosMovto") = If(DdlMoneda.SelectedValue = "1", dr("Cargos"), dr("CargosME"))
|
||||
Row("AbonosMovto") = If(DdlMoneda.SelectedValue = "1", dr("Abonos"), dr("AbonosME"))
|
||||
Row("CveCuenta") = -1
|
||||
Row("CargosMovto") = If("1" = "1", dr("Cargos"), dr("CargosME"))
|
||||
Row("AbonosMovto") = If("1" = "1", dr("Abonos"), dr("AbonosME"))
|
||||
Row("Saldo") = dr("SaldoActual")
|
||||
Row("CtaMayor") = dr("CtaMayor")
|
||||
Row("Concepto") = String.Format("Total {0}:", dr("Nombre"))
|
||||
@@ -271,7 +260,7 @@ Partial Class AC_RepMovimientosAuxiliaresCatalogo
|
||||
End If
|
||||
|
||||
If dr("CtaMayor").ToString = "2" Then
|
||||
For index = dr("Clasificacion").ToString.ToEntero + Aumento To DtDatos.Rows.Count
|
||||
For index As Integer = dr("Clasificacion").ToString.ToEntero + Aumento To DtDatos.Rows.Count
|
||||
If DtDatos.Rows(index)("Nombre").ToString <> dr("Nombre").ToString Then
|
||||
i = index
|
||||
Exit For
|
||||
@@ -293,14 +282,14 @@ Partial Class AC_RepMovimientosAuxiliaresCatalogo
|
||||
#Region "G R I D - GV DATOS"
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
'GvDatos.Dispose()
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Fecha") = "" Then
|
||||
If e.Row.DBCampo("Concepto") = "" Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
e.Row.ControlStyle.Height = 35
|
||||
|
||||
@@ -321,7 +310,8 @@ Partial Class AC_RepMovimientosAuxiliaresCatalogo
|
||||
'End If
|
||||
|
||||
If TotalPadre Then
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells.Remove(CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3))
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3).Width = "1px"
|
||||
'CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells.Remove(CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3))
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3).Align = "Right"
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3).Width = "400px"
|
||||
If e.Row.RowIndex + 1 = DtDatos.Rows.Count Then
|
||||
@@ -340,21 +330,20 @@ Partial Class AC_RepMovimientosAuxiliaresCatalogo
|
||||
End If
|
||||
|
||||
'e.Row.FCLabel("LbReferencia").Text = String.Format("Total {0}:", If(e.Row.DBCampo("CtaMayor").ToString = "2", "", e.Row.DBCampo("Nombre").ToString))
|
||||
e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("Cargos").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("Abonos").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("SaldoActual").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("Cargos").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("Abonos").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("SaldoActual").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
End If
|
||||
|
||||
Else
|
||||
TotalPadre = False
|
||||
e.Row.Width = 200
|
||||
e.Row.ControlStyle.Font.Bold = False
|
||||
CType(e.Row.FindControl("tr1"), HtmlTableRow).Visible = False
|
||||
e.Row.FCHyperLink("HLPoliza").NavigateUrl = String.Format("/Contabilidad/RegPoliza.aspx?IdPoliza={0}", e.Row.DBCampo("IdPoliza"))
|
||||
e.Row.FCHyperLink("HLPoliza").NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", e.Row.DBCampo("CvePoliza"))
|
||||
|
||||
If e.Row.DBCampo("CargosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("CargosMovto").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
If e.Row.DBCampo("AbonosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("AbonosMovto").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
If e.Row.DBCampo("Saldo").ToDouble <> 0 Then e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("Saldo").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
If e.Row.DBCampo("CargosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("CargosMovto").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
If e.Row.DBCampo("AbonosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("AbonosMovto").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
If e.Row.DBCampo("Saldo").ToDouble <> 0 Then e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("Saldo").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
|
||||
End If
|
||||
|
||||
@@ -390,36 +379,60 @@ Partial Class AC_RepMovimientosAuxiliaresCatalogo
|
||||
#End Region
|
||||
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then
|
||||
If DdlCuentas.SelectedValue.ToEntero = -1 Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero <> -1, DdlTipoCuentas.SelectedValue.ToEntero, HdnCveCuenta.Value.ToEntero)
|
||||
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate)
|
||||
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate)
|
||||
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
'If ObjConta.GetAnexoCatalogo(IdCuenta, FechaInicio, FechaFin) Then
|
||||
'DtDatos = ObjConta.DtResultados
|
||||
DtDatos = DtDatos
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte()
|
||||
Else
|
||||
Alert("No se encontró información para el reporte", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
ImprimirReporte()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12) Then
|
||||
GvDatos.ExportToExcel("MovimientosAuxiliares")
|
||||
Else
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte("Excel")
|
||||
Else
|
||||
Alert("No se encontró información para el reporte", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
ImprimirReporte("Excel")
|
||||
|
||||
'Dim htmlTabe As New HtmlTable
|
||||
'Dim RutaLogo As String = $"{UsuarioActual.Empresa.Ruta}Logo.png"
|
||||
'Dim strinLiteral As String = ""
|
||||
|
||||
'Dim EncabezadoLiteral As New LiteralControl
|
||||
|
||||
|
||||
|
||||
'If System.IO.File.Exists(RutaLogo) Then
|
||||
' RutaLogo = $"http://{Request.Url.Host }/Empresas/{UsuarioActual.CveEmpresa}/Logo.png"
|
||||
|
||||
' strinLiteral = $"<table style='width:{ GvDatos.Width }px'><tr>
|
||||
' <td colspan='3' style='width:15%;height:150px; text-align:center; vertical-align:middle;font-weight: bold;'><img width='200px' height='150px' style='max-height:150px!important;max-width:200px!important' src='{RutaLogo}' /> </td>
|
||||
' <td colspan='3' style='width:70%;height:150px; text-align:center; vertical-align:middle;font-weight: bold; display: block;'><p><span>{UsuarioActual.Empresa.Empresa} </span><br><span> Movimientos Auxiliares del Catálogo<p></td>
|
||||
' <td colspan='3' style='width:15%;height:150px; text-align:center; vertical-align:middle;font-weight: bold;'> Fecha:{NowADS().ToString("dd/MM/yyyy")}</td>
|
||||
' </tr>
|
||||
' <tr>
|
||||
' <td style='text-align:left;' colspan='6'>
|
||||
' <b>Filtros Cuenta:</b> {DdlCuentas.SelectedItem.Text} <b>Fecha inicio: </b>{ TxtFechaDel.Text} <b>Fecha Fin:</b> {TxtFechaAl.Text}
|
||||
' <td>
|
||||
' </tr>
|
||||
' </table>"
|
||||
'Else
|
||||
' strinLiteral = $"<table style='width:{ GvDatos.Width }px'><tr>
|
||||
' <td colspan='3' style='width:15%;height:150px; text-align:center; vertical-align:middle;font-weight: bold;'> </td>
|
||||
' <td colspan='3' style='width:70%;height:150px; text-align:center; vertical-align:middle;font-weight: bold; display: block;'><p><span>{UsuarioActual.Empresa.Empresa} </span><br><span> Movimientos Auxiliares del Catálogo<p></td>
|
||||
' <td colspan='3' style='width:15%;height:150px; text-align:center; vertical-align:middle;font-weight: bold;'> Fecha:{NowADS().ToString("dd/MM/yyyy")}</td>
|
||||
' </tr>
|
||||
' <tr>
|
||||
' <td style='text-align:left;' colspan='9'>
|
||||
' <b>Filtros Cuenta:</b> {DdlCuentas.SelectedItem.Text} <b>Fecha inicio: </b>{ TxtFechaDel.Text} <b>Fecha Fin:</b> {TxtFechaAl.Text}
|
||||
' <td>
|
||||
|
||||
' <tr>
|
||||
' </table>"
|
||||
'End If
|
||||
|
||||
'EncabezadoLiteral.Text = strinLiteral
|
||||
'GvDatos.ExportToExcel($"MovimientosAuxiliares_{NowADS().ToString("yyyyMMddmmss")}", Encabezado2:=EncabezadoLiteral)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
@@ -429,8 +442,15 @@ Partial Class AC_RepMovimientosAuxiliaresCatalogo
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("CveMoneda", DdlMoneda.SelectedValue))
|
||||
ImprimirPDF("Contabilidad/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato)
|
||||
params.Add(New ReportParameter("pFechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("CveMoneda", "1"))
|
||||
params.Add(New ReportParameter("Cuenta", Cuenta))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato)
|
||||
|
||||
End Sub
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
319
Contabilidad/RepMovimientosAuxiliaresCatalogoCI.aspx
Normal file
319
Contabilidad/RepMovimientosAuxiliaresCatalogoCI.aspx
Normal file
@@ -0,0 +1,319 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepMovimientosAuxiliaresCatalogoCI.aspx.vb" Inherits="AC_RepMovimientosAuxiliaresCatalogo" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="Css" runat="server">
|
||||
<style>
|
||||
.truncate {
|
||||
width: 300px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Generar EXCEL</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server" style="margin-left:2%;"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Movimientos Auxiliares del Catálogo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" CssClass="btn btn-default" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" Enabled="false"/>
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1" style="margin-left:10px; width: 90px;">Fecha Inicio:</label>
|
||||
<div class="col-md-2" style="width: 140px;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVFechaDel" runat="server" ControlToValidate="TxtFechaDel" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2Del" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDel" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1" style="width: 80px; padding-right: 2px;">Fecha Fin:</label>
|
||||
<div class="col-md-2" style="width: 140px;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVFechaAl" runat="server" ControlToValidate="TxtFechaAl" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2Al" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaAl" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1">Tipo de Cuentas:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoCuentas" CssClass="form-control input-sm" runat="server" DataTextField="Nombre" DataValueField="Id" TabIndex="4" onchange="Enable();" ClientIDMode="Static">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 60px;">Cuenta:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:HiddenField ID="HdnCveCuenta" runat="server" ClientIDMode="Static" />
|
||||
<asp:TextBox ID="TxtCuenta" CssClass="form-control-input" runat="server" ClientIDMode="Static" Enabled="false" TabIndex="5" onclick="this.setSelectionRange(0, this.value.length)"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<label class="col-md-1" style="margin-left:10px; width: 90px;">Moneda:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlMoneda" CssClass="form-control input-sm" runat="server" DataTextField="Moneda" DataValueField="CveMoneda" TabIndex="5" ClientIDMode="Static" style="margin-top:10%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 90px; padding-right: 2px;">Segmento de negocio</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="form-control input-sm select2me" ID="DdlSegmentoNegocio" runat="server" DataTextField="Nombre" DataValueField="Id" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<%-- <br />
|
||||
<div class="text-right">
|
||||
Buscar :
|
||||
<input type="text" id="Buscar" style="margin-right: 30px;" />
|
||||
</div>--%>
|
||||
|
||||
|
||||
<%-- <div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", TbDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", TbDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server" style="margin-left: 15px; margin-right: 15px;">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" CssClass="ScrollAD table table-smallpadding Widthall" data-heighterror="375" data-freezecols="0" data-freezerows="-1"
|
||||
ShowHeader="True" ShowHeaderWhenEmpty="true" AllowPaging="False" ShowFooter="False" GridLines="None" EmptyDataText="No se encontrarios movimientos." AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField ControlStyle-CssClass="Widthall">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="3"><font size="2">Cuenta</font></td>
|
||||
<td colspan="1"><font size="2">Nombre</font></td>
|
||||
<td colspan="3"></td>
|
||||
<td><font size="2">Saldo Inicial</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="60px" align="center">Fecha</td>
|
||||
<td width="60px" align="center">Tipo</td>
|
||||
<td width="60px" align="center">Número</td>
|
||||
<td width="300px" align="left">Concepto</td>
|
||||
<td width="100px" align="center">Referencia</td>
|
||||
<td width="100px" align="center">Cargos</td>
|
||||
<td width="100px" align="center">Abonos</td>
|
||||
<td width="100px" align="center">Saldo</td>
|
||||
</tr>
|
||||
</table>
|
||||
<%--<hr />--%>
|
||||
</HeaderTemplate>
|
||||
<%-- <HeaderStyle />--%>
|
||||
<ItemTemplate>
|
||||
<table width="100%" border="0" style="border-spacing: 0px;">
|
||||
<tr runat="server" id="tr1">
|
||||
<td colspan="3" align="left" width="180px">
|
||||
<asp:Label ID="LbCuenta" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</td>
|
||||
<td colspan="1" align="left" width="300px">
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</td>
|
||||
<td colspan="2" width="200px"></td>
|
||||
<td style="font-weight: normal;" align="right" width="100px">Saldo Inicial:
|
||||
</td>
|
||||
<td style="font-weight: normal;" align="right" width="100px">
|
||||
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="tr2">
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:Literal ID="LbFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</td>
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:Literal ID="LbTipo" runat="server" Text='<%# Eval("TipoPoliza")%>'></asp:Literal>
|
||||
</td>
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Text='<%# Eval("Folio")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbNumero" runat="server" Text='<%# Eval("Folio")%>'></asp:Label>--%>
|
||||
</td>
|
||||
<td width="300px" align="left">
|
||||
<div class="truncate" style="width: 300px;">
|
||||
<asp:Label ID="LbConcepto" runat="server" CssClass="truncate" Text='<%# Eval("Concepto")%>'></asp:Label>
|
||||
</div>
|
||||
</td>
|
||||
<td width="100px" align="center">
|
||||
<asp:Label ID="LbReferencia" runat="server" Text='<%# Eval("Referencia")%>'></asp:Label>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label ID="LbCargos" runat="server"></asp:Label>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label ID="LbAbonos" runat="server"></asp:Label>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label ID="LbSaldo" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).on('mouseenter', ".truncate", function () {
|
||||
var $this = $(this);
|
||||
if (this.offsetWidth < this.scrollWidth && !$this.attr('title')) {
|
||||
$this.tooltip({
|
||||
title: $this.text(),
|
||||
placement: "top"
|
||||
});
|
||||
$this.tooltip('show');
|
||||
}
|
||||
});
|
||||
|
||||
function pageLoad(sender, args) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$(function () {
|
||||
//Genero las cuentas en el arreglo
|
||||
var ArrCuentas = [<%= WSCuentas()%>];
|
||||
|
||||
|
||||
$("#TxtCuenta").autocomplete({
|
||||
minLength: 0,
|
||||
source: ArrCuentas,
|
||||
focus: function (event, ui) {
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
return false;
|
||||
},
|
||||
select: function (event, ui) {
|
||||
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
|
||||
//$("#project-description").html(ui.item.desc);
|
||||
//$("#project-icon").attr("src", "images/" + ui.item.icon);
|
||||
|
||||
return false;
|
||||
}
|
||||
})
|
||||
//.autocomplete("instance")._renderItem = function (ul, item) {
|
||||
// return $("<li>")
|
||||
// .append("<a>" + item.label + "</a>")
|
||||
// .appendTo(ul);
|
||||
//};
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('input[type=text]').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('select').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
<%-- $('#Buscar').keyup(function () {
|
||||
var texto = $('#Buscar').val();
|
||||
$('#<%=GvDatos.ClientID%> > tbody > tr').css({ 'display': 'none' });
|
||||
$("#<%=GvDatos.ClientID%> > tbody > tr:contains('" + texto + "')").css({ 'display': '' });
|
||||
|
||||
$('#<%=GvDatos.ClientID%> > tbody > tr:nth-child(1)').css({ 'display': 'none' });
|
||||
});--%>
|
||||
|
||||
function Enable() {
|
||||
var Producto = $get("DdlTipoCuentas").value;
|
||||
if (Producto == "-2") {
|
||||
document.getElementById("TxtCuenta").disabled = false;
|
||||
//document.getElementById("TxtCuenta").focus();
|
||||
//alert(Producto);
|
||||
}
|
||||
else {
|
||||
document.getElementById("TxtCuenta").value = " ";
|
||||
document.getElementById("TxtCuenta").disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
436
Contabilidad/RepMovimientosAuxiliaresCatalogoCI.aspx.vb
Normal file
436
Contabilidad/RepMovimientosAuxiliaresCatalogoCI.aspx.vb
Normal file
@@ -0,0 +1,436 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepMovimientosAuxiliaresCatalogo
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtTotales As DataTable
|
||||
Get
|
||||
DtTotales = DirectCast(ViewState("DtTotales"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtTotales") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicio As Date
|
||||
Get
|
||||
FechaInicio = ViewState("FechaInicio").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFin As Date
|
||||
Get
|
||||
FechaFin = ViewState("FechaFin").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IdCuenta As Integer
|
||||
Get
|
||||
IdCuenta = ViewState("IdCuenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("IdCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property IdSegNeg As Integer
|
||||
Get
|
||||
If ViewState("IdSegNeg") Is Nothing Then
|
||||
ViewState("IdSegNeg") = -1
|
||||
End If
|
||||
|
||||
Return ViewState("IdSegNeg").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("IdSegNeg") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property TotalPadre As Boolean
|
||||
Get
|
||||
TotalPadre = CBool(ViewState("TotalPadre"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("TotalPadre") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DTCuentas As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTCuentas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTCuentas") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
|
||||
|
||||
BtnConsultar.Enabled = True
|
||||
Dim ErrorParametros As Boolean = True
|
||||
|
||||
CargaTipoCuentas()
|
||||
CargaMoneda()
|
||||
CargaSegmentosNegocio()
|
||||
|
||||
TxtCuenta.Enabled = False
|
||||
|
||||
If Request("ID") IsNot Nothing AndAlso IsNumeric(Request("ID")) AndAlso Request("ID").ToEntero > 0 Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
|
||||
|
||||
IdCuenta = Request("ID").ToEntero
|
||||
|
||||
IdSegNeg = If(Request("IdSegNeg") IsNot Nothing AndAlso Request("IdSegNeg").ToString.ToEntero > 0, Request("IdSegNeg").ToString.ToEntero, -1)
|
||||
|
||||
HdnCveCuenta.Value = IdCuenta.ToString
|
||||
|
||||
FechaFin = Request("FF").ToDate
|
||||
TxtFechaAl.Text = FechaFin.ToShortDateString
|
||||
|
||||
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
FechaInicio = Request("FI").ToDate
|
||||
TxtFechaDel.Text = FechaInicio.ToShortDateString
|
||||
Else
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
TxtFechaDel.Text = FechaInicio.ToShortDateString
|
||||
End If
|
||||
|
||||
ErrorParametros = False
|
||||
|
||||
|
||||
If DdlTipoCuentas.Items.FindByValue(IdCuenta.ToString) IsNot Nothing Then
|
||||
DdlTipoCuentas.SelectedValue = IdCuenta.ToString
|
||||
Else
|
||||
DdlTipoCuentas.SelectedValue = "-2"
|
||||
TxtCuenta.Enabled = True
|
||||
|
||||
If DTCuentas.FiltraParametros(String.Format("Id = {0}", IdCuenta)).Rows.Count > 0 Then
|
||||
TxtCuenta.Text = DTCuentas.FiltraParametros(String.Format("Id = {0}", IdCuenta)).Rows(0)("CtaCodigo").ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
DdlSegmentoNegocio.SelectedValueExist(IdSegNeg)
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorParametros Then
|
||||
TotalPadre = True
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("La empresa no usa Contabilidad ni Armonización Contable", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaSegmentosNegocio()
|
||||
Dim ObjContpaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If ObjContpaq.GetSegmentosNegocio(-1, "-1") Then
|
||||
DdlSegmentoNegocio.DataSource = ObjContpaq.DtResultados
|
||||
DdlSegmentoNegocio.DataBind()
|
||||
End If
|
||||
ObjContpaq.Dispose()
|
||||
DdlSegmentoNegocio.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSegmentoNegocio.SelectedValue = "-1"
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaMoneda()
|
||||
DdlMoneda.DataSource = GlobalDTMonedas
|
||||
DdlMoneda.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero <> -2, DdlTipoCuentas.SelectedValue.ToEntero, HdnCveCuenta.Value.ToEntero)
|
||||
|
||||
CargaDatos()
|
||||
|
||||
' Imprimir_click(sender, e)
|
||||
RegistraScript("Enable();")
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A - D A T O S"
|
||||
Public Function WSCuentas() As String
|
||||
Dim Str As New StringBuilder
|
||||
Dim i As Integer = 0
|
||||
Dim dt As DataTable = DTCuentas
|
||||
|
||||
|
||||
If dt IsNot Nothing Then
|
||||
For Each dr As DataRow In dt.Rows
|
||||
i += 1
|
||||
Str.AppendFormat("{{value:""{0}"",label:""{1}""}}{2}", dr("Id"), dr("CtaCodigo").ToString.Replace("""", ""), If(i < dt.Rows.Count, ",", ""))
|
||||
Next
|
||||
End If
|
||||
|
||||
Return Str.ToString
|
||||
End Function
|
||||
Private Sub CargaTipoCuentas()
|
||||
Dim ObjTipoCuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If ObjTipoCuenta.GetCuentas(-1, "-1", -1) Then
|
||||
Dim dr As DataRow = ObjTipoCuenta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
|
||||
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
|
||||
DTCuentas = ObjTipoCuenta.DtResultados
|
||||
DdlTipoCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo IN ('_ACTIVO', '_BPASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
End If
|
||||
ObjTipoCuenta.Dispose()
|
||||
DdlTipoCuentas.DataBind()
|
||||
'If strGlobal.Length > 0 Then DdlTipoCuentas.Items.Insert(0, New ListItem("Todas", strGlobal))
|
||||
DdlTipoCuentas.Items.Insert(0, New ListItem("Todas las Cuentas", "1"))
|
||||
DdlTipoCuentas.Items.Add(New ListItem("Algun específico", "-2"))
|
||||
DdlTipoCuentas.SelectedIndex = 0
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa, 60)
|
||||
|
||||
If ObjConta.GetMovimientosAuxiliaresCatalogo(IdCuenta, FechaInicio, FechaFin, DdlMoneda.SelectedValue.ToEntero, DdlSegmentoNegocio.SelectedValue.ToEntero) Then
|
||||
'DtTotales = DtDatos.Clone
|
||||
DtDatos = ObjConta.DtResultados
|
||||
CargaGrid()
|
||||
|
||||
|
||||
'InsertaTotales()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub InsertaTotales()
|
||||
Dim i = 0
|
||||
Dim Aumento = 0
|
||||
Dim Row As DataRow
|
||||
Dim Row2 As DataRow
|
||||
|
||||
'Llena DtTotales
|
||||
For Each dr As DataRow In DtDatos.Rows
|
||||
If dr("Fecha").ToString = "" Then
|
||||
|
||||
Row = DtTotales.NewRow
|
||||
|
||||
Row("ID") = -1
|
||||
Row("CargosMovto") = If(DdlMoneda.SelectedValue = "1", dr("Cargos"), dr("CargosME"))
|
||||
Row("AbonosMovto") = If(DdlMoneda.SelectedValue = "1", dr("Abonos"), dr("AbonosME"))
|
||||
Row("Saldo") = dr("SaldoActual")
|
||||
Row("CtaMayor") = dr("CtaMayor")
|
||||
Row("Concepto") = String.Format("Total {0}:", dr("Nombre"))
|
||||
Row("Nombre") = dr("Nombre")
|
||||
DtTotales.Rows.Add(Row)
|
||||
Row("Clasificacion") = i
|
||||
End If
|
||||
|
||||
i += 1
|
||||
Next
|
||||
|
||||
'Inserta Totales en DtDatos
|
||||
For Each dr As DataRow In DtTotales.Rows
|
||||
i = 0
|
||||
|
||||
If dr("CtaMayor").ToString = "1" Then
|
||||
DtDatos.ImportRow(dr)
|
||||
End If
|
||||
|
||||
If dr("CtaMayor").ToString = "2" Then
|
||||
For index = dr("Clasificacion").ToString.ToEntero + Aumento To DtDatos.Rows.Count
|
||||
If DtDatos.Rows(index)("Nombre").ToString <> dr("Nombre").ToString Then
|
||||
i = index
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Row2 = DtDatos.NewRow
|
||||
Row2.ItemArray = dr.ItemArray
|
||||
|
||||
DtDatos.Rows.InsertAt(Row2, i + Aumento)
|
||||
Aumento += 1
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "G R I D - GV DATOS"
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Fecha") = "" Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
e.Row.ControlStyle.Height = 35
|
||||
|
||||
'Cuando es Titulo
|
||||
If e.Row.DBCampo("SaldoActual") = "" Then
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Visible = False
|
||||
|
||||
|
||||
'Cuando Es Total
|
||||
Else
|
||||
CType(e.Row.FindControl("tr1"), HtmlTableRow).Visible = False
|
||||
|
||||
'Anterior para TotalPadre
|
||||
'If e.Row.DBCampo("CtaMayor").ToString = "2" And (e.Row.DBCampo("Nivel3").ToString <> "" Xor e.Row.DBCampo("Orden").ToString.Length = 18) Then
|
||||
' e.Row.FCLabel("LbReferencia").Text = "Total:"
|
||||
'Else
|
||||
' e.Row.FCLabel("LbConcepto").Text = String.Format("Total {0}:", e.Row.DBCampo("Nombre").ToString)
|
||||
'End If
|
||||
|
||||
If TotalPadre Then
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells.Remove(CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3))
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3).Align = "Right"
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3).Width = "400px"
|
||||
If e.Row.RowIndex + 1 = DtDatos.Rows.Count Then
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(4).Attributes.Add("style", "border-top: 1px solid black;")
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(5).Attributes.Add("style", "border-top: 1px solid black;")
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(6).Attributes.Add("style", "border-top: 1px solid black;")
|
||||
End If
|
||||
e.Row.FCLabel("LbReferencia").Text = String.Format("Total {0}:", e.Row.DBCampo("Nombre").ToString)
|
||||
|
||||
|
||||
Else
|
||||
TotalPadre = True
|
||||
e.Row.FCLabel("LbReferencia").Font.Bold = False
|
||||
e.Row.FCLabel("LbReferencia").Text = "Total:"
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(4).Align = "Right"
|
||||
End If
|
||||
|
||||
'e.Row.FCLabel("LbReferencia").Text = String.Format("Total {0}:", If(e.Row.DBCampo("CtaMayor").ToString = "2", "", e.Row.DBCampo("Nombre").ToString))
|
||||
e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("Cargos").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("Abonos").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("SaldoActual").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
End If
|
||||
|
||||
Else
|
||||
TotalPadre = False
|
||||
e.Row.Width = 200
|
||||
e.Row.ControlStyle.Font.Bold = False
|
||||
CType(e.Row.FindControl("tr1"), HtmlTableRow).Visible = False
|
||||
e.Row.FCHyperLink("HLPoliza").NavigateUrl = String.Format("/Contabilidad/RegPoliza.aspx?IdPoliza={0}", e.Row.DBCampo("IdPoliza"))
|
||||
|
||||
If e.Row.DBCampo("CargosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("CargosMovto").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
If e.Row.DBCampo("AbonosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("AbonosMovto").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
If e.Row.DBCampo("Saldo").ToDouble <> 0 Then e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("Saldo").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'COLOREA NEGATIVOS
|
||||
If e.Row.FCLabel("LbCargos").Text.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red
|
||||
Else
|
||||
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
If e.Row.FCLabel("LbAbonos").Text.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red
|
||||
Else
|
||||
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
If e.Row.FCLabel("LbSaldo").Text.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldo").ForeColor = Drawing.Color.Red
|
||||
Else
|
||||
e.Row.FCLabel("LbSaldo").ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
If e.Row.FCLabel("LbSaldoInicial").Text.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red
|
||||
Else
|
||||
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero <> -1, DdlTipoCuentas.SelectedValue.ToEntero, HdnCveCuenta.Value.ToEntero)
|
||||
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
'If ObjConta.GetAnexoCatalogo(IdCuenta, FechaInicio, FechaFin) Then
|
||||
'DtDatos = ObjConta.DtResultados
|
||||
DtDatos = DtDatos
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte()
|
||||
Else
|
||||
Alert("No se encontró información para el reporte", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12) Then
|
||||
GvDatos.ExportToExcel("MovimientosAuxiliares")
|
||||
Else
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte("Excel")
|
||||
Else
|
||||
Alert("No se encontró información para el reporte", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("CveMoneda", DdlMoneda.SelectedValue))
|
||||
ImprimirPDF("Contabilidad/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,16 +1,6 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepOrigenAplicacion.aspx.vb" Inherits="Contabilidad_RepOrigenAplicacion" %>
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepOrigenAplicacion.aspx.vb" Inherits="Contabilidad2_RepOrigenAplicacion" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAcciones">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkExcel" data-toggle="tooltip" OnClick="LnkExcel_Click" data-placement="left" title="Excel" Text="<i class='fa fa-file-excel-o'></i> Excel" Visible="false"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -76,9 +66,9 @@
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitl magindate">
|
||||
<div class="tools" style="margin-top:5px">
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" Text="Consultar" runat="server" OnClick="BtnConsultar_Click" />
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" Text="Consultar" runat="server" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline text-size-12">
|
||||
@@ -88,7 +78,7 @@
|
||||
<td>Fecha Inicio:</td>
|
||||
<td>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 93px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="25px"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
@@ -105,7 +95,7 @@
|
||||
<td>Fecha Fin:</td>
|
||||
<td>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 94px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="25px"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
@@ -116,37 +106,46 @@
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
<li style="margin-right: 30px" runat="server" id="TdEjercicio" visible="false">
|
||||
<li style="margin-right: 30px" runat="server" id="TdEjercicio" visible="true" class="col-md-1">
|
||||
<%-- <label class="col-md-1" style="width: 60px;">Ejercicio:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicio" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm" runat="server" Width="70px">
|
||||
|
||||
</asp:DropDownList>
|
||||
</div>--%>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Ejercicio:</td>
|
||||
<td>
|
||||
<div class="input-group input-sm input-small date date-picker " style="width: 94px !important; padding: 0px;">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" Width="100px" Height="25px">
|
||||
<asp:ListItem Text="2010" Value="2010"></asp:ListItem>
|
||||
<asp:ListItem Text="2011" Value="2011"></asp:ListItem>
|
||||
<asp:ListItem Text="2012" Value="2012"></asp:ListItem>
|
||||
<asp:ListItem Text="2013" Value="2013"></asp:ListItem>
|
||||
<asp:ListItem Text="2014" Value="2014"></asp:ListItem>
|
||||
<asp:ListItem Text="2015" Value="2015"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:DropDownList ID="DdlEjercicio" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm" runat="server" Width="100px" Visible="true" >
|
||||
|
||||
</asp:DropDownList>
|
||||
|
||||
|
||||
<%-- <asp:DropDownList ID="DdlEjercicio1" runat="server" Width="100px">
|
||||
</asp:DropDownList>--%>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
<li style="margin-right: 30px" runat="server" id="tdTipoReporte" visible="false">
|
||||
<li>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<div class="col-md-7 ">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" Style="max-width: 200px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</li>
|
||||
<li style="margin-right: 30px" runat="server" id="tdTipoReporte" visible="true">
|
||||
<table>
|
||||
<tr>
|
||||
<td>Tipo:</td>
|
||||
<td>
|
||||
<div class="input-group input-sm input-small date date-picker " style="width: 94px !important; padding: 0px;">
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" Width="120px" Height="25px">
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" Width="100px">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -156,13 +155,11 @@
|
||||
<tr>
|
||||
<td>SubTotales:</td>
|
||||
<td>
|
||||
<div class="input-group input-sm input-small date date-picker " style="width: 94px !important; padding: 0px;">
|
||||
<asp:DropDownList ID="DdlSubtotales" runat="server" Width="120px" Height="25px">
|
||||
<asp:DropDownList ID="DdlSubtotales" runat="server" Width="100px">
|
||||
<asp:ListItem Text="Sin Subtotales" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Trimestral" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Cuatrimestral" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -235,9 +232,7 @@
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveCuenta">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
@@ -245,22 +240,6 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="400" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLlImporteBase" runat="server" Text='<%# Eval("ImporteBase", "{0:N2}")%>' CssClass="Texto" Target="_blank" ></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLImporteActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank" ></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Origen">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLOrigen" runat="server" Text='<%# Eval("Origen", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
@@ -277,52 +256,6 @@
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
|
||||
<asp:GridView ID="GvOrigenAplicacionSIG" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveCuenta" Visible="false">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="400" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLlImporteBase" runat="server" Text='<%# Eval("ImporteBase", "{0:N2}")%>' CssClass="Texto" Target="_blank" ></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLImporteActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank" ></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Origen">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLOrigen" runat="server" Text='<%# Eval("Origen", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Aplicación">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAplicacion" runat="server" Text='<%# Eval("Aplicacion", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Option Strict On
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad_RepOrigenAplicacion
|
||||
Partial Class Contabilidad2_RepOrigenAplicacion
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
@@ -64,12 +64,12 @@ Partial Class Contabilidad_RepOrigenAplicacion
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
TipoReporte = -1
|
||||
Else
|
||||
TipoReporte = 1
|
||||
tdTipoReporte.Visible = True
|
||||
End If
|
||||
'If UsuarioActual.Empresa.UsaAC Then
|
||||
' TipoReporte = -1
|
||||
'Else
|
||||
TipoReporte = 1
|
||||
tdTipoReporte.Visible = True
|
||||
'End If
|
||||
|
||||
'Normal
|
||||
TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
|
||||
@@ -77,23 +77,20 @@ Partial Class Contabilidad_RepOrigenAplicacion
|
||||
|
||||
'Anual
|
||||
Anos = 0
|
||||
Dim ClsConta As New ClsContabilidad
|
||||
If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValue = NowADS().Year.ToString
|
||||
|
||||
TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty)
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
|
||||
TabMensual.Visible = False
|
||||
TabAnual.Visible = False
|
||||
TdFI.Visible = False
|
||||
tdTipoReporte.Visible = False
|
||||
|
||||
GvOrigenAplicacionSIG.Visible = True
|
||||
GvDatos.Visible = False
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -152,63 +149,32 @@ Partial Class Contabilidad_RepOrigenAplicacion
|
||||
|
||||
#Region " NORMAL "
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
' Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, "0"c), Anio)
|
||||
' Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
|
||||
LnkExcel.Visible = False
|
||||
|
||||
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
|
||||
Dim AnioActual As Integer = TxtFechaAl.Text.ToDate.Year
|
||||
Dim AnioAnteior As Integer = AnioActual - 1
|
||||
|
||||
|
||||
GvOrigenAplicacionSIG.Columns(1).Visible = True
|
||||
GvOrigenAplicacionSIG.Columns(2).Visible = True
|
||||
|
||||
GvOrigenAplicacionSIG.Columns(1).HeaderText = AnioAnteior.ToString
|
||||
GvOrigenAplicacionSIG.Columns(2).HeaderText = AnioActual.ToString
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
'GvOrigenAplicacionSIG
|
||||
If ObjConta.GetRepOrigenAplicacion(TxtFechaAl.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
GvOrigenAplicacionSIG.DataSource = ObjConta.DtResultados
|
||||
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
LnkExcel.Visible = True
|
||||
End If
|
||||
Else
|
||||
GvOrigenAplicacionSIG.DataSource = Nothing
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
GvOrigenAplicacionSIG.DataBind()
|
||||
Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
|
||||
Dim FechaI = String.Format("{0}/{1}/{2}", FechaInicio.Day, FechaInicio.Month, FechaInicio.Year)
|
||||
Dim FechaF = String.Format("{0}/{1}/{2}", FechaFin.Day, FechaFin.Month, FechaFin.Year)
|
||||
|
||||
If ObjConta.GetOrigenAplicacion(FechaI, FechaF, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
|
||||
If ObjConta.GetOrigenAplicacion(FechaInicio, FechaFin) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
|
||||
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos de origen y aplicación", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
CargaGrid()
|
||||
End If
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos de origen y aplicación", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
CargaGrid()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid()
|
||||
@@ -220,15 +186,15 @@ Partial Class Contabilidad_RepOrigenAplicacion
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'Titulo y Sumatoria de cambios
|
||||
If e.Row.DBCampo("Orden3").ToString.ToEntero = 10 Or e.Row.DBCampo("Orden3").ToString.ToEntero = 30 Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
''Titulo y Sumatoria de cambios
|
||||
'If e.Row.DBCampo("Orden3").ToString.ToEntero = 10 Or e.Row.DBCampo("Orden3").ToString.ToEntero = 30 Then
|
||||
' e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
'End If
|
||||
|
||||
'CUENTAS
|
||||
If e.Row.DBCampo("Orden3").ToString.ToEntero = 20 Then
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
End If
|
||||
''CUENTAS
|
||||
'If e.Row.DBCampo("Orden3").ToString.ToEntero = 20 Then
|
||||
' e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
'End If
|
||||
|
||||
'TOTAL
|
||||
If e.Row.DBCampo("Nombre").ToString.Trim = "" Then
|
||||
@@ -240,62 +206,17 @@ Partial Class Contabilidad_RepOrigenAplicacion
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvOrigenAplicacionSIG_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOrigenAplicacionSIG.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'Titulo y Sumatoria de cambios
|
||||
If e.Row.DBCampo("Orden3").ToString.ToEntero = 10 Or e.Row.DBCampo("Orden3").ToString.ToEntero = 30 Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
'CUENTAS
|
||||
If e.Row.DBCampo("Orden3").ToString.ToEntero = 20 Then
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
End If
|
||||
|
||||
'TOTAL
|
||||
If e.Row.DBCampo("Nombre").ToString.Trim = "" Then
|
||||
e.Row.Attributes.Add("style", "border-top: 1px solid; margin-top:10px;")
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Text = "TOTAL"
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
|
||||
'Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta=55274&FF=31/12/2021
|
||||
Dim FechaFinBase As Date = New Date(TxtFechaAl.Text.ToDate.Year - 1, 12, 31)
|
||||
|
||||
If e.Row.DataKey("CveCuenta").ToEntero > 0 Then
|
||||
e.Row.FCHyperLink("HLlImporteBase").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={e.Row.DataKey("CveCuenta")}&FF={FechaFinBase.ToString("dd/MM/yyyy")}"
|
||||
e.Row.FCHyperLink("HLImporteActual").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={e.Row.DataKey("CveCuenta")}&FF={TxtFechaAl.Text}"
|
||||
e.Row.FCHyperLink("HLOrigen").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={e.Row.DataKey("CveCuenta")}&FF={TxtFechaAl.Text}"
|
||||
e.Row.FCHyperLink("HLAplicacion").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={e.Row.DataKey("CveCuenta")}&FF={TxtFechaAl.Text}"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " MENSUAL "
|
||||
Private Sub CargaDatosMensual()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
''Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
If ObjConta.GetOrigenAplicacionMensual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte) Then
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
If ObjConta.GetOrigenAplicacionMensual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatosMensual = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatosMensual = Nothing
|
||||
@@ -370,11 +291,14 @@ Partial Class Contabilidad_RepOrigenAplicacion
|
||||
|
||||
#Region " ANUAL "
|
||||
Private Sub CargaDatosAnual()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1
|
||||
|
||||
If ObjConta.GetOrigenAplicacionAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte) Then
|
||||
If ObjConta.GetOrigenAplicacionAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatosAnual = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatosAnual = Nothing
|
||||
@@ -382,7 +306,7 @@ Partial Class Contabilidad_RepOrigenAplicacion
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1
|
||||
|
||||
|
||||
If DtDatosAnual IsNot Nothing Then
|
||||
CargaGridAnual()
|
||||
@@ -433,7 +357,4 @@ Partial Class Contabilidad_RepOrigenAplicacion
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs)
|
||||
GvDatos.ExportToExcel2("RepOrigenAplicacion.xlsx")
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -487,8 +487,8 @@ Partial Class AC2_SituacionFinanciera
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
Else
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
@@ -519,8 +519,8 @@ Partial Class AC2_SituacionFinanciera
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
'Cuentas
|
||||
Else
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
End If
|
||||
|
||||
|
||||
@@ -553,8 +553,8 @@ Partial Class AC2_SituacionFinanciera
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
'e.Row.ControlStyle.Font.Bold = True
|
||||
ElseIf e.Row.DBCampo("CveCuenta") <> "55276" Then
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
@@ -485,8 +485,8 @@ Partial Class AC2_SituacionFinanciera
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
Else
|
||||
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte)
|
||||
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte)
|
||||
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte)
|
||||
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
@@ -517,8 +517,8 @@ Partial Class AC2_SituacionFinanciera
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
'Cuentas
|
||||
Else
|
||||
'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
End If
|
||||
|
||||
|
||||
@@ -551,8 +551,8 @@ Partial Class AC2_SituacionFinanciera
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
'e.Row.ControlStyle.Font.Bold = True
|
||||
Else
|
||||
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
@@ -1,749 +0,0 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contabilidad2_CatCuentas
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "Propiedades"
|
||||
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtConceptosconta As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtConceptosconta"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtConceptosconta") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IDSelected As Integer
|
||||
Get
|
||||
Return ViewState("idsel").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("idsel") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CvePadre As Integer
|
||||
Get
|
||||
Return ViewState("CvePadre").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePadre") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property Afectable As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("Afectable").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("Afectable") = value
|
||||
End Set
|
||||
End Property
|
||||
#Region "Contabilidadnew"
|
||||
Private Property CveProveedor As Integer
|
||||
Get
|
||||
Return ViewState("CveProveedor").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveProveedor") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveCliente As Integer
|
||||
Get
|
||||
Return ViewState("CveCliente").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCliente") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveClasificacion As Integer
|
||||
Get
|
||||
Return ViewState("CveClasificacion").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveClasificacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveBancoCuenta As Integer
|
||||
Get
|
||||
Return ViewState("CveBancoCuenta").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveBancoCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveAlmacen As Integer
|
||||
Get
|
||||
Return ViewState("CveAlmacen").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveAlmacen") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
DdlAlmacen.DataBind()
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
CargaMonedas()
|
||||
CargaAgrupadorSAT()
|
||||
CargaDatos()
|
||||
Using objconta As New ClsContabilidad
|
||||
objconta.GetConta_ConceptosContables(1)
|
||||
DtConceptosconta = objconta.DtResultados
|
||||
End Using
|
||||
Using ObjBancos As New ClsBancos
|
||||
If ObjBancos.GetBancosCuentas(-1) Then
|
||||
ddlBancos.DataSource = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
ddlBancos.DataBind()
|
||||
ddlBancos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
End Using
|
||||
|
||||
|
||||
DdlConcepto.DataSource = DtConceptosconta
|
||||
DdlConcepto.DataBind()
|
||||
DdlConcepto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'Else
|
||||
' Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia)
|
||||
' MEECuenta.Enabled = False
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMonedas()
|
||||
|
||||
DdlMoneda.DataSource = GlobalDTMonedas
|
||||
DdlMoneda.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAgrupadorSAT()
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If ObjConta.GetAgrupadoresSAT() Then
|
||||
DdlAgrupadorSAT.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
DdlAgrupadorSAT.DataBind()
|
||||
DdlAgrupadorSAT.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
'para obtener la mascara, tomo el primer dato y reemplazo los numeros por cero
|
||||
Dim Mascara As String = UsuarioActual.Empresa.ContaFormatoCuenta.Replace("X", "9") '"###-##-####"
|
||||
'If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
||||
' Mascara = DtDatos.Rows(0)("Codigo").ToString.Replace("1", "0").Replace("2", "0").Replace("3", "0").Replace("4", "0").Replace("5", "0").Replace("6", "0").Replace("7", "0").Replace("8", "0").Replace("9", "0")
|
||||
'End If
|
||||
|
||||
MEECuenta.Mask = Mascara '.Replace("0", "9")
|
||||
MEECuenta.AutoComplete = True
|
||||
MEECuenta.AutoCompleteValue = Mascara
|
||||
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
ArbolCuentas.nivel = "CtaInicial"
|
||||
ArbolCuentas.nodoid = "CveCuenta"
|
||||
ArbolCuentas.padre = "CvePadre"
|
||||
ArbolCuentas.titulo = "CuentaFormatoNombre"
|
||||
ArbolCuentas.DataBind()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Function getNodosHijos(nodo As Integer) As DataTable
|
||||
' Return DtDatos.FiltraParametros(String.Format("IdPadre = {0}", nodo))
|
||||
'End Function
|
||||
Private Function getNodospadreHijos(nodo As Integer) As DataTable
|
||||
Return DtDatos.FiltraParametros(String.Format("CveCuenta = {0}", nodo))
|
||||
End Function
|
||||
Protected Sub agregar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.addclick
|
||||
LimpiarCampos()
|
||||
|
||||
Tsubcuenta.Visible = True
|
||||
DdlCuentaContable.Visible = False
|
||||
|
||||
Dim dt As New DataTable
|
||||
|
||||
'IDSelected = HdnID.Value.ToEntero() "ul" + itempadre.Cve;
|
||||
Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem)
|
||||
IDSelected = obj.Cve
|
||||
'obj.FindControl(String.Format("ul{0}", obj.Cve))
|
||||
'obj.Controls.Add(New TextBox())
|
||||
dt = getNodospadreHijos(IDSelected)
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = dt.Rows(0)
|
||||
'TxtCuenta.Text = Trim(dr("CuentaFormato").ToString.Replace("-", "").ToString)
|
||||
'Tcuenta.Text = Trim(dr("CuentaFormato").ToString.Replace("-", "").ToString)
|
||||
Tsubcuenta.Text = dr("CuentaFormato").ToString()
|
||||
DTcuenta.SelectedValue = dr("Tipo").ToString()
|
||||
DcuentaMayor.SelectedValue = dr("CtaMayor").ToString
|
||||
LblSubCuenta.Text = dr("Nombre").ToString
|
||||
Afectable = CBool(dr("Afectable").ToString)
|
||||
CvePadre = dr("CvePadre").ToString.ToEntero
|
||||
End If
|
||||
|
||||
If Afectable Then
|
||||
RegistraScript(String.Format("Afectable({0});", nuevacuenta.ClientID))
|
||||
Alert("Se va crear una subcuenta en una cuenta afectable", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
RegistraScript("NoAfectable();")
|
||||
|
||||
End If
|
||||
TxtCuenta.Enabled = True
|
||||
|
||||
'Tcuenta.Enabled = True
|
||||
nuevacuenta.Visible = True
|
||||
updatos.Visible = True
|
||||
updatos.Update()
|
||||
|
||||
End Sub
|
||||
Private Sub limpiavalorescontables()
|
||||
|
||||
|
||||
DdlConcepto.SelectedValueExist(-1)
|
||||
onconceptochange()
|
||||
CveProveedor = -1
|
||||
DdlProveedores.SelectedText = ""
|
||||
DdlProveedores.SelectedValue = CveProveedor.ToString
|
||||
CveCliente = -1
|
||||
DdlClientesWS.SelectedText = ""
|
||||
DdlClientesWS.SelectedValue = CveCliente.ToString
|
||||
Dim PorcentajeImpuesto As Decimal = -1
|
||||
DdlClasificacion.SelectedValueExist(PorcentajeImpuesto)
|
||||
CveClasificacion = -1
|
||||
DdlClasificacion.SelectedValueExist(CveClasificacion)
|
||||
CveBancoCuenta = -1
|
||||
CveAlmacen = -1
|
||||
DdlAlmacen.SelectedValueExist(CveAlmacen)
|
||||
End Sub
|
||||
Protected Sub editar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.editclick
|
||||
LimpiarCampos()
|
||||
limpiavalorescontables()
|
||||
CargaCuentasContables()
|
||||
|
||||
Tsubcuenta.Visible = False
|
||||
DdlCuentaContable.Visible = True
|
||||
|
||||
Dim dt As DataTable
|
||||
Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem)
|
||||
IDSelected = obj.Cve
|
||||
dt = getNodospadreHijos(IDSelected)
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = dt.Rows(0)
|
||||
TxtCuenta.Text = dr("CuentaFormato").ToString.Replace("-", "").ToString
|
||||
'Tcuenta.Text = dr("CuentaFormato").ToString.Replace("-", "").ToString
|
||||
Tnombre.Text = dr("Nombre").ToString()
|
||||
DTcuenta.SelectedValue = dr("Tipo").ToString()
|
||||
DcuentaMayor.SelectedValue = dr("CtaMayor").ToString
|
||||
DdlMoneda.SelectedValue = If(dr("CveMoneda").ToString = "", "1", dr("CveMoneda").ToString)
|
||||
Using objconta As New ClsContabilidad
|
||||
objconta.GetConta_CuentasDataContabilidad(IDSelected, UsuarioActual.CveEmpresa)
|
||||
If objconta.DtResultados.Rows.Count > 0 Then
|
||||
Dim rowcc As DataRow = objconta.DtResultados.Rows(0)
|
||||
DdlConcepto.SelectedValue = "-1"
|
||||
DdlConcepto.SelectedValueExist(rowcc("CveConceptoAdmin").ToString().ToEntero())
|
||||
onconceptochange()
|
||||
CveProveedor = rowcc("CveProveedor").ToString().ToEntero()
|
||||
DdlProveedores.SelectedText = rowcc("Proveedor").ToString()
|
||||
DdlProveedores.SelectedValue = CveProveedor.ToString
|
||||
CveCliente = rowcc("CveCliente").ToString().ToEntero()
|
||||
DdlClientesWS.SelectedText = rowcc("Cliente").ToString
|
||||
DdlClientesWS.SelectedValue = CveCliente.ToString
|
||||
Dim PorcentajeImpuesto As Decimal = rowcc("PorcentajeImpuesto").ToString().ToDecimal() * 100
|
||||
TxtPorcentaje.Text = PorcentajeImpuesto.ToString
|
||||
CveClasificacion = rowcc("CveClasificacion").ToString().ToEntero()
|
||||
DdlClasificacion.SelectedValueExist(CveClasificacion)
|
||||
CveBancoCuenta = rowcc("CveBancoCuenta").ToString().ToEntero()
|
||||
ddlBancos.SelectedValue = "-1"
|
||||
ddlBancos.SelectedValueExist(CveBancoCuenta)
|
||||
CveAlmacen = rowcc("CveAlmacen").ToString().ToEntero()
|
||||
DdlAlmacen.SelectedValue = "-1"
|
||||
DdlAlmacen.SelectedValueExist(CveAlmacen)
|
||||
DdlPersonal.SelectedValueExist(rowcc("CvePersonal").ToString().ToEntero())
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
If dr("CveAgrupadorSAT").ToString.ToEntero = 0 Then
|
||||
DdlAgrupadorSAT.SelectedValue = "-1"
|
||||
Else
|
||||
DdlAgrupadorSAT.SelectedValueExist(dr("CveAgrupadorSAT").ToString)
|
||||
End If
|
||||
|
||||
|
||||
TxtDigAgrup.Text = dr("DigAgrup").ToString
|
||||
TxtNomIngles.Text = dr("NomIdioma").ToString
|
||||
|
||||
Dim Hijos As Integer = DtDatos.FiltraParametros(String.Format("CvePadre = {0}", IDSelected)).Rows.Count
|
||||
|
||||
If Hijos = 0 Then BtnEliminar.Visible = True
|
||||
|
||||
dt = getNodospadreHijos(dr("CvePadre").ToString.ToEntero)
|
||||
If dt.Rows.Count > 0 Then
|
||||
Dim drt As DataRow = dt.Rows(0)
|
||||
Tsubcuenta.Text = drt("Codigo").ToString
|
||||
DdlCuentaContable.SelectedValueExist(drt("CveCuenta").ToString)
|
||||
LblSubCuenta.Text = drt("Nombre").ToString
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
TxtCuenta.Enabled = True
|
||||
Guardar.Visible = True
|
||||
updatos.Visible = True
|
||||
updatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentasContables()
|
||||
|
||||
DdlCuentaContable.ClearSelection()
|
||||
DdlCuentaContable.Items.Clear()
|
||||
DdlCuentaContable.SelectedValue = Nothing
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCuentaContable.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
DdlCuentaContable.DataBind()
|
||||
DdlCuentaContable.Items.Insert(0, New ListItem("-", "-1"))
|
||||
DdlCuentaContable.SelectedValueExist("-1")
|
||||
|
||||
End Sub
|
||||
Protected Sub Guardar_Click(sender As Object, e As EventArgs) Handles Guardar.Click
|
||||
|
||||
If Tnombre.Text.Trim = "" Then Alert("Ingrese nombre de la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
Dim CveConceptoAdmin As Integer = DdlConcepto.SelectedValue.ToEntero()
|
||||
Dim CveProveedor As Integer = DdlProveedores.SelectedValue.ToEntero()
|
||||
Dim CveCliente As Integer = DdlClientesWS.SelectedValue.ToEntero()
|
||||
Dim CveClasificacion As Integer = DdlClasificacion.SelectedValue.ToEntero()
|
||||
Dim PorcentajeImpuesto As Decimal = TxtPorcentaje.Text.ToDecimal() / 100
|
||||
Dim CveBancoCuenta As Integer = ddlBancos.SelectedValue.ToEntero
|
||||
Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero()
|
||||
|
||||
|
||||
|
||||
If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then
|
||||
If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero,
|
||||
TxtDigAgrup.Text.ToString.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin,
|
||||
CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto,
|
||||
CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen, Codigo:=TxtCuenta.Text.Replace("-", ""), CvePadre:=DdlCuentaContable.SelectedValue.ToEntero) Then
|
||||
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
' Dim ObjContaEmpresa As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
' If Not ObjContaEmpresa.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
|
||||
' DdlMoneda.SelectedValue.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
|
||||
' ObjContaEmpresa.Dispose()
|
||||
' ObjConta.Dispose()
|
||||
' Exit Sub
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}")
|
||||
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
|
||||
' Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
' If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||
' Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero
|
||||
' Dim IdAgrupador As Integer
|
||||
|
||||
' If ObjConta2.GetAgrupadoresSAT() Then
|
||||
' IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
|
||||
' End If
|
||||
' If Id > 0 Then
|
||||
' If ObjConta2.UpdateCuenta(Id, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, IdAgrupador, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End Using
|
||||
'End If
|
||||
|
||||
Dim customerRow As Data.DataRow
|
||||
customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0)
|
||||
customerRow("Nombre") = Tnombre.Text
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
CargaDatos()
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
|
||||
Dim item As CheckBox = DirectCast(ArbolCuentas.FindControl(String.Format("chk{0}", IDSelected)), CheckBox)
|
||||
item.Text = String.Format("{0} - {1}", customerRow("CuentaFormato").ToString, Tnombre.Text)
|
||||
'updatos.Visible = False
|
||||
'Guardar.Visible = False
|
||||
LimpiarCampos()
|
||||
'RegistraScript("$get('BtnCambiaAgrupadorSAT').click();")
|
||||
updatos.Update()
|
||||
GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing
|
||||
Alert("La cuenta se guardo correctamente")
|
||||
|
||||
End If
|
||||
Else
|
||||
Alert("Es necesario agregar el campo 'Agrupador SAT'", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Sub
|
||||
Protected Sub nuevacuenta_Click(sender As Object, e As EventArgs) Handles nuevacuenta.Click
|
||||
|
||||
If Tnombre.Text.Trim = "" Then Alert("Ingrese nombre de la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
|
||||
If TxtCuenta.Text.Trim = "" Then Alert("Ingrese la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
'If Tcuenta.Text.Trim = "" Then Alert("Ingrese la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
|
||||
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim CuentaEfectivo As Integer = 0
|
||||
'Dim Afectable As Integer = 1 'If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable
|
||||
TxtCuenta.Text.Replace("-", "")
|
||||
Dim idnew As Integer = 0
|
||||
|
||||
Dim CveConceptoContable As Integer = DdlConcepto.SelectedValue.ToEntero()
|
||||
Dim row As DataRow = Nothing
|
||||
Dim CveTipoSaldo As Integer = 0
|
||||
Dim PorcentajeIVA As Decimal = -1
|
||||
Dim drt As DataRow
|
||||
Dim CveConceptoAdmin As Integer
|
||||
Dim CveProveedor As Integer
|
||||
Dim CveCliente As Integer
|
||||
Dim CveClasificacion As Integer
|
||||
Dim PorcentajeImpuesto As Decimal
|
||||
Dim CveBancoCuenta As Integer
|
||||
'Dim CveAlmacen As Integer = -1
|
||||
'Dim CvePersonal As Integer = -1
|
||||
Dim NombreCuenta As String
|
||||
Dim TipoCuenta As String
|
||||
Dim CuentaMayor As Integer
|
||||
Dim CveMoneda As Integer
|
||||
Dim DigAgrup As Integer
|
||||
Dim CveAgrupadorSat As Integer
|
||||
Dim NomIdioma As String
|
||||
Dim TieneError As Boolean = False
|
||||
If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
If CveConceptoContable > 0 Then
|
||||
row = DtConceptosconta.FiltroPrimero(String.Format("CveConceptoContable={0}", CveConceptoContable))
|
||||
CveTipoSaldo = row("CveTipoSaldo").ToString.ToEntero()
|
||||
End If
|
||||
If Not IsNothing(row) Then
|
||||
If CveTipoSaldo = 3 Then
|
||||
PorcentajeIVA = TxtPorcentaje.Text.ToDecimal / 100D
|
||||
End If
|
||||
End If
|
||||
ObjConta.IniciaTransacSQL()
|
||||
If Afectable Then
|
||||
If ObjConta.GetCuentas(IDSelected, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
drt = ObjConta.DtResultados.FiltroPrimero(String.Format("CveCuenta={0}", IDSelected))
|
||||
CveConceptoAdmin = If(drt("CveConceptoAdmin").ToString.ToEntero = 0, -1, drt("CveConceptoAdmin").ToString.ToEntero)
|
||||
CveProveedor = If(drt("CveProveedor").ToString.ToEntero = 0, -1, drt("CveProveedor").ToString.ToEntero)
|
||||
CveCliente = If(drt("CveCliente").ToString.ToEntero = 0, -1, drt("CveCliente").ToString.ToEntero)
|
||||
CveClasificacion = If(drt("CveClasificacion").ToString.ToEntero = 0, -1, drt("CveClasificacion").ToString.ToEntero)
|
||||
PorcentajeImpuesto = If(drt("PorcentajeImpuesto").ToString.ToEntero = 0, -1, drt("PorcentajeImpuesto").ToString.ToEntero)
|
||||
CveBancoCuenta = If(drt("CveBancoCuenta").ToString.ToEntero = 0, -1, drt("CveBancoCuenta").ToString.ToEntero)
|
||||
'CveAlmacen = IIf(drt("CveAlmacen").ToString.ToEntero = 0, -1, drt("CveAlmacen").ToString.ToEntero)
|
||||
'CvePersonal = IIf(drt("CvePersonal").ToString.ToEntero = 0, -1, drt("CvePersonal").ToString.ToEntero)
|
||||
NombreCuenta = If(drt("Nombre").ToString = "", "", drt("Nombre").ToString)
|
||||
TipoCuenta = If(drt("Tipo").ToString = "", "", drt("Tipo").ToString)
|
||||
CuentaMayor = If(drt("CtaMayor").ToString.ToEntero = 0, 0, drt("CtaMayor").ToString.ToEntero)
|
||||
CveMoneda = If(drt("CveMoneda").ToString.ToEntero = -1, -1, drt("CveMoneda").ToString.ToEntero)
|
||||
DigAgrup = If(drt("DigAgrup").ToString.ToEntero = -1, -1, drt("DigAgrup").ToString.ToEntero)
|
||||
CveAgrupadorSat = If(drt("CveAgrupadorSAT").ToString.ToEntero = 0, -1, drt("CveAgrupadorSAT").ToString.ToEntero)
|
||||
NomIdioma = If(drt("NomIdioma").ToString = "", "", drt("NomIdioma").ToString)
|
||||
idnew = ObjConta.AddCuenta(CvePadre, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
|
||||
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente,
|
||||
CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta)
|
||||
If idnew > 0 Then
|
||||
If ObjConta.UpdateTraspasoPrepoliza(UsuarioActual.CveEmpresa, IDSelected, idnew) Then
|
||||
If Not ObjConta.UpdateCuenta(IDSelected.ToEntero, NombreCuenta, TipoCuenta, CuentaMayor, CveMoneda,
|
||||
DigAgrup, CveAgrupadorSat, NomIdioma) Then
|
||||
TieneError = True
|
||||
ObjConta.RollBack()
|
||||
ObjConta.Dispose()
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
Alert("El traspaso de movimientos en la cuenta tuvo un error.", TipoMensaje.MsgError)
|
||||
TieneError = True
|
||||
ObjConta.RollBack()
|
||||
ObjConta.Dispose()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
idnew = ObjConta.AddCuenta(IDSelected, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
|
||||
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, PorcentajeImpuesto:=PorcentajeIVA)
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Es necesario agregar el campo 'Agrupador SAT'", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
If idnew > 0 Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim codigoPadre As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text
|
||||
If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||
Dim IdPadre As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero
|
||||
Dim IdAgrupador As Integer
|
||||
|
||||
If ObjConta2.GetAgrupadoresSAT() Then
|
||||
IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
|
||||
End If
|
||||
|
||||
|
||||
codigoPadre = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
ObjConta2 = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjConta2.IniciaTransacSQL()
|
||||
If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||
IdPadre = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero
|
||||
If ObjConta2.GetAgrupadoresSAT() Then
|
||||
IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
|
||||
End If
|
||||
|
||||
If IdPadre > 0 Then
|
||||
Dim idnew2 As Integer = ObjConta2.AddCuenta(TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, CuentaEfectivo, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, TxtNomIngles.Text.Trim, 1, IdPadre, IdAgrupador)
|
||||
|
||||
If idnew2 > 0 Then
|
||||
If Not ObjConta.UpdateCuentaCompaq(idnew, idnew2, UsuarioActual.CveEmpresa) Then
|
||||
TieneError = True
|
||||
ObjConta2.RollBack()
|
||||
ObjConta.RollBack()
|
||||
Alert("Ocurrio un error al vincultar la cuenta con SIG y Compaq", TipoMensaje.MsgError)
|
||||
Else
|
||||
ObjConta2.Commit()
|
||||
End If
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
ObjConta2.RollBack()
|
||||
Alert("Ocurrio un error al crear la cuenta en Compaq", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjConta2.Dispose()
|
||||
End If
|
||||
If Not TieneError Then
|
||||
Dim dr As DataRow = DtDatos.NewRow
|
||||
dr("CveCuenta") = idnew
|
||||
dr("CuentaFormato") = TxtCuenta.Text
|
||||
'dr("CuentaFormato") = Tcuenta.Text
|
||||
dr("Nombre") = Tnombre.Text
|
||||
dr("CuentaFormatoNombre") = String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text)
|
||||
dr("Tipo") = DTcuenta.SelectedValue.ToString
|
||||
dr("CtaMayor") = DcuentaMayor.SelectedValue.ToString
|
||||
dr("CvePadre") = IDSelected
|
||||
dr("Codigo") = Tnombre.Text
|
||||
dr("CveMoneda") = DdlMoneda.SelectedValue.ToEntero
|
||||
dr("DigAgrup") = TxtDigAgrup.Text.Trim.ToEntero
|
||||
dr("NomIdioma") = TxtNomIngles.Text.Trim
|
||||
DtDatos.Rows.Add(dr)
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
'.Attributes.Add("data-hijos","0");
|
||||
Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem)
|
||||
item.Attributes.Item("data-hijos") = (item.Attributes.Item("data-hijos").ToEntero + 1).ToString
|
||||
Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", IDSelected)), ADServerControl.DragableUL)
|
||||
If (IsNothing(objul)) Then
|
||||
objul = New ADServerControl.DragableUL
|
||||
objul.ID = String.Format("ul{0}", item.Cve)
|
||||
item.Controls.Add(objul)
|
||||
End If
|
||||
ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text))
|
||||
|
||||
End If
|
||||
End If
|
||||
If ObjConta2 IsNot Nothing Then ObjConta2.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
ObjConta.RollBack()
|
||||
Alert("Ocurrio un error al crear la cuenta", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
ObjConta.Commit()
|
||||
GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing
|
||||
CargaDatos()
|
||||
LimpiarCampos()
|
||||
updatos.Update()
|
||||
Alert("La cuenta se guardo correctamente", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub LimpiarCampos()
|
||||
TxtCuenta.Text = ""
|
||||
'Tcuenta.Text = ""
|
||||
Tnombre.Text = ""
|
||||
DTcuenta.SelectedValue = "-1"
|
||||
DcuentaMayor.SelectedValue = "-1"
|
||||
DdlAgrupadorSAT.SelectedValue = "-1"
|
||||
Tsubcuenta.Text = ""
|
||||
TxtDigAgrup.Text = ""
|
||||
Guardar.Visible = False
|
||||
nuevacuenta.Visible = False
|
||||
TxtCuenta.Enabled = False
|
||||
'Tcuenta.Enabled = False
|
||||
DdlCuentaContable.SelectedValueExist(-1)
|
||||
DdlCuentaContable.Visible = False
|
||||
Tsubcuenta.Visible = True
|
||||
BtnEliminar.Visible = False
|
||||
End Sub
|
||||
|
||||
Protected Sub borrar_Click(sender As Object, e As EventArgs) Handles borrar.Click
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
'ObjConta.IniciaTransacSQL()
|
||||
|
||||
If ObjConta.RemoveCuenta(IDSelected.ToEntero) Then
|
||||
|
||||
Dim customerRow As Data.DataRow
|
||||
customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0)
|
||||
customerRow("CvePadre") = "-5"
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem)
|
||||
Dim padre As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", item.CvePadre)), ADServerControl.DragableItem)
|
||||
padre.Attributes.Item("data-hijos") = (padre.Attributes.Item("data-hijos").ToEntero - 1).ToString
|
||||
ArbolCuentas.Controls.Remove(item)
|
||||
RegistraScript(String.Format("$('#{0}').click();", editar.ClientID))
|
||||
|
||||
LimpiarCampos()
|
||||
upcuentas.Update()
|
||||
Alert("La Cuenta ha sido eliminada", TipoMensaje.MsgInformacion)
|
||||
|
||||
Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}")
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||
Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero
|
||||
|
||||
If Id > 0 Then
|
||||
If ObjConta2.RemoveCuenta(Id) Then
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjConta2.Dispose()
|
||||
|
||||
End If
|
||||
GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
Else
|
||||
Alert("La Cuenta no pudo ser eliminada", TipoMensaje.MsgError)
|
||||
' ObjConta.RollBack()
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Sub
|
||||
'Protected Sub BtnCambiaAgrupadorSAT_Click(sender As Object, e As EventArgs)
|
||||
' CargaAgrupadorSAT()
|
||||
'End Sub
|
||||
Protected Sub DdlConcepto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
onconceptochange()
|
||||
End Sub
|
||||
Private Sub onconceptochange(Optional CveCuenta As Integer = -1)
|
||||
PnlOpcion1.Visible = False
|
||||
pnlOpcion2.Visible = False
|
||||
pnlOpcion3.Visible = False
|
||||
pnlOpcion4.Visible = False
|
||||
pnlOpcion5.Visible = False
|
||||
pnlOpcion6.Visible = False
|
||||
Dim CveConceptoContable As Integer = DdlConcepto.SelectedValue.ToEntero()
|
||||
Dim row As DataRow = Nothing
|
||||
Dim CveTipoSaldo As Integer = 0
|
||||
Dim CveParejaContable As Integer = 0
|
||||
If CveConceptoContable > 0 Then
|
||||
row = DtConceptosconta.FiltroPrimero(String.Format("CveConceptoContable={0}", CveConceptoContable))
|
||||
CveTipoSaldo = row("CveTipoSaldo").ToString.ToEntero()
|
||||
CveParejaContable = row("CveParejaContable").ToString().ToEntero()
|
||||
End If
|
||||
If Not IsNothing(row) Then
|
||||
Select Case CveTipoSaldo
|
||||
Case 1
|
||||
PnlOpcion1.Visible = True
|
||||
Case 2
|
||||
pnlOpcion2.Visible = True
|
||||
Case 3
|
||||
pnlOpcion2.Visible = True
|
||||
pnlOpcion3.Visible = True
|
||||
'If DdlClasificacion.Items.Count < 2 Then
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataBind()
|
||||
'End If
|
||||
Case 4
|
||||
pnlOpcion4.Visible = True
|
||||
Case 5
|
||||
pnlOpcion5.Visible = True
|
||||
|
||||
Case 6
|
||||
pnlOpcion6.Visible = True
|
||||
Case 8
|
||||
pnlOpcion8.Visible = True
|
||||
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlPersonal.DataBind()
|
||||
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub LnkImprimirExcel_Click(sender As Object, e As EventArgs)
|
||||
Imprime("Excel")
|
||||
End Sub
|
||||
Private Sub Imprime(Formato As String)
|
||||
If DtDatos IsNot Nothing Then
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Cuentas.rdlc", DtDatos, params, "Cuentas", Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1,311 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogo.aspx.vb" Inherits="AC2_RepAnexoCatalogo" EnableEventValidation="false" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.table-VH {
|
||||
padding-top: 58px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label runat="server" ID="LbTitulo" Text="Anexo del Catálogo"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" ValidationGroup="Valida" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<%--<div class="row">--%>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Cuenta
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Tipo Movto
|
||||
</div>
|
||||
<div class="col-md-2 truncate">
|
||||
<asp:DropDownList ID="DdlCuenta" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos y saldo no igual a cero" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" id="tdTipoReporte" visible="false" runat="server">
|
||||
Tipo
|
||||
</div>
|
||||
<div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1" id="divProyecto" runat="server">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" CssClass="ScrollAD table table-smallpadding Widthall" data-heighterror="375" data-freezecols="0" data-freezerows="-1"
|
||||
ShowHeader="True" ShowHeaderWhenEmpty="true" AllowPaging="False" ShowFooter="False" EmptyDataText="No se encontraron cuentas con los parametros establecidos." AutoGenerateColumns="False" OnRowDataBound="GvIngresos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="180" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Iniciales">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Iniciales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
<asp:Label ID="LbSaldoInicial2" runat="server" Width="30px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Actuales">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Actuales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
<asp:Label ID="LbSaldoActual" runat="server" Width="30px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
<%-- function pageLoad(sender, args) {
|
||||
|
||||
$(function () {
|
||||
//Genero las cuentas en el arreglo
|
||||
var ArrCuentas = [<%= WSCuentas()%>];
|
||||
|
||||
$("#TxtCuenta").autocomplete({
|
||||
minLength: 0,
|
||||
source: ArrCuentas,
|
||||
focus: function (event, ui) {
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
return false;
|
||||
},
|
||||
select: function (event, ui) {
|
||||
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
|
||||
//$("#project-description").html(ui.item.desc);
|
||||
//$("#project-icon").attr("src", "images/" + ui.item.icon);
|
||||
|
||||
return false;
|
||||
}
|
||||
})
|
||||
//.autocomplete("instance")._renderItem = function (ul, item) {
|
||||
// return $("<li>")
|
||||
// .append("<a>" + item.label + "</a>")
|
||||
// .appendTo(ul);
|
||||
//};
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('input[type=text]').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('select').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}--%>
|
||||
|
||||
function Enable() {
|
||||
var Producto = $get("DdlTipoCuentas").value;
|
||||
if (Producto == "-2") {
|
||||
//document.getElementById("TxtCuenta").disabled = false;
|
||||
document.getElementById("C_DdlCuentas").disabled = false;
|
||||
//document.getElementById("TxtCuenta").focus();
|
||||
//alert(Producto);
|
||||
}
|
||||
else {
|
||||
//document.getElementById("TxtCuenta").value = " ";
|
||||
//document.getElementById("TxtCuenta").disabled = true;
|
||||
$get("C_DdlCuentas").value = "-1";
|
||||
document.getElementById("C_DdlCuentas").disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
function Scroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 360;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#<%=GvDatos.ClientID%>').ADScroll({
|
||||
height: Alto
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
@@ -1,315 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC2_RepAnexoCatalogo
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicio As Date
|
||||
Get
|
||||
FechaInicio = ViewState("FechaInicio").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaFin As Date
|
||||
Get
|
||||
FechaFin = ViewState("FechaFin").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IdCuenta As Integer
|
||||
Get
|
||||
IdCuenta = ViewState("CveCuenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
'Private Property DTCuentas As DataTable
|
||||
' Get
|
||||
' Return CType(ViewState("DTCuentas"), DataTable)
|
||||
' End Get
|
||||
' Set(value As DataTable)
|
||||
' ViewState("DTCuentas") = value
|
||||
' End Set
|
||||
'End Property
|
||||
Private Property CveProyecto As String
|
||||
Get
|
||||
CveProyecto = ViewState("CveProyecto").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("CveProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveSubProyecto As String
|
||||
Get
|
||||
CveSubProyecto = ViewState("CveSubProyecto").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("CveSubProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TP").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TP") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.CveEmpresa <> 119 Then
|
||||
' Response.Redirect($"/Contabilidad/RepAnexoCatalogo.aspx")
|
||||
'End If
|
||||
|
||||
Dim ErrorParametros = True
|
||||
DtDatos = Nothing
|
||||
CargaTipoCuentas()
|
||||
|
||||
FechaInicio = NowADS().FirstDayOfMonth
|
||||
FechaFin = NowADS()
|
||||
|
||||
'If UsuarioActual.Empresa.UsaAC Then
|
||||
' TipoReporte = -1
|
||||
'Else
|
||||
' TipoReporte = 1
|
||||
' tdTipoReporte.Visible = True
|
||||
' tdTipoReporte2.Visible = True
|
||||
'End If
|
||||
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
'If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
IdCuenta = Request("CveCuenta").ToEntero
|
||||
'FechaInicio = Request("FI").ToDate
|
||||
FechaFin = Request("FF").ToDate
|
||||
DdlCuentas.SelectedValueExist(IdCuenta)
|
||||
|
||||
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
FechaInicio = Request("FI").ToDate
|
||||
Else
|
||||
If Request("ER") IsNot Nothing AndAlso Request("ER").ToString = "1" Then
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
Else
|
||||
FechaInicio = ("1900/01/01").ToDate
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Request("CM") IsNot Nothing AndAlso IsNumeric(Request("CM")) AndAlso Request("CM").ToEntero > 0 Then
|
||||
DdlCuenta.SelectedValueExist(Request("CM").ToString)
|
||||
End If
|
||||
|
||||
If Request("CveProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveProyecto")) Then
|
||||
CveProyecto = Request("CveProyecto").ToString
|
||||
DdlProyecto.SelectedValueExist(CveProyecto)
|
||||
DdlProyecto_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then
|
||||
CveSubProyecto = Request("CveSubProyecto").ToString
|
||||
DdlSubproyecto.SelectedValueExist(CveSubProyecto)
|
||||
End If
|
||||
|
||||
ErrorParametros = False
|
||||
|
||||
If Request("TP") IsNot Nothing AndAlso IsNumeric(Request("TP")) AndAlso Request("TP").ToEntero > 0 Then
|
||||
TipoReporte = Request("TP").ToEntero
|
||||
|
||||
DdlTipoReporte.SelectedValue = TipoReporte.ToString
|
||||
End If
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
|
||||
|
||||
txtFechaI.Text = FechaInicio.ToShortDateString
|
||||
txtFechaF.Text = FechaFin.ToShortDateString
|
||||
|
||||
If Not ErrorParametros Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
|
||||
Private Sub CargaTipoCuentas()
|
||||
'Dim ObjTipoCuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjTipoCuenta As New ClsContabilidad
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
DdlCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
' DdlCuentas.DataSource = ObjTipoCuenta.DtResultados
|
||||
End If
|
||||
ObjTipoCuenta.Dispose()
|
||||
|
||||
DdlCuentas.DataBind()
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos")
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If Request("TipoReporte") IsNot Nothing Then
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
Else
|
||||
TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
End If
|
||||
'Dim CveSubProyecto As String
|
||||
|
||||
CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero.ToString
|
||||
CveProyecto = DdlProyecto.SelectedValue.ToEntero.ToString
|
||||
|
||||
If ObjConta.GetAnexoCatalogo(IdCuenta, FechaInicio, FechaFin, DdlCuenta.SelectedValue.ToEntero, CveProyecto.ToEntero, CveSubProyecto.ToEntero, UsuarioActual.CveEmpresa, TipoReporte) Then
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
DtDatos = ObjConta.DtResultados.FiltraParametros(" SaldoInicial <> 0 OR Cargos <> 0 OR Abonos <> 0")
|
||||
Else
|
||||
DtDatos = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
CargaGrid()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
'GvDatos.Dispose()
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
RegistraScript("Scroll();")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CveCuenta").ToEntero = IdCuenta Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
'e.Row.ControlStyle.Font.Size = 9
|
||||
'e.Row.ControlStyle.Height = 30
|
||||
Else
|
||||
e.Row.ControlStyle.Font.Bold = False
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("CtaMayor") = "4" Or e.Row.DBCampo("CtaMayor") = "1" Then
|
||||
' e.Row.ControlStyle.Font.Bold = True
|
||||
'End If
|
||||
|
||||
'Acomoda Deudor y Acreedor
|
||||
If e.Row.DBCampo("Tipo") <> "D" Then
|
||||
'e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0}{1}", e.Row.DBCampo("SaldoInicial").FormatoNumero, " ")
|
||||
e.Row.FCLabel("LbSaldoInicial2").Visible = True
|
||||
e.Row.FCLabel("LbSaldoActual").Visible = True
|
||||
End If
|
||||
|
||||
'Colorea NEGATIVOS
|
||||
If e.Row.DBCampo("SaldoInicial").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Cargos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Abonos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("SaldoActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLSaldoActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveProyecto={3}&CveSubProyecto={4}&TP={5}", e.Row.DBCampo("CveCuenta"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveProyecto, CveSubProyecto, TipoReporte)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte("Excel")
|
||||
'GvDatos.ExportToExcelG("AnexoCatalogo" & NowADS().ToShortDateString & ".xlsx")
|
||||
'GvDatos.ExportToExcelG("ExistenciasHorizontal.xlsx", "Anexo Catalogo", UsuarioActual, "".ToString, 100, 200)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "Contabilidad/Reportes/RepAnexoCatalogo.rdlc"
|
||||
'nombre del reporte
|
||||
Dim fileName As String = "AnexoCatalogo"
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("IdCuenta", IdCuenta.ToString))
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("usuarioImprimio", UsuarioActual.Nombre))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("pFechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
Public Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
|
||||
If DdlCuentas.SelectedValue.ToEntero = -1 Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate)
|
||||
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate)
|
||||
IdCuenta = DdlCuentas.SelectedValue.ToEntero
|
||||
CargaDatos()
|
||||
End If
|
||||
'RegistraScript("Enable();")
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,213 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepBalanzaComprobacion.aspx.vb" Inherits="Contabilidad2_RepBalanzaComprobacion" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" Visible="true" /> --%>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Balanza de Comprobación
|
||||
<asp:Label runat="server" ID="LbTitulo"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" ValidationGroup="GrpConsulta" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Fecha Inicio:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVTxtFechaDel" runat="server" ControlToValidate="TxtFechaDel" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaDel" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaDel" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Fecha Fin:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVTxtFechaAl" runat="server" ControlToValidate="TxtFechaAl" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaAl" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaAl" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Cuentas:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="form-control input-sm select2me" runat="server" ID="DdlTipoCuentas" Width="150px">
|
||||
<asp:ListItem Text="Todas" Value="1" />
|
||||
<asp:ListItem Text="Con Movimientos" Value="2" />
|
||||
<asp:ListItem Text="Saldo Actual no igual a cero" Value="3" />
|
||||
<asp:ListItem Text="Con Movimientos y saldo no igual a cero" Value="4" />
|
||||
<asp:ListItem Text="Con Movimientos o saldo no igual a cero " Value="5" />
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlTipoCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" runat="server" visible="false">Tipo:</label>
|
||||
<div class="col-md-2" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<label class="col-md-1" >Nivel: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlNivel" runat="server" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" >
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayores" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Último nivel" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div
|
||||
|
||||
<label class="col-md-1">Vista: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlVista" runat="server" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" >
|
||||
<asp:ListItem Selected="True" Text="Contable" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="SAT" Value="1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px" align="left;">
|
||||
|
||||
<input type="text" id="TxtBusquedaIndicadores" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaIndicadores','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaIndicadores','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
|
||||
runat="server" GridLines="None" EmptyDataText="No se encontraron cuentas con los parametros establecidos." AutoGenerateColumns="False" OnRowDataBound="GvIngresos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="180" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Iniciales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbSaldoInicial" Style="white-space: pre;" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Actuales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSaldoActual" Style="white-space: pre;" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<asp:Label ID="LbSaldoActual" Style="white-space: pre;" runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,252 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contabilidad2_RepBalanzaComprobacion
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicio As Date
|
||||
Get
|
||||
FechaInicio = ViewState("FechaInicio").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFin As Date
|
||||
Get
|
||||
FechaFin = ViewState("FechaFin").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IdCuenta As Integer
|
||||
Get
|
||||
IdCuenta = ViewState("IdCuenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("IdCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property ModoImpresion As Boolean
|
||||
Get
|
||||
ModoImpresion = CType(ViewState("ModoImpresion"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ModoImpresion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveProyecto As Integer
|
||||
Get
|
||||
CveProyecto = ViewState("CveProyecto").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveSubProyecto As Integer
|
||||
Get
|
||||
CveSubProyecto = ViewState("CveSubProyecto").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveSubProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
' Response.Redirect($"/Contabilidad/RepBalanzaComprobacion.aspx")
|
||||
'End If
|
||||
|
||||
Dim ErrorParametros = True
|
||||
ModoImpresion = False
|
||||
TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
|
||||
TxtFechaAl.Text = NowADS().ToShortDateString
|
||||
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
'If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
IdCuenta = Request("CveCuenta").ToEntero
|
||||
'FechaInicio = Request("FI").ToDate
|
||||
FechaFin = Request("FF").ToDate
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
ErrorParametros = False
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
If Not ErrorParametros Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos")
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
Private Sub CargaDatos()
|
||||
' Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero.ToEntero
|
||||
CveProyecto = DdlProyecto.SelectedValue.ToEntero.ToEntero
|
||||
|
||||
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
|
||||
If TipoReporte = 1 Then
|
||||
'mostrar cuales son las cuentas que no tienen asignado el agrupador que sean afectables
|
||||
|
||||
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||
Dim dtt As DataTable = ObjConta.DtResultados.FiltraParametros("CveAgrupadorSAT is null and not Codigo like '_%'")
|
||||
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
||||
Dim str As New StringBuilder
|
||||
For Each dr As DataRow In dtt.Rows
|
||||
str.AppendFormat(" - {0} </br>", dr("CtaCodigo"))
|
||||
Next
|
||||
Alert(str.ToString)
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, DdlTipoCuentas.SelectedValue.ToEntero, TipoReporte, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, DdlVista.SelectedValue.ToEntero, DdlNivel.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
CargaGrid()
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
|
||||
CargaDatos()
|
||||
|
||||
RegistraScript("Enable();")
|
||||
End Sub
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CtaMayor") = "1" OrElse e.Row.DBCampo("CtaMayor") = "3" OrElse e.Row.DBCampo("CtaMayor") = "4" Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
End If
|
||||
|
||||
'Acomoda Deudor y Acreedor
|
||||
If e.Row.DBCampo("CveTipo") = "1" Then
|
||||
e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0} ", e.Row.DBCampo("SaldoInicial").FormatoNumero)
|
||||
e.Row.FCLabel("LbSaldoActual").Text = " "
|
||||
End If
|
||||
|
||||
'Colorea NEGATIVOS
|
||||
If e.Row.DBCampo("SaldoInicial").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Cargos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Abonos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("SaldoActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLSaldoActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
'Total general
|
||||
If e.Row.DBCampo("Id") = "" Then
|
||||
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
e.Row.ControlStyle.Font.Size = 9
|
||||
e.Row.ControlStyle.Height = 30
|
||||
e.Row.FCLabel("LbNombre").Text = "Sumas Iguales"
|
||||
e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0} <br/>{1}", e.Row.DBCampo("SaldoID").FormatoNumero, e.Row.DBCampo("SaldoIA").FormatoNumero)
|
||||
e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("TotalCargos").FormatoNumero
|
||||
e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("TotalAbonos").FormatoNumero
|
||||
e.Row.FCLabel("LbSaldoActual").Visible = True
|
||||
e.Row.FCLabel("LbSaldoActual").Text = String.Format("{0} <br/>{1}", e.Row.DBCampo("SaldoAD").FormatoNumero, e.Row.DBCampo("SaldoAA").FormatoNumero)
|
||||
Else
|
||||
If ModoImpresion Then e.Row.Cells(5).Text = e.Row.FCHyperLink("HLSaldoActual").Text Else e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("ID"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveProyecto, CveSubProyecto)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click
|
||||
ModoImpresion = True
|
||||
|
||||
CargaDatos()
|
||||
|
||||
ImprimirReporte()
|
||||
|
||||
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "Contabilidad/Reportes/RepBalanzaComprobacion.rdlc"
|
||||
'nombre del reporte
|
||||
Dim fileName As String = "BalanzaComprobacion"
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("pFechaIni", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,563 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoResultados.aspx.vb" Inherits="Contabilidad2_RepEstadoResultados" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="CSS" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="E" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
function pageLoad() {
|
||||
$(document).ready(function () {
|
||||
gridviewScrollMensual();
|
||||
gridviewScrollAnual();
|
||||
});
|
||||
|
||||
function gridviewScrollMensual() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 250;
|
||||
|
||||
$('#<%=GvDatosMensual.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto,
|
||||
freezesize: 1,
|
||||
headerrowcount: 1
|
||||
});
|
||||
}
|
||||
|
||||
function gridviewScrollAnual() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 250;
|
||||
|
||||
$('#<%=GvDatosAnual.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto,
|
||||
freezesize: 1,
|
||||
headerrowcount: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" Text="Consultar" runat="server" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1" style="width: 60px;">Ejercicio:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicio" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm" runat="server" Width="70px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="TdPeriodo" visible="false">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate" style="padding-right:2px;">Periodo:</label>
|
||||
<div class="col-md-7">
|
||||
<asp:DropDownList ID="DdlPeriodo" CssClass="form-control input-sm" runat="server">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" Style="max-width: 200px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="Div1" visible="true">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Tipo:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" runat="server" id="TdSubTotales" visible="false">
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate" style="padding-right:2px;">SubTotales:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlSubtotales" CssClass="form-control input-sm" runat="server">
|
||||
<asp:ListItem Text="Sin Subtotales" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Trimestral" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Cuatrimestral" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer runat="server" ID="TabContainer" AutoPostBack="true" OnActiveTabChanged="TabContainer_ActiveTabChanged">
|
||||
|
||||
<%--NORMAL--%>
|
||||
<ajax:TabPanel HeaderText="Estado de Resultados" ID="TabNormal" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<table style="width: 100%;" class="table">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvIngresos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvIngresos_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Font-Size="14px" Text="INGRESOS Y OTROS BENEFICIOS"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" Width="400px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Período Actual">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeActual" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Período Acumulado">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle> <RowStyle CssClass="Texto" /> <AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvGastos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvGastos_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Font-Size="14px" Text="GASTOS Y OTRAS PÉRDIDAS"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" Width="400px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Período Actual">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeActual" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Período Acumulado">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle> <RowStyle CssClass="Texto" /> <AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<asp:UpdatePanel ID="UpdatePanel3" runat="server" Visible="false">
|
||||
<ContentTemplate>
|
||||
<table style="width: 90%;" class="table table-striped table-advance table-hover">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h3>Resultados del Ejercicio (Ahorro/Desahorro):</h3>
|
||||
</td>
|
||||
<td width="120px" align="right">
|
||||
<asp:Label runat="server" Font-Bold="true" ID="LbTotalActual"></asp:Label>
|
||||
</td>
|
||||
<td width="120px" align="right">
|
||||
<asp:Label runat="server" Font-Bold="true" ID="LbTotalAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<%--MENSUAL--%>
|
||||
<ajax:TabPanel HeaderText="Estado de Resultados Mensual" ID="TabMensual" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatosMensual" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatosMensual" CssClass="table table-advance table-striped table-hover Widthall" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="400" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Enero">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLEnero" runat="server" Text='<%# Eval("Enero", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeEnero" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Febrero">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLFebrero" runat="server" Text='<%# Eval("Febrero", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeFebrero" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Marzo">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLMarzo" runat="server" Text='<%# Eval("Marzo", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeMarzo" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Subtotal 1er Trimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLTrimestral1" runat="server" Text='<%# Eval("Trimestral1", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeTrimestral1" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Abril">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAbril" runat="server" Text='<%# Eval("Abril", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAbril" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Subtotal 1er Cuatrimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLCuatrimestral1" runat="server" Text='<%# Eval("Cuatrimestral1", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeCuatrimestral1" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Mayo">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLMayo" runat="server" Text='<%# Eval("Mayo", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeMayo" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Junio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLJunio" runat="server" Text='<%# Eval("Junio", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeJunio" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Subtotal 2do Trimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLTrimestral2" runat="server" Text='<%# Eval("Trimestral2", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeTrimestral2" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Julio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLJulio" runat="server" Text='<%# Eval("Julio", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeJulio" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Agosto">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAgosto" runat="server" Text='<%# Eval("Agosto", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAgosto" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Subtotal 2do Cuatrimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLCuatrimestral2" runat="server" Text='<%# Eval("Cuatrimestral2", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeCuatrimestral2" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Septiembre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSeptiembre" runat="server" Text='<%# Eval("Septiembre", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeSeptiembre" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Subtotal 3er Trimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLTrimestral3" runat="server" Text='<%# Eval("Trimestral3", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeTrimestral3" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Octubre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLOctubre" runat="server" Text='<%# Eval("Octubre", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeOctubre" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Noviembre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLNoviembre" runat="server" Text='<%# Eval("Noviembre", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeNoviembre" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Diciembre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLDiciembre" runat="server" Text='<%# Eval("Diciembre", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeDiciembre" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Subtotal 4to Trimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLTrimestral4" runat="server" Text='<%# Eval("Trimestral4", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeTrimestral4" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Subtotal 3er Cuatrimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLCuatrimestral3" runat="server" Text='<%# Eval("Cuatrimestral3", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeCuatrimestral3" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<%--ANUAL--%>
|
||||
<ajax:TabPanel HeaderText="Estado de Resultados Anual" ID="TabAnual" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatosAnual" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatosAnual" CssClass="table table-advance table-striped table-hover Widthall" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="400" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano1" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno1" runat="server" Text='<%# Eval("Ano1", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno1" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano2" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno2" runat="server" Text='<%# Eval("Ano2", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno2" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano3" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno3" runat="server" Text='<%# Eval("Ano3", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno3" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano4" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno4" runat="server" Text='<%# Eval("Ano4", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno4" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano5" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno5" runat="server" Text='<%# Eval("Ano5", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno5" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano6" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno6" runat="server" Text='<%# Eval("Ano6", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno6" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano7" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno7" runat="server" Text='<%# Eval("Ano7", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno7" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano8" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno8" runat="server" Text='<%# Eval("Ano8", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno8" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano9" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno9" runat="server" Text='<%# Eval("Ano9", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno9" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano10" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno10" runat="server" Text='<%# Eval("Ano10", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno10" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano11" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno11" runat="server" Text='<%# Eval("Ano11", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno11" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano12" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno12" runat="server" Text='<%# Eval("Ano12", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno12" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano13" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno13" runat="server" Text='<%# Eval("Ano13", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno13" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano14" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno14" runat="server" Text='<%# Eval("Ano14", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno14" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano15" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno15" runat="server" Text='<%# Eval("Ano15", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno15" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano16" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno16" runat="server" Text='<%# Eval("Ano16", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno16" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano17" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno17" runat="server" Text='<%# Eval("Ano17", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno17" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano18" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno18" runat="server" Text='<%# Eval("Ano18", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno18" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano19" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno19" runat="server" Text='<%# Eval("Ano19", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno19" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano20" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno20" runat="server" Text='<%# Eval("Ano20", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno20" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,664 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad2_RepEstadoResultados
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region " PROPIEDADES NORMAL "
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtIngresos As DataTable
|
||||
Get
|
||||
DtIngresos = DirectCast(ViewState("DtIngresos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtIngresos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtGastos As DataTable
|
||||
Get
|
||||
DtGastos = DirectCast(ViewState("DtGastos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtGastos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActual As Double
|
||||
Get
|
||||
TotalActual = ViewState("TotalActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalAnterior As Double
|
||||
Get
|
||||
TotalAnterior = ViewState("TotalAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaI As String
|
||||
Get
|
||||
Return ViewState("FechaI").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaI") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaF As String
|
||||
Get
|
||||
Return ViewState("FechaF").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaF") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property ReporteComplementario As Boolean
|
||||
Get
|
||||
ReporteComplementario = CBool(ViewState("ReporteComplementario").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ReporteComplementario") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region " PROPIEDADES MENSUAL "
|
||||
Private Property DtDatosMensual As DataTable
|
||||
Get
|
||||
DtDatosMensual = DirectCast(ViewState("DtDatosMensual"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatosMensual") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " PROPIEDADES ANUAL "
|
||||
Private Property DtDatosAnual As DataTable
|
||||
Get
|
||||
DtDatosAnual = DirectCast(ViewState("DtDatosAnual"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatosAnual") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property Anos As Integer
|
||||
Get
|
||||
Anos = ViewState("Anos").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("Anos") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
Private Property TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TipoReporte").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoReporte") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Response.Redirect($"/Contabilidad/RepEstadoResultados.aspx")
|
||||
End If
|
||||
|
||||
'tdTipoReporte.Visible = True
|
||||
TipoReporte = 1
|
||||
|
||||
|
||||
CargaDatosGenerales()
|
||||
|
||||
DdlEjercicio.SelectedValue = NowADS().Year.ToString
|
||||
|
||||
Anos = 0
|
||||
|
||||
'Normal
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
DdlPeriodo.SelectedValue = NowADS().Month.ToString
|
||||
|
||||
TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatosGenerales()
|
||||
'Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ClsConta As New ClsContabilidad
|
||||
|
||||
If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
|
||||
ClsConta.Dispose()
|
||||
|
||||
DdlEjercicio.DataBind()
|
||||
End Sub
|
||||
|
||||
#Region " NORMAL "
|
||||
|
||||
Private Sub CargaDatos()
|
||||
FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetEstadoActividades(FechaI.ToDate, FechaF.ToDate, TipoReporte, -1, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Estado de Actividades", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
CargaGrids()
|
||||
SumaTotales()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGrids()
|
||||
DtIngresos = DtDatos.FiltraParametros("Orden Like '0004%' OR Tipo = 'H'")
|
||||
DtGastos = DtDatos.FiltraParametros("Orden Like '0005%' OR Tipo = 'G'")
|
||||
Dim Row As DataRow = DtIngresos.NewRow
|
||||
|
||||
|
||||
Dim TotalActualLocal = 0.0, TotalAnteriorLocal = 0.0
|
||||
|
||||
|
||||
If DtIngresos.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As DataRow In DtIngresos.FiltraParametros("CtaMayor = 1").Rows
|
||||
TotalActualLocal += dr("ImporteActual").ToString.ToDouble
|
||||
TotalAnteriorLocal += dr("ImporteAcumulado").ToString.ToDouble
|
||||
Next
|
||||
|
||||
Row.Item("Nombre") = "TOTAL INGRESOS "
|
||||
Row.Item("ImporteActual") = TotalActualLocal.ToString
|
||||
Row.Item("PorcentajeActual") = "100"
|
||||
Row.Item("ImporteAcumulado") = TotalAnteriorLocal.ToString
|
||||
Row.Item("PorcentajeAcumulado") = "100"
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtIngresos.Rows.Add(Row)
|
||||
Else
|
||||
Row.Item("Nombre") = "TOTAL INGRESOS "
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAcumulado") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtIngresos.Rows.Add(Row)
|
||||
End If
|
||||
|
||||
Dim T1 = TotalActualLocal, T2 = TotalAnteriorLocal
|
||||
|
||||
TotalActual = TotalActualLocal
|
||||
TotalAnterior = TotalAnteriorLocal
|
||||
|
||||
TotalActualLocal = 0
|
||||
TotalAnteriorLocal = 0
|
||||
|
||||
Row = DtGastos.NewRow
|
||||
If DtGastos.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As DataRow In DtGastos.FiltraParametros("CtaMayor = 1").Rows
|
||||
TotalActualLocal += dr("ImporteActual").ToString.ToDouble
|
||||
TotalAnteriorLocal += dr("ImporteAcumulado").ToString.ToDouble
|
||||
Next
|
||||
|
||||
Row.Item("Nombre") = "TOTAL GASTOS"
|
||||
Row.Item("ImporteActual") = TotalActualLocal
|
||||
Row.Item("PorcentajeActual") = If(T1 > 0, (TotalActualLocal * 100 / T1).ToString, "0").FormatoNumero
|
||||
Row.Item("ImporteAcumulado") = TotalAnteriorLocal.ToString
|
||||
Row.Item("PorcentajeAcumulado") = If(T2 > 0, (TotalAnteriorLocal * 100 / T2).ToString, "0").FormatoNumero
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtGastos.Rows.Add(Row)
|
||||
Else
|
||||
Row.Item("Nombre") = "TOTAL GASTOS"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAcumulado") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtGastos.Rows.Add(Row)
|
||||
End If
|
||||
|
||||
TotalActual -= TotalActualLocal
|
||||
TotalAnterior -= TotalAnteriorLocal
|
||||
|
||||
'INSERTA UTILIDAD
|
||||
Row = DtGastos.NewRow
|
||||
Row.Item("Nombre") = "Utilidad (o Pérdida)"
|
||||
Row.Item("ImporteActual") = TotalActual
|
||||
Row.Item("PorcentajeActual") = If(T1 > 0, (TotalActual * 100 / T1).ToString, "0").FormatoNumero
|
||||
Row.Item("ImporteAcumulado") = TotalAnterior.ToString
|
||||
Row.Item("PorcentajeAcumulado") = If(T2 > 0, (TotalAnterior * 100 / T2).ToString, "0").FormatoNumero
|
||||
Row.Item("CtaMayor") = -2
|
||||
DtGastos.Rows.Add(Row)
|
||||
|
||||
|
||||
|
||||
GvIngresos.DataSource = DtIngresos
|
||||
GvIngresos.DataBind()
|
||||
|
||||
GvGastos.DataSource = DtGastos
|
||||
GvGastos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SumaTotales()
|
||||
'Llena Lb´s Totales
|
||||
LbTotalActual.Text = TotalActual.ToString.FormatoNumero
|
||||
LbTotalAnterior.Text = TotalAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalActual.ForeColor = If(TotalActual < 0, Drawing.Color.Red, Drawing.Color.Black)
|
||||
LbTotalAnterior.ForeColor = If(TotalAnterior < 0, Drawing.Color.Red, Drawing.Color.Black)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "GV´S ROW DATA BOUND"
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
|
||||
'METODO ANTERIOR
|
||||
'TotalActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
'TotalAnterior += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||
|
||||
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
'e.Row.CssClass = "SubTotales3"
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvGastos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
|
||||
|
||||
'METODO ANTERIOR
|
||||
'TotalActual -= e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
'TotalAnterior -= e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||
|
||||
|
||||
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = -2 Then
|
||||
'e.Row.CssClass = "SubTotales"
|
||||
e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
End If
|
||||
|
||||
ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
'e.Row.CssClass = "SubTotales"
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " MENSUAL "
|
||||
|
||||
Private Sub CargaDatosMensual()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
If ObjConta.GetEstadoResultadosMensual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatosMensual = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatosMensual = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del estado de resultados", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
EscondeSubtotales()
|
||||
|
||||
If DtDatosMensual IsNot Nothing Then
|
||||
CargaGridMensual()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub EscondeSubtotales()
|
||||
|
||||
'Esconde Trimestral
|
||||
GvDatosMensual.Columns(7).Visible = False
|
||||
GvDatosMensual.Columns(8).Visible = False
|
||||
GvDatosMensual.Columns(17).Visible = False
|
||||
GvDatosMensual.Columns(18).Visible = False
|
||||
GvDatosMensual.Columns(27).Visible = False
|
||||
GvDatosMensual.Columns(28).Visible = False
|
||||
GvDatosMensual.Columns(35).Visible = False
|
||||
GvDatosMensual.Columns(36).Visible = False
|
||||
|
||||
'Esconde Cuatrimestral
|
||||
GvDatosMensual.Columns(11).Visible = False
|
||||
GvDatosMensual.Columns(12).Visible = False
|
||||
GvDatosMensual.Columns(23).Visible = False
|
||||
GvDatosMensual.Columns(24).Visible = False
|
||||
GvDatosMensual.Columns(37).Visible = False
|
||||
GvDatosMensual.Columns(38).Visible = False
|
||||
|
||||
If DdlSubtotales.SelectedValue = "2" Then
|
||||
GvDatosMensual.Columns(7).Visible = True
|
||||
GvDatosMensual.Columns(8).Visible = True
|
||||
GvDatosMensual.Columns(17).Visible = True
|
||||
GvDatosMensual.Columns(18).Visible = True
|
||||
GvDatosMensual.Columns(27).Visible = True
|
||||
GvDatosMensual.Columns(28).Visible = True
|
||||
GvDatosMensual.Columns(35).Visible = True
|
||||
GvDatosMensual.Columns(36).Visible = True
|
||||
ElseIf DdlSubtotales.SelectedValue = "3" Then
|
||||
GvDatosMensual.Columns(11).Visible = True
|
||||
GvDatosMensual.Columns(12).Visible = True
|
||||
GvDatosMensual.Columns(23).Visible = True
|
||||
GvDatosMensual.Columns(24).Visible = True
|
||||
GvDatosMensual.Columns(37).Visible = True
|
||||
GvDatosMensual.Columns(38).Visible = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGridMensual()
|
||||
GvDatosMensual.DataSource = DtDatosMensual
|
||||
GvDatosMensual.DataBind()
|
||||
UpDatosMensual.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatosMensual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosMensual.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then
|
||||
e.Row.FCHyperLink("HLEnero").Text = ""
|
||||
e.Row.FCHyperLink("HLFebrero").Text = ""
|
||||
e.Row.FCHyperLink("HLMarzo").Text = ""
|
||||
e.Row.FCHyperLink("HLAbril").Text = ""
|
||||
e.Row.FCHyperLink("HLMayo").Text = ""
|
||||
e.Row.FCHyperLink("HLJunio").Text = ""
|
||||
e.Row.FCHyperLink("HLJulio").Text = ""
|
||||
e.Row.FCHyperLink("HLAgosto").Text = ""
|
||||
e.Row.FCHyperLink("HLSeptiembre").Text = ""
|
||||
e.Row.FCHyperLink("HLOctubre").Text = ""
|
||||
e.Row.FCHyperLink("HLNoviembre").Text = ""
|
||||
e.Row.FCHyperLink("HLDiciembre").Text = ""
|
||||
e.Row.Cells(2).Text = ""
|
||||
e.Row.Cells(4).Text = ""
|
||||
e.Row.Cells(6).Text = ""
|
||||
e.Row.Cells(8).Text = ""
|
||||
e.Row.Cells(10).Text = ""
|
||||
e.Row.Cells(12).Text = ""
|
||||
e.Row.Cells(14).Text = ""
|
||||
e.Row.Cells(16).Text = ""
|
||||
e.Row.Cells(18).Text = ""
|
||||
e.Row.Cells(20).Text = ""
|
||||
e.Row.Cells(22).Text = ""
|
||||
e.Row.Cells(24).Text = ""
|
||||
End If
|
||||
|
||||
'AGRUPADOR DE CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
'TITULO DE CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 10px;")
|
||||
End If
|
||||
|
||||
'CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Then
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Or e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/02/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("09/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/11/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
e.Row.FCHyperLink("HLTrimestral1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLTrimestral2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLTrimestral3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLTrimestral4").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
e.Row.FCHyperLink("HLCuatrimestral1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLCuatrimestral2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLCuatrimestral3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
End If
|
||||
|
||||
'TOTALES
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 5 Then
|
||||
e.Row.Attributes.Add("style", "border-top: 1px solid;")
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " ANUAL "
|
||||
|
||||
Private Sub CargaDatosAnual()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
If ObjConta.GetEstadoResultadosAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatosAnual = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatosAnual = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del balance general anual", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1
|
||||
|
||||
'Esconde todo
|
||||
For index = 1 To 40 Step 2
|
||||
GvDatosAnual.Columns(index).Visible = False
|
||||
GvDatosAnual.Columns(index + 1).Visible = False
|
||||
Next
|
||||
|
||||
Dim i = 0
|
||||
For index = 1 To Anos * 2 Step 2
|
||||
GvDatosAnual.Columns(index).Visible = True
|
||||
GvDatosAnual.Columns(index + 1).Visible = True
|
||||
GvDatosAnual.Columns(index).HeaderText = (DdlEjercicio.SelectedValue.ToEntero + i).ToString
|
||||
i = i + 1
|
||||
Next
|
||||
|
||||
If DtDatosAnual IsNot Nothing Then
|
||||
CargaGridAnual()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGridAnual()
|
||||
GvDatosAnual.DataSource = DtDatosAnual
|
||||
GvDatosAnual.DataBind()
|
||||
UpDatosAnual.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvDatosAnual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosAnual.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then
|
||||
For index = 1 To Anos
|
||||
e.Row.FCHyperLink("HLAno" + index.ToString).Text = ""
|
||||
e.Row.Cells(index + index).Text = ""
|
||||
Next
|
||||
End If
|
||||
|
||||
'AGRUPADOR DE CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
'TITULO DE CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 10px;")
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
End If
|
||||
|
||||
'CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Then
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Or e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
For index = 1 To Anos
|
||||
e.Row.FCHyperLink("HLAno" + index.ToString).NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), String.Format("31/12/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
Next
|
||||
End If
|
||||
|
||||
'TOTALES
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 5 Then
|
||||
e.Row.Attributes.Add("style", "border-top: 1px solid;")
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 10px;")
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
End If
|
||||
|
||||
'SUMAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 6 Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
'Nota:
|
||||
' 0 = Normal
|
||||
' 1 = Mensual
|
||||
' 2 = Anual
|
||||
|
||||
If TabContainer.ActiveTabIndex = 0 Then
|
||||
|
||||
CargaDatos()
|
||||
|
||||
ElseIf TabContainer.ActiveTabIndex = 1 Then
|
||||
|
||||
CargaDatosMensual()
|
||||
|
||||
ElseIf TabContainer.ActiveTabIndex = 2 Then
|
||||
|
||||
CargaDatosAnual()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub TabContainer_ActiveTabChanged(sender As Object, e As EventArgs)
|
||||
|
||||
'Nota:
|
||||
' 0 = Normal
|
||||
' 1 = Mensual
|
||||
' 2 = Anual
|
||||
|
||||
'Esconde Todo de lo variable de Filtros
|
||||
TdSubTotales.Visible = False
|
||||
TdPeriodo.Visible = False
|
||||
|
||||
If TabContainer.ActiveTabIndex = 0 Then
|
||||
TdPeriodo.Visible = True
|
||||
ElseIf TabContainer.ActiveTabIndex = 1 Then
|
||||
TdSubTotales.Visible = True
|
||||
ElseIf TabContainer.ActiveTabIndex = 2 Then
|
||||
|
||||
End If
|
||||
|
||||
UpFiltros.Update()
|
||||
|
||||
BtnConsultar_Click(BtnConsultar, EventArgs.Empty)
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,154 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepFlujoEfectivo.aspx.vb" Inherits="AC2_RepFlujoEfectivo" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Estado de Flujo de Efectivo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" /> --%>
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1 "><span>Fecha Inicio:</span></div>
|
||||
<div class="col-md-1 ">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="TxtFechaDel" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1 "><span>Fecha Fin:</span></div>
|
||||
<div class="col-md-1 ">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="TxtFechaAl" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1 "><span>Divisor:</span></div>
|
||||
<div class="col-md-1 ">
|
||||
<asp:DropDownList runat="server" ID="DdlUnidad" CssClass="form-control input-sm selec2me">
|
||||
<asp:ListItem Text="1" Value="1" Selected="True" />
|
||||
<asp:ListItem Text="1,000" Value="1000" />
|
||||
<asp:ListItem Text="1,000,000" Value="1000000" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" Style="max-width: 200px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="tdTipoReporte" visible="true">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Tipo:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" CssClass="table table-advance table-hover tablenobottomborder" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound" ShowFooter="True">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<div id="Concepto" runat="server">
|
||||
<asp:Literal ID="LtNombre" Text='<%# Eval("Nombre", "{0:N2}")%>' runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="500px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbActual" Text='<%# Eval("ImporteActual", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbPeriodoActual" runat="server" />
|
||||
</HeaderTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAnterior" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbPeriodoAnterior" runat="server" />
|
||||
</HeaderTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%-- <asp:BoundField DataField="Nombre" HeaderText="Cuenta" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="300px"/>
|
||||
<asp:BoundField DataField="ImporteActual" DataFormatString="{0:N2}" HeaderText="ImporteActual" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>
|
||||
<asp:BoundField DataField="ImporteAnterior" DataFormatString="{0:N2}" HeaderText="ImporteAnterior" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>--%>
|
||||
</Columns>
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,235 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.IO
|
||||
Imports iTextSharp.text
|
||||
Imports iTextSharp.text.html.simpleparser
|
||||
Imports iTextSharp.text.pdf
|
||||
|
||||
Partial Class AC2_RepFlujoEfectivo
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActual As Double
|
||||
Get
|
||||
TotalActual = ViewState("TotalActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalAnterior As Double
|
||||
Get
|
||||
TotalAnterior = ViewState("TotalAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaAl As String
|
||||
Get
|
||||
FechaAl = ViewState("FechaAl").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaAl") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
|
||||
TxtFechaAl.Text = NowADS().ToShortDateString
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
FechaAl = TxtFechaAl.Text
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
If ObjConta.GetFlujoEfectivo(FechaInicio, FechaFin, DdlUnidad.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Estado de Flujo de Efectivo", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
'OBTENEMOS TOTALES NETOS DE OPERACIONES PARA INSERTAR DIRECTO
|
||||
If DtDatos IsNot Nothing Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(120) Then
|
||||
TotalActual = DtDatos.FiltraParametros("Codigo = '040000000000000000'").Rows(0)("ImporteActual").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '050000000000000000'").Rows(0)("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior = DtDatos.FiltraParametros("Codigo = '040000000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '050000000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble
|
||||
Else
|
||||
TotalActual = DtDatos.FiltraParametros("Codigo = '000040000000000000'").Rows(0)("ImporteActual").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '000050000000000000'").Rows(0)("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior = DtDatos.FiltraParametros("Codigo = '000040000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '000050000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble
|
||||
End If
|
||||
End If
|
||||
|
||||
CargaGrid()
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
' GvDatos.Caption = String.Format("<div class='Titulos' style='width:100%; height:45px;'>{0}<br/>Estado de Flujo de Efectivo<br/>Al {1}</div>", UsuarioActual.Empresa.Empresa, TxtFechaAl.Text)
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'PARA PONER AÑO EN HEADER
|
||||
If e.Row.RowIndex = 0 Then
|
||||
GvDatos.HeaderRow.FCLabel("LbPeriodoActual").Text = e.Row.DBCampo("Actual")
|
||||
GvDatos.HeaderRow.FCLabel("LbPeriodoAnterior").Text = e.Row.DBCampo("Anterior")
|
||||
End If
|
||||
|
||||
'TITULO DE BLOQUE (CABECERAS Y TOTALES)
|
||||
If e.Row.DBCampo("Level") = "-1" Then
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-top:20px; ")
|
||||
e.Row.Font.Bold = True
|
||||
|
||||
'CABCERA
|
||||
If e.Row.DBCampo("CveCuenta") = "12" Then
|
||||
e.Row.FCLabel("LbActual").Text = ""
|
||||
e.Row.FCLabel("LbAnterior").Text = ""
|
||||
End If
|
||||
|
||||
'TOTAL OPERACIONES
|
||||
If e.Row.DBCampo("CveCuenta") = "123" Then
|
||||
e.Row.FCLabel("LbActual").Text = TotalActual.ToString.FormatoNumero
|
||||
e.Row.FCLabel("LbAnterior").Text = TotalAnterior.ToString.FormatoNumero
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'ORIGEN Y APLICACION
|
||||
If e.Row.DBCampo("Level") = "0" Then
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-left:30px; margin-top:15px")
|
||||
e.Row.Font.Bold = True
|
||||
End If
|
||||
|
||||
'PAPAS
|
||||
If e.Row.DBCampo("Level") = "2" Then
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-left: 60px; margin-top:5px;")
|
||||
End If
|
||||
|
||||
'HIJOS
|
||||
If e.Row.DBCampo("Level") = "3" Then
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-left:90px;")
|
||||
End If
|
||||
|
||||
'INGRESOS -> ORIGEN
|
||||
If e.Row.DBCampo("Codigo").ToString.Substring(0, 5) = "00004" Then e.Row.FCLiteral("LtNombre").Text = "ORIGEN"
|
||||
|
||||
'GASTOS -> APLICACION
|
||||
If e.Row.DBCampo("Codigo").ToString.Substring(0, 5) = "00005" Then e.Row.FCLiteral("LtNombre").Text = "APLICACION"
|
||||
|
||||
|
||||
|
||||
'ACTIVIDADES DE OPERACION
|
||||
If e.Row.DBCampo("Sup").ToString <> "" Then
|
||||
If e.Row.DBCampo("ImporteAnterior").ToString.ToDecimal = 0 Then
|
||||
e.Row.FCLabel("LbAnterior").Text = ""
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDecimal = 0 Then
|
||||
e.Row.FCLabel("LbActual").Text = ""
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
'Protected Sub GvDatos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowCreated
|
||||
' If (e.Row.RowType = DataControlRowType.Header) Then
|
||||
' Dim HeaderGrid As GridView = DirectCast(sender, GridView)
|
||||
' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert)
|
||||
' Dim HeaderCell As TableCell = New TableCell()
|
||||
' HeaderCell.Text = String.Format("<div class='Titulos' style='width:100%; height:45px;'>{0}<br/>Estado de Flujo de Efectivo<br/>Al {1}</div>", UsuarioActual.Empresa.Empresa, FechaAl)
|
||||
' HeaderCell.ColumnSpan = GvDatos.Columns.Count
|
||||
' HeaderCell.HorizontalAlign = HorizontalAlign.Center
|
||||
' HeaderGridRow.Cells.Add(HeaderCell)
|
||||
|
||||
|
||||
' GvDatos.Controls(0).Controls.AddAt(0, HeaderGridRow)
|
||||
' End If
|
||||
|
||||
' If (e.Row.RowType = DataControlRowType.Footer) Then
|
||||
' Dim HeaderGrid As GridView = DirectCast(sender, GridView)
|
||||
' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Footer, DataControlRowState.Insert)
|
||||
' Dim HeaderCell As TableCell = New TableCell()
|
||||
' HeaderCell.Text = "<table><tr> <td colspan='3' style='height:30px;'> <br/><br/><br/><br/></td></tr><tr><td >_________________________________<br/>C.P. Izelda Angulo Peraza</td><td style='width:75px'> </td><td > _________________________________<br/>Lic. Juan Fortino Leon Robinson</td></tr><tr><td>Subdirector de Contabilidad</td><td style='width:75px'> </td><td>Director General</td></table>"
|
||||
' HeaderCell.ColumnSpan = GvDatos.Columns.Count
|
||||
' HeaderCell.HorizontalAlign = HorizontalAlign.Center
|
||||
' HeaderGridRow.Cells.Add(HeaderCell)
|
||||
|
||||
' e.Row.Cells.Clear()
|
||||
' e.Row.Cells.Add(HeaderCell)
|
||||
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'GvDatos.ExportToExcel("ReporteFlujoEfectivo" & NowADS().ToShortDateString)
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pAl", FechaAl))
|
||||
params.Add(New ReportParameter("pTotalActual", TotalActual.ToString.FormatoNumero))
|
||||
params.Add(New ReportParameter("pTotalAnterior", TotalAnterior.ToString.FormatoNumero))
|
||||
params.Add(New ReportParameter("pFirma1", String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de Contabilidad", vbCrLf)))
|
||||
params.Add(New ReportParameter("pFirma2", String.Format("Lic. Juan Fortino Leon Robinson{0} Director General", vbCrLf)))
|
||||
ImprimirPDF("AC/Reportes/RepFlujoEfectivo.rdlc", DtDatos, params, "EdoFlujoEfectivo", Formato)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,246 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepMovimientosAuxiliaresCatalogo.aspx.vb" Inherits="Conta_RepMovimientosAuxiliaresCatalogo" EnableEventValidation="false" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="Css" runat="server">
|
||||
<style>
|
||||
.truncate {
|
||||
width: 300px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
table {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
tr {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
td {
|
||||
border: none !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Generar EXCEL</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Movimientos Auxiliares del Catálogo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" ValidationGroup="Valida" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
Cuenta:
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Tipo Movto
|
||||
</div>
|
||||
<div class="col-md-2 truncate">
|
||||
<asp:DropDownList ID="DdlOpcionCuentas" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos y saldo no igual a cero" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" id="tdTipoReporte" visible="false" runat="server">
|
||||
Tipo
|
||||
</div>
|
||||
<div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1" id="divProyecto" runat="server">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="row" style="margin-right: 10px; margin-top: 8px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontrarios movimientos."
|
||||
DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField ControlStyle-CssClass="Widthall">
|
||||
<HeaderTemplate>
|
||||
<table width="100%" style="border: none">
|
||||
<tr>
|
||||
<td colspan="3"><font size="2">Cuenta</font></td>
|
||||
<td colspan="1"><font size="2">Nombre</font></td>
|
||||
<td colspan="4"></td>
|
||||
<td><font size="2">Saldo Inicial</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="60px" align="center">Fecha</td>
|
||||
<td width="60px" align="center">Tipo</td>
|
||||
<td width="60px" align="center">Número</td>
|
||||
<td width="300px" align="left">Concepto</td>
|
||||
<td width="100px" align="center">Referencia</td>
|
||||
<td width="100px" align="center">Referencia Movto</td>
|
||||
<td width="100px" align="center">SubProyecto</td>
|
||||
<td width="100px" align="center">Cargos</td>
|
||||
<td width="100px" align="center">Abonos</td>
|
||||
<td width="100px" align="center">Saldo</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table width="100%" style="border: none">
|
||||
<tr runat="server" id="tr1">
|
||||
<td colspan="3" align="left" width="180px">
|
||||
<asp:Label ID="LbCuenta" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</td>
|
||||
<td colspan="1" align="left" width="300px">
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</td>
|
||||
<td colspan="2" width="200px"></td>
|
||||
<td style="font-weight: normal;" align="right" width="100px">Saldo Inicial:
|
||||
</td>
|
||||
<td style="font-weight: normal;" align="right" width="100px">
|
||||
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="tr2">
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:Literal ID="LbFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</td>
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:Literal ID="LbTipo" runat="server" Text='<%# Eval("TipoPoliza")%>'></asp:Literal>
|
||||
</td>
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Text='<%# Eval("Folio")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
|
||||
<td width="300px" align="left">
|
||||
<div class="truncate" style="width: 300px;">
|
||||
<asp:Label ID="LbConcepto" runat="server" CssClass="truncate" Text='<%# Eval("Concepto")%>' title='<%# Eval("Concepto")%>'></asp:Label>
|
||||
</div>
|
||||
</td>
|
||||
<td width="100px">
|
||||
<asp:Label ID="LbReferencia" runat="server" Text='<%# Eval("Referencia")%>'></asp:Label>
|
||||
</td>
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:Literal ID="LtlRefMovto" runat="server" Text='<%# Eval("ReferenciaAdmin")%>'></asp:Literal>
|
||||
</td>
|
||||
<td width="100px">
|
||||
<asp:Label ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Label>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label ID="LbCargos" runat="server"></asp:Label>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label ID="LbAbonos" runat="server"></asp:Label>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label ID="LbSaldo" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
@@ -1,456 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtTotales As DataTable
|
||||
Get
|
||||
DtTotales = DirectCast(ViewState("DtTotales"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtTotales") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicio As Date
|
||||
Get
|
||||
FechaInicio = ViewState("FechaInicio").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFin As Date
|
||||
Get
|
||||
FechaFin = ViewState("FechaFin").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property TotalPadre As Boolean
|
||||
Get
|
||||
TotalPadre = CBool(ViewState("TotalPadre"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("TotalPadre") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DTCuentas As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTCuentas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTCuentas") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TipoReporte As String
|
||||
Get
|
||||
TipoReporte = ViewState("TP").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("TP") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Cuenta As String
|
||||
Get
|
||||
Return ViewState("Cuenta").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Cuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.CveEmpresa <> 119 Then
|
||||
' Response.Redirect($"/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx")
|
||||
'End If
|
||||
|
||||
Dim ErrorParametros As Boolean = True
|
||||
|
||||
CargaTipoCuentas()
|
||||
'TxtCuenta.Enabled = False
|
||||
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
|
||||
FechaFin = Request("FF").ToDate
|
||||
txtFechaF.Text = FechaFin.ToShortDateString
|
||||
|
||||
DdlCuentas.SelectedValueExist(Request("CveCuenta").ToEntero)
|
||||
|
||||
|
||||
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
FechaInicio = Request("FI").ToDate
|
||||
txtFechaI.Text = FechaInicio.ToShortDateString
|
||||
Else
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
TxtFechaF.Text = FechaInicio.ToShortDateString
|
||||
End If
|
||||
|
||||
If Request("CveProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveProyecto")) Then
|
||||
DdlProyecto.SelectedValueExist(Request("CveProyecto"))
|
||||
DdlProyecto_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then
|
||||
DdlSubproyecto.SelectedValueExist(Request("CveSubProyecto"))
|
||||
End If
|
||||
|
||||
ErrorParametros = False
|
||||
|
||||
If Request("TP") IsNot Nothing AndAlso IsNumeric(Request("TP")) AndAlso Request("TP").ToEntero > 0 Then
|
||||
TipoReporte = Request("TP").ToString
|
||||
|
||||
' DdlTipoReporte.SelectedValue = TipoReporte.ToString
|
||||
End If
|
||||
|
||||
|
||||
''If DdlTipoCuentas.Items.FindByValue(IdCuenta.ToString) IsNot Nothing Then
|
||||
'' DdlTipoCuentas.SelectedValue = IdCuenta.ToString
|
||||
''Else
|
||||
'' DdlTipoCuentas.SelectedValue = "-2"
|
||||
'' TxtCuenta.Enabled = True
|
||||
|
||||
'' If DTCuentas.FiltraParametros(String.Format("Cvecuenta = {0}", IdCuenta)).Rows.Count > 0 Then
|
||||
'' TxtCuenta.Text = DTCuentas.FiltraParametros(String.Format("CveCuenta = {0}", IdCuenta)).Rows(0)("Codigo").ToString
|
||||
'' End If
|
||||
''End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorParametros Then
|
||||
TotalPadre = True
|
||||
TipoReporte = "1"
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
If DdlCuentas.SelectedValue.ToEntero = -1 Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate)
|
||||
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate)
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
' Imprimir_click(sender, e)
|
||||
'RegistraScript("Enable();")
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A - D A T O S"
|
||||
Public Function WSCuentas() As String
|
||||
Dim Str As New StringBuilder
|
||||
Dim i As Integer = 0
|
||||
Dim dt As DataTable = DTCuentas
|
||||
|
||||
For Each dr As DataRow In dt.Rows
|
||||
i += 1
|
||||
Str.AppendFormat("{{value:""{0}"",label:""{1}""}}{2}", dr("CveCuenta"), dr("Codigo").ToString.Replace("""", ""), If(i < dt.Rows.Count, ",", ""))
|
||||
Next
|
||||
|
||||
Return Str.ToString
|
||||
End Function
|
||||
Private Sub CargaTipoCuentas()
|
||||
|
||||
Dim ObjTipoCuenta As New ClsContabilidad
|
||||
DdlCuentas.Enabled = True
|
||||
|
||||
If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DTCuentas = ObjTipoCuenta.DtResultados
|
||||
DdlCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
|
||||
End If
|
||||
ObjTipoCuenta.Dispose()
|
||||
DdlCuentas.DataBind()
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos")
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim CveProyecto As Integer = DdlProyecto.SelectedValue.ToEntero
|
||||
Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
|
||||
TipoReporte = DdlTipoReporte.SelectedValue.ToString
|
||||
If TipoReporte = "1" And DdlCuentas.SelectedValue.ToEntero < 0 Then
|
||||
Alert("No ha seleccionado cuenta, Favor de especificar una", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Cuenta = DdlCuentas.SelectedItem.ToString
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetMovimientosAuxiliaresCatalogo(DdlCuentas.SelectedValue.ToEntero, FechaInicio, FechaFin, -1, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte, DdlOpcionCuentas.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
DtTotales = DtDatos.Clone
|
||||
|
||||
CargaGrid()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub InsertaTotales()
|
||||
Dim i As Integer = 0
|
||||
Dim Aumento As Integer = 0
|
||||
Dim Row As DataRow
|
||||
Dim Row2 As DataRow
|
||||
|
||||
'Llena DtTotales
|
||||
For Each dr As DataRow In DtDatos.Rows
|
||||
If dr("Concepto").ToString = "" Then
|
||||
|
||||
Row = DtTotales.NewRow
|
||||
|
||||
Row("CveCuenta") = -1
|
||||
Row("CargosMovto") = If("1" = "1", dr("Cargos"), dr("CargosME"))
|
||||
Row("AbonosMovto") = If("1" = "1", dr("Abonos"), dr("AbonosME"))
|
||||
Row("Saldo") = dr("SaldoActual")
|
||||
Row("CtaMayor") = dr("CtaMayor")
|
||||
Row("Concepto") = String.Format("Total {0}:", dr("Nombre"))
|
||||
Row("Nombre") = dr("Nombre")
|
||||
DtTotales.Rows.Add(Row)
|
||||
Row("Clasificacion") = i
|
||||
End If
|
||||
|
||||
i += 1
|
||||
Next
|
||||
|
||||
'Inserta Totales en DtDatos
|
||||
For Each dr As DataRow In DtTotales.Rows
|
||||
i = 0
|
||||
|
||||
If dr("CtaMayor").ToString = "1" Then
|
||||
DtDatos.ImportRow(dr)
|
||||
End If
|
||||
|
||||
If dr("CtaMayor").ToString = "2" Then
|
||||
For index As Integer = dr("Clasificacion").ToString.ToEntero + Aumento To DtDatos.Rows.Count
|
||||
If DtDatos.Rows(index)("Nombre").ToString <> dr("Nombre").ToString Then
|
||||
i = index
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Row2 = DtDatos.NewRow
|
||||
Row2.ItemArray = dr.ItemArray
|
||||
|
||||
DtDatos.Rows.InsertAt(Row2, i + Aumento)
|
||||
Aumento += 1
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "G R I D - GV DATOS"
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
'GvDatos.Dispose()
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Concepto") = "" Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
e.Row.ControlStyle.Height = 35
|
||||
|
||||
'Cuando es Titulo
|
||||
If e.Row.DBCampo("SaldoActual") = "" Then
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Visible = False
|
||||
|
||||
|
||||
'Cuando Es Total
|
||||
Else
|
||||
CType(e.Row.FindControl("tr1"), HtmlTableRow).Visible = False
|
||||
|
||||
'Anterior para TotalPadre
|
||||
'If e.Row.DBCampo("CtaMayor").ToString = "2" And (e.Row.DBCampo("Nivel3").ToString <> "" Xor e.Row.DBCampo("Orden").ToString.Length = 18) Then
|
||||
' e.Row.FCLabel("LbReferencia").Text = "Total:"
|
||||
'Else
|
||||
' e.Row.FCLabel("LbConcepto").Text = String.Format("Total {0}:", e.Row.DBCampo("Nombre").ToString)
|
||||
'End If
|
||||
|
||||
If TotalPadre Then
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3).Width = "1px"
|
||||
'CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells.Remove(CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3))
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3).Align = "Right"
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3).Width = "400px"
|
||||
If e.Row.RowIndex + 1 = DtDatos.Rows.Count Then
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(4).Attributes.Add("style", "border-top: 1px solid black;")
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(5).Attributes.Add("style", "border-top: 1px solid black;")
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(6).Attributes.Add("style", "border-top: 1px solid black;")
|
||||
End If
|
||||
e.Row.FCLabel("LbReferencia").Text = String.Format("Total {0}:", e.Row.DBCampo("Nombre").ToString)
|
||||
|
||||
|
||||
Else
|
||||
TotalPadre = True
|
||||
e.Row.FCLabel("LbReferencia").Font.Bold = False
|
||||
e.Row.FCLabel("LbReferencia").Text = "Total:"
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(4).Align = "Right"
|
||||
End If
|
||||
|
||||
'e.Row.FCLabel("LbReferencia").Text = String.Format("Total {0}:", If(e.Row.DBCampo("CtaMayor").ToString = "2", "", e.Row.DBCampo("Nombre").ToString))
|
||||
e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("Cargos").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("Abonos").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("SaldoActual").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
End If
|
||||
|
||||
Else
|
||||
TotalPadre = False
|
||||
e.Row.ControlStyle.Font.Bold = False
|
||||
CType(e.Row.FindControl("tr1"), HtmlTableRow).Visible = False
|
||||
e.Row.FCHyperLink("HLPoliza").NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", e.Row.DBCampo("CvePoliza"))
|
||||
|
||||
If e.Row.DBCampo("CargosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("CargosMovto").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
If e.Row.DBCampo("AbonosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("AbonosMovto").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
If e.Row.DBCampo("Saldo").ToDouble <> 0 Then e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("Saldo").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'COLOREA NEGATIVOS
|
||||
If e.Row.FCLabel("LbCargos").Text.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red
|
||||
Else
|
||||
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
If e.Row.FCLabel("LbAbonos").Text.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red
|
||||
Else
|
||||
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
If e.Row.FCLabel("LbSaldo").Text.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldo").ForeColor = Drawing.Color.Red
|
||||
Else
|
||||
e.Row.FCLabel("LbSaldo").ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
If e.Row.FCLabel("LbSaldoInicial").Text.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red
|
||||
Else
|
||||
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
If DdlCuentas.SelectedValue.ToEntero = -1 Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate)
|
||||
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate)
|
||||
|
||||
DtDatos = DtDatos
|
||||
ImprimirReporte()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
ImprimirReporte("Excel")
|
||||
|
||||
'Dim htmlTabe As New HtmlTable
|
||||
'Dim RutaLogo As String = $"{UsuarioActual.Empresa.Ruta}Logo.png"
|
||||
'Dim strinLiteral As String = ""
|
||||
|
||||
'Dim EncabezadoLiteral As New LiteralControl
|
||||
|
||||
|
||||
|
||||
'If System.IO.File.Exists(RutaLogo) Then
|
||||
' RutaLogo = $"http://{Request.Url.Host }/Empresas/{UsuarioActual.CveEmpresa}/Logo.png"
|
||||
|
||||
' strinLiteral = $"<table style='width:{ GvDatos.Width }px'><tr>
|
||||
' <td colspan='3' style='width:15%;height:150px; text-align:center; vertical-align:middle;font-weight: bold;'><img width='200px' height='150px' style='max-height:150px!important;max-width:200px!important' src='{RutaLogo}' /> </td>
|
||||
' <td colspan='3' style='width:70%;height:150px; text-align:center; vertical-align:middle;font-weight: bold; display: block;'><p><span>{UsuarioActual.Empresa.Empresa} </span><br><span> Movimientos Auxiliares del Catálogo<p></td>
|
||||
' <td colspan='3' style='width:15%;height:150px; text-align:center; vertical-align:middle;font-weight: bold;'> Fecha:{NowADS().ToString("dd/MM/yyyy")}</td>
|
||||
' </tr>
|
||||
' <tr>
|
||||
' <td style='text-align:left;' colspan='6'>
|
||||
' <b>Filtros Cuenta:</b> {DdlCuentas.SelectedItem.Text} <b>Fecha inicio: </b>{ TxtFechaDel.Text} <b>Fecha Fin:</b> {TxtFechaAl.Text}
|
||||
' <td>
|
||||
' </tr>
|
||||
' </table>"
|
||||
'Else
|
||||
' strinLiteral = $"<table style='width:{ GvDatos.Width }px'><tr>
|
||||
' <td colspan='3' style='width:15%;height:150px; text-align:center; vertical-align:middle;font-weight: bold;'> </td>
|
||||
' <td colspan='3' style='width:70%;height:150px; text-align:center; vertical-align:middle;font-weight: bold; display: block;'><p><span>{UsuarioActual.Empresa.Empresa} </span><br><span> Movimientos Auxiliares del Catálogo<p></td>
|
||||
' <td colspan='3' style='width:15%;height:150px; text-align:center; vertical-align:middle;font-weight: bold;'> Fecha:{NowADS().ToString("dd/MM/yyyy")}</td>
|
||||
' </tr>
|
||||
' <tr>
|
||||
' <td style='text-align:left;' colspan='9'>
|
||||
' <b>Filtros Cuenta:</b> {DdlCuentas.SelectedItem.Text} <b>Fecha inicio: </b>{ TxtFechaDel.Text} <b>Fecha Fin:</b> {TxtFechaAl.Text}
|
||||
' <td>
|
||||
|
||||
' <tr>
|
||||
' </table>"
|
||||
'End If
|
||||
|
||||
'EncabezadoLiteral.Text = strinLiteral
|
||||
'GvDatos.ExportToExcel($"MovimientosAuxiliares_{NowADS().ToString("yyyyMMddmmss")}", Encabezado2:=EncabezadoLiteral)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("pFechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("CveMoneda", "1"))
|
||||
params.Add(New ReportParameter("Cuenta", Cuenta))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato)
|
||||
|
||||
End Sub
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,360 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad2_RepOrigenAplicacion
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region " PROPIEDADES NORMAL "
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " PROPIEDADES ANUAL "
|
||||
Private Property DtDatosAnual As DataTable
|
||||
Get
|
||||
DtDatosAnual = DirectCast(ViewState("DtDatosAnual"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatosAnual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Anos As Integer
|
||||
Get
|
||||
Anos = ViewState("Anos").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("Anos") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Private Property TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TipoReporte").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoReporte") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtDatosMensual As DataTable
|
||||
Get
|
||||
DtDatosMensual = DirectCast(ViewState("DtDatosMensual"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatosMensual") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
'If UsuarioActual.Empresa.UsaAC Then
|
||||
' TipoReporte = -1
|
||||
'Else
|
||||
TipoReporte = 1
|
||||
tdTipoReporte.Visible = True
|
||||
'End If
|
||||
|
||||
'Normal
|
||||
TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
|
||||
TxtFechaAl.Text = NowADS().ToShortDateString
|
||||
|
||||
'Anual
|
||||
Anos = 0
|
||||
Dim ClsConta As New ClsContabilidad
|
||||
If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValue = NowADS().Year.ToString
|
||||
|
||||
TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
'Nota:
|
||||
' 0 = Normal
|
||||
' 1 = Mensual
|
||||
' 2 = Anual
|
||||
|
||||
If TabContainer.ActiveTabIndex = 0 Then
|
||||
|
||||
CargaDatos()
|
||||
|
||||
ElseIf TabContainer.ActiveTabIndex = 1 Then
|
||||
|
||||
CargaDatosMensual()
|
||||
|
||||
ElseIf TabContainer.ActiveTabIndex = 2 Then
|
||||
|
||||
CargaDatosAnual()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub TabContainer_ActiveTabChanged(sender As Object, e As EventArgs)
|
||||
|
||||
'Nota:
|
||||
' 0 = Normal
|
||||
' 1 = Mensual
|
||||
' 2 = Anual
|
||||
|
||||
'Esconde Todo de lo variable de Filtros
|
||||
TdSubTotales.Visible = False
|
||||
TdEjercicio.Visible = False
|
||||
TdFI.Visible = False
|
||||
TdFF.Visible = False
|
||||
|
||||
If TabContainer.ActiveTabIndex = 0 Then
|
||||
TdFI.Visible = True
|
||||
TdFF.Visible = True
|
||||
ElseIf TabContainer.ActiveTabIndex = 1 Then
|
||||
TdEjercicio.Visible = True
|
||||
TdSubTotales.Visible = True
|
||||
ElseIf TabContainer.ActiveTabIndex = 2 Then
|
||||
TdEjercicio.Visible = True
|
||||
End If
|
||||
|
||||
UpFiltros.Update()
|
||||
|
||||
BtnConsultar_Click(BtnConsultar, EventArgs.Empty)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " NORMAL "
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
' Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, "0"c), Anio)
|
||||
' Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
|
||||
Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
|
||||
Dim FechaI = String.Format("{0}/{1}/{2}", FechaInicio.Day, FechaInicio.Month, FechaInicio.Year)
|
||||
Dim FechaF = String.Format("{0}/{1}/{2}", FechaFin.Day, FechaFin.Month, FechaFin.Year)
|
||||
|
||||
If ObjConta.GetOrigenAplicacion(FechaI, FechaF, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos de origen y aplicación", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
CargaGrid()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
''Titulo y Sumatoria de cambios
|
||||
'If e.Row.DBCampo("Orden3").ToString.ToEntero = 10 Or e.Row.DBCampo("Orden3").ToString.ToEntero = 30 Then
|
||||
' e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
'End If
|
||||
|
||||
''CUENTAS
|
||||
'If e.Row.DBCampo("Orden3").ToString.ToEntero = 20 Then
|
||||
' e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
'End If
|
||||
|
||||
'TOTAL
|
||||
If e.Row.DBCampo("Nombre").ToString.Trim = "" Then
|
||||
e.Row.Attributes.Add("style", "border-top: 1px solid; margin-top:10px;")
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Text = "TOTAL"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " MENSUAL "
|
||||
Private Sub CargaDatosMensual()
|
||||
''Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
If ObjConta.GetOrigenAplicacionMensual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatosMensual = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatosMensual = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del estado de origen y aplicación de recursos", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
EscondeSubtotales()
|
||||
|
||||
|
||||
If DtDatosMensual IsNot Nothing Then
|
||||
CargaGridMensual()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub EscondeSubtotales()
|
||||
|
||||
'Esconde Trimestral
|
||||
GvDatosMensual.Columns(4).Visible = False
|
||||
GvDatosMensual.Columns(9).Visible = False
|
||||
GvDatosMensual.Columns(14).Visible = False
|
||||
GvDatosMensual.Columns(18).Visible = False
|
||||
|
||||
'Esconde Cuatrimestral
|
||||
GvDatosMensual.Columns(6).Visible = False
|
||||
GvDatosMensual.Columns(12).Visible = False
|
||||
GvDatosMensual.Columns(19).Visible = False
|
||||
|
||||
If DdlSubtotales.SelectedValue = "2" Then
|
||||
GvDatosMensual.Columns(4).Visible = True
|
||||
GvDatosMensual.Columns(9).Visible = True
|
||||
GvDatosMensual.Columns(14).Visible = True
|
||||
GvDatosMensual.Columns(18).Visible = True
|
||||
ElseIf DdlSubtotales.SelectedValue = "3" Then
|
||||
GvDatosMensual.Columns(6).Visible = True
|
||||
GvDatosMensual.Columns(12).Visible = True
|
||||
GvDatosMensual.Columns(19).Visible = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGridMensual()
|
||||
GvDatosMensual.DataSource = DtDatosMensual
|
||||
GvDatosMensual.DataBind()
|
||||
UpDatosMensual.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatosMensual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosMensual.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'AGRUPADOR DE CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 2 Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
|
||||
'CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Then
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
End If
|
||||
|
||||
'TOTALES
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
e.Row.Attributes.Add("style", "border-top: 1px solid;")
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " ANUAL "
|
||||
Private Sub CargaDatosAnual()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1
|
||||
|
||||
If ObjConta.GetOrigenAplicacionAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatosAnual = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatosAnual = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del estado de origen y aplicación de recursos", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
|
||||
If DtDatosAnual IsNot Nothing Then
|
||||
CargaGridAnual()
|
||||
End If
|
||||
|
||||
'Esconde todo
|
||||
For index = 1 To 12
|
||||
GvDatosAnual.Columns(index).Visible = False
|
||||
Next
|
||||
|
||||
For index = 1 To Anos
|
||||
GvDatosAnual.Columns(index).Visible = True
|
||||
GvDatosAnual.HeaderRow.FCLabel("LbAno" + index.ToString).Text = (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString
|
||||
Next
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGridAnual()
|
||||
GvDatosAnual.DataSource = DtDatosAnual
|
||||
GvDatosAnual.DataBind()
|
||||
UpDatosAnual.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatosAnual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosAnual.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'AGRUPADOR DE CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 2 Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
|
||||
'CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Then
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
End If
|
||||
|
||||
'TOTALES
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
e.Row.Attributes.Add("style", "border-top: 1px solid;")
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
@@ -1,631 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepSituacionFinanciera.aspx.vb" Inherits="AC2_SituacionFinanciera" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Literal ID="LtTitulo" Text="Estado de Situación Financiera" runat="server" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="Imprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCerrar" runat="server" Visible="false"><i class="fa-solid fa-shield" ></i> Cerrar Ejercicio</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" Text="Consultar" runat="server" OnClick="BtnConsultar_Click" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Ejercicio:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Periodo:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100%" CssClass="select2me">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1" style="display: none;">SubProyecto: </label>
|
||||
<div class="col-md-2" style="display: none;">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" Width="150px" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1" runat="server" id="DVConsolidado1" visible="false">Consolidado: </label>
|
||||
<div class="col-md-1" runat="server" id="DVConsolidado2" visible="false">
|
||||
<asp:DropDownList ID="DdlOpcion" runat="server" CssClass="select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Value ="1">Normal</asp:ListItem>
|
||||
<asp:ListItem Value ="2">Consolidado</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<div class="col-md-3" runat="server" id="tdTipoReporte" visible="true">
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate" >Tipo:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" CssClass="select2me" Width="100%">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Con Firma:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkFirma" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Nivel 2:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkNivel" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<rvweb:ReportViewer ID="rvReporteador" Visible="false" runat="server" Width="100%" Height="600"></rvweb:ReportViewer>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<table style="width: 100%; float: left; margin-right: 20px;">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
<center>
|
||||
<h3>ACTIVO</h3>
|
||||
|
||||
<asp:UpdatePanel ID="UpActivo" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvActivo" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvActivoNoCirculante" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO NO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvActivoDiferido" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO DIFERIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<table style="width: 100%; float: left;">
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<center>
|
||||
<h3>PASIVO</h3>
|
||||
<asp:UpdatePanel ID="UpPasivo" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvPasivo" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPasivoNoCirculante" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO NO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPasivoDiferido" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO DIFERIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="275px" align="center">
|
||||
<h4>Total del Pasivo:</h4>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPasivo" width="100px" align="right" visible="false">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<center>
|
||||
<h3>
|
||||
<asp:Literal Text="CAPITAL" ID="LtlTituloHacienda" runat="server" />
|
||||
</h3>
|
||||
|
||||
<asp:UpdatePanel ID="UpPatrimonio" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvPatrimonio" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PATRIMONIO CONTRIBUIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<asp:GridView ID="GvUtilidad" ShowHeader="false" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPatrimonioGenerado" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PATRIMONIO GENERADO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPatrimonioActualizacion" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="EXCESO O INSUFICIENCIA DE ACTUALIZACION"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="50%" style="text-align: center;">
|
||||
<h4>
|
||||
<asp:Literal ID="LtlTotalHacienda" Text="Total Capital:" runat="server" />
|
||||
</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPatrimonioActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPatrimonio" width="25%" align="right" visible="false">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPatrimonioAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<center>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="50%" style="text-align: center;">
|
||||
<h4>Total del Activo:</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalActivoActual" Font-Size="12pt"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalActivoAnterior" width="25%" align="right" visible="false">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalActivoAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<center>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td style="text-align: center; width: 50%;">
|
||||
<h4>
|
||||
<asp:Literal ID="LtlTotalPasivoPatrimonio" Text="Total del Pasivo y Capital:" runat="server" />
|
||||
</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoPatrimonioActual" Font-Size="12pt"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPasivoAnterior" width="25%" align="right" visible="false">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoPatrimonioAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<asp:Label runat="server" ID="LbDescuadre" ForeColor="Red" Font-Bold="false" Font-Size="Small"></asp:Label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="ModalCierre" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalEditarFecha" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlCierre" Text="Cierre de Ejercicio" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" style="width: 90px;">Ejercicio:</label>
|
||||
<div class="col-md-2" style="width: 125px;">
|
||||
<asp:DropDownList ID="DdlEjercicioCierre" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate" style="width: 90px;">Cuentas:</label>
|
||||
<div class="col-md-5">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" CssClass="select2me" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnCierre" runat="server" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="VgmEditarFecha" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -1,645 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class AC2_SituacionFinanciera
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActivoActual As Double
|
||||
Get
|
||||
TotalActivoActual = ViewState("TotalActivoActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActivoActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActivoAnterior As Double
|
||||
Get
|
||||
TotalActivoAnterior = ViewState("TotalActivoAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActivoAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoActual As Double
|
||||
Get
|
||||
TotalPasivoActual = ViewState("TotalPasivoActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoAnterior As Double
|
||||
Get
|
||||
TotalPasivoAnterior = ViewState("TotalPasivoAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPatrimonioActual As Double
|
||||
Get
|
||||
TotalPatrimonioActual = ViewState("TotalPatrimonioActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPatrimonioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPatrimonioAnterior As Double
|
||||
Get
|
||||
TotalPatrimonioAnterior = ViewState("TotalPatrimonioAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPatrimonioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoPatrimonioActual As Double
|
||||
Get
|
||||
TotalPasivoPatrimonioActual = ViewState("TotalPasivoPatrimonioActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoPatrimonioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoPatrimonioAnterior As Double
|
||||
Get
|
||||
TotalPasivoPatrimonioAnterior = ViewState("TotalPasivoPatrimonioAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoPatrimonioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaInicioActual As Date
|
||||
Get
|
||||
FechaInicioActual = ViewState("FechaInicioActual").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFinActual As Date
|
||||
Get
|
||||
FechaFinActual = ViewState("FechaFinActual").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFinActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicioAnterior As Date
|
||||
Get
|
||||
FechaInicioAnterior = ViewState("FechaInicioAnterior").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFinAnterior As Date
|
||||
Get
|
||||
FechaFinAnterior = ViewState("FechaFinAnterior").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFinAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TipoReporte").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoReporte") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
TipoReporte = -1
|
||||
Else
|
||||
TipoReporte = 1
|
||||
tdTipoReporte.Visible = True
|
||||
LtTitulo.Text = "Balance General"
|
||||
End If
|
||||
|
||||
TotalActivoActual = 0
|
||||
TotalActivoAnterior = 0
|
||||
TotalPasivoActual = 0
|
||||
TotalPasivoAnterior = 0
|
||||
TotalPatrimonioActual = 0
|
||||
TotalPatrimonioAnterior = 0
|
||||
TotalPasivoPatrimonioActual = 0
|
||||
TotalPasivoPatrimonioAnterior = 0
|
||||
|
||||
'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString
|
||||
'TxtFechaFin.Text = NowADS().ToShortDateString
|
||||
|
||||
CargaEjercicios()
|
||||
|
||||
If UsuarioActual.Empresa.GrupoEmpresa > 0 And UsuarioActual.CveRol = 1 Then
|
||||
DVConsolidado1.Visible = True
|
||||
DVConsolidado2.Visible = True
|
||||
End If
|
||||
|
||||
'CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEjercicios()
|
||||
'Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim Clsconta As New ClsContabilidad
|
||||
If Clsconta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = Clsconta.DtResultados
|
||||
DdlEjercicioCierre.DataSource = Clsconta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
DdlEjercicioCierre.DataSource = Nothing
|
||||
End If
|
||||
Clsconta.Dispose()
|
||||
DdlEjercicioCierre.DataBind()
|
||||
DdlEjercicioCierre.SelectedValue = NowADS().Year.ToString
|
||||
|
||||
DdlEjercicio.DataBind()
|
||||
DdlEjercicio.SelectedValue = NowADS().Year.ToString
|
||||
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(346) Then LnkCerrar.Visible = True
|
||||
|
||||
'DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
DdlPeriodo.SelectedValue = NowADS().Month.ToString
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
''Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
Dim FechaI As String = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
Dim FechaF As String = FechaI.ToDate.LastDayOfMonth.ToShortDateString
|
||||
TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
|
||||
GvActivo.Columns(1).HeaderText = DdlEjercicio.SelectedValue
|
||||
GvActivo.Columns(2).HeaderText = (DdlEjercicio.SelectedValue.ToEntero - 1).ToString
|
||||
|
||||
GvPasivo.Columns(1).HeaderText = DdlEjercicio.SelectedValue
|
||||
GvPasivo.Columns(2).HeaderText = (DdlEjercicio.SelectedValue.ToEntero - 1).ToString
|
||||
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
|
||||
If ObjConta.GetSituacionFinanciera("01/01/1900".ToDate, FechaF.ToDate, UsuarioActual.CveEmpresa, CveSubProyecto, TipoReporte, Opcion:=DdlOpcion.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
|
||||
CargaGrids()
|
||||
|
||||
If GvPatrimonio.HeaderRow IsNot Nothing Then
|
||||
GvPatrimonio.HeaderRow.FCLabel("LbTitulo").Text = "CAPITAL CONTABLE"
|
||||
End If
|
||||
|
||||
SumaTotales()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del estado de situación financiera", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGrids()
|
||||
|
||||
If Not ChkNivel.Checked Then
|
||||
DtDatos = DtDatos.FiltraParametros("Level < 3")
|
||||
End If
|
||||
|
||||
Dim DtActivoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND TipoCuenta=1")
|
||||
Dim DtActivoNoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND TipoCuenta=2 ")
|
||||
Dim DtActivoDiferido As DataTable = DtDatos.FiltraParametros(" TipoCuenta=9 ")
|
||||
|
||||
' Dim DtActivoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND Orden LIKE '%/00011%' ")
|
||||
' Dim DtActivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND Orden LIKE '%/00012%' ")
|
||||
Dim Row As DataRow = DtActivoCirculante.NewRow
|
||||
|
||||
If DtActivoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtActivoCirculante.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtActivoCirculante.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtActivoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtActivoCirculante.Rows.Add(Row)
|
||||
|
||||
|
||||
Row = DtActivoNoCirculante.NewRow
|
||||
If DtActivoNoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtActivoNoCirculante.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtActivoNoCirculante.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtActivoNoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtActivoNoCirculante.Rows.Add(Row)
|
||||
|
||||
Row = DtActivoDiferido.NewRow
|
||||
If DtActivoDiferido.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO DIFERIDO"
|
||||
Row.Item("ImporteActual") = DtActivoDiferido.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtActivoDiferido.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtActivoDiferido.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO DIFERIDO"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtActivoDiferido.Rows.Add(Row)
|
||||
|
||||
GvActivo.DataSource = DtActivoCirculante
|
||||
GvActivo.DataBind()
|
||||
GvActivoNoCirculante.DataSource = DtActivoNoCirculante
|
||||
GvActivoNoCirculante.DataBind()
|
||||
|
||||
GvActivoDiferido.DataSource = DtActivoDiferido
|
||||
GvActivoDiferido.DataBind()
|
||||
UpActivo.Update()
|
||||
|
||||
|
||||
'PASIVO
|
||||
Dim DtPasivoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('D') AND TipoCuenta=3")
|
||||
Dim DtPasivoNoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('D') AND TipoCuenta=4")
|
||||
|
||||
'Dim DtPasivoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND Orden LIKE '%/00021%' ")
|
||||
'Dim DtPasivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND Orden LIKE '%/00022%' ")
|
||||
|
||||
Row = DtPasivoCirculante.NewRow
|
||||
If DtPasivoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PASIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtPasivoCirculante.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPasivoCirculante.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtPasivoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PASIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPasivoCirculante.Rows.Add(Row)
|
||||
|
||||
Row = DtPasivoNoCirculante.NewRow
|
||||
If DtPasivoNoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PASIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtPasivoNoCirculante.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPasivoNoCirculante.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtPasivoNoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PASIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPasivoNoCirculante.Rows.Add(Row)
|
||||
|
||||
|
||||
GvPasivo.DataSource = DtPasivoCirculante
|
||||
GvPasivo.DataBind()
|
||||
GvPasivoNoCirculante.DataSource = DtPasivoNoCirculante
|
||||
GvPasivoNoCirculante.DataBind()
|
||||
UpPasivo.Update()
|
||||
|
||||
|
||||
'PATRIMONIO
|
||||
Dim DtPatrimonioContribuido As DataTable = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (5,6,8,7)")
|
||||
'Dim DtPatrimonioGenerado = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (6,8)")
|
||||
'Dim DtPatrimonioActualizacion = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=7")
|
||||
'Dim DtUtilidad = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=5")
|
||||
|
||||
'Dim DtPatrimonioContribuido = DtDatos.FiltraParametros("Tipo in ('F') AND Orden LIKE '%/00031%' ")
|
||||
'Dim DtPatrimonioGenerado = DtDatos.FiltraParametros("Tipo in ('F') AND Orden LIKE '%/00032%' ")
|
||||
'Dim DtPatrimonioActualizacion = DtDatos.FiltraParametros("Tipo in ('F') AND Orden LIKE '%/00033%' ")
|
||||
|
||||
Row = DtPatrimonioContribuido.NewRow
|
||||
If DtPatrimonioContribuido.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL CAPITAL"
|
||||
Row.Item("ImporteActual") = DtPatrimonioContribuido.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPatrimonioContribuido.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtPatrimonioContribuido.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL CAPITAL"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPatrimonioContribuido.Rows.Add(Row)
|
||||
|
||||
''Row = DtPatrimonioGenerado.NewRow
|
||||
''If DtPatrimonioGenerado.Rows.Count > 0 Then
|
||||
'' Row.Item("Nombre") = " TOTAL PATRIMONIO GENERADO"
|
||||
'' 'El id = 87 es el id de la cuenta "RESULTADOS DEL EJERCICIO:(AHORRO/DESAHORRO)"
|
||||
'' Row.Item("ImporteActual") = DtPatrimonioGenerado.SUM("ImporteActual").ToString
|
||||
'' Row.Item("ImporteAnterior") = DtPatrimonioGenerado.SUM("ImporteAnterior").ToString
|
||||
'' Row.Item("CtaMayor") = -1
|
||||
'' 'DtPatrimonioGenerado.Rows.RemoveAt(0)
|
||||
''Else
|
||||
'' Row.Item("Nombre") = " TOTAL PATRIMONIO GENERADO"
|
||||
'' Row.Item("ImporteActual") = "0.00"
|
||||
'' Row.Item("ImporteAnterior") = "0.00"
|
||||
'' Row.Item("CtaMayor") = -1
|
||||
''End If
|
||||
''DtPatrimonioGenerado.Rows.Add(Row)
|
||||
|
||||
''Row = DtPatrimonioActualizacion.NewRow
|
||||
''If DtPatrimonioActualizacion.Rows.Count > 0 Then
|
||||
'' Row.Item("Nombre") = " TOTAL EXCESO O INSUFICIENCIA EN LA ACTUALIZACION"
|
||||
'' Row.Item("ImporteActual") = DtPatrimonioActualizacion.SUM("ImporteActual").ToString
|
||||
'' Row.Item("ImporteAnterior") = DtPatrimonioActualizacion.SUM("ImporteAnterior").ToString
|
||||
'' Row.Item("CtaMayor") = -1
|
||||
'' 'DtPatrimonioActualizacion.Rows.RemoveAt(0)
|
||||
''Else
|
||||
'' Row.Item("Nombre") = " TOTAL EXCESO O INSUFICIENCIA EN LA ACTUALIZACION"
|
||||
'' Row.Item("ImporteActual") = "0.00"
|
||||
'' Row.Item("ImporteAnterior") = "0.00"
|
||||
'' Row.Item("CtaMayor") = -1
|
||||
''End If
|
||||
''DtPatrimonioActualizacion.Rows.Add(Row)
|
||||
|
||||
|
||||
GvPatrimonio.DataSource = DtPatrimonioContribuido
|
||||
GvPatrimonio.DataBind()
|
||||
'GvPatrimonioGenerado.DataSource = DtPatrimonioGenerado
|
||||
'GvPatrimonioGenerado.DataBind()
|
||||
'GvPatrimonioActualizacion.DataSource = DtPatrimonioActualizacion
|
||||
'GvPatrimonioActualizacion.DataBind()
|
||||
|
||||
'GvUtilidad.DataSource = DtUtilidad
|
||||
'GvUtilidad.DataBind()
|
||||
|
||||
UpPatrimonio.Update()
|
||||
End Sub
|
||||
Private Sub SumaTotales()
|
||||
TotalPasivoPatrimonioActual = TotalPasivoActual + TotalPatrimonioActual
|
||||
TotalPasivoPatrimonioAnterior = TotalPasivoAnterior + TotalPatrimonioAnterior
|
||||
|
||||
'Llena Lb´s Totales
|
||||
LbTotalActivoActual.Text = TotalActivoActual.ToString.FormatoNumero
|
||||
LbTotalActivoAnterior.Text = TotalActivoAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPasivoActual.Text = TotalPasivoActual.ToString.FormatoNumero
|
||||
LbTotalPasivoAnterior.Text = TotalPasivoAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPatrimonioActual.Text = TotalPatrimonioActual.ToString.FormatoNumero
|
||||
LbTotalPatrimonioAnterior.Text = TotalPatrimonioAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPasivoPatrimonioActual.Text = TotalPasivoPatrimonioActual.ToString.FormatoNumero
|
||||
LbTotalPasivoPatrimonioAnterior.Text = TotalPasivoPatrimonioAnterior.ToString.FormatoNumero
|
||||
|
||||
|
||||
Dim Descuadre As Boolean = False
|
||||
'COLOREA ROJO SI NO CUADRAN TOTALES
|
||||
If Math.Round(TotalActivoActual, 2) <> Math.Round(TotalPasivoPatrimonioActual, 2) Then
|
||||
LbTotalActivoActual.ForeColor = Drawing.Color.Red
|
||||
LbTotalPasivoPatrimonioActual.ForeColor = Drawing.Color.Red
|
||||
Descuadre = True
|
||||
Else
|
||||
LbTotalActivoActual.ForeColor = Drawing.Color.Black
|
||||
LbTotalPasivoPatrimonioActual.ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
'If Math.Round(TotalActivoAnterior, 2) <> Math.Round(TotalPasivoPatrimonioAnterior, 2) Then
|
||||
' LbTotalActivoAnterior.ForeColor = Drawing.Color.Red
|
||||
' LbTotalPasivoPatrimonioAnterior.ForeColor = Drawing.Color.Red
|
||||
' Descuadre = True
|
||||
'Else
|
||||
' LbTotalActivoAnterior.ForeColor = Drawing.Color.Black
|
||||
' LbTotalPasivoPatrimonioAnterior.ForeColor = Drawing.Color.Black
|
||||
'End If
|
||||
|
||||
If Descuadre Then
|
||||
LbDescuadre.Text = "Las sumas de los totales están descuadradas."
|
||||
Else
|
||||
LbDescuadre.Text = ""
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
'Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
'Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
|
||||
'If ObjConta.GetSituacionFinanciera("01/01/2000".ToDate, FechaF.ToDate, DdlTipoReporte.SelectedValue.ToEntero) Then
|
||||
' DtDatos = ObjConta.DtResultados
|
||||
' 'If ChkFirma.Checked = True Then
|
||||
|
||||
' ' Dim Row As DataRow = DtDatos.NewRow
|
||||
' ' Row.Item("Nombre") = String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de contabilidad", "")
|
||||
' ' Row.Item("Sup") = String.Format("Lic. Juan Fortino Leon Robinson{0} Director General", "")
|
||||
' ' Row.Item("ImporteActual") = "0"
|
||||
' ' Row.Item("ImporteAnterior") = "0"
|
||||
' ' Row.Item("Tipo") = "Firma"
|
||||
' ' DtDatos.Rows.Add(Row)
|
||||
' 'End If
|
||||
'End If
|
||||
'ObjConta.Dispose()
|
||||
|
||||
ImprimirReporte()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
TotalActivoActual = 0
|
||||
TotalActivoAnterior = 0
|
||||
TotalPasivoActual = 0
|
||||
TotalPasivoAnterior = 0
|
||||
TotalPatrimonioActual = 0
|
||||
TotalPatrimonioAnterior = 0
|
||||
TotalPasivoPatrimonioActual = 0
|
||||
TotalPasivoPatrimonioAnterior = 0
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "GV´S ROW DATA BOUND"
|
||||
|
||||
Protected Sub GvActivo_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalActivoActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalActivoAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
Else
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level").ToString = "2" Then
|
||||
e.Row.FCLabel("LbNombre").Text = String.Format(" {0}", e.Row.DBCampo("Nombre").ToString)
|
||||
ElseIf e.Row.DBCampo("Level").ToString = "1" Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvPasivo_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'Totales
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalPasivoActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalPasivoAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
'Cuentas
|
||||
Else
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte)
|
||||
'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
End If
|
||||
|
||||
|
||||
'Colorea NEGATIVOS
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level").ToString = "2" Then
|
||||
e.Row.FCLabel("LbNombre").Text = String.Format(" {0}", e.Row.DBCampo("Nombre").ToString)
|
||||
ElseIf e.Row.DBCampo("Level").ToString = "1" Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvPatrimonio_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalPatrimonioActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalPatrimonioAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
'e.Row.ControlStyle.Font.Bold = True
|
||||
ElseIf e.Row.DBCampo("CveCuenta") <> "55276" Then
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte)
|
||||
'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level").ToString = "2" Then
|
||||
e.Row.FCLabel("LbNombre").Text = String.Format(" {0}", e.Row.DBCampo("Nombre").ToString)
|
||||
ElseIf e.Row.DBCampo("Level").ToString = "1" Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim FechaI As String = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
Dim FechaF As String = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
|
||||
Dim fileName As String = "EdoSituacionFinanciera"
|
||||
Dim reportpath As String = "Contabilidad2/Reportes/RepSituacionFinanciera.rdlc"
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFirma1", If(ChkFirma.Checked, String.Format("{0}", vbCrLf), "")))
|
||||
params.Add(New ReportParameter("pFirma2", If(ChkFirma.Checked, String.Format("{0}l", vbCrLf), "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaF))
|
||||
|
||||
params.Add(New ReportParameter("periodo", String.Format("de {0} {1}", DdlPeriodo.SelectedItem.ToString, DdlEjercicio.SelectedItem.ToString)))
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkCerrar_Click(sender As Object, e As EventArgs) Handles LnkCerrar.Click
|
||||
RegistraScript("$('#ModalCierre').modal()")
|
||||
CargaCtaContableE()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnCierre_Click(sender As Object, e As EventArgs) Handles BtnCierre.Click
|
||||
Dim objConta As New ClsContabilidad
|
||||
Dim FechaIncio As String = String.Format("{0}/01/01", DdlEjercicioCierre.SelectedValue.ToString)
|
||||
Dim FechaFin As String = String.Format("{0}/12/31", DdlEjercicioCierre.SelectedValue.ToString)
|
||||
Dim CvePrepoliza As Integer = objConta.CierreEjercicio(UsuarioActual.CveEmpresa, DdlEjercicioCierre.SelectedValue.ToEntero, DdlCuentas.SelectedValue.ToEntero, FechaIncio, FechaFin, UsuarioActual.CveUsuario)
|
||||
If CvePrepoliza > 0 Then
|
||||
Alert(String.Format("Se realizo el cierre correctamente: <br/> <b> Poliza: </b> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrepoliza={0}'>{0}</a>", CvePrepoliza), TipoMensaje.MsgInformacion)
|
||||
objConta.Commit()
|
||||
Else
|
||||
Alert("Ocurrio un error al realizar el cierre", TipoMensaje.MsgError)
|
||||
objConta.RollBack()
|
||||
End If
|
||||
objConta.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCtaContableE()
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCuentas.DataSource = ObjConta.DtResultados.FiltraParametros("Tipo = 'F' or Tipo = 'E' ", "")
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
DdlCuentas.DataBind()
|
||||
DdlCuentas.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user