This commit is contained in:
2022-03-15 18:04:23 -07:00
75 changed files with 1292 additions and 540 deletions

View File

@@ -2399,7 +2399,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim CveSubProyecto As Integer = -1
Dim TipoMovto As Boolean = If(Row("Cargo").ToString.ToDecimal <> 0, False, True)
Dim CveConceptoContable As Integer = GlobalDTContaConceptosContables(-1).FiltroPrimeroValor("CveConceptoContable", String.Format("ConceptoContable ='{0}'", Row("ConceptoAdministrativo"))).ToEntero ' Row("CveConceptoContable").ToString.ToEntero
Dim CveConceptoContable As Integer = GlobalDTContaConceptosContables(-1).FiltroPrimeroValor("CveConceptoContable", String.Format("ConceptoContable ='{0}'", Row("ConceptoAdministrativo").ToString.Trim)).ToEntero ' Row("CveConceptoContable").ToString.ToEntero
'Dim IdCtaContable As Integer = Row("IdCtaContable").ToString.ToEntero
Dim CveClasificacion As Integer = -1
Dim CveCuentaExcel As Integer = -1

View File

@@ -0,0 +1,115 @@
<%@ Page Title="Reporte Flujo de Efectivo" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepFlujoEfectivo.aspx.vb" Inherits="Contabilidad_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">
Reporte 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>
</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-default" CssClass="btn btn-default" Enabled="false" />
</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="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>
<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-2 ">
<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>
<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>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" />
</asp:DropDownList>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<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>
</Columns>
</asp:GridView>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,178 @@
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 Contabilidad_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(Now), Month(Now), 1).ToShortDateString
TxtFechaAl.Text = Date.Now.ToShortDateString
CargaDatos()
BtnConsultar.Enabled = True
End If
End Sub
#Region "CARGA DATOS Y GRID"
Private Sub CargaDatos()
Dim ObjConta As New ClsContabilidad
'Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
FechaAl = TxtFechaAl.Text
If ObjConta.GetFlujoEfectivo2(FechaFin, DdlTipo.SelectedValue.ToEntero, 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()
GvDatos.DataSource = DtDatos
GvDatos.DataBind()
UpDatos.Update()
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("Id") = "12" Then
e.Row.FCLabel("LbActual").Text = ""
e.Row.FCLabel("LbAnterior").Text = ""
End If
'TOTAL OPERACIONES
If e.Row.DBCampo("Id") = "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
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
End Sub
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
GvDatos.ExportToExcel2("RepFlujosDeEfectivo.xlsx")
End Sub
End Class