Commit inicial Ventas Productivo
This commit is contained in:
159
Contabilidad/AuxiliarPrePolizas.aspx
Normal file
159
Contabilidad/AuxiliarPrePolizas.aspx
Normal file
@@ -0,0 +1,159 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="AuxiliarPrePolizas.aspx.cs" Inherits="Contabilidad_AuxiliarPrePolizas" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.select2 .select2-selection__rendered {
|
||||
line-height: 1;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.select2 .select2-selection--multiple {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
min-height: 20px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.select2-selection__rendered {
|
||||
margin-top: 0px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.select2-selection {
|
||||
margin-top: 0px;
|
||||
height: 31px;
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||
border: none;
|
||||
outline: 0;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Auxiliar de PrePolizas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="PFiltro" 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" ValidationGroup="Valida" OnClick="BtnConsultar_Click" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row" style="margin-left: 10px;">
|
||||
<label class="col-md-1 ">Plantilla:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlPlantillaPoliza" OnSelectedIndexChanged="DdlPlantillaPoliza_SelectedIndexChanged" AutoPostBack="true" runat="server" DataTextField="PlantillaPoliza" DataValueField="CvePlantillaPoliza" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVPlantilla" runat="server" ControlToValidate="DdlPlantillaPoliza" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Plantilla Poliza''</b> es necesario, por favor ingréselo." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOPlantilla" runat="server" HighlightCssClass="vco" TargetControlID="RFVPlantilla"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<label class="col-md-1 ">Concepto:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:ListBox ID="DdlConcepto" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" CssClass="form-control ddlFiltros input-sm select2me Widthall" runat="server" Width="100%"></asp:ListBox>
|
||||
<%-- <asp:DropDownList ID="DdlConcepto" runat="server" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
|
||||
</asp:DropDownList>--%>
|
||||
</div>
|
||||
<div class="col-md-1" style="">Fecha Inicial:</div>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="margin-top: -5px; padding: 5px 0px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Style="width: 80px;"></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>
|
||||
<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>
|
||||
<div class="col-md-1" style="margin-left: 25px">Fecha Final:</div>
|
||||
<div class="col-md-1" style="margin-left: -10px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="margin-top: -5px; padding: 5px 0px;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Style="width: 80px;"></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>
|
||||
<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>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row" style="margin-left: 10px;">
|
||||
<asp:UpdatePanel ID="UpSubProyecto" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
|
||||
<div class="col-md-2" id="DivProyecto" runat="server">
|
||||
<asp:DropDownList ID="DdlProyecto" Width="100%" OnSelectedIndexChanged="DdlProyecto_SelectedIndexChanged" runat="server" CssClass="select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" ValidationGroup="Valida">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="select2me" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" ValidationGroup="Valida" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="margin-left: 0px; margin-top: 15px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
|
||||
<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:GridView ID="GvDatos" runat="server" GridLines="None"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontraron registros" data-sort="true" Width="99%" OnRowDataBound="GvDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:HyperLinkField DataTextField="Fecha" Target="_blank" HeaderText="Fecha" DataTextFormatString="{0:d}" DataNavigateUrlFields="CvePrePoliza" DataNavigateUrlFormatString="/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}" />
|
||||
<asp:BoundField DataField="ConceptoContable" HeaderText="Concepto Contable" />
|
||||
<asp:HyperLinkField DataTextField="Concepto" Target="_blank" HeaderText="Concepto" DataNavigateUrlFields="CvePrePoliza" DataNavigateUrlFormatString="/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}" />
|
||||
<asp:BoundField DataField="Referencia" HeaderText="Referencia" />
|
||||
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:C}" />
|
||||
<asp:BoundField DataField="ContactoNombre" HeaderText="Beneficiario/Pagador" />
|
||||
<asp:BoundField DataField="SubProyecto" HeaderText="Centro Costo" />
|
||||
<asp:HyperLinkField HeaderText="Docto Bancario" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString ="/Bancos/IE.aspx?CveIE={0}" DataTextField="BancosFolio" Target="_blank" ItemStyle-HorizontalAlign="center" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
205
Contabilidad/AuxiliarPrePolizas.aspx.cs
Normal file
205
Contabilidad/AuxiliarPrePolizas.aspx.cs
Normal file
@@ -0,0 +1,205 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
|
||||
public partial class Contabilidad_AuxiliarPrePolizas : ClsPaginas
|
||||
{
|
||||
|
||||
#region PROPIEDADES
|
||||
private DataTable DtDatos
|
||||
{
|
||||
get { return DtDatos = (DataTable)ViewState["DtDatos"]; }
|
||||
set { ViewState["DtDatos"] = value; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaValores();
|
||||
}
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
{
|
||||
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString();
|
||||
txtFechaF.Text = DateTime.Now.ToShortDateString();
|
||||
DdlPlantillaPoliza.DataSource = get_GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa);
|
||||
DdlPlantillaPoliza.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlPlantillaPoliza.DataBind();
|
||||
CargaConceptosContables();
|
||||
DdlProyecto.DataSource = get_GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1);
|
||||
DdlProyecto.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
DdlProyecto.DataBind();
|
||||
CargaTipoCentroCosto();
|
||||
if (DivProyecto.Visible)
|
||||
{
|
||||
CargaSubProyectos();
|
||||
}
|
||||
}
|
||||
private void CargaSubProyectos()
|
||||
{
|
||||
DdlSubProyecto.Items.Clear();
|
||||
if (DdlProyecto.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
DdlSubProyecto.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, DdlProyecto.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, -1);
|
||||
DdlSubProyecto.DataBind();
|
||||
}
|
||||
DdlSubProyecto.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
UpSubProyecto.Update();
|
||||
}
|
||||
|
||||
private void CargaTipoCentroCosto()
|
||||
{
|
||||
if (UsuarioActual.Empresa.Tipo_CentroCosto == 1)
|
||||
{
|
||||
DdlSubProyecto.Items.Clear();
|
||||
DivProyecto.Visible = false;
|
||||
LblProyecto.Visible = false;
|
||||
LblSubProyecto.Text = "Sucursal:";
|
||||
|
||||
DdlSubProyecto.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1);
|
||||
DdlSubProyecto.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
DdlSubProyecto.DataBind();
|
||||
}
|
||||
else if (UsuarioActual.Empresa.Tipo_CentroCosto == 2)
|
||||
{
|
||||
DdlSubProyecto.Items.Clear();
|
||||
DivProyecto.Visible = false;
|
||||
LblProyecto.Visible = false;
|
||||
LblSubProyecto.Text = "Proyecto:";
|
||||
|
||||
DdlSubProyecto.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1);
|
||||
DdlSubProyecto.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
DdlSubProyecto.DataBind();
|
||||
}
|
||||
else if (UsuarioActual.Empresa.Tipo_CentroCosto == 4)
|
||||
{
|
||||
LblProyecto.Text = "Sucursal:";
|
||||
LblSubProyecto.Text = "Proyecto:";
|
||||
}
|
||||
else if (UsuarioActual.Empresa.Tipo_CentroCosto == 5)
|
||||
{
|
||||
LblProyecto.Text = "Proyecto:";
|
||||
LblSubProyecto.Text = "Sucursal:";
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
GenerarPDF("EXCEL");
|
||||
}
|
||||
|
||||
protected void GenerarPDF(String Opcion)
|
||||
{
|
||||
String FechaI;
|
||||
if (txtFechaI.Text == "" || txtFechaI.Text == "__/__/____") { FechaI = "-1"; } else { FechaI = $" <b>Fecha Inicial:</b> {txtFechaI.Text}"; }
|
||||
String FechaF;
|
||||
if (txtFechaF.Text == "" || txtFechaF.Text == "__/__/____") { FechaF = "-1"; } else { FechaF = $" <b>Fecha Final:</b> {txtFechaF.Text}"; }
|
||||
String PlantillaPoliza;
|
||||
if (DdlPlantillaPoliza.SelectedValue != "-1") { PlantillaPoliza = $" <b>Plantilla Poliza:</b> {DdlPlantillaPoliza.SelectedItem.Text}"; } else { PlantillaPoliza = ""; }
|
||||
String Concepto;
|
||||
if (DdlConcepto.GetSelectedText() != "") { Concepto = $" <b>Concepto:</b> {DdlConcepto.GetSelectedText()}"; } else { Concepto = ""; }
|
||||
String Proyecto;
|
||||
if (DdlProyecto.SelectedValue != "-1") { Proyecto = $" <b>Proyecto:</b> {DdlProyecto.SelectedItem.Text}"; } else { Proyecto = ""; }
|
||||
String SubProyecto;
|
||||
if (DdlSubProyecto.SelectedValue != "-1") { SubProyecto = $" <b>SubProyecto:</b> {DdlSubProyecto.SelectedItem.Text}"; } else { SubProyecto = ""; }
|
||||
if (DtDatos.Rows.Count > 0)
|
||||
{
|
||||
System.IO.FileInfo Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
|
||||
String logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
List<ReportParameter> para = new List<ReportParameter>();
|
||||
para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||
para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString()));
|
||||
para.Add(new ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {PlantillaPoliza}{Concepto}{Proyecto}{SubProyecto}{FechaI}{FechaF}"));
|
||||
if (Imagen.Exists)
|
||||
{
|
||||
para.Add(new ReportParameter("LogoPath", logouri));
|
||||
}
|
||||
else
|
||||
{
|
||||
para.Add(new ReportParameter("LogoPath", ""));
|
||||
}
|
||||
ImprimirPDF("Empresas/Grales/Formatos/AuxiliarPrePolizas.rdlc", DtDatos, para, "Reporte de Auxiliar de PrePolizas", Opcion);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("No hay datos consultados", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
string Conceptos = "";
|
||||
if (DdlConcepto.GetSelectedValuesM() == "") { Conceptos = "-1"; } else { Conceptos = DdlConcepto.GetSelectedValuesM(); }
|
||||
ClsContabilidad ObjConta = new ClsContabilidad();
|
||||
if (ObjConta.GetAuxiliarPrePolizas(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlSubProyecto.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa,
|
||||
Conceptos, DdlPlantillaPoliza.SelectedValue.ToEntero(), DdlProyecto.SelectedValue.ToEntero()))
|
||||
{
|
||||
GvDatos.DataSource = ObjConta.DtResultados;
|
||||
DtDatos = ObjConta.DtResultados;
|
||||
}
|
||||
ObjConta.Dispose();
|
||||
GvDatos.DataBind();
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
protected void DdlProyecto_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CargaSubProyectos();
|
||||
}
|
||||
|
||||
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
//if (e.Row.DBCampo("CveSubProyecto").ToEntero() < 1)
|
||||
//{
|
||||
// e.Row.CssClass = "Totales";
|
||||
//}
|
||||
if (e.Row.DBCampo("Tipo").ToEntero() == 1)
|
||||
{
|
||||
e.Row.CssClass = "SubTotales";
|
||||
//e.Row.Cells[1].Text = e.Row.DBCampo("ProyectoSubProyecto").ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkPdf_Click(object sender, EventArgs e)
|
||||
{
|
||||
GenerarPDF("PDF");
|
||||
}
|
||||
|
||||
protected void DdlPlantillaPoliza_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CargaConceptosContables();
|
||||
}
|
||||
|
||||
private void CargaConceptosContables()
|
||||
{
|
||||
DdlConcepto.Items.Clear();
|
||||
if (DdlPlantillaPoliza.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
ClsContabilidad ObjConta = new ClsContabilidad();
|
||||
if (ObjConta.GetPlantillaConceptos(UsuarioActual.CveEmpresa, DdlPlantillaPoliza.SelectedValue.ToEntero()))
|
||||
{
|
||||
DdlConcepto.DataSource = ObjConta.DtResultados.FiltraParametros("", DistinctColumns: new string[] { "CveConceptoContable","ConceptoContable"});
|
||||
}
|
||||
ObjConta.Dispose();
|
||||
}
|
||||
DdlConcepto.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
DdlConcepto.DataBind();
|
||||
}
|
||||
}
|
||||
255
Contabilidad/CatCuentas.aspx
Normal file
255
Contabilidad/CatCuentas.aspx
Normal file
@@ -0,0 +1,255 @@
|
||||
<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatCuentas.aspx.vb" Inherits="Contabilidad_CatCuentas" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
#treeviewarbolmiarbol, .catcuentascontarbol .catcuentasarbol {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#listviewbuscar {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.aradd {
|
||||
margin-left: 15px;
|
||||
background-color: #1caf9a;
|
||||
color: #ffffff;
|
||||
font-weight: 300;
|
||||
padding: 2px 7px 3px 8px;
|
||||
text-align: center;
|
||||
height: 15px;
|
||||
border-radius: 18px !important;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.aradd::before {
|
||||
font: normal normal normal 14px/1 FontAwesome;
|
||||
font-size: 9px !important;
|
||||
content: "\f067";
|
||||
}
|
||||
|
||||
.aredit {
|
||||
margin-left: 15px;
|
||||
background-color: #E87E04;
|
||||
color: #ffffff;
|
||||
font-weight: 300;
|
||||
padding: 2px 7px 3px 8px;
|
||||
text-align: center;
|
||||
height: 15px;
|
||||
border-radius: 18px !important;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.aredit::before {
|
||||
font: normal normal normal 14px/1 FontAwesome;
|
||||
font-size: 9px !important;
|
||||
content: "\f040";
|
||||
}
|
||||
</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">
|
||||
</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">
|
||||
<fieldset>
|
||||
<legend>Cuentas</legend>
|
||||
<div class="catcuentasarbol">
|
||||
<div id="treeviewarbolmiarbol">
|
||||
<asp:Literal ID="Literal1" Visible="false" runat="server"></asp:Literal>
|
||||
<ADS:Arbol runat="server" ID="ArbolCuentas"></ADS:Arbol>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="catcuentasform">
|
||||
|
||||
|
||||
<asp:TextBox ID="Textbuscar" Style="display: none;" runat="server"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnID" runat="server" Value="" ClientIDMode="Static" />
|
||||
<asp:Button ID="editar" runat="server" Style="display: none;" Text="Buscar" />
|
||||
<asp:Button ID="agregar" Style="display: none;" runat="server" Text="Buscar" />
|
||||
<asp:Button ID="borrar" Style="display: none;" runat="server" Text="borrar" />
|
||||
<fieldset>
|
||||
<legend>Información de la cuenta</legend>
|
||||
<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" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Nombre</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="Tnombre" Style="width: 100%;" runat="server" MaxLength="50"></asp:TextBox>
|
||||
</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>
|
||||
<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: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>
|
||||
<asp:ListItem Text="Pasivo Deudora " Value="C"></asp:ListItem>
|
||||
<asp:ListItem Text="Pasivo Acreedora " Value="D"></asp:ListItem>
|
||||
<asp:ListItem Text="Capital Deudora " Value="E"></asp:ListItem>
|
||||
<asp:ListItem Text="Capital Acreedora " Value="F"></asp:ListItem>
|
||||
<asp:ListItem Text="Resultados Deudora " Value="G"></asp:ListItem>
|
||||
<asp:ListItem Text="Resultados Acreedora" Value="H"></asp:ListItem>
|
||||
<asp:ListItem Text="Estadisticas Deudora" Value="I"></asp:ListItem>
|
||||
<asp:ListItem Text="Estadisticas Acredora " Value="J"></asp:ListItem>
|
||||
<asp:ListItem Text="Orden Deudora " Value="K"></asp:ListItem>
|
||||
<asp:ListItem Text="Orden Acreedora " Value="L"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<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: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>
|
||||
<asp:ListItem Text="Titulo " Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="SubTitulo " Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Dígito agrupador</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="TxtDigAgrup" Style="width: 40px;" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<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 />
|
||||
<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>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
<asp:Content ID="content7" ContentPlaceHolderID="JS" runat="server">
|
||||
<script>
|
||||
function buscararbolito(inputid, ulid) {
|
||||
|
||||
var texto = $("input#" + inputid).val();
|
||||
if ((texto == '') && ($('ul#' + ulid))) {
|
||||
$('ul#' + ulid + '').removeClass("listainvicible");
|
||||
}
|
||||
else {
|
||||
if ($('ul#' + ulid).hasClass('listainvicible') == false) {
|
||||
$('ul#' + ulid).addClass("listainvicible");
|
||||
}
|
||||
if ($('ul#' + ulid + ' li.livisible')) {
|
||||
$('ul#' + ulid + ' li.livisible').removeClass("livisible");
|
||||
}
|
||||
if ($('ul#' + ulid + ' input:checked')) {
|
||||
$('ul#' + ulid + ' input:checked').prop('checked', false);
|
||||
}
|
||||
if ($('ul#' + ulid + ' li:contains("' + texto + '") > input[type=checkbox]')) {
|
||||
$('ul#' + ulid + ' li:contains("' + texto + '") > input[type=checkbox]').prop('checked', true);
|
||||
}
|
||||
if ($('ul#' + ulid + ' li:contains("' + texto + '")')) {
|
||||
$('ul#' + ulid + ' li:contains("' + texto + '")').addClass("livisible");
|
||||
}
|
||||
if ($('ul#' + ulid + ' label:contains("' + texto + '") ~ ul li')) {
|
||||
$('ul#' + ulid + ' label:contains(""' + texto + '"") ~ ul li').addClass("livisible");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
buscararbolito('C_ArbolCuentas_Abuscar', 'C_ArbolCuentas_miarbol')
|
||||
});
|
||||
});
|
||||
|
||||
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?');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
319
Contabilidad/CatCuentas.aspx.vb
Normal file
319
Contabilidad/CatCuentas.aspx.vb
Normal file
@@ -0,0 +1,319 @@
|
||||
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
|
||||
'inicio()
|
||||
'RegistraScript("$('#Tsubcuenta').mask('00000-0000-0000-00000');")
|
||||
|
||||
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
|
||||
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
|
||||
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(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
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", Now.ToDateTime.ToShortDateString))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/CatCuentas.rdlc", DtDatos.FiltraParametros("", "Orden ASC"), params, String.Format("Catalogo Cuentas-{0}", Now.ToDateTime.ToShortDateString))
|
||||
End Sub
|
||||
End Class
|
||||
249
Contabilidad/CatPeriodosBloqueo.aspx
Normal file
249
Contabilidad/CatPeriodosBloqueo.aspx
Normal file
@@ -0,0 +1,249 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatPeriodosBloqueo.aspx.vb" Inherits="Contabilidad_CatPeriodosBloqueo" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Periodos Bloqueo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarPeriodosBloqueo" data-toggle="tooltip" data-placement="left" title="Agregar Periodo de Bloqueo" Text="<i class='fa fa-plus'></i> Agregar Bloqueo"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="Widthall" style="text-align: right!important; margin-top: 20px!important; margin-bottom: 2px!important">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvPeriodosBloqueo.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvPeriodosBloqueo.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin: 5px">
|
||||
<asp:UpdatePanel ID="UPGvPeriodosBloqueo" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvPeriodosBloqueo" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveEmpresa, Ejercicio, Mes1, Mes2, Mes3, Mes4,Mes5,Mes6,Mes7,Mes8,Mes9,Mes10,Mes11,Mes12"
|
||||
EmptyDataText="No se encontraron registros"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Ejercicio">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Ejercicio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Enero" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" Checked='<%# Eval("Mes1") %>' Enabled="False"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Febrero" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" Checked='<%# Eval("Mes2") %>' Enabled="False"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Marzo" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" Checked='<%# Eval("Mes3") %>' Enabled="False"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abril" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" Checked='<%# Eval("Mes4") %>' Enabled="False"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Mayo" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" Checked='<%# Eval("Mes5") %>' Enabled="False"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Junio" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" Checked='<%# Eval("Mes6") %>' Enabled="False"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Julio" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" Checked='<%# Eval("Mes7") %>' Enabled="False"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Agosto" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" Checked='<%# Eval("Mes8") %>' Enabled="False"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Septiembre" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" Checked='<%# Eval("Mes9") %>' Enabled="False"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Octubre" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" Checked='<%# Eval("Mes10") %>' Enabled="False"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Noviembre" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" Checked='<%# Eval("Mes11") %>' Enabled="False"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Diciembre" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" Checked='<%# Eval("Mes12") %>' Enabled="False"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgE" OnClick="Edit_ClickPeriodosBloqueo" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" OnClick="Remove_ClickPeriodosBloqueo" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div id="DivAgregarPeriodosBloqueo" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalPeriodosBloqueo" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalPeriodosBloqueo" runat="server">Agregar Bloqueo</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtEjercicio" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtBonificacion" runat="server" ControlToValidate="TxtEjercicio" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ejercicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtEjercicio.ClientID.ToString()%>">Ejercicio:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Enero</th>
|
||||
<th>Febero</th>
|
||||
<th>Marzo</th>
|
||||
<th>Abril</th>
|
||||
<th>Mayo</th>
|
||||
<th>Junio</th>
|
||||
<th>Julio</th>
|
||||
<th>Agosto</th>
|
||||
<th>Septiembre</th>
|
||||
<th>Octubre</th>
|
||||
<th>Noviembre</th>
|
||||
<th>Diciembre</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><asp:CheckBox ID="ChkM1" runat="server" /></td>
|
||||
<td align="center"><asp:CheckBox ID="ChkM2" runat="server" /></td>
|
||||
<td align="center"><asp:CheckBox ID="ChkM3" runat="server" /></td>
|
||||
<td align="center"><asp:CheckBox ID="ChkM4" runat="server" /></td>
|
||||
<td align="center"><asp:CheckBox ID="ChkM5" runat="server" /></td>
|
||||
<td align="center"><asp:CheckBox ID="ChkM6" runat="server" /></td>
|
||||
<td align="center"><asp:CheckBox ID="ChkM7" runat="server" /></td>
|
||||
<td align="center"><asp:CheckBox ID="ChkM8" runat="server" /></td>
|
||||
<td align="center"><asp:CheckBox ID="ChkM9" runat="server" /></td>
|
||||
<td align="center"><asp:CheckBox ID="ChkM10" runat="server" /></td>
|
||||
<td align="center"><asp:CheckBox ID="ChkM11" runat="server" /></td>
|
||||
<td align="center"><asp:CheckBox ID="ChkM12" runat="server" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarPeriodosBloqueoModal" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTamanio" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
229
Contabilidad/CatPeriodosBloqueo.aspx.vb
Normal file
229
Contabilidad/CatPeriodosBloqueo.aspx.vb
Normal file
@@ -0,0 +1,229 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
|
||||
Partial Class Contabilidad_CatPeriodosBloqueo
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "Propiedades"
|
||||
Private Property Ejercicio As Integer
|
||||
Get
|
||||
If Not ViewState("Ejercicio") Is Nothing Then
|
||||
Return ViewState("Ejercicio").ToString.ToEntero
|
||||
Else
|
||||
Return -1
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("Ejercicio") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
Private Property CveEmpresa As Integer
|
||||
Get
|
||||
If Not ViewState("CveEmpresa") Is Nothing Then
|
||||
Return ViewState("CveEmpresa").ToString.ToEntero
|
||||
Else
|
||||
Return -1
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveEmpresa") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
Private Property Actualizar As Boolean
|
||||
Get
|
||||
If Not ViewState("Actualizar") Is Nothing Then
|
||||
Return DirectCast(ViewState("Actualizar"), Boolean)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("Actualizar") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargadatosGvPeriodosBloqueo()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargadatosGvPeriodosBloqueo()
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If ObjConta.GetPeriodosBloqueo(UsuarioActual.CveEmpresa) Then
|
||||
GvPeriodosBloqueo.DataSource = ObjConta.DtResultados
|
||||
Else
|
||||
GvPeriodosBloqueo.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
UPGvPeriodosBloqueo.DataBind()
|
||||
UpGral.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarPeriodosBloqueo_Click(sender As Object, e As EventArgs) Handles BtnAgregarPeriodosBloqueo.Click
|
||||
LtlTituloModalPeriodosBloqueo.Text = "Agregar Bloqueo"
|
||||
BtnAgregarPeriodosBloqueoModal.Text = "Agregar"
|
||||
|
||||
LimpiarChecked()
|
||||
TxtEjercicio.Text = ""
|
||||
|
||||
Actualizar = False
|
||||
UpGral.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarPeriodosBloqueo"))
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiarChecked()
|
||||
ChkM1.Checked = False
|
||||
ChkM2.Checked = False
|
||||
ChkM3.Checked = False
|
||||
ChkM4.Checked = False
|
||||
ChkM5.Checked = False
|
||||
ChkM6.Checked = False
|
||||
ChkM7.Checked = False
|
||||
ChkM8.Checked = False
|
||||
ChkM9.Checked = False
|
||||
ChkM10.Checked = False
|
||||
ChkM11.Checked = False
|
||||
ChkM12.Checked = False
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarPeriodosBloqueoModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarPeriodosBloqueoModal.Click
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If Not Actualizar Then
|
||||
If ObjConta.AddPeriodosBloqueo(UsuarioActual.CveEmpresa, TxtEjercicio.Text, ChkM1.Checked, ChkM2.Checked, ChkM3.Checked, ChkM4.Checked, ChkM5.Checked, ChkM6.Checked, ChkM7.Checked, ChkM8.Checked, ChkM9.Checked, ChkM10.Checked, ChkM11.Checked, ChkM12.Checked) Then
|
||||
|
||||
CargadatosGvPeriodosBloqueo()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarPeriodosBloqueo"), "jsHideModalPeriodosBloqueo")
|
||||
UpGral.Update()
|
||||
|
||||
Alert("Bloqueo Agregado Correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al guardar el Periodo de Bloqueo", TipoMensaje.MsgError)
|
||||
End If
|
||||
Else
|
||||
|
||||
If ObjConta.UpdatePeriodosBloqueo(UsuarioActual.CveEmpresa, TxtEjercicio.Text, ChkM1.Checked, ChkM2.Checked, ChkM3.Checked, ChkM4.Checked, ChkM5.Checked, ChkM6.Checked, ChkM7.Checked, ChkM8.Checked, ChkM9.Checked, ChkM10.Checked, ChkM11.Checked, ChkM12.Checked) Then
|
||||
|
||||
CargadatosGvPeriodosBloqueo()
|
||||
UpModalPeriodosBloqueo.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarPeriodosBloqueo"), "jsHideModalPeriodosBloqueo")
|
||||
|
||||
UpGral.Update()
|
||||
Alert("Bloqueo Actualizado Correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al Actualizar el Periodo de Bloqueo", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
Ejercicio = -1
|
||||
Actualizar = False
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Remove_ClickPeriodosBloqueo(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
Ejercicio = GvRow.DataKey("Ejercicio")
|
||||
CveEmpresa = GvRow.DataKey("CveEmpresa")
|
||||
|
||||
If ObjConta.RemovePeriodosBloqueo(CveEmpresa, Ejercicio) Then
|
||||
CargadatosGvPeriodosBloqueo()
|
||||
|
||||
Alert("El Periodo de Bloqueo se Eliminó Correctamente ", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al Eliminar el Periodo de Bloqueo", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
CargadatosGvPeriodosBloqueo()
|
||||
|
||||
Ejercicio = -1
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Edit_ClickPeriodosBloqueo(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
|
||||
LtlTituloModalPeriodosBloqueo.Text = "Editar Bloqueo"
|
||||
Actualizar = True
|
||||
|
||||
Ejercicio = GvRow.DataKey("Ejercicio")
|
||||
CveEmpresa = GvRow.DataKey("CveEmpresa")
|
||||
|
||||
TxtEjercicio.Text = Ejercicio
|
||||
'DdlTareaProgra.SelectedValueExist(CveTareaProgramada)
|
||||
LimpiarChecked()
|
||||
|
||||
If GvRow.DataKey("Mes1").ToString = "True" Then
|
||||
ChkM1.Checked = True
|
||||
End If
|
||||
If GvRow.DataKey("Mes2").ToString = "True" Then
|
||||
ChkM2.Checked = True
|
||||
End If
|
||||
If GvRow.DataKey("Mes3").ToString = "True" Then
|
||||
ChkM3.Checked = True
|
||||
End If
|
||||
If GvRow.DataKey("Mes4").ToString = "True" Then
|
||||
ChkM4.Checked = True
|
||||
End If
|
||||
If GvRow.DataKey("Mes5").ToString = "True" Then
|
||||
ChkM5.Checked = True
|
||||
End If
|
||||
If GvRow.DataKey("Mes6").ToString = "True" Then
|
||||
ChkM6.Checked = True
|
||||
End If
|
||||
If GvRow.DataKey("Mes7").ToString = "True" Then
|
||||
ChkM7.Checked = True
|
||||
End If
|
||||
If GvRow.DataKey("Mes8").ToString = "True" Then
|
||||
ChkM8.Checked = True
|
||||
End If
|
||||
If GvRow.DataKey("Mes9").ToString = "True" Then
|
||||
ChkM9.Checked = True
|
||||
End If
|
||||
If GvRow.DataKey("Mes10").ToString = "True" Then
|
||||
ChkM10.Checked = True
|
||||
End If
|
||||
If GvRow.DataKey("Mes11").ToString = "True" Then
|
||||
ChkM11.Checked = True
|
||||
End If
|
||||
If GvRow.DataKey("Mes12").ToString = "True" Then
|
||||
ChkM12.Checked = True
|
||||
End If
|
||||
|
||||
BtnAgregarPeriodosBloqueoModal.Text = "Actualizar"
|
||||
|
||||
UpModalPeriodosBloqueo.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarPeriodosBloqueo"))
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
138
Contabilidad/ComparacionesContabilidad.aspx
Normal file
138
Contabilidad/ComparacionesContabilidad.aspx
Normal file
@@ -0,0 +1,138 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ComparacionesContabilidad.aspx.vb" Inherits="Contabilidad_ComparacionesContabilidad" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="CSS" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="E" runat="Server">
|
||||
Comparaciones
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" 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" Enabled="false"/>
|
||||
</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" Width="100%" DataTextField="Ejercicio" DataValueField="Ejercicio"></asp:DropDownList></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%">
|
||||
|
||||
<ajax:TabPanel ID="TabCompras" runat="server" HeaderText="Compras">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvCompras" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover" OnRowDataBound="GvCompras_RowDataBound" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLCompra" runat="server" Text='<%# Eval("SerieFolio")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Total" HeaderText="Importe SIG" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataField="Importe" HeaderText="Importe Poliza" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataField="Diferencia" HeaderText="Diferencia" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabBancos" runat="server" HeaderText="Bancos">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvBancos" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover" OnRowDataBound="GvBancos_RowDataBound" Style=" text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLFolio" runat="server" Text='<%# Eval("Folio")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="TotIE" HeaderText="Importe IE" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataField="TotPoliza" HeaderText="Importe Póliza" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataField="DifImporte" HeaderText="Diferencia" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataField="MovimientoIncorrecto" HeaderText="Tipo Movto" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabProveedores" runat="server" HeaderText="Proveedores">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvProveedores" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="NombreComercial" HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="300px" />
|
||||
<asp:BoundField DataField="SaldoPoliza" HeaderText="Saldo Póliza" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataField="SaldoSistema" HeaderText="Saldo Sistema" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataField="SaldoDif" HeaderText="Diferencia" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabClientes" runat="server" HeaderText="Clientes">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvClientes" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="NombreComercial" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="300px" />
|
||||
<asp:BoundField DataField="SaldoPoliza" HeaderText="Saldo Póliza" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataField="SaldoSistema" HeaderText="Saldo Sistema" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataField="SaldoDif" HeaderText="Diferencia" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabInv" runat="server" HeaderText="Inventarios">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvInv" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:HyperlinkField DataTextField="Folio" HeaderText="Folio" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="70px" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" DataNavigateUrlFields="CveMovimiento" />
|
||||
<asp:HyperlinkField DataTextField="TotPoliza" DataTextFormatString="{0:N2}" HeaderText="Total Poliza" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataNavigateUrlFormatString="/Contabilidad/RegPoliza.aspx?IdPoliza={0}" DataNavigateUrlFields="PolID" />
|
||||
<asp:BoundField DataField="TotInv" HeaderText="Total Inventario" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataField="DifImporte" HeaderText="Diferencia" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataField="FechaConta" HeaderText="F.Conta" DataFormatString="{0:d}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataField="FechaSis" HeaderText="F.Sistema" DataFormatString="{0:d}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
137
Contabilidad/ComparacionesContabilidad.aspx.vb
Normal file
137
Contabilidad/ComparacionesContabilidad.aspx.vb
Normal file
@@ -0,0 +1,137 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
|
||||
Partial Class Contabilidad_ComparacionesContabilidad
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "Propiedades"
|
||||
Private ReadOnly Property CveCajaChica As Integer
|
||||
Get
|
||||
Return ViewState("CveCajaChica").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
Private Property DtCheques As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtCheques"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtCheques") = 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 Then
|
||||
BtnConsultar.Enabled = True
|
||||
CargaEjercicios()
|
||||
CargaDatos()
|
||||
Else
|
||||
Alert("La empresa no usa contabilidad.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaEjercicios()
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ClsConta.GetEjercicios() Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjAC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
'Compras
|
||||
If ObjAC.GetComparaciones(1, DdlEjercicio.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvCompras.DataSource = ObjAC.DtResultados
|
||||
Else
|
||||
GvCompras.DataSource = Nothing
|
||||
End If
|
||||
|
||||
'Bancos
|
||||
If ObjAC.GetComparaciones(2, DdlEjercicio.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvBancos.DataSource = ObjAC.DtResultados
|
||||
Else
|
||||
GvBancos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
'Proveedores
|
||||
If ObjAC.GetComparaciones(3, DdlEjercicio.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvProveedores.DataSource = ObjAC.DtResultados
|
||||
Else
|
||||
GvProveedores.DataSource = Nothing
|
||||
End If
|
||||
|
||||
'Clientes
|
||||
If ObjAC.GetComparaciones(4, DdlEjercicio.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvClientes.DataSource = ObjAC.DtResultados
|
||||
Else
|
||||
GvClientes.DataSource = Nothing
|
||||
End If
|
||||
|
||||
'Clientes
|
||||
If ObjAC.GetComparaciones(5, DdlEjercicio.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvInv.DataSource = ObjAC.DtResultados
|
||||
Else
|
||||
GvInv.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAC.Dispose()
|
||||
|
||||
|
||||
GvCompras.DataBind()
|
||||
GvBancos.DataBind()
|
||||
GvProveedores.DataBind()
|
||||
GvClientes.DataBind()
|
||||
GvInv.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Protected Sub GvBancos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCHyperLink("HLFolio").NavigateUrl = String.Format("/Contabilidad/RegPoliza.aspx?IdPoliza={0}", e.Row.DBCampo("PolID"))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvCompras_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCHyperLink("HLCompra").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DBCampo("CveCompra"))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GvInv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvInv.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("DifImporte").ToDouble <> 0.00 Then
|
||||
e.Row.Cells(3).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("FechaDiferente") = "1" Then
|
||||
e.Row.Cells(4).ForeColor = Drawing.Color.Red
|
||||
e.Row.Cells(5).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
161
Contabilidad/ConceptosContables.aspx
Normal file
161
Contabilidad/ConceptosContables.aspx
Normal file
@@ -0,0 +1,161 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ConceptosContables.aspx.vb" Inherits="Contabilidad_ConceptosContables" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<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">
|
||||
Catálogo de Concepto Contable
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="110px">
|
||||
<asp:LinkButton ID="LbCveConceptoContable" runat="server" CausesValidation="false" Text="" CommandArgument="CveConceptoContable" OnClick="LbOrden_Click">
|
||||
Clave
|
||||
<asp:Literal ID="ImgCveConceptoContable" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="110px">
|
||||
<asp:LinkButton ID="LbTipo" runat="server" CausesValidation="false" Text="" CommandArgument="Tipo" OnClick="LbOrden_Click">
|
||||
Tipo
|
||||
<asp:Literal ID="ImgTipo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="260px">
|
||||
<asp:LinkButton ID="LbConceptoContable" runat="server" CausesValidation="false" Text="" CommandArgument="ConceptoContable" OnClick="LbOrden_Click">
|
||||
Concepto Contable
|
||||
<asp:Literal ID="ImgConceptoContable" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbEstado" runat="server" CausesValidation="false" Text="" CommandArgument="Estado" OnClick="LbOrden_Click">
|
||||
Estado
|
||||
<asp:Literal ID="ImgEstado" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng" OnClick="LbOrden_Click">
|
||||
Fecha Ing
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="161px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td style="text-align: center;">
|
||||
<asp:TextBox ID="TxtCveConceptoContable" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="84px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCveConceptoContable" runat="server" ControlToValidate="TxtCveConceptoContable" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clave''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCveConceptoContable" runat="server" HighlightCssClass="vco" TargetControlID="RFVCveConceptoContable" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
<asp:TextBox ID="TxtTipo" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="84px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTipo" runat="server" ControlToValidate="TxtTipo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCTipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
<asp:TextBox ID="TxtConceptoContable" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="234px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVConceptoContable" runat="server" ControlToValidate="TxtConceptoContable" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto Contable'</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCConceptoContable" runat="server" HighlightCssClass="vco" TargetControlID="RFVConceptoContable" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center;">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveConceptoContable" EmptyDataText="No se encontraron Conceptos Contables Registrados" ToolTip="Listado de Estado de Conceptos Contables" CssClass="table table-striped table-advance table-hover" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCveConceptoContable" runat="server" Text='<%# Eval("CveConceptoContable", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCveConceptoContable" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("CveConceptoContable") %>' ValidationGroup="GrpGV" Width="84px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCveConceptoContable" runat="server" ControlToValidate="TxtCveConceptoContable" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clave''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCveConceptoContable" runat="server" HighlightCssClass="vco" TargetControlID="RFVCveConceptoContable" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipo" runat="server" Text='<%# Eval("Tipo", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtTipo" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Tipo") %>' ValidationGroup="GrpGV" Width="84px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTipo" runat="server" ControlToValidate="TxtTipo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCTipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlConceptoContable" runat="server" Text='<%# Eval("ConceptoContable", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtConceptoContable" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("ConceptoContable") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVConceptoContable" runat="server" ControlToValidate="TxtConceptoContable" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto Contable''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCConceptoContable" runat="server" HighlightCssClass="vco" TargetControlID="RFVConceptoContable" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstado" runat="server" Text='<%# Eval("Estado") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstado" runat="server" Checked='<%# If (Eval("Estado").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
173
Contabilidad/ConceptosContables.aspx.vb
Normal file
173
Contabilidad/ConceptosContables.aspx.vb
Normal file
@@ -0,0 +1,173 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contabilidad_ConceptosContables
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjConceptoContable As New ClsContabilidad
|
||||
If ObjConceptoContable.GetConta_ConceptosContables() Then
|
||||
ViewState("DTConceptoContable") = ObjConceptoContable.DtResultados
|
||||
GlobalDTContaConceptosContables(-1) = ObjConceptoContable.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjConceptoContable.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjConceptoContable As New ClsContabilidad
|
||||
If ObjConceptoContable.AddConta_ConceptosContables(TxtCveConceptoContable.Text.Trim.ToEntero, TxtTipo.Text.Trim, TxtConceptoContable.Text.Trim, UsuarioActual.CveUsuario) Then
|
||||
TxtTipo.Text = ""
|
||||
TxtCveConceptoContable.Text = ""
|
||||
Alert("El Concepto Contable se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTConceptoContable") = ObjConceptoContable.DtResultados
|
||||
GlobalDTContaConceptosContables(-1) = ObjConceptoContable.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjConceptoContable.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(110)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(110)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(260)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(7).Width = Unit.Pixel(61)
|
||||
End If
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjConceptoContable As New ClsContabilidad
|
||||
Dim CveConceptoContable As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
If ObjConceptoContable.RemoveConta_ConceptosContables(CveConceptoContable) Then
|
||||
TxtTipo.Text = ""
|
||||
TxtCveConceptoContable.Text = ""
|
||||
TxtConceptoContable.Text = ""
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTConceptoContable") = ObjConceptoContable.DtResultados
|
||||
GlobalDTContaConceptosContables(-1) = ObjConceptoContable.DtResultados
|
||||
Alert("El Concepto Contable se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjConceptoContable.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
Dim ObjConceptoContable As New ClsContabilidad
|
||||
Dim Tipo As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtTipo"), TextBox).Text.Trim
|
||||
Dim ConceptoContable As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtConceptoContable"), TextBox).Text.Trim
|
||||
Dim Estado As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstado").Checked
|
||||
Dim CveConceptoContable As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtCveConceptoContable"), TextBox).Text.Trim.ToEntero
|
||||
|
||||
If ObjConceptoContable.UpdateConta_ConceptosContables(Tipo, ConceptoContable, Estado, CveConceptoContable) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTConceptoContable") = ObjConceptoContable.DtResultados
|
||||
GlobalDTContaConceptosContables(-1) = ObjConceptoContable.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjConceptoContable.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
|
||||
Else
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTConceptoContable"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTConceptoContable"), DataTable)
|
||||
End If
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
96
Contabilidad/ContabilidadElectronica.aspx
Normal file
96
Contabilidad/ContabilidadElectronica.aspx
Normal file
@@ -0,0 +1,96 @@
|
||||
<%@ Page Title="Contabilidad Electrónica" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ContabilidadElectronica.aspx.vb" Inherits="Contabilidad_ContabilidadElectronica" %>
|
||||
|
||||
<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="E" runat="Server">
|
||||
Contabilidad Electrónica
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-5">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Generación de XML</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>Tipo Reporte:</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server">
|
||||
<asp:ListItem Text="Catálogo Cuentas" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Balanza Comprobación" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Ejercicio: </td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlEjercicio" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" runat="server"></asp:DropDownList>
|
||||
</td>
|
||||
<td>Periodo: </td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlPeriodo" CssClass="form-control input-sm select2me" 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>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center;">
|
||||
<asp:Button ID="BtnGenerar" OnClick="BtnGenerar_Click" Text="Generar XML" Width="200px" CssClass="btn btn-primary" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnGenerar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
238
Contabilidad/ContabilidadElectronica.aspx.vb
Normal file
238
Contabilidad/ContabilidadElectronica.aspx.vb
Normal file
@@ -0,0 +1,238 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Partial Class Contabilidad_ContabilidadElectronica
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Private Property ArchivoCuentas As String
|
||||
Get
|
||||
ArchivoCuentas = ViewState("ArchivoCuentas").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("ArchivoCuentas") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property ArchivoBalanza As String
|
||||
Get
|
||||
ArchivoBalanza = ViewState("ArchivoBalanza").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("ArchivoBalanza") = 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
|
||||
InicializaValores()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
'TxtFechaI.Text = String.Format("01/01/{0}", Now.Year)
|
||||
'TxtFechaI.Text = Now.ToShortDateString
|
||||
|
||||
If Not UsuarioActual.Empresa.UsaContabilidad Then
|
||||
BtnGenerar.Enabled = False
|
||||
Alert("Este módulo requiere el uso de contabilidad", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConta.GetEjercicios() Then
|
||||
DdlEjercicio.DataSource = ObjConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValue = Now.Year.ToString
|
||||
DdlPeriodo.SelectedValue = Now.Month.ToString
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " GENERA XML "
|
||||
Protected Sub BtnGenerar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
'CREA DIRECTORIO SI NO EXISTE
|
||||
DirectoryExistsCreate(String.Format("{0}ContabilidadElectronica", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
'LIMPIA VALORES
|
||||
ArchivoCuentas = ""
|
||||
ArchivoBalanza = ""
|
||||
|
||||
If DdlTipoReporte.SelectedValue = "1" Then
|
||||
GeneraCatalogo()
|
||||
ElseIf DdlTipoReporte.SelectedValue = "2" Then
|
||||
GeneraBalanza()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub GeneraCatalogo()
|
||||
Dim FechaF = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, "0"c), DdlEjercicio.SelectedValue).ToDate.LastDayOfMonth
|
||||
Dim DtCuentas As New DataTable
|
||||
|
||||
Dim ObjConpaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConpaq.GetCuentasElectronica(MinFecha, FechaF) Then
|
||||
DtCuentas = ObjConpaq.DtResultados
|
||||
End If
|
||||
ObjConpaq.Dispose()
|
||||
|
||||
|
||||
If DtCuentas IsNot Nothing AndAlso DtCuentas.Rows.Count > 0 Then
|
||||
Dim Str As New StringBuilder
|
||||
|
||||
'CABECERA
|
||||
Str.Append("<?xml version=""1.0"" encoding=""UTF-8""?>")
|
||||
Str.Append("<catalogocuentas: Catalogo xsi:schemaLocation=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/CatalogoCuentas CatalogoCuentas_1_1.xsd"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" Version=""1.1"" ")
|
||||
Str.AppendFormat("RFC=""{0}"" ", UsuarioActual.Empresa.RFC)
|
||||
Str.AppendFormat("Mes=""{0}"" ", DdlPeriodo.SelectedValue)
|
||||
Str.AppendFormat("Anio=""{0}"" ", DdlEjercicio.SelectedValue)
|
||||
Str.AppendFormat("Sello=""{0}"" ", "123")
|
||||
Str.AppendFormat("noCertificado=""{0}"" ", "123")
|
||||
Str.AppendFormat("Certificado=""{0}"" ", "1234567890")
|
||||
Str.Append("xmlns:catalogocuentas=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/CatalogoCuentas"">")
|
||||
|
||||
'DETALLES
|
||||
For Each Dr As DataRow In DtCuentas.Rows
|
||||
Str.Append("<catalogocuentas:Ctas ")
|
||||
Str.AppendFormat("CodAgrup=""{0}"" ", Dr("CodAgrup"))
|
||||
Str.AppendFormat("NumCta=""{0}"" ", Dr("NumCta"))
|
||||
Str.AppendFormat("Desc=""{0}"" ", Dr("Desc"))
|
||||
Str.AppendFormat("SubCtaDe=""{0}"" ", Dr("SubCtaDe"))
|
||||
Str.AppendFormat("Nivel=""{0}"" ", Dr("Nivel"))
|
||||
Str.AppendFormat("Natur=""{0}"" ", Dr("Natur"))
|
||||
Str.Append("/>")
|
||||
Next
|
||||
DtCuentas.Dispose()
|
||||
|
||||
'FIN
|
||||
Str.Append("</catalogocuentas:Catalogo>")
|
||||
|
||||
|
||||
'GUARDA ARHIVO
|
||||
ArchivoCuentas = Server.MapPath(String.Format("~/Empresas/{0}/ContabilidadElectronica/{1}{2}{3}CT.xml", UsuarioActual.CveEmpresa, UsuarioActual.Empresa.RFC, DdlEjercicio.SelectedValue, DdlPeriodo.SelectedValue.PadLeft(2, "0"c)))
|
||||
|
||||
'SOBREESCRIBE
|
||||
If System.IO.File.Exists(ArchivoCuentas) Then
|
||||
System.IO.File.Delete(ArchivoCuentas)
|
||||
End If
|
||||
|
||||
Dim fs As FileStream = File.Create(ArchivoCuentas)
|
||||
Dim info As Byte() = New UTF8Encoding(True).GetBytes(Str.ToString)
|
||||
fs.Write(info, 0, info.Length)
|
||||
fs.Close()
|
||||
|
||||
|
||||
'DESCARGA XML
|
||||
Dim DescargaZIP As Ionic.Zip.ZipFile = New Ionic.Zip.ZipFile()
|
||||
|
||||
If IO.File.Exists(ArchivoCuentas) Then
|
||||
DescargaZIP.AddFile(ArchivoCuentas, "")
|
||||
End If
|
||||
|
||||
DescargaZIP.Save(Response.OutputStream)
|
||||
Response.AddHeader("content-Disposition", String.Format("attachment; filename={0}{1}{2}CT.zip", UsuarioActual.Empresa.RFC, DdlEjercicio.SelectedValue, DdlPeriodo.SelectedValue.PadLeft(2, "0"c)))
|
||||
Response.ContentType = "application/zip"
|
||||
Response.End()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GeneraBalanza()
|
||||
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, "0"c), DdlEjercicio.SelectedValue).ToDate
|
||||
Dim FechaF = FechaI.LastDayOfMonth
|
||||
Dim DtCuentas As New DataTable
|
||||
|
||||
Dim ObjConpaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConpaq.GetBalanzaElectronica(FechaI, FechaF) Then
|
||||
DtCuentas = ObjConpaq.DtResultados
|
||||
End If
|
||||
ObjConpaq.Dispose()
|
||||
|
||||
|
||||
If DtCuentas IsNot Nothing AndAlso DtCuentas.Rows.Count > 0 Then
|
||||
Dim Str As New StringBuilder
|
||||
|
||||
'CABECERA
|
||||
Str.Append("<?xml version=""1.0"" encoding=""UTF-8""?>")
|
||||
Str.Append("<BCE:Balanza xsi:schemaLocation=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/BalanzaComprobacion BalanzaComprobacion_1_1.xsd"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" Version=""1.1"" ")
|
||||
Str.AppendFormat("RFC=""{0}"" ", UsuarioActual.Empresa.RFC)
|
||||
Str.AppendFormat("Mes=""{0}"" ", DdlPeriodo.SelectedValue)
|
||||
Str.AppendFormat("Anio=""{0}"" ", DdlEjercicio.SelectedValue)
|
||||
|
||||
Str.AppendFormat("TipoEnvio=""{0}"" ", "C")
|
||||
Str.AppendFormat("FechaModBal=""{0}"" ", FechaF.ToString("yyyy-MM-dd"))
|
||||
|
||||
Str.AppendFormat("Sello=""{0}"" ", "123")
|
||||
Str.AppendFormat("noCertificado=""{0}"" ", "123")
|
||||
Str.AppendFormat("Certificado=""{0}"" ", "1234567890")
|
||||
Str.Append("xmlns:BCE=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/BalanzaComprobacion"">")
|
||||
|
||||
'DETALLES
|
||||
For Each Dr As DataRow In DtCuentas.Rows
|
||||
Str.Append("<BCE:Ctas ")
|
||||
Str.AppendFormat("NumCta=""{0}"" ", Dr("NumCta"))
|
||||
Str.AppendFormat("SaldoIni=""{0}"" ", Dr("SaldoIni"))
|
||||
Str.AppendFormat("Debe=""{0}"" ", Dr("Debe"))
|
||||
Str.AppendFormat("Haber=""{0}"" ", Dr("Haber"))
|
||||
Str.AppendFormat("SaldoFin=""{0}"" ", Dr("SaldoFin"))
|
||||
Str.Append("/>")
|
||||
Next
|
||||
|
||||
DtCuentas.Dispose()
|
||||
|
||||
'FIN
|
||||
Str.Append("</BCE:Balanza>")
|
||||
|
||||
|
||||
'GUARDA ARHIVO
|
||||
ArchivoBalanza = Server.MapPath(String.Format("~/Empresas/{0}/ContabilidadElectronica/{1}{2}{3}BN.xml", UsuarioActual.CveEmpresa, UsuarioActual.Empresa.RFC, DdlEjercicio.SelectedValue, DdlPeriodo.SelectedValue.PadLeft(2, "0"c)))
|
||||
|
||||
'SOBREESCRIBE
|
||||
If System.IO.File.Exists(ArchivoBalanza) Then
|
||||
System.IO.File.Delete(ArchivoBalanza)
|
||||
End If
|
||||
|
||||
Dim fs As FileStream = File.Create(ArchivoBalanza)
|
||||
Dim info As Byte() = New UTF8Encoding(True).GetBytes(Str.ToString)
|
||||
fs.Write(info, 0, info.Length)
|
||||
fs.Close()
|
||||
|
||||
|
||||
|
||||
'DESCARGA XML
|
||||
Dim DescargaZIP As Ionic.Zip.ZipFile = New Ionic.Zip.ZipFile()
|
||||
|
||||
If IO.File.Exists(ArchivoBalanza) Then
|
||||
DescargaZIP.AddFile(ArchivoBalanza, "")
|
||||
End If
|
||||
|
||||
DescargaZIP.Save(Response.OutputStream)
|
||||
Response.AddHeader("content-Disposition", String.Format("attachment; filename={0}{1}{2}BN.zip", UsuarioActual.Empresa.RFC, DdlEjercicio.SelectedValue, DdlPeriodo.SelectedValue.PadLeft(2, "0"c)))
|
||||
Response.ContentType = "application/zip"
|
||||
Response.End()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
540
Contabilidad/ContabilizacionCompras.aspx
Normal file
540
Contabilidad/ContabilizacionCompras.aspx
Normal file
@@ -0,0 +1,540 @@
|
||||
<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ContabilizacionCompras.aspx.cs" Inherits="Contabilidad_ContabilizacionCompras" %>
|
||||
|
||||
<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">
|
||||
Diario de Movimientos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPPFiltros" 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-primary" />
|
||||
<asp:CheckBox ID="chkexpand" ClientIDMode="Static" CssClass="hidden" runat="server" />
|
||||
<a href="javascript;" data-idchekbox='chkexpand' class='<%= Convert.ToBoolean(chkexpand.Checked) ? "collapse" : "expand" %>'></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Proveedores:</label>
|
||||
<div class="col-md-3">
|
||||
<ADS:DropDownLost ID="DdlProveedores" runat="server" CssStyle="width: 300px;" DataTextField="RazonSocial" DataValueField="CveProveedor">
|
||||
|
||||
</ADS:DropDownLost>
|
||||
</div>
|
||||
<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: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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="CalendarExtender1" TargetControlID="txtFechaI" PopupButtonID="ImgCalendarioI" 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>
|
||||
<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="txtFechaF" runat="server" CssClass="form-control" Width="99%" 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>
|
||||
<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="CalendarExtender2" 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 Inicial''</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 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="vcoFfvFF" 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>
|
||||
|
||||
<div class="portlet-body" <%= Convert.ToBoolean(chkexpand.Checked) ? "" : "style=\"display:none;\"" %>>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Personal:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlPersonal" CssClass="form-control input-sm select2me" Width="260px" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Tipo Proveedor:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlTipoProveedor" CssClass="form-control input-sm select2me" Width="260px" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Proveedor" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Acreedor" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Moneda:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlMoneda" CssClass="form-control input-sm select2me" Width="260px" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Pesos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Dolares" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Plantillas Polizas:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlPlantillasPolizas" CssClass="form-control input-sm select2me" Width="260px" runat="server" AppendDataBoundItems="true" DataTextField="PlantillaPoliza" DataValueField="CvePlantillaPoliza">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Estatus:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlEstatusContabilizacion" CssClass="form-control input-sm select2me" Width="260px" runat="server">
|
||||
<asp:ListItem Selected="True" Text="No contabilizado" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contabilizado" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Todos" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="Updatetabs" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%">
|
||||
<ajax:TabPanel ID="TabCompras" runat="server" HeaderText="Compras">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvCompras" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContabilizarCompras" runat="server" CssClass="btn btn-success" Text="Contabilizar" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvPrePolizaCompras" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" Style="text-align: center;" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha,CveTipoPoliza,IdPoliza" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Panel ID="PnlDetalleCompras" runat="server" CssClass="Texto">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="False" CssClass="table detallerow table-hover" Style=" float: right; width: 95%;" DataKeyNames="IdCtaContable,Cargo,Abono" GridLines="None" OnRowDataBound="GvD_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Movimiento">
|
||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplC" Target="_blank" runat="server" Text='<%# Eval("Concepto").ToString() == "" ? "_": Eval("Concepto") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="SubProyecto">
|
||||
<ItemStyle HorizontalAlign="Left" Width="120px" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="IdCtaContable" ItemStyle-Font-Italic="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" ItemStyle-CssClass="truncate" HeaderText="Cuenta">
|
||||
<ItemStyle CssClass="truncate" Font-Italic="True" HorizontalAlign="Left" Width="150px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlC" runat="server" Text='<%# Eval("Cargo", "{0:N2}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlCME" runat="server" Text='<%# Eval("CargoME", "<br/>ME: {0:N2}") %>' Visible='<%# (Convert.ToDouble(Eval("CargoME")) != 0.00 )? true : false %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="120px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlA" runat="server" Text='<%# Eval("Abono", "{0:N2}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlAME" runat="server" Text='<%# Eval("AbonoME", "<br/>ME: {0:N2}") %>' Visible='<%# (Convert.ToDouble(Eval("AbonoME")) != 0.00 )? true : false %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="120px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle Font-Size="Smaller" />
|
||||
</asp:GridView>
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr style="background-color: #949494; color: black;">
|
||||
<td style="width: 50px"></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:TextBox ID="TxtFechaCompras" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox></td>
|
||||
<td style="width: 50px; text-align: right;">Concepto:</td>
|
||||
<td style="width: 400px; text-align: left;">
|
||||
<asp:TextBox ID="TxtConceptoCompras" ItemStyle-HorizontalAlign="Left" Width="400px" runat="server" Text='<%# Eval("Concepto") %>'></asp:TextBox></td>
|
||||
<td style="width: 100px; text-align: right;">Póliza: </td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:Literal ID="LtPolizaTipoCompras" Text='<%# Eval("TipoPoliza", "{0:d}") %>' runat="server"></asp:Literal></td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink>
|
||||
</td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:LinkButton ID="LnkSimplificar" runat="server" OnClick="LnkSimplificarCompra_Click" ToolTip="Simplificar Póliza"><i class='fa fa-exchange'></i></asp:LinkButton>
|
||||
</td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Ver Poliza" NavigateUrl='<%# Eval("IdPoliza", "/Contabilidad/RegPoliza.aspx?IdPoliza={0}")%>'></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color: black;">
|
||||
<td></td>
|
||||
<td style="width: 30px; text-align: right;">Factura:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:HyperLink Target="_blank" ID="HplFacturaVenta" runat="server" Text='<%# Eval("Serie")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 50px; text-align: right;">Proveedor:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:HyperLink Target="_blank" ID="HplProveedorVenta" runat="server" Text='<%# Eval("NombreComercial")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveProveedor", "/Compras/Proveedores.aspx?CveProveedor={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblFechaVenta" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Label></td>
|
||||
<td style="width: 50px; text-align: right;">Total:</td>
|
||||
<td style="width: 50px; text-align: left;">
|
||||
<asp:Label ID="lblTotalVenta" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Label></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblMoneda" ItemStyle-HorizontalAlign="Left" runat="server" Text='<%# Eval("Moneda") %>'></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabPagos" runat="server" HeaderText="Pagos">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvPagos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContabilizarPagos" runat="server" CssClass="btn btn-success" Text="Contabilizar" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvPrePolizaPagos" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha,CveTipoPoliza,IdPoliza" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Panel ID="PnlDetallePagos" runat="server">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="false" CssClass="table detallerow table-hover" Style="float: right; width: 95%;" DataKeyNames="IdCtaContable, Cargo, Abono" GridLines="None" OnRowDataBound="GvD_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Movimiento" />
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplC" Target="_blank" runat="server" Text='<%# Eval("Concepto") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="SubProyecto" />
|
||||
<asp:BoundField DataField="IdCtaContable" ItemStyle-Font-Italic="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" ItemStyle-CssClass="truncate" HeaderText="Cuenta" />
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlC" runat="server" Text='<%# Eval("Cargo", "{0:N2}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlCME" runat="server" Text='<%# Eval("CargoME", "<br/>ME: {0:N2}") %>' Visible='<%# (Convert.ToDouble(Eval("CargoME")) != 0.00 )? true : false %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="120px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlA" runat="server" Text='<%# Eval("Abono", "{0:N2}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlAME" runat="server" Text='<%# Eval("AbonoME", "<br/>ME: {0:N2}") %>' Visible='<%# (Convert.ToDouble(Eval("AbonoME")) != 0.00 )? true : false %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="120px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle Font-Size="Smaller" />
|
||||
</asp:GridView>
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr style="background-color: #949494; color: black;">
|
||||
<td style="width: 50px"></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:TextBox ID="TxtFechaPagos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox></td>
|
||||
<td style="width: 50px; text-align: right;">Concepto:</td>
|
||||
<td style="width: 400px; text-align: left;">
|
||||
<asp:TextBox ID="TxtConceptoPagos" ItemStyle-HorizontalAlign="Left" Width="400px" runat="server" Text='<%# Eval("Concepto") %>'></asp:TextBox></td>
|
||||
<td style="width: 100px; text-align: right;">Póliza: </td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:Literal ID="LtPolizaTipoPagos" Text='<%# Eval("TipoPoliza", "{0:d}") %>' runat="server"></asp:Literal></td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink></td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:LinkButton ID="LnkSimplificar" runat="server" OnClick="LnkSimplificar_Click" ToolTip="Simplificar Póliza"><i class='fa fa-exchange'></i></asp:LinkButton>
|
||||
</td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Ver Poliza" NavigateUrl='<%# Eval("IdPoliza", "/Contabilidad/RegPoliza.aspx?IdPoliza={0}")%>'></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color: black; display:none;">
|
||||
<td></td>
|
||||
<td style="width: 30px; text-align: right;">Número:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:HyperLink Target="_blank" ID="HplFacturaPagos" runat="server" Text='<%# Eval("Serie")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 50px; text-align: right;">Pagador:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblProveedorPagos" runat="server" Text='<%# Eval("NombreComercial")%>' CssClass="Texto"></asp:Label></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblFechaPagos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Label></td>
|
||||
<td style="width: 50px; text-align: right;">Total:</td>
|
||||
<td style="width: 50px; text-align: left;">
|
||||
<asp:Label ID="lblTotalPagos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Label></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblMoneda" ItemStyle-HorizontalAlign="Left" runat="server" Text='<%# Eval("Moneda") %>'></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabAnticipos" runat="server" HeaderText="Anticipos">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvAnticipos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContabilizarAnticipos" runat="server" CssClass="btn btn-success" Text="Contabilizar" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvPrePolizaAnticipos" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" Style="text-align: center;" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha,CveTipoPoliza,IdPoliza" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Panel ID="PnlDetalleAnticipos" runat="server">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="false" CssClass="table detallerow table-hover" Style="text-align: center; float: right; width: 95%;" DataKeyNames="IdCtaContable, Cargo, Abono" GridLines="None" OnRowDataBound="GvD_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Movimiento" />
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplC" Target="_blank" runat="server" Text='<%# Eval("Concepto") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="SubProyecto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="SubProyecto" />
|
||||
<asp:BoundField DataField="IdCtaContable" ItemStyle-Font-Size="Smaller" ItemStyle-Font-Italic="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" ItemStyle-CssClass="truncate" HeaderText="Cuenta" />
|
||||
<asp:BoundField DataField="Cargo" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Cargos" />
|
||||
<asp:BoundField DataField="Abono" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Abonos" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr style="background-color: #949494; color: black;">
|
||||
<td style="width: 50px"></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:TextBox ID="TxtFechaAnticipos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox></td>
|
||||
<td style="width: 50px; text-align: right;">Concepto:</td>
|
||||
<td style="width: 400px; text-align: left;">
|
||||
<asp:TextBox ID="TxtConceptoAnticipos" ItemStyle-HorizontalAlign="Left" Width="400px" runat="server" Text='<%# Eval("Concepto") %>'></asp:TextBox></td>
|
||||
<td style="width: 100px; text-align: right;">Póliza: </td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:Literal ID="LtPolizaTipoAnticipos" Text='<%# Eval("TipoPoliza", "{0:d}") %>' runat="server"></asp:Literal></td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" CssClass="Texto" Visible="false" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink>
|
||||
</td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Ver Poliza" NavigateUrl='<%# Eval("IdPoliza", "/Contabilidad/RegPoliza.aspx?IdPoliza={0}")%>'></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color: black;display:none;">
|
||||
<td></td>
|
||||
<td style="width: 30px; text-align: right;">Número:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:HyperLink Target="_blank" ID="HplFacturaAnticipos" runat="server" Text='<%# Eval("Serie")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 50px; text-align: right;">Pagador:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="LblProveedorAnticipos" runat="server" Text='<%# Eval("NombreComercial")%>' CssClass="Texto"></asp:Label></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblFechaAnticipos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Label></td>
|
||||
<td style="width: 50px; text-align: right;">Total:</td>
|
||||
<td style="width: 50px; text-align: left;">
|
||||
<asp:Label ID="lblTotalAnticipos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Label></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblMoneda" ItemStyle-HorizontalAlign="Left" runat="server" Text='<%# Eval("Moneda") %>'></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabAmortizaciones" runat="server" HeaderText="Amortizaciones">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvAmortizaciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContabilizarAmortizaciones" runat="server" CssClass="btn btn-success" Text="Contabilizar" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvPrePolizaAmortizaciones" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" Style="text-align: center;" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha,CveTipoPoliza,IdPoliza" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Panel ID="PnlDetalleAmortizaciones" runat="server">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="false" CssClass="table detallerow table-hover" Style="text-align: center; float: right; width: 95%;" DataKeyNames="IdCtaContable, Cargo, Abono" GridLines="None" OnRowDataBound="GvD_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Movimiento" />
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplC" Target="_blank" runat="server" Text='<%# Eval("Concepto") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="SubProyecto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="SubProyecto" />
|
||||
<asp:BoundField DataField="IdCtaContable" ItemStyle-Font-Size="Smaller" ItemStyle-Font-Italic="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" ItemStyle-CssClass="truncate" HeaderText="Cuenta" />
|
||||
<asp:BoundField DataField="Cargo" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Cargos" />
|
||||
<asp:BoundField DataField="Abono" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Abonos" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr style="background-color: #949494; color: black;">
|
||||
<td style="width: 50px"></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:TextBox ID="TxtFechaAmortizaciones" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox></td>
|
||||
<td style="width: 50px; text-align: right;">Concepto:</td>
|
||||
<td style="width: 400px; text-align: left;">
|
||||
<asp:TextBox ID="TxtConceptoAmortizaciones" ItemStyle-HorizontalAlign="Left" Width="400px" runat="server" Text='<%# Eval("Concepto") %>'></asp:TextBox></td>
|
||||
<td style="width: 100px; text-align: right;">Póliza: </td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:Literal ID="LtPolizaTipoAmortizaciones" Text='<%# Eval("TipoPoliza", "{0:d}") %>' runat="server"></asp:Literal></td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" CssClass="Texto" Visible="false" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink>
|
||||
</td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Ver Poliza" NavigateUrl='<%# Eval("IdPoliza", "/Contabilidad/RegPoliza.aspx?IdPoliza={0}")%>'></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color: black;">
|
||||
<td></td>
|
||||
<td style="width: 30px; text-align: right;">Factura:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:HyperLink Target="_blank" ID="HplFacturaAmortizaciones" runat="server" Text='<%# Eval("Serie")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 50px; text-align: right;">Proveedor:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:HyperLink Target="_blank" ID="HplProveedorAmortizaciones" runat="server" Text='<%# Eval("NombreComercial")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveProveedor", "/Compras/Proveedors.aspx?CveProveedor={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblFechaAmortizaciones" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Label></td>
|
||||
<td style="width: 50px; text-align: right;">Total:</td>
|
||||
<td style="width: 50px; text-align: left;">
|
||||
<asp:Label ID="lblTotalAmortizaciones" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Label></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblMoneda" ItemStyle-HorizontalAlign="Left" runat="server" Text='<%# Eval("Moneda") %>'></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
function cargarGridHijo() {
|
||||
$('.detallerow').each(function (index) {
|
||||
var tr = $("<tr ></tr>")
|
||||
var td = $("<td colspan='99'></td>")
|
||||
var tb = $(this);
|
||||
tb.closest("tr").after(tr);
|
||||
td.append(tb);
|
||||
tr.append(td);
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
cargarGridHijo();
|
||||
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
cargarGridHijo();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
408
Contabilidad/ContabilizacionCompras.aspx.cs
Normal file
408
Contabilidad/ContabilizacionCompras.aspx.cs
Normal file
@@ -0,0 +1,408 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
|
||||
public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
|
||||
{
|
||||
private DataTable DTmpC
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DTmpC"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["DTmpC"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool TienePermisoEditar
|
||||
{
|
||||
get { return (bool)ViewState["TienePermisoEditar"]; }
|
||||
set { ViewState["TienePermisoEditar"] = value; }
|
||||
}
|
||||
|
||||
public bool TienePermisoVerPoliza
|
||||
{
|
||||
get { return (bool)ViewState["TienePermisoVerPoliza"]; }
|
||||
set { ViewState["TienePermisoVerPoliza"] = value; }
|
||||
}
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
TienePermisoVerPoliza = false;
|
||||
DdlProveedores.setEsWebService(true);
|
||||
DdlProveedores.Attributes.Add("data-metodo", "getproveedores");
|
||||
if (UsuarioActual.Empresa.UsaContabilidad)
|
||||
{
|
||||
TienePermisoEditar = false;
|
||||
ClsContPAQi ObjCont = new ClsContPAQi(UsuarioActual.Empresa);
|
||||
ObjCont.GetCuentas(-1, "-1", -1);
|
||||
string[] columnas = new string[3] { "Id", "CuentaFormato", "Nombre" };
|
||||
DTmpC = ObjCont.DtResultados.FiltraParametros("", "", columnas);
|
||||
ObjCont.Dispose();
|
||||
|
||||
//DdlProveedores.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa);
|
||||
//DdlProveedores.DataBind();
|
||||
|
||||
DdlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa);
|
||||
DdlPersonal.DataBind();
|
||||
|
||||
DdlPlantillasPolizas.DataSource = get_GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa);
|
||||
DdlPlantillasPolizas.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
DdlPlantillasPolizas.DataBind();
|
||||
|
||||
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().AddMonths(-1).ToShortDateString();
|
||||
txtFechaF.Text = DateTime.Now.ToShortDateString();
|
||||
|
||||
//CargaDatos();
|
||||
|
||||
if (UsuarioActual.CveRol == 1 || UsuarioActual.CveUsuario == 17 || UsuarioActual.CveUsuario == 171 || UsuarioActual.TienePermisoProceso(221))
|
||||
{
|
||||
TienePermisoEditar = true;
|
||||
TienePermisoVerPoliza = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("Este módulo requiere el uso de Contabilidad.", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
BtnConsultar.Enabled = false;
|
||||
BtnContabilizarCompras.Enabled = false;
|
||||
BtnContabilizarPagos.Enabled = false;
|
||||
BtnContabilizarAnticipos.Enabled = false;
|
||||
BtnContabilizarAmortizaciones.Enabled = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BtnConsultar.Click += new EventHandler(this.BtnConsultar_Click);
|
||||
BtnContabilizarCompras.Click += new EventHandler(this.BtnGuardarCompras_Click);
|
||||
BtnContabilizarPagos.Click += new EventHandler(this.BtnGuardarPagos_Click);
|
||||
BtnContabilizarAnticipos.Click += new EventHandler(this.BtnGuardarAnticipos_Click);
|
||||
BtnContabilizarAmortizaciones.Click += new EventHandler(this.BtnGuardarAmortizaciones_Click);
|
||||
}
|
||||
|
||||
protected void OnRowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
GridView GvD = e.Row.FCGridView("GvD");
|
||||
int CvePrePoliza = e.Row.DataKey("CvePrePoliza").ToEntero();
|
||||
|
||||
e.Row.Cells[0].ToolTip = CvePrePoliza.ToString();
|
||||
|
||||
ClsContabilidad contP = new ClsContabilidad();
|
||||
|
||||
if (contP.GetContabilizacionDiarioDetalle(CvePrePoliza))
|
||||
{
|
||||
if (contP.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
decimal Abonos = 0;
|
||||
decimal Cargos = 0;
|
||||
decimal Dif = (decimal)0.01;
|
||||
|
||||
Abonos = Math.Round(contP.DtResultados.SUMD("Abono"), 2);
|
||||
Cargos = Math.Round(contP.DtResultados.SUMD("Cargo"), 2);
|
||||
|
||||
if (Math.Abs(Cargos - Abonos) >= Dif)
|
||||
{
|
||||
e.Row.FCCheckBox("Chk").Enabled = false;
|
||||
e.Row.FCCheckBox("Chk").ToolTip = string.Format("Cargos y abonos diferentes (${0}-${1}, dif${2})", Cargos, Abonos, Cargos-Abonos);
|
||||
}
|
||||
|
||||
if (e.Row.DBCampo("IdPoliza").ToEntero() > 0)
|
||||
{
|
||||
e.Row.FCCheckBox("Chk").Enabled = false;
|
||||
e.Row.FCCheckBox("Chk").ToolTip = "Póliza ya contabilizada";
|
||||
}
|
||||
|
||||
GvD.DataSource = contP.DtResultados;
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (TienePermisoEditar)
|
||||
{
|
||||
e.Row.FCHyperLink("HplEdicion").Visible = true;
|
||||
}
|
||||
|
||||
e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("IdPoliza").ToEntero() > 0;
|
||||
|
||||
contP.Dispose();
|
||||
GvD.DataBind();
|
||||
|
||||
if (e.Row.DBCampo("Moneda") == "USD" && e.Row.FCLinkButton("LBActualizarTC") != null)
|
||||
{
|
||||
e.Row.FCLinkButton("LBActualizarTC").Visible = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void Contabilizar(int CvePrepoliza, DateTime Fecha, string Concepto, ClsContabilidad Obj)
|
||||
{
|
||||
if (Obj.ContabilizarPrePoliza(CvePrepoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, Fecha, Concepto))
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnGuardarCompras_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
|
||||
foreach (GridViewRow row in GvPrePolizaCompras.Rows)
|
||||
{
|
||||
CheckBox chk = row.FCCheckBox("Chk");
|
||||
TextBox txtFecha = row.FCTextBox("TxtFechaCompras");
|
||||
TextBox txtConcepto = row.FCTextBox("TxtConceptoCompras");
|
||||
|
||||
if (chk != null && chk.Checked)
|
||||
{
|
||||
DateTime Fecha = txtFecha.Text.ToDate();
|
||||
int CvePrepoliza = GvPrePolizaCompras.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
string Concepto = txtConcepto.Text;
|
||||
|
||||
Contabilizar(CvePrepoliza, Fecha, Concepto, ObjMov);
|
||||
}
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
|
||||
Alert("Se Contabilizaron Correctamente los Siguientes Folios: <br>" + ObjMov.AlertaMensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
private void BtnGuardarPagos_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
|
||||
foreach (GridViewRow row in GvPrePolizaPagos.Rows)
|
||||
{
|
||||
CheckBox chk = row.FCCheckBox("Chk");
|
||||
TextBox txtFecha = row.FCTextBox("TxtFechaPagos");
|
||||
TextBox txtConcepto = row.FCTextBox("TxtConceptoPagos");
|
||||
|
||||
if (chk != null && chk.Checked)
|
||||
{
|
||||
DateTime Fecha = txtFecha.Text.ToDate();
|
||||
int CvePrepoliza = GvPrePolizaPagos.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
string Concepto = txtConcepto.Text;
|
||||
|
||||
Contabilizar(CvePrepoliza, Fecha, Concepto, ObjMov);
|
||||
}
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
|
||||
Alert("Se Contabilizaron Correctamente los Siguientes Folios: <br>" + ObjMov.AlertaMensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
private void BtnGuardarAnticipos_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
|
||||
foreach (GridViewRow row in GvPrePolizaAnticipos.Rows)
|
||||
{
|
||||
CheckBox chk = row.FCCheckBox("Chk");
|
||||
TextBox txtFecha = row.FCTextBox("TxtFechaAnticipos");
|
||||
TextBox txtConcepto = row.FCTextBox("TxtConceptoAnticipos");
|
||||
|
||||
if (chk != null && chk.Checked)
|
||||
{
|
||||
DateTime Fecha = txtFecha.Text.ToDate();
|
||||
int CvePrepoliza = GvPrePolizaAnticipos.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
string Concepto = txtConcepto.Text;
|
||||
|
||||
Contabilizar(CvePrepoliza, Fecha, Concepto, ObjMov);
|
||||
}
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
|
||||
Alert("Se Contabilizaron Correctamente los Siguientes Folios: <br>" + ObjMov.AlertaMensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
private void BtnGuardarAmortizaciones_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
foreach (GridViewRow row in GvPrePolizaAmortizaciones.Rows)
|
||||
{
|
||||
CheckBox chk = row.FCCheckBox("Chk");
|
||||
TextBox txtFecha = row.FCTextBox("TxtFechaAmortizaciones");
|
||||
TextBox txtConcepto = row.FCTextBox("TxtConceptoAmortizaciones");
|
||||
|
||||
if (chk != null && chk.Checked)
|
||||
{
|
||||
DateTime Fecha = txtFecha.Text.ToDate();
|
||||
int CvePrepoliza = GvPrePolizaAmortizaciones.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
string Concepto = txtConcepto.Text;
|
||||
|
||||
Contabilizar(CvePrepoliza, Fecha, Concepto, ObjMov);
|
||||
}
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
|
||||
Alert("Se Contabilizaron Correctamente los Siguientes Folios: <br>" + ObjMov.AlertaMensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
DateTime FechaI = txtFechaI.Text.ToDate();
|
||||
DateTime FechaF = txtFechaF.Text.ToDate();
|
||||
var EstatusContabilizacion = DdlEstatusContabilizacion.SelectedValue.ToEntero();
|
||||
int CveProveedor = -1;
|
||||
if (DdlProveedores.SelectedValue.ToEntero() > 0) CveProveedor = DdlProveedores.SelectedValue.ToEntero();
|
||||
|
||||
|
||||
|
||||
ClsContabilidad cont = new ClsContabilidad();
|
||||
|
||||
// Cargamos las Compras
|
||||
if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 1, FechaI, FechaF, CveProveedor, DdlPersonal.SelectedValue.ToEntero(), DdlTipoProveedor.SelectedValue.ToEntero(), DdlMoneda.SelectedValue.ToEntero(), DdlPlantillasPolizas.SelectedValue.ToEntero(), EstatusContabilizacion))
|
||||
{
|
||||
GvPrePolizaCompras.DataSource = cont.DtResultados;
|
||||
GvPrePolizaCompras.DataBind();
|
||||
}
|
||||
|
||||
// Cargamos los pagos
|
||||
if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 2, FechaI, FechaF, CveProveedor, DdlPersonal.SelectedValue.ToEntero(), DdlTipoProveedor.SelectedValue.ToEntero(), DdlMoneda.SelectedValue.ToEntero(), DdlPlantillasPolizas.SelectedValue.ToEntero(), EstatusContabilizacion))
|
||||
{
|
||||
|
||||
GvPrePolizaPagos.DataSource = cont.DtResultados;
|
||||
GvPrePolizaPagos.DataBind();
|
||||
}
|
||||
|
||||
// Cargamos las amortizaciones
|
||||
if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 101, FechaI, FechaF, CveProveedor, DdlPersonal.SelectedValue.ToEntero(), DdlTipoProveedor.SelectedValue.ToEntero(), DdlMoneda.SelectedValue.ToEntero(), DdlPlantillasPolizas.SelectedValue.ToEntero(), EstatusContabilizacion))
|
||||
{
|
||||
GvPrePolizaAmortizaciones.DataSource = cont.DtResultados;
|
||||
GvPrePolizaAmortizaciones.DataBind();
|
||||
}
|
||||
|
||||
cont.Dispose();
|
||||
|
||||
UpGvCompras.Update();
|
||||
UpGvPagos.Update();
|
||||
UpGvAnticipos.Update();
|
||||
UpGvAmortizaciones.Update();
|
||||
}
|
||||
|
||||
protected void GvD_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
int cuenta = e.Row.DataKey("IdCtaContable").ToString().ToEntero();
|
||||
int CveConcepto = e.Row.DBCampo("CveConceptoContable").ToEntero();
|
||||
|
||||
if (CveConcepto.Contiene(5, 6, 14, 16, 17, 19, 206, 22, 23, 25, 26, 18, 60, 183, 184, 185, 186 ,205, 240, 243, 244, 248, 249,15,22,248,249,237))
|
||||
{
|
||||
e.Row.FCHyperLink("HplC").NavigateUrl = string.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DBCampo("CveCompra"));
|
||||
}
|
||||
if (CveConcepto.Contiene(30, 204))
|
||||
{
|
||||
e.Row.FCHyperLink("HplC").NavigateUrl = string.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"));
|
||||
}
|
||||
if (CveConcepto.Contiene(2, 4, 13, 61, 38, 39))
|
||||
{
|
||||
e.Row.FCHyperLink("HplC").NavigateUrl = string.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DBCampo("CveVenta"));
|
||||
}
|
||||
if (CveConcepto.Contiene(28, 29))
|
||||
{
|
||||
e.Row.FCHyperLink("HplC").NavigateUrl = string.Format("/RH/Personal.aspx?CvePersonal={0}", e.Row.DBCampo("CvePersonal"));
|
||||
}
|
||||
if (CveConcepto.Contiene(68))
|
||||
{
|
||||
e.Row.FCHyperLink("HplC").NavigateUrl = string.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"));
|
||||
}
|
||||
if (CveConcepto.Contiene(176,177,228,229,232,233))
|
||||
{
|
||||
e.Row.FCHyperLink("HplC").NavigateUrl = string.Format("/OC/OC.aspx?OC={0}", e.Row.DBCampo("CveOC"));
|
||||
}
|
||||
|
||||
|
||||
if (cuenta > 0)
|
||||
{
|
||||
DataRow dr = DTmpC.FiltroPrimero(String.Format("Id = {0}", cuenta));
|
||||
|
||||
if (dr != null) e.Row.Cells[3].Text = string.Format("{0}<br/>{1}", dr["CuentaFormato"], dr["Nombre"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.Cells[0].ForeColor = System.Drawing.Color.Red;
|
||||
|
||||
((GridViewRow)((GridView)e.Row.NamingContainer).BindingContainer).FCCheckBox("Chk").Enabled = false;
|
||||
((GridViewRow)((GridView)e.Row.NamingContainer).BindingContainer).FCCheckBox("Chk").ToolTip = "Hay conceptos sin cuenta asignada";
|
||||
}
|
||||
|
||||
if (Convert.ToDecimal(e.Row.DataKey("Cargo").ToString()) == 0) e.Row.Cells[4].Text = "";
|
||||
|
||||
if (Convert.ToDecimal(e.Row.DataKey("Abono").ToString()) == 0) e.Row.Cells[5].Text = "";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void LnkSimplificar_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
|
||||
LinkButton btn = (LinkButton)sender;
|
||||
GridViewRow row = (GridViewRow)btn.NamingContainer;
|
||||
int index = Convert.ToInt32(row.RowIndex);
|
||||
|
||||
int CvePrePoliza = GvPrePolizaPagos.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
|
||||
if (ObjMov.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
Alert("Se ha simplificado la poliza correctamente", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("Ocurrió un error al simplificar la póliza", ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
|
||||
ObjMov.Dispose();
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
protected void LnkSimplificarCompra_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
|
||||
LinkButton btn = (LinkButton)sender;
|
||||
GridViewRow row = (GridViewRow)btn.NamingContainer;
|
||||
int index = Convert.ToInt32(row.RowIndex);
|
||||
|
||||
int CvePrePoliza = GvPrePolizaCompras.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
|
||||
if (ObjMov.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
Alert("Se ha simplificado la poliza correctamente", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("Ocurrió un error al simplificar la póliza", ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
|
||||
ObjMov.Dispose();
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
}
|
||||
490
Contabilidad/ContabilizacionVentas.aspx
Normal file
490
Contabilidad/ContabilizacionVentas.aspx
Normal file
@@ -0,0 +1,490 @@
|
||||
<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ContabilizacionVentas.aspx.cs" Inherits="Contabilidad_ContabilizacionVentas" %>
|
||||
|
||||
<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">
|
||||
Diario de Ventas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel2" runat="server" OnClick="ImgExcel2_Click" ><i class="fa fa-ad-excel"></i> Generar</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPPFiltros" 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-primary" OnClick="BtnConsultar_Click" />
|
||||
<asp:CheckBox ID="chkexpand" ClientIDMode="Static" CssClass="hidden" runat="server" />
|
||||
<a href="javascript;" data-idchekbox='chkexpand' class='<%= Convert.ToBoolean(chkexpand.Checked) ? "collapse" : "expand" %>'></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Clientes:</label>
|
||||
<div class="col-md-3">
|
||||
<ADS:Dropdownlost ID="DdlClientes" runat="server" CssStyle="width: 300px;" DataTextField="NombreComercial" DataValueField="CveCliente"></ADS:Dropdownlost>
|
||||
<%--<asp:DropDownList ID="DdlClientes" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>--%>
|
||||
</div>
|
||||
<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: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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="CalendarExtender1" TargetControlID="txtFechaI" PopupButtonID="ImgCalendarioI" 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>
|
||||
<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="txtFechaF" runat="server" CssClass="form-control" Width="99%" 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>
|
||||
<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="CalendarExtender2" 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="vcoFfvFF" 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>
|
||||
<div class="portlet-body" <%= Convert.ToBoolean(chkexpand.Checked) ? "" : "style=\"display:none;\"" %>>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Moneda:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlMoneda" CssClass="form-control input-sm select2me" Width="260px" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Pesos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Dolares" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Estatus:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlEstatusContabilizacion" CssClass="form-control input-sm select2me" Width="260px" runat="server">
|
||||
<asp:ListItem Selected="True" Text="No contabilizado" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contabilizado" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Todos" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Sucursal:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AppendDataBoundItems="true" Width="260px" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UPPTabs" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%">
|
||||
<ajax:TabPanel ID="TabV" runat="server" HeaderText="Ventas">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpGvVentas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContabilizarVentas" runat="server" CssClass="btn btn-success" Text="Contabilizar" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvV" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" Style="text-align: center;" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Panel ID="PnlDetalleVentas" runat="server" CssClass="Texto">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="false" CssClass="table detallerow table-hover" Style="float: right; width: 95%;" DataKeyNames="IdCtaContable,Cargo,Abono" GridLines="None" OnRowDataBound="GvD_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Movimiento" />
|
||||
<asp:TemplateField HeaderText="Concepto" ItemStyle-Font-Size="Smaller">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplC" runat="server" Text='<%# Eval("Concepto") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="SubProyecto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="SubProyecto" />
|
||||
<asp:BoundField DataField="" ItemStyle-Font-Size="Smaller" ItemStyle-Font-Italic="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Cuenta" />
|
||||
<asp:BoundField DataField="Cargo" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Cargos" />
|
||||
<asp:BoundField DataField="Abono" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Abonos" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr style="background-color: #949494; color: black;">
|
||||
<td style="width: 50px"></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:TextBox ID="TxtFechaVentas" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox></td>
|
||||
<td style="width: 50px; text-align: right;">Concepto:</td>
|
||||
<td style="width: 400px; text-align: left;">
|
||||
<asp:TextBox ID="TxtConceptoVentas" ItemStyle-HorizontalAlign="Left" Width="400px" runat="server" Text='<%# Eval("Concepto") %>'></asp:TextBox></td>
|
||||
<td style="width: 100px; text-align: right;">Póliza: </td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:Literal ID="LtPolizaTipoVentas" Text='<%# Eval("TipoPoliza", "{0:d}") %>' runat="server"></asp:Literal></td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" CssClass="Texto" Visible="false" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink></td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:LinkButton ID="LnkSimplificar" runat="server" OnClick="LnkSimplificarCompra_Click" ToolTip="Simplificar Póliza"><i class='fa fa-exchange'></i></asp:LinkButton>
|
||||
</td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Ver Poliza" NavigateUrl='<%# Eval("IdPoliza", "/Contabilidad/RegPoliza.aspx?IdPoliza={0}")%>'></asp:HyperLink>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr style="color: black;">
|
||||
<td></td>
|
||||
<td style="width: 30px; text-align: right;">Factura:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:HyperLink Target="_blank" ID="HplFacturaVenta" runat="server" Text='<%# Eval("Serie")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 50px; text-align: right;">Cliente:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:HyperLink Target="_blank" ID="HplClienteVenta" runat="server" Text='<%# Eval("NombreComercial")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveCliente", "/Ventas/Clientes.aspx?CveCliente={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblFechaVenta" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Label></td>
|
||||
<td style="width: 50px; text-align: right;">Total:</td>
|
||||
<td style="width: 50px; text-align: left;">
|
||||
<asp:Label ID="lblTotalVenta" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Label></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblMoneda" ItemStyle-HorizontalAlign="Left" runat="server" Text='<%# Eval("Moneda") %>'></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabP" runat="server" HeaderText="Pagos">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvPagos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContabilizarPagos" runat="server" CssClass="btn btn-success" Text="Contabilizar" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvP" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" Style="text-align: center;" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Panel ID="PnlDetallePagos" runat="server">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="false" CssClass="table detallerow table-hover" Style="float: right; width: 95%;" DataKeyNames="IdCtaContable, Cargo, Abono" GridLines="None" OnRowDataBound="GvD_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Movimiento" />
|
||||
<asp:TemplateField HeaderText="Concepto" ItemStyle-Font-Size="Smaller">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplC" runat="server" Text='<%# Eval("Concepto") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="SubProyecto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="SubProyecto" />
|
||||
<asp:BoundField DataField="" ItemStyle-Font-Size="Smaller" ItemStyle-Font-Italic="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px" HeaderText="Cuenta" />
|
||||
<asp:BoundField DataField="Cargo" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Cargos" />
|
||||
<asp:BoundField DataField="Abono" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Abonos" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr style="background-color: #949494; color: black;">
|
||||
<td style="width: 50px"></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:TextBox ID="TxtFechaPagos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox></td>
|
||||
<td style="width: 50px; text-align: right;">Concepto:</td>
|
||||
<td style="width: 400px; text-align: left;">
|
||||
<asp:TextBox ID="TxtConceptoPagos" ItemStyle-HorizontalAlign="Left" Width="400px" runat="server" Text='<%# Eval("Concepto") %>'></asp:TextBox></td>
|
||||
<td style="width: 100px; text-align: right;">Póliza: </td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:Literal ID="LtPolizaTipoPagos" Text='<%# Eval("TipoPoliza", "{0:d}") %>' runat="server"></asp:Literal></td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" CssClass="Texto" Visible="false" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink></td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Ver Poliza" NavigateUrl='<%# Eval("IdPoliza", "/Contabilidad/RegPoliza.aspx?IdPoliza={0}")%>'></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color: black;">
|
||||
<td></td>
|
||||
<td style="width: 30px; text-align: right;">Número:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:HyperLink Target="_blank" ID="HplFacturaPagos" runat="server" Text='<%# Eval("Serie")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 50px; text-align: right;">Pagador:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblClientePagos" runat="server" Text='<%# Eval("NombreComercial")%>' CssClass="Texto"></asp:Label></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblFechaPagos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Label></td>
|
||||
<td style="width: 50px; text-align: right;">Total:</td>
|
||||
<td style="width: 50px; text-align: left;">
|
||||
<asp:Label ID="lblTotalPagos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Label></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblMoneda" ItemStyle-HorizontalAlign="Left" runat="server" Text='<%# Eval("Moneda") %>'></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabA" runat="server" HeaderText="Anticipos">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvAnticipos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContabilizarAnticipos" runat="server" CssClass="btn btn-success" Text="Contabilizar" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvA" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" Style="text-align: center;" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Panel ID="PnlDetalleAnticipos" runat="server">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="false" CssClass="table detallerow table-hover" Style="float: right; width: 95%;" DataKeyNames="IdCtaContable, Cargo, Abono" GridLines="None" OnRowDataBound="GvD_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Movimiento" />
|
||||
<asp:TemplateField HeaderText="Concepto" ItemStyle-Font-Size="Smaller">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplC" runat="server" Text='<%# Eval("Concepto") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="SubProyecto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="SubProyecto" />
|
||||
<asp:BoundField DataField="" ItemStyle-Font-Size="Smaller" ItemStyle-Font-Italic="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px" HeaderText="Cuenta" />
|
||||
<asp:BoundField DataField="Cargo" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Cargos" />
|
||||
<asp:BoundField DataField="Abono" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Abonos" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr style="background-color: #949494; color: black;">
|
||||
<td style="width: 50px"></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:TextBox ID="TxtFechaAnticipos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox></td>
|
||||
<td style="width: 50px; text-align: right;">Concepto:</td>
|
||||
<td style="width: 400px; text-align: left;">
|
||||
<asp:TextBox ID="TxtConceptoAnticipos" ItemStyle-HorizontalAlign="Left" Width="400px" runat="server" Text='<%# Eval("Concepto") %>'></asp:TextBox></td>
|
||||
<td style="width: 100px; text-align: right;">Póliza: </td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:Literal ID="LtPolizaTipoAnticipos" Text='<%# Eval("TipoPoliza", "{0:d}") %>' runat="server"></asp:Literal></td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" CssClass="Texto" Visible="false" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink></td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Ver Poliza" NavigateUrl='<%# Eval("IdPoliza", "/Contabilidad/RegPoliza.aspx?IdPoliza={0}")%>'></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color: black;">
|
||||
<td></td>
|
||||
<td style="width: 30px; text-align: right;">Número:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:HyperLink Target="_blank" ID="HplFacturaAnticipos" runat="server" Text='<%# Eval("Serie")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 50px; text-align: right;">Pagador:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="LblClienteAnticipos" runat="server" Text='<%# Eval("NombreComercial")%>' CssClass="Texto"></asp:Label></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblFechaAnticipos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Label></td>
|
||||
<td style="width: 50px; text-align: right;">Total:</td>
|
||||
<td style="width: 50px; text-align: left;">
|
||||
<asp:Label ID="lblTotalAnticipos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Label></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblMoneda" ItemStyle-HorizontalAlign="Left" runat="server" Text='<%# Eval("Moneda") %>'></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabAm" runat="server" HeaderText="Amortizaciones">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvAmortizaciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContabilizarAmortizaciones" runat="server" CssClass="btn btn-success" Text="Contabilizar" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvPrePolizaAmortizaciones" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" Style="text-align: center;" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Panel ID="PnlDetalleAmortizaciones" runat="server">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="false" CssClass="table detallerow table-hover" Style=" float: right; width: 95%;" DataKeyNames="IdCtaContable, Cargo, Abono" GridLines="None" OnRowDataBound="GvD_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Movimiento" />
|
||||
<asp:TemplateField HeaderText="Concepto" ItemStyle-Font-Size="Smaller">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplC" runat="server" Text='<%# Eval("Concepto") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="SubProyecto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="SubProyecto" />
|
||||
<asp:BoundField DataField="" ItemStyle-Font-Size="Smaller" ItemStyle-Font-Italic="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px" HeaderText="Cuenta" />
|
||||
<asp:BoundField DataField="Cargo" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Cargos" />
|
||||
<asp:BoundField DataField="Abono" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Abonos" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr style="background-color: #949494; color: black;">
|
||||
<td style="width: 50px"></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:TextBox ID="TxtFechaAmortizaciones" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox></td>
|
||||
<td style="width: 50px; text-align: right;">Concepto:</td>
|
||||
<td style="width: 400px; text-align: left;">
|
||||
<asp:TextBox ID="TxtConceptoAmortizaciones" ItemStyle-HorizontalAlign="Left" Width="400px" runat="server" Text='<%# Eval("Concepto") %>'></asp:TextBox></td>
|
||||
<td style="width: 100px; text-align: right;">Póliza: </td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:Literal ID="LtPolizaTipoAmortizaciones" Text='<%# Eval("TipoPoliza", "{0:d}") %>' runat="server"></asp:Literal></td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" CssClass="Texto" Visible="false" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink></td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Ver Poliza" NavigateUrl='<%# Eval("IdPoliza", "/Contabilidad/RegPoliza.aspx?IdPoliza={0}")%>'></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color: black;">
|
||||
<td></td>
|
||||
<td style="width: 30px; text-align: right;">Factura:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:HyperLink Target="_blank" ID="HplFacturaAmortizaciones" runat="server" Text='<%# Eval("Serie")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 50px; text-align: right;">Cliente:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:HyperLink Target="_blank" ID="HplClienteAmortizaciones" runat="server" Text='<%# Eval("NombreComercial")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveCliente", "/Ventas/Clientes.aspx?CveCliente={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblFechaAmortizaciones" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Label></td>
|
||||
<td style="width: 50px; text-align: right;">Total:</td>
|
||||
<td style="width: 50px; text-align: left;">
|
||||
<asp:Label ID="lblTotalAmortizaciones" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Label></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblMoneda" ItemStyle-HorizontalAlign="Left" runat="server" Text='<%# Eval("Moneda") %>'></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
function cargarGridHijo() {
|
||||
$('.detallerow').each(function (index) {
|
||||
var tr = $("<tr ></tr>")
|
||||
var td = $("<td colspan='99'></td>")
|
||||
var tb = $(this);
|
||||
tb.closest("tr").after(tr);
|
||||
td.append(tb);
|
||||
tr.append(td);
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
cargarGridHijo();
|
||||
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
cargarGridHijo();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
406
Contabilidad/ContabilizacionVentas.aspx.cs
Normal file
406
Contabilidad/ContabilizacionVentas.aspx.cs
Normal file
@@ -0,0 +1,406 @@
|
||||
using System;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
|
||||
public partial class Contabilidad_ContabilizacionVentas : ClsPaginas
|
||||
{
|
||||
private DataTable DTmpC
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DTmpC"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["DTmpC"] = value;
|
||||
}
|
||||
}
|
||||
public bool TienePermisoEditar
|
||||
{
|
||||
get { return (bool)ViewState["TienePermisoEditar"]; }
|
||||
set { ViewState["TienePermisoEditar"] = value; }
|
||||
}
|
||||
|
||||
public bool TienePermisoVerPoliza
|
||||
{
|
||||
get { return (bool)ViewState["TienePermisoVerPoliza"]; }
|
||||
set { ViewState["TienePermisoVerPoliza"] = value; }
|
||||
}
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
TienePermisoVerPoliza = false;
|
||||
TienePermisoEditar = false;
|
||||
if (UsuarioActual.Empresa.UsaContabilidad)
|
||||
{
|
||||
TienePermisoEditar = UsuarioActual.TienePermisoProceso(221);
|
||||
|
||||
ClsContPAQi ObjCont = new ClsContPAQi(UsuarioActual.Empresa);
|
||||
ObjCont.GetCuentas(-1, "-1", -1);
|
||||
string[] columnas = new string[3] { "Id", "CuentaFormato", "Nombre" };
|
||||
DTmpC = ObjCont.DtResultados.FiltraParametros("", "", columnas);
|
||||
ObjCont.Dispose();
|
||||
|
||||
if (UsuarioActual.CveRol == 1 || UsuarioActual.CveUsuario == 17 || UsuarioActual.CveUsuario == 171 || UsuarioActual.TienePermisoProceso(221))
|
||||
{
|
||||
TienePermisoEditar = true;
|
||||
TienePermisoVerPoliza = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("Este módulo requiere el uso de Contabilidad.", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
BtnConsultar.Enabled = false;
|
||||
BtnContabilizarVentas.Enabled = false;
|
||||
BtnContabilizarPagos.Enabled = false;
|
||||
BtnContabilizarAnticipos.Enabled = false;
|
||||
BtnContabilizarAmortizaciones.Enabled = false;
|
||||
ImgExcel2.Visible = false;
|
||||
}
|
||||
|
||||
DdlClientes.setEsWebService(true);
|
||||
DdlClientes.Attributes.Add("data-metodo", "getcliente");
|
||||
|
||||
DdlSubProyecto.DataSource = get_GlobalDTSubProyectos(-1, CveEmpresa: UsuarioActual.CveEmpresa);
|
||||
DdlSubProyecto.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
DdlSubProyecto.DataBind();
|
||||
|
||||
txtFechaI.Text = DateTime.Now.AddMonths(-1).FirstDayOfMonth().ToShortDateString();
|
||||
txtFechaF.Text = DateTime.Now.ToShortDateString();
|
||||
|
||||
//cargaPolizas();
|
||||
}
|
||||
|
||||
BtnContabilizarVentas.Click += new EventHandler(this.BtnGuardarVentas_Click);
|
||||
BtnContabilizarPagos.Click += new EventHandler(this.BtnGuardarPagos_Click);
|
||||
BtnContabilizarAnticipos.Click += new EventHandler(this.BtnGuardarAnticipos_Click);
|
||||
BtnContabilizarAmortizaciones.Click += new EventHandler(this.BtnGuardarAmortizaciones_Click);
|
||||
//BtnConsultar.Click += new EventHandler(this.BtnConsultar_Click);
|
||||
}
|
||||
|
||||
protected void OnRowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
GridView GvD = e.Row.FCGridView("GvD");
|
||||
int CvePrePoliza = e.Row.DataKey("CvePrePoliza").ToEntero();
|
||||
|
||||
ClsContabilidad contP = new ClsContabilidad();
|
||||
|
||||
if (contP.GetContabilizacionDiarioDetalle(CvePrePoliza))
|
||||
{
|
||||
if (contP.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
Double Abonos = 0;
|
||||
Double Cargos = 0;
|
||||
|
||||
Abonos = contP.DtResultados.SUM("Abono");
|
||||
Cargos = contP.DtResultados.SUM("Cargo");
|
||||
|
||||
if (Cargos != Abonos)
|
||||
{
|
||||
e.Row.FCCheckBox("Chk").Enabled = false;
|
||||
e.Row.FCCheckBox("Chk").ToolTip = $"La suma de cargos y abonos son diferentes ({Cargos}-{Abonos})";
|
||||
}
|
||||
|
||||
if (e.Row.DBCampo("IdPoliza").ToEntero() > 0)
|
||||
{
|
||||
e.Row.FCCheckBox("Chk").Enabled = false;
|
||||
e.Row.FCCheckBox("Chk").ToolTip = "Póliza ya contabilizada";
|
||||
}
|
||||
|
||||
GvD.DataSource = contP.DtResultados;
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.Visible = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (UsuarioActual.CveRol == 1 || UsuarioActual.CveUsuario == 17 || UsuarioActual.CveUsuario == 1446 || UsuarioActual.CveUsuario == 1641 || TienePermisoEditar)
|
||||
{
|
||||
e.Row.FCHyperLink("HplEdicion").Visible = true;
|
||||
}
|
||||
|
||||
e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("IdPoliza").ToEntero() > 0;
|
||||
|
||||
contP.Dispose();
|
||||
GvD.DataBind();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void Contabilizar(int CvePrepoliza, DateTime Fecha, string Concepto, ClsContabilidad Obj)
|
||||
{
|
||||
if (Obj.ContabilizarPrePoliza(CvePrepoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, Fecha, Concepto))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnGuardarVentas_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
|
||||
foreach (GridViewRow row in GvV.Rows)
|
||||
{
|
||||
CheckBox chk = row.FCCheckBox("Chk");
|
||||
TextBox txtFecha = row.FCTextBox("TxtFechaVentas");
|
||||
TextBox txtConcepto = row.FCTextBox("TxtConceptoVentas");
|
||||
|
||||
if (chk != null && chk.Checked)
|
||||
{
|
||||
DateTime Fecha = txtFecha.Text.ToDate();
|
||||
int CvePrepoliza = GvV.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
string Concepto = txtConcepto.Text;
|
||||
|
||||
Contabilizar(CvePrepoliza, Fecha, Concepto, ObjMov);
|
||||
}
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
|
||||
Alert("Se Contabilizaron Correctamente los Siguientes Folios: <br>" + ObjMov.AlertaMensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
cargaPolizas();
|
||||
|
||||
}
|
||||
|
||||
private void BtnGuardarPagos_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
|
||||
foreach (GridViewRow row in GvP.Rows)
|
||||
{
|
||||
CheckBox chk = row.FCCheckBox("Chk");
|
||||
TextBox txtFecha = row.FCTextBox("TxtFechaPagos");
|
||||
TextBox txtConcepto = row.FCTextBox("TxtConceptoPagos");
|
||||
|
||||
if (chk != null && chk.Checked)
|
||||
{
|
||||
DateTime Fecha = txtFecha.Text.ToDate();
|
||||
int CvePrepoliza = GvP.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
string Concepto = txtConcepto.Text;
|
||||
|
||||
Contabilizar(CvePrepoliza, Fecha, Concepto, ObjMov);
|
||||
}
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
|
||||
Alert("Se Contabilizaron Correctamente los Siguientes Folios: <br>" + ObjMov.AlertaMensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
cargaPolizas();
|
||||
|
||||
}
|
||||
|
||||
private void BtnGuardarAnticipos_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
|
||||
foreach (GridViewRow row in GvA.Rows)
|
||||
{
|
||||
CheckBox chk = row.FCCheckBox("Chk");
|
||||
TextBox txtFecha = row.FCTextBox("TxtFechaAnticipos");
|
||||
TextBox txtConcepto = row.FCTextBox("TxtConceptoAnticipos");
|
||||
|
||||
if (chk != null && chk.Checked)
|
||||
{
|
||||
DateTime Fecha = txtFecha.Text.ToDate();
|
||||
int CvePrepoliza = GvA.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
string Concepto = txtConcepto.Text;
|
||||
|
||||
Contabilizar(CvePrepoliza, Fecha, Concepto, ObjMov);
|
||||
}
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
|
||||
Alert("Se Contabilizaron Correctamente los Siguientes Folios: <br>" + ObjMov.AlertaMensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
cargaPolizas();
|
||||
|
||||
}
|
||||
|
||||
private void BtnGuardarAmortizaciones_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
|
||||
foreach (GridViewRow row in GvPrePolizaAmortizaciones.Rows)
|
||||
{
|
||||
CheckBox chk = row.FCCheckBox("Chk");
|
||||
TextBox txtFecha = row.FCTextBox("TxtFechaAmortizaciones");
|
||||
TextBox txtConcepto = row.FCTextBox("TxtConceptoAmortizaciones");
|
||||
|
||||
if (chk != null && chk.Checked)
|
||||
{
|
||||
DateTime Fecha = txtFecha.Text.ToDate();
|
||||
int CvePrepoliza = GvPrePolizaAmortizaciones.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
string Concepto = txtConcepto.Text;
|
||||
|
||||
Contabilizar(CvePrepoliza, Fecha, Concepto, ObjMov);
|
||||
}
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
|
||||
Alert("Se Contabilizaron Correctamente los Siguientes Folios: <br>" + ObjMov.AlertaMensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
cargaPolizas();
|
||||
|
||||
}
|
||||
|
||||
private void cargaPolizas()
|
||||
{
|
||||
|
||||
DateTime FechaI = txtFechaI.Text.ToDate();
|
||||
DateTime FechaF = txtFechaF.Text.ToDate();
|
||||
|
||||
ClsContabilidad cont = new ClsContabilidad();
|
||||
|
||||
// Cargamos las ventas
|
||||
if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 4, FechaI, FechaF, CveMoneda: DdlMoneda.SelectedValue.ToEntero(),EstatusContabilizacion:DdlEstatusContabilizacion.SelectedValue.ToEntero(),CveSubProyecto:DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
{
|
||||
if (DdlClientes.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
GvV.DataSource = cont.DtResultados.FiltraParametros($"CveCliente = {DdlClientes.SelectedValue}");
|
||||
}
|
||||
else
|
||||
{
|
||||
GvV.DataSource = cont.DtResultados;
|
||||
}
|
||||
GvV.DataBind();
|
||||
}
|
||||
|
||||
// Cargamos los pagos
|
||||
if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 11, FechaI, FechaF, CveMoneda: DdlMoneda.SelectedValue.ToEntero(), EstatusContabilizacion: DdlEstatusContabilizacion.SelectedValue.ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
{
|
||||
if (DdlClientes.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
GvP.DataSource = cont.DtResultados.FiltraParametros($"CveCliente = {DdlClientes.SelectedValue}");
|
||||
}
|
||||
else
|
||||
{
|
||||
GvP.DataSource = cont.DtResultados;
|
||||
}
|
||||
GvP.DataBind();
|
||||
}
|
||||
|
||||
// Cargamos los anticipos
|
||||
if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 12, FechaI, FechaF))
|
||||
{
|
||||
if (DdlClientes.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
GvA.DataSource = cont.DtResultados.FiltraParametros($"CveCliente = {DdlClientes.SelectedValue}");
|
||||
}
|
||||
else
|
||||
{
|
||||
GvA.DataSource = cont.DtResultados;
|
||||
}
|
||||
GvA.DataBind();
|
||||
}
|
||||
|
||||
// Cargamos las amortizaciones
|
||||
if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 10, FechaI, FechaF))
|
||||
{
|
||||
if (DdlClientes.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
GvPrePolizaAmortizaciones.DataSource = cont.DtResultados.FiltraParametros($"CveCliente = {DdlClientes.SelectedValue}");
|
||||
}
|
||||
else
|
||||
{
|
||||
GvPrePolizaAmortizaciones.DataSource = cont.DtResultados;
|
||||
}
|
||||
GvPrePolizaAmortizaciones.DataBind();
|
||||
}
|
||||
|
||||
cont.Dispose();
|
||||
|
||||
UpGvVentas.Update();
|
||||
UpGvPagos.Update();
|
||||
UpGvAnticipos.Update();
|
||||
UpGvAmortizaciones.Update();
|
||||
UPPTabs.Update();
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
cargaPolizas();
|
||||
}
|
||||
|
||||
|
||||
protected void GvD_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
int cuenta = e.Row.DataKey("IdCtaContable").ToString().ToEntero();
|
||||
int CveConcepto = e.Row.DBCampo("CveConceptoContable").ToEntero();
|
||||
|
||||
if (CveConcepto.Contiene(5, 6, 14, 19, 17, 206, 25, 26))
|
||||
{
|
||||
e.Row.FCHyperLink("HplC").NavigateUrl = string.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DBCampo("CveCompra"));
|
||||
}
|
||||
if (CveConcepto.Contiene(30, 204))
|
||||
{
|
||||
e.Row.FCHyperLink("HplC").NavigateUrl = string.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"));
|
||||
}
|
||||
if (CveConcepto.Contiene(2, 4, 13, 61, 38, 39, 1, 203, 207, 251))
|
||||
{
|
||||
e.Row.FCHyperLink("HplC").NavigateUrl = string.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DBCampo("CveVenta"));
|
||||
}
|
||||
if (CveConcepto.Contiene(68))
|
||||
{
|
||||
e.Row.FCHyperLink("HplC").NavigateUrl = string.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"));
|
||||
}
|
||||
if (CveConcepto.Contiene(28,29))
|
||||
{
|
||||
e.Row.FCHyperLink("HplC").NavigateUrl = string.Format("/RH/Personal.aspx?CvePersonal={0}", e.Row.DBCampo("CvePersonal"));
|
||||
}
|
||||
|
||||
if (cuenta > 0)
|
||||
{
|
||||
DataRow dr = DTmpC.FiltroPrimero(String.Format("Id = {0}", cuenta));
|
||||
|
||||
if (dr != null) e.Row.Cells[3].Text = string.Format("{0}<br/>{1}", dr["CuentaFormato"], dr["Nombre"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.Cells[0].ForeColor = System.Drawing.Color.Red;
|
||||
|
||||
((GridViewRow)((GridView)e.Row.NamingContainer).BindingContainer).FCCheckBox("Chk").Visible = false;
|
||||
}
|
||||
|
||||
if (Convert.ToDecimal(e.Row.DataKey("Cargo").ToString()) == 0) e.Row.Cells[4].Text = "";
|
||||
|
||||
if (Convert.ToDecimal(e.Row.DataKey("Abono").ToString()) == 0) e.Row.Cells[5].Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void ImgExcel2_Click(object sender, EventArgs e)
|
||||
{
|
||||
GvV.ExportToExcel("DiarioVentas_" + DateTime.Now.ToShortDateString());
|
||||
}
|
||||
|
||||
protected void LnkSimplificarCompra_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
|
||||
LinkButton btn = (LinkButton)sender;
|
||||
GridViewRow row = (GridViewRow)btn.NamingContainer;
|
||||
int index = Convert.ToInt32(row.RowIndex);
|
||||
|
||||
int CvePrePoliza = GvV.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
|
||||
if (ObjMov.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
Alert("Se ha simplificado la poliza correctamente", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("Ocurrió un error al simplificar la póliza", ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
|
||||
ObjMov.Dispose();
|
||||
cargaPolizas();
|
||||
}
|
||||
|
||||
}
|
||||
29
Contabilidad/DIOTChilo.aspx
Normal file
29
Contabilidad/DIOTChilo.aspx
Normal file
@@ -0,0 +1,29 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="DIOTChilo.aspx.vb" Inherits="Contabilidad_DIOTChilo" %>
|
||||
|
||||
<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="E" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<asp:TextBox ID="TxtPoliza" runat="server" Width="50%" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Button ID="BtnContabilizar" runat="server" CssClass="form-control btn btn-primary" Text="Fierro Compa!" Width="50%" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
121
Contabilidad/DIOTChilo.aspx.vb
Normal file
121
Contabilidad/DIOTChilo.aspx.vb
Normal file
@@ -0,0 +1,121 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contabilidad_DIOTChilo
|
||||
Inherits Page
|
||||
|
||||
Private Sub Contabilidad_DIOTChilo_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub BtnContabilizar_Click(sender As Object, e As EventArgs) Handles BtnContabilizar.Click
|
||||
Dim ObjContabilidad As New ClsContabilidad
|
||||
Dim ObjConta As ClsContPAQi = Nothing
|
||||
Dim ObjEmpres As New Empresa()
|
||||
|
||||
ObjEmpres.Empresa = "EXPLORACIONES MINERAS DEL DESIERTO S.A DE C.V"
|
||||
ObjEmpres.ServerContPAQi = "192.168.0.2\COMPAC,1430"
|
||||
ObjEmpres.BDContPAQi = "ctEMD"
|
||||
ObjEmpres.UsrContPAQi = "sa"
|
||||
ObjEmpres.PwdContPAQi = "AsS151026r37"
|
||||
|
||||
Dim OcurrioError = False
|
||||
Dim Mensaje = ""
|
||||
|
||||
If ObjConta Is Nothing Then
|
||||
ObjConta = New ClsContPAQi(ObjEmpres)
|
||||
ObjConta.IniciaTransacSQL()
|
||||
End If
|
||||
|
||||
Dim tIdPoliza As Integer
|
||||
Dim Fecha As Date
|
||||
Dim ContaFolio As Integer
|
||||
|
||||
If ObjContabilidad.GetPrePoliza(TxtPoliza.Text.ToEntero, 13) Then
|
||||
tIdPoliza = ObjContabilidad.DtResultados(0)("IdPoliza").ToString.ToEntero
|
||||
Fecha = ObjContabilidad.DtResultados(0)("Fecha").ToString.ToDate
|
||||
ContaFolio = ObjContabilidad.DtResultados(0)("FolioPoliza").ToString.ToEntero
|
||||
End If
|
||||
|
||||
|
||||
If ObjContabilidad.GetDIOTValores(TxtPoliza.Text.ToEntero) Then
|
||||
|
||||
If ObjContabilidad.DtResultados.Rows.Count.ToEntero > 0 Then
|
||||
Dim IdProveedor As Integer
|
||||
|
||||
Dim RFC As String = ""
|
||||
Dim RazonSocial As String = ""
|
||||
Dim IdCtaContProveedores As Integer
|
||||
|
||||
|
||||
For Each dr As DataRow In ObjContabilidad.DtResultados.Rows
|
||||
RFC = dr("RFC").ToString
|
||||
RazonSocial = dr("RazonSocial").ToString
|
||||
IdCtaContProveedores = dr("IdCtaContProveedores").ToString.ToEntero
|
||||
|
||||
If IdCtaContProveedores > 0 Then
|
||||
|
||||
'busco la clave del proveedor en la contabilidad por su cuenta contable
|
||||
If ObjConta.GetProveedores(IdCuentaContable:=IdCtaContProveedores) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
Dim drt As DataRow = ObjConta.DtResultados.Rows(0) : IdProveedor = drt("Id").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
'busco la clave del proveedor en la contabilidad por su cuenta contable
|
||||
If ObjConta.GetProveedores(RFC:=RFC) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
Dim drtt As DataRow = ObjConta.DtResultados.Rows(0) : IdProveedor = drtt("Id").ToString.ToEntero
|
||||
End If
|
||||
Else
|
||||
'registro el proveedor generico
|
||||
Select Case 13
|
||||
Case Else : IdProveedor = 0
|
||||
End Select
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If IdProveedor <= 0 Then
|
||||
IdProveedor = ObjConta.AddProveedor(IdCtaContProveedores, RFC, RazonSocial, "")
|
||||
If IdProveedor <= 0 Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not OcurrioError Then
|
||||
If dr("Total").ToString.ToDecimal <> 0.00 Then
|
||||
If Not ObjConta.AddDevolucionesIVA(tIdPoliza, dr("CuentaBancos").ToString.ToEntero,
|
||||
IdProveedor,
|
||||
16,
|
||||
dr("SubTotal").ToString.ToDecimal,
|
||||
dr("IvaAcreditable").ToString.ToDecimal,
|
||||
dr("IVARetenido").ToString.ToDecimal,
|
||||
dr("ISRRetenido").ToString.ToDecimal,
|
||||
Fecha,
|
||||
ContaFolio,
|
||||
dr("Serie").ToString.ToString,
|
||||
dr("Folio").ToString.StrToNum, dr("FolioFiscal").ToString, 13) Then
|
||||
OcurrioError = True
|
||||
Mensaje = "La Poliza o la Cuenta no son válidas"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
If OcurrioError Then
|
||||
ObjConta.RollBack()
|
||||
Else
|
||||
'Alert(String.Format("<a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", tIdPoliza, ObjConta.Folio))
|
||||
ObjConta.Commit()
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
91
Contabilidad/DescargaRespaldos.aspx
Normal file
91
Contabilidad/DescargaRespaldos.aspx
Normal file
@@ -0,0 +1,91 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="DescargaRespaldos.aspx.vb" Inherits="Contabilidad_DescargaRespaldos" %>
|
||||
|
||||
<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="E" Runat="Server">
|
||||
Descarga de respaldos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="udpDescargas" runat="server" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
<div class="panel panel-default" id="dvPanel" runat="server" >
|
||||
<div class="panel-heading">
|
||||
<asp:Label ID="lblEmpresa" runat="server" Text="empresa"></asp:Label>
|
||||
</div>
|
||||
<div class="panel-body" style="height:100%!important" >
|
||||
<br />
|
||||
|
||||
<div class="container" style="width: 100%" >
|
||||
|
||||
<div class="row" style="width: 100%" >
|
||||
<div class="col-sm-6" style="text-align: left!important">
|
||||
<asp:ImageButton ID="btnHome" AlternateText ="Atras" ImageUrl="~/Imagenes/home_w.png" runat="server" />Inicio
|
||||
<asp:ImageButton ID="btnImgBack" AlternateText ="Atras" ImageUrl="~/Imagenes/back-button.png" runat="server" />
|
||||
|
||||
Atras</div>
|
||||
<div class="col-sm-6" style="text-align: right!important">
|
||||
<asp:TextBox runat="server" ID="filtroGVtext" onkeyup="FiltrarGV();return false;" ClientIDMode="Static" Style="height: 30px;"></asp:TextBox>
|
||||
<a href="javascript:;" onclick="FiltrarGV();return false;" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="dTable" class="table table-hover" style="width: 100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 60%!important">Archivo</th>
|
||||
<th style="width: 10%!important">Tamaño</th>
|
||||
<th style="width: 10%!important">Creación</th>
|
||||
<th style="width: 10%!important">Tipo</th>
|
||||
<th style="width: 10%!important">Descarga</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tdBodyDescargas" runat="server">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<script>
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#dTable').DataTable({
|
||||
"order": [[3, "desc"], [2, "desc"]], scrollCollapse: true, paging: false, searching: false, info: false
|
||||
});
|
||||
|
||||
$(window).keydown(function (event) {
|
||||
if (event.keyCode == 13) {
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function FiltrarGV() {
|
||||
var texto = $('#filtroGVtext').val();
|
||||
$('#<%=tdBodyDescargas.ClientID%> > tr').css({ 'display': 'none' });
|
||||
$("#<%=tdBodyDescargas.ClientID%> > tr:contains('" + texto + "')").css({ 'display': '' });
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
407
Contabilidad/DescargaRespaldos.aspx.vb
Normal file
407
Contabilidad/DescargaRespaldos.aspx.vb
Normal file
@@ -0,0 +1,407 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.IO
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contabilidad_DescargaRespaldos
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected rutaCon As String = ""
|
||||
Protected rutaRes As String = ""
|
||||
|
||||
Private Sub Contabilidad_DescargaRespaldos_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
Dim empresa As Empresa = getEmpresaBDContPAQi()
|
||||
Dim pilaUrl As New List(Of String)
|
||||
|
||||
ViewState("URLS") = pilaUrl
|
||||
ViewState("URLR") = "/"
|
||||
ViewState("FEMPRESA") = empresa.BDContPAQi
|
||||
ViewState("URLACTUAL") = ""
|
||||
|
||||
Else
|
||||
|
||||
End If
|
||||
|
||||
Try
|
||||
'addCaragaLinksInicio()
|
||||
loadEvent()
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub directorioDefault()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub loadEvent()
|
||||
|
||||
Dim lista As List(Of String) = DirectCast(ViewState("URLS"), List(Of String))
|
||||
|
||||
If getUrl() = "" Then
|
||||
addCargaLinksInicio()
|
||||
Else
|
||||
cargarFolderActual()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub addCargaLinksInicio()
|
||||
|
||||
Dim empresa As Empresa = getEmpresaBDContPAQi()
|
||||
Dim BDContPAQi As String = empresa.BDContPAQi
|
||||
|
||||
lblEmpresa.Text = "Empresa: " & empresa.Empresa
|
||||
|
||||
Dim listaFile As New List(Of String)
|
||||
Dim listaDir As New List(Of String)
|
||||
|
||||
Dim listaNombres As New List(Of String)
|
||||
|
||||
Dim GB As Integer = 1073741824
|
||||
Dim MB As Integer = 1048576
|
||||
Dim KB As Integer = 1024
|
||||
Dim resultado As Double = 0.0
|
||||
|
||||
listaFile.Clear()
|
||||
listaDir.Clear()
|
||||
tdBodyDescargas.Controls.Clear()
|
||||
|
||||
If (BDContPAQi <> "") Then
|
||||
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<tr>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td style='text-align:left!important'>CONTPAQI</td>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td></td>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td></td>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td style='text-align:center!important'>Carpeta</td>"))
|
||||
Dim lnkConpaq As New ImageButton
|
||||
|
||||
lnkConpaq.ID = "lnkContPaq"
|
||||
lnkConpaq.ImageUrl = "~/Imagenes/folder.png"
|
||||
lnkConpaq.PostBackUrl = "#"
|
||||
|
||||
lnkConpaq.Attributes.Add("data-toggle", "tooltip")
|
||||
lnkConpaq.Attributes.Add("data-placement", "right")
|
||||
lnkConpaq.Attributes.Add("title", "Acceder")
|
||||
|
||||
AddHandler lnkConpaq.Click, AddressOf Me.lnkFolderCompaqt
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td style='text-align:center'>"))
|
||||
tdBodyDescargas.Controls.Add(lnkConpaq)
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("</td>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("</tr>"))
|
||||
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<tr>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td style='text-align:left!important'>RESPALDOS</td>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td></td>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td></td>"))
|
||||
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td style='text-align:center!important'>Carpeta</td>"))
|
||||
Dim lnkRes As New ImageButton
|
||||
|
||||
lnkRes.ID = "lnkRes"
|
||||
lnkRes.ImageUrl = "~/Imagenes/folder.png"
|
||||
lnkRes.PostBackUrl = "#"
|
||||
|
||||
lnkRes.Attributes.Add("data-toggle", "tooltip")
|
||||
lnkRes.Attributes.Add("data-placement", "right")
|
||||
lnkRes.Attributes.Add("title", "Acceder")
|
||||
|
||||
AddHandler lnkRes.Click, AddressOf Me.lnkFolderRes
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td style='text-align:center'>"))
|
||||
tdBodyDescargas.Controls.Add(lnkRes)
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("</td>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("</tr>"))
|
||||
|
||||
Else
|
||||
dvPanel.Visible = False
|
||||
Alert("No se encontraron descargas relacionadas.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
|
||||
udpDescargas.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub lnkFolderCompaqt(sender As Object, e As EventArgs)
|
||||
|
||||
addUrl(Path.Combine(System.Configuration.ConfigurationManager.AppSettings("ContPAQDescargas").ToString, ViewState("FEMPRESA").ToString))
|
||||
cargarFolderActual()
|
||||
End Sub
|
||||
Protected Sub lnkFolderRes(sender As Object, e As EventArgs)
|
||||
|
||||
If System.Configuration.ConfigurationManager.AppSettings("RespaldosArchivos") <> Nothing Then
|
||||
addUrl(Path.Combine(System.Configuration.ConfigurationManager.AppSettings("RespaldosArchivos"), ViewState("FEMPRESA").ToString))
|
||||
|
||||
cargarFolderActual()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub cargarFolderActual()
|
||||
|
||||
|
||||
tdBodyDescargas.Controls.Clear()
|
||||
Dim empresa As Empresa = getEmpresaBDContPAQi()
|
||||
Dim BDContPAQi As String = empresa.BDContPAQi
|
||||
|
||||
Dim contador As Integer = 0
|
||||
|
||||
Dim listaFile As New List(Of String)
|
||||
Dim listaDir As New List(Of String)
|
||||
|
||||
Dim listaNombres As New List(Of String)
|
||||
|
||||
Dim GB As Integer = 1073741824
|
||||
Dim MB As Integer = 1048576
|
||||
Dim KB As Integer = 1024
|
||||
|
||||
lblEmpresa.Text = "Empresa: " & empresa.Empresa
|
||||
Dim resultado As Double = 0.0
|
||||
|
||||
listaFile.Clear()
|
||||
listaDir.Clear()
|
||||
|
||||
If (BDContPAQi <> "") Then
|
||||
|
||||
Try
|
||||
|
||||
Dim ruta As String = getUrl()
|
||||
|
||||
listaFile.AddRange(Directory.GetFiles(ruta))
|
||||
listaDir.AddRange(Directory.GetDirectories(ruta))
|
||||
|
||||
dvPanel.Visible = True
|
||||
|
||||
For Each d In listaDir
|
||||
|
||||
Dim di As New DirectoryInfo(d)
|
||||
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<tr>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td style='text-align:left!important'>" & di.Name & "</td>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td style='text-align:center!important'></td>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td style='text-align:center!important'>" & di.CreationTime.ToString("dd/MM/yyyy") & "</td>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td style='text-align:center!important'>Carpeta</td>"))
|
||||
Dim lnk As New ImageButton
|
||||
|
||||
lnk.ID = "lnkFol" & contador
|
||||
lnk.Attributes.Add("fname", di.Name)
|
||||
lnk.ImageUrl = "~/Imagenes/folder.png"
|
||||
lnk.PostBackUrl = "#"
|
||||
|
||||
|
||||
lnk.PostBackUrl = "#"
|
||||
lnk.Attributes.Add("data-toggle", "tooltip")
|
||||
lnk.Attributes.Add("data-placement", "right")
|
||||
lnk.Attributes.Add("title", "Acceder")
|
||||
|
||||
AddHandler lnk.Click, AddressOf Me.lnkFolder
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td style='text-align:center'>"))
|
||||
tdBodyDescargas.Controls.Add(lnk)
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("</td>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("</tr>"))
|
||||
contador = contador + 1
|
||||
|
||||
Next
|
||||
contador = 0
|
||||
For Each s In listaFile
|
||||
|
||||
Dim fi As New FileInfo(s)
|
||||
|
||||
|
||||
Dim sLen As String = fi.Length.ToString()
|
||||
If fi.Length >= (GB) Then
|
||||
resultado = fi.Length / GB
|
||||
sLen = String.Format("{0} Gb", resultado.ToString("#.##"))
|
||||
ElseIf fi.Length >= (MB) Then
|
||||
resultado = fi.Length / MB
|
||||
sLen = String.Format("{0} Mb", resultado.ToString("#.##"))
|
||||
ElseIf fi.Length >= (KB) Then
|
||||
resultado = fi.Length / KB
|
||||
sLen = String.Format("{0} Kb", resultado.ToString("#.##"))
|
||||
End If
|
||||
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<tr>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td style='text-align:left!important'>" & fi.Name & "</td>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td style='text-align:center!important'>" & sLen & "</td>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td style='text-align:center!important'>" & fi.CreationTime.ToString("dd/MM/yyyy") & "</td>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td style='text-align:center!important'>Archivo</td>"))
|
||||
Dim lnk As New ImageButton
|
||||
|
||||
lnk.ID = "lnkDes" & contador
|
||||
lnk.Attributes.Add("fname", fi.Name)
|
||||
lnk.ImageUrl = "~/Imagenes/Abajo.png"
|
||||
lnk.PostBackUrl = "#"
|
||||
|
||||
lnk.Attributes.Add("data-toggle", "tooltip")
|
||||
lnk.Attributes.Add("data-placement", "right")
|
||||
lnk.Attributes.Add("title", "Descargar")
|
||||
|
||||
AddHandler lnk.Click, AddressOf Me.lnkBtnDownload
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("<td style='text-align:center'>"))
|
||||
tdBodyDescargas.Controls.Add(lnk)
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("</td>"))
|
||||
tdBodyDescargas.Controls.Add(New LiteralControl("</tr>"))
|
||||
contador = contador + 1
|
||||
udpDescargas.Update()
|
||||
|
||||
Next
|
||||
|
||||
Catch ex As Exception
|
||||
Alert("Error al obtener Archivos." & ex.Message, TipoMensaje.MsgAdvertencia)
|
||||
dvPanel.Visible = False
|
||||
|
||||
End Try
|
||||
Else
|
||||
dvPanel.Visible = False
|
||||
Alert("No se encontraron descargas relacionadas.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
udpDescargas.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub lnkFolder(sender As Object, e As EventArgs)
|
||||
|
||||
Dim lnk As ImageButton
|
||||
lnk = DirectCast(sender, ImageButton)
|
||||
Dim nombre As String = lnk.Attributes("fname")
|
||||
|
||||
addUrl(nombre)
|
||||
|
||||
cargarFolderActual()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub lnkBtnDownload(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Dim empresa As Empresa = getEmpresaBDContPAQi()
|
||||
Dim BDContPAQi As String = empresa.BDContPAQi
|
||||
|
||||
|
||||
Dim ruta As String = getUrl()
|
||||
|
||||
Dim lnk As ImageButton
|
||||
lnk = DirectCast(sender, ImageButton)
|
||||
|
||||
Dim nombre As String = lnk.Attributes("fname")
|
||||
Dim filename As String = Path.Combine(ruta, nombre)
|
||||
|
||||
If filename <> "" Then
|
||||
|
||||
Dim file As New System.IO.FileInfo(filename)
|
||||
If file.Exists Then
|
||||
|
||||
Response.Clear()
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=" & cleanFileName(file.Name))
|
||||
Response.AddHeader("Content-Length", file.Length.ToString())
|
||||
Response.ContentType = "application/octet-stream"
|
||||
Response.TransmitFile(file.FullName)
|
||||
Response.End()
|
||||
|
||||
Else
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Shared ReadOnly AllowedChars As Dictionary(Of Char, Char) = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._()0123456789".ToDictionary(Function(c) c)
|
||||
Private Function cleanFileName(fileName As String) As String
|
||||
Dim newFileName As Char() = fileName.ToCharArray()
|
||||
For i As Integer = 0 To newFileName.Length - 1
|
||||
If Not AllowedChars.ContainsKey(newFileName(i)) Then
|
||||
newFileName(i) = "_"c
|
||||
End If
|
||||
Next
|
||||
Return New String(newFileName)
|
||||
End Function
|
||||
|
||||
Private Function getEmpresaBDContPAQi() As Empresa
|
||||
Dim objEmpresa As New ClsSisEmpresas()
|
||||
Dim empresa As New Empresa
|
||||
|
||||
If objEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||
' If objEmpresa.GetEmpresas(4, "-1", "-1", "-1", "-1") Then
|
||||
empresa = objEmpresa.Empresa
|
||||
|
||||
End If
|
||||
|
||||
objEmpresa.Dispose()
|
||||
Return empresa
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Private Function getUrl() As String
|
||||
|
||||
|
||||
Dim listaUrl As List(Of String) = DirectCast(ViewState("URLS"), List(Of String))
|
||||
Dim tempUrl As String = ""
|
||||
|
||||
If listaUrl.Count > 0 Then
|
||||
|
||||
tempUrl = listaUrl(listaUrl.Count - 1)
|
||||
|
||||
End If
|
||||
|
||||
Return tempUrl
|
||||
End Function
|
||||
|
||||
Private Sub addUrl(ByVal folder As String)
|
||||
|
||||
Dim listaUrl As List(Of String) = DirectCast(ViewState("URLS"), List(Of String))
|
||||
Dim tempUrl As String
|
||||
|
||||
If listaUrl.Count = 0 Then
|
||||
listaUrl.Add(folder)
|
||||
Else
|
||||
tempUrl = Path.Combine(listaUrl(listaUrl.Count - 1), folder)
|
||||
listaUrl.Add(tempUrl)
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub removerUltimaUrl()
|
||||
|
||||
Dim urls As List(Of String) = DirectCast(ViewState("URLS"), List(Of String))
|
||||
|
||||
If urls.Count > 0 Then
|
||||
urls.RemoveAt(urls.Count - 1)
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub btnImgBack_Click(sender As Object, e As ImageClickEventArgs) Handles btnImgBack.Click
|
||||
removerUltimaUrl()
|
||||
|
||||
If getUrl() = "" Then
|
||||
addCargaLinksInicio()
|
||||
Else
|
||||
cargarFolderActual()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub btnHome_Click(sender As Object, e As ImageClickEventArgs) Handles btnHome.Click
|
||||
|
||||
Dim urlLista As New List(Of String)
|
||||
ViewState("URLS") = urlLista
|
||||
addCargaLinksInicio()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
926
Contabilidad/DiarioAmortizaciones.aspx
Normal file
926
Contabilidad/DiarioAmortizaciones.aspx
Normal file
@@ -0,0 +1,926 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="DiarioAmortizaciones.aspx.vb" Inherits="Contabilidad_DiarioAmortizaciones" %>
|
||||
|
||||
<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:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" Runat="Server">
|
||||
<asp:UpdatePanel ID="UPPFiltros" 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-primary" Text="Consultar" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>Proveedor:</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DdlProveedores" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="250px" CssClass="form-group input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>
|
||||
Cuenta:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DdlCuenta" runat="server" AppendDataBoundItems="true" DataTextField="NumCuenta" DataValueField="CveCuenta" Width="100px" CssClass="form-group input-sm">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>
|
||||
Tipo:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DdlTipoTransaccion" runat="server" AppendDataBoundItems="true" AutoPostBack="false" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" Width="100px" ValidationGroup="GrpGuardar" CssClass="form-group input-sm">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<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: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioI" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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="CalendarExtender1" TargetControlID="txtFechaI" PopupButtonID="ImgCalendarioI" 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>
|
||||
</li>
|
||||
<li>
|
||||
F.F.:
|
||||
</li>
|
||||
<li>
|
||||
<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="txtFechaF" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<asp:Panel ID="PnlPoliza" runat="server" Visible="true">
|
||||
<asp:UpdatePanel ID="UPPPoliza" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:RadioButtonList ID="RBLOpcion" runat="server" RepeatDirection="Horizontal" AutoPostBack="True">
|
||||
<asp:ListItem Value="1" >Póliza Agrupadora</asp:ListItem>
|
||||
<asp:ListItem Value="2" Selected="true">Póliza Por Separado</asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
|
||||
|
||||
|
||||
<asp:Panel runat="server" ID="PnlAgrupadora" Visible="false">
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="Texto">
|
||||
<tr style="height: 18px;">
|
||||
<td style="text-align: left; width: 100px"> <b>Fecha:</b> </td>
|
||||
<td style="text-align: left;">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" Width="88px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="imgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaC" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFecha" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaC" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaC" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="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="VCERFVFC" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECVFC" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<table width="150px" runat="server" id="TbTipoCambio" visible="False">
|
||||
<tr>
|
||||
<td>Tipo Cambio.</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtTC" onblur="$get('ImgTC').style.display='';" runat="server" Width="45px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="ImgTC" Style="display: none;" Height="16px" ClientIDMode="Static" ImageUrl="/Imagenes/accept.png"></asp:ImageButton>
|
||||
<asp:HiddenField ID="HdnTC" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height: 18px;">
|
||||
<td style="text-align: left;"> <b>Tipo de Póliza:</b> </td>
|
||||
<td colspan="2" style="text-align: left;">
|
||||
<asp:DropDownList ID="DdlPolizaTipo" DataValueField="Id" DataTextField="Nombre" runat="server"></asp:DropDownList></td>
|
||||
</tr>
|
||||
<tr style="height: 18px;">
|
||||
<td style="text-align: left;"> <b>Concepto:</b> </td>
|
||||
<td colspan="2" style="text-align: left;">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" Text="" Width="350px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" Display="None" ErrorMessage="El campo <b>''Concepto''</b> es necesario, por favor ingréselo)." ValidationGroup="GrpGuardar" ControlToValidate="TxtDescripcion"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</asp:Panel>
|
||||
<%-- <asp:RadioButtonList ID="RBLOpcionFyE" runat="server" RepeatDirection="Horizontal">
|
||||
<asp:ListItem Value="1" Selected="True">Compras</asp:ListItem>
|
||||
<asp:ListItem Value="2">FyE</asp:ListItem>
|
||||
</asp:RadioButtonList>--%>
|
||||
<br />
|
||||
<asp:Button ID="BtnContabilizar" runat="server" Text="Contabilizar" ValidationGroup="GrpGuardar" CssClass="btn btn-primary"/>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
</asp:Panel>
|
||||
|
||||
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<ajax:TabContainer runat="server" ID="Tabs">
|
||||
|
||||
<ajax:TabPanel runat="server" ID="TabAnt" HeaderText="Anticipos" >
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvAnt" GridLines="None" CssClass="table table-hover table-advance Widthall" Width="100%" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="Importe,CveMoneda,CvePrePoliza,CvePlantillaPoliza,CveEmpresa,IdCtaContAnticipos,IdCtaContComplementaria,IdCtaContBancos,IdCtaContBancosComplementaria,CveIE,PrefijoConta,TipoTransAbreviatura,Folio,CveTipoTransaccion,IdCuentaIVAxAcreditar,IdCuentaIVAAcreditable,CveProveedor">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="Titulos">
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr style="height: 20px;">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" Visible="False" /></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="text-align: left;">Fecha:<asp:TextBox ID="TxtFecha" type="date" runat="server" Width="113px" Text='<%# Eval("Fecha", "{0:yyyy-MM-dd}") %>' required></asp:TextBox>
|
||||
|
||||
Tipo Póliza:
|
||||
<asp:DropDownList ID="DdlPolizaTipo" DataValueField="Id" DataTextField="Nombre" runat="server"></asp:DropDownList>
|
||||
Concepto:
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" Width="350px" Text='<%# Eval("RazonSocial", "Anticipo {0}") %>'></asp:TextBox>
|
||||
- $
|
||||
<%# Eval("Importe", "{0:N2}")%>
|
||||
<%# Eval("Abreviatura")%>
|
||||
<asp:Label ID="LblTC" runat="server" Text="TC:" Font-Size="6pt" Font-Italic="True" Visible='<%# Eval("CveMoneda").ToString = "2"%>'></asp:Label>
|
||||
<asp:TextBox ID="TxtTC" runat="server" Width="35px" Font-Size="6pt" Font-Italic="True" Text='<%# Eval("TC")%>' Visible='<%# Eval("CveMoneda").ToString = "2"%>'></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td style="text-align:left">
|
||||
Proveedor: <asp:HyperLink ID="HplP" runat="server" CssClass="Texto" Text='<%# Eval("RazonSocial")%>' NavigateUrl='<%# Eval("CveProveedor", "/Compras/Proveedores.aspx?CveProveedor={0}")%>'></asp:HyperLink>
|
||||
Cuenta: <asp:HyperLink ID="HplC" runat="server" CssClass="Texto" Text='<%# Eval("Cuenta")%>' NavigateUrl='<%# Eval("CveCuenta", "/Bancos/CuentasBancariasDetalle.aspx?CveCuenta={0}")%>'></asp:HyperLink>
|
||||
<%# Eval("TipoTransaccion")%> : <asp:HyperLink ID="HplTT" runat="server" CssClass="Texto" Text='<%# Eval("Folio")%>' NavigateUrl='<%# Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}")%>'></asp:HyperLink>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:GridView ID="GvPC" GridLines="None" CssClass="table table-hover table-advance Widthall" Width="100%" runat="server" ShowHeader="False" AutoGenerateColumns="False" OnRowDataBound="GvPC_RowDataBound" DataKeyNames="CveCompra,RazonSocial,TipoDocto,SerieFolio,Descripcion,SubTotal,Total,IVA,CveIE,Fecha,CveProveedor,Conta_AsientoContableComprasContado,IdCuentaGasto,RetIVA,RetISR,IdCtaContRetIVA,IdCtaContRetISR,IdCtaContProveedores,CveMonedaCompra,CompraIdPoliza">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<%-- <asp:HiddenField ID="HdnTipoDocto" runat="server" Value='<%# Eval("TipoDocto")%>' />--%>
|
||||
<asp:HiddenField ID="HdnCveCompra" runat="server" Value='<%# Eval("CveCompra")%>' />
|
||||
<%-- <asp:HiddenField ID="HdnCveIE" runat="server" Value='<%# Eval("CveIE")%>' />--%>
|
||||
<%-- <asp:HiddenField ID="HdnActual" runat="server" />--%>
|
||||
<asp:HiddenField ID="HdnIVA" runat="server" Value='<%# Eval("IVA")%>' />
|
||||
<asp:HiddenField ID="HdnRetIVA" runat="server" Value='<%# Eval("RetIVA")%>' />
|
||||
<asp:HiddenField ID="HdnRetISR" runat="server" Value='<%# Eval("RetISR")%>' />
|
||||
<asp:HiddenField ID="HdnSerie" runat="server" Value='<%# Eval("Serie")%>' />
|
||||
<asp:HiddenField ID="HdnFolio" runat="server" Value='<%# Eval("Folio")%>' />
|
||||
<asp:HiddenField ID="HdnSerieFolio" runat="server" Value='<%# Eval("SerieFolio")%>' />
|
||||
<asp:HiddenField ID="HdnSubTotalCompra" runat="server" Value='<%# Eval("SubTotal")%>' />
|
||||
<asp:HiddenField ID="HdnTotal" runat="server" Value='<%# Eval("Total")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContProveedores" runat="server" Value='<%# Eval("IdCtaContProveedores")%>' />
|
||||
<asp:HiddenField ID="HdnCveProveedor" runat="server" Value='<%# Eval("CveProveedor")%>' />
|
||||
<asp:HiddenField ID="HdnRazonSocial" runat="server" Value='<%# Eval("RazonSocial")%>' />
|
||||
<asp:HiddenField ID="HdnRFC" runat="server" Value='<%# Eval("RFC")%>' />
|
||||
<asp:HiddenField ID="HdnIVAPagadoCompra" runat="server" Value='<%# Eval("IVAPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnImportePagadoCompra" runat="server" Value='<%# Eval("ImportePagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnRetIVAPagadoCompra" runat="server" Value='<%# Eval("RetIVAPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnRetISRPagadoCompra" runat="server" Value='<%# Eval("RetISRPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnTCFechaCompra" runat="server" Value='<%# Eval("TC_Compra")%>'/>
|
||||
<asp:HiddenField ID="HdnTC" runat="server"/>
|
||||
<asp:HiddenField ID="HdnIdCtaContRetIVA" runat="server" Value='<%# Eval("IdCtaContRetIVA")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContRetISR" runat="server" Value='<%# Eval("IdCtaContRetISR")%>' />
|
||||
|
||||
<asp:HiddenField ID="HdnCompraIdPoliza" runat="server" Value='<%# Eval("CompraIdPoliza")%>' />
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" runat="server" id="TbCompra">
|
||||
<tr class="SubTotales">
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr style="height: 20px;">
|
||||
<td style="width: 25px;"></td>
|
||||
<td>
|
||||
<table width="100%" cellspacing="0" cellpadding="0" id="TbH" runat="server">
|
||||
<tr>
|
||||
<td style="width: 250px; display: none;">
|
||||
<asp:HyperLink ID="HplProv" runat="server" Visible="False" CssClass="Texto" Text='<%# Eval("RazonSocial")%>' NavigateUrl='<%# Eval("CveProveedor", "/Compras/Proveedores.aspx?CveProveedor={0}") %>'></asp:HyperLink>
|
||||
</td>
|
||||
<td style="width: 100px;">F: <a href='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}") %>' class="Texto"><%# Eval("SerieFolio")%></a></td>
|
||||
<td style="width: 100px;"> <%# Eval("Fecha", "{0:d}")%></td>
|
||||
<td style="width: 120px;">SubTotal: <asp:Label ID="LblSubTotal" runat="server" Text='<%# Eval("SubTotal", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 100px;">IVA: <%# Eval("IVA", "{0:N2}")%></td>
|
||||
<td style="width: 70px;">Ret.IVA: <asp:Label ID="LblRetIVA" runat="server" Text='<%# Eval("RetIVA", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 70px;">Ret.ISR: <asp:Label ID="LblRetISR" runat="server" Text='<%# Eval("RetISR", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 100px;">Total: <%# Eval("Total", "{0:N2}")%> <%# Eval("Abreviatura")%>
|
||||
<asp:Label ID="LblTC" runat="server" Font-Size="6pt" Font-Italic="True" Text='<%# If(UsuarioActual.CveEmpresa = 66, Eval("TC_Fluctuacion", "T.C. {0}"), Eval("TC_Compra", "T.C. {0}"))%>' Visible='<%# Eval("CveMonedaCompra").ToString = "2"%>'></asp:Label>
|
||||
<asp:TextBox ID="TxtTC" Width="25px" runat="server" Visible="False"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:GridView ID="GvD" runat="server" GridLines="None" CssClass="table table-hover table-advance Widthall" AutoGenerateColumns="False" OnRowDataBound="GvD_RowDataBound" ForeColor="Gray" DataKeyNames="PS,SubTotalPS,CveCompra,TipoDocto,SerieFolio,Descripcion,SubTotal,CveIE,Fecha,IdCuentaGasto">
|
||||
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS">
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Proyecto">
|
||||
<ItemTemplate>
|
||||
<%#String.Format("{0} - {1}", Eval("Proyecto"), Eval("SubProyecto")) %>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Clasificacion" ItemStyle-Width="100px" HeaderText="Clasificación" HeaderStyle-HorizontalAlign="Center">
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="120px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Importe($)">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitSubtotalPS" runat="server" Text='<%# Eval("SubTotalPS", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<%#String.Format("{0} - {1}", Eval("Proyecto"), Eval("SubProyecto")) %>
|
||||
</ItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlM" runat="server" Width="80px">
|
||||
</asp:DropDownList>
|
||||
<div style='width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'><%# Eval("CuentaGasto") %></div>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="260px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />--%>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
|
||||
<ajax:TabPanel runat="server" ID="TabFyE" HeaderText="F y E">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpFye" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<asp:GridView ID="GvFyE" GridLines="None" CssClass="table table-hover table-advance Widthall" Width="100%" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="Importe,CveMoneda,CvePrePoliza,IdPoliza,CvePlantillaPoliza,CveEmpresa,IdCtaContPersonal,IdCtaContComplementaria,IdCtaContBancos,IdCtaContBancosComplementaria,CveIE,PrefijoConta,TipoTransAbreviatura,Folio,CveTipoTransaccion,IdCuentaIVAxAcreditar,IdCuentaIVAAcreditable,CveProveedor">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="Titulos">
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr style="height: 20px;">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" Visible="False" /></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<ul class="list-inline text-size-12 magindate">
|
||||
<li>
|
||||
Fecha:
|
||||
</li>
|
||||
<li>
|
||||
Fecha:<asp:TextBox ID="TxtFecha" type="date" runat="server" Width="113px" Text='<%# Eval("Fecha", "{0:yyyy-MM-dd}") %>' required></asp:TextBox>
|
||||
</li>
|
||||
<li>
|
||||
Tipo Póliza:
|
||||
<asp:DropDownList CssClass="input-sm" ID="DdlPolizaTipo" DataValueField="Id" DataTextField="Nombre" runat="server"></asp:DropDownList>
|
||||
</li>
|
||||
<li>
|
||||
Concepto:
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" Width="350px" Text='<%# Eval("RazonSocial", "Comprobación: {0}")%>'></asp:TextBox>
|
||||
</li>
|
||||
<li>
|
||||
- $
|
||||
<%# Eval("IEImporte", "{0:N2}")%>
|
||||
<%# Eval("Abreviatura")%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:Label ID="LblTC" runat="server" Text="TC:" Font-Size="6pt" Font-Italic="True" Visible='<%# Eval("CveMoneda").ToString = "2"%>'></asp:Label>
|
||||
<asp:TextBox ID="TxtTC" runat="server" Width="35px" Font-Size="6pt" Font-Italic="True" Text='<%# Eval("TC")%>' Visible='<%# Eval("CveMoneda").ToString = "2"%>'></asp:TextBox>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td style="text-align:left">
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>
|
||||
Personal: <asp:HyperLink ID="HplP" runat="server" CssClass="Texto" Text='<%# Eval("RazonSocial")%>' NavigateUrl='<%# Eval("CvePersonal", "/RH/Personal.aspx?CvePersonal={0}")%>'></asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
Cuenta: <asp:HyperLink ID="HplC" runat="server" CssClass="Texto" Text='<%# Eval("Cuenta")%>' NavigateUrl='<%# Eval("CveCuenta", "/Bancos/CuentasBancariasDetalle.aspx?CveCuenta={0}")%>'></asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<%# Eval("TipoTransaccion")%> : <asp:HyperLink ID="HplTT" runat="server" CssClass="Texto" Text='<%# Eval("Folio")%>' NavigateUrl='<%# Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}")%>'></asp:HyperLink>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:GridView ID="GvPC" GridLines="None" CssClass="table table-hover table-advance Widthall" Width="100%" runat="server" ShowHeader="False" AutoGenerateColumns="False" OnRowDataBound="GvPC_RowDataBound" DataKeyNames="CveCompra,RazonSocial,TipoDocto,SerieFolio,Descripcion,SubTotal,Total,IVA,CveIE,Fecha,CveProveedor,Conta_AsientoContableComprasContado,IdCuentaGasto,RetIVA,RetISR,IdCtaContRetIVA,IdCtaContRetISR,IdCtaContProveedores,CveMonedaCompra,CompraIdPoliza">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:HiddenField ID="HdnTipoDocto" runat="server" Value='<%# Eval("TipoDocto")%>' />
|
||||
<asp:HiddenField ID="HdnCveCompra" runat="server" Value='<%# Eval("CveCompra")%>' />
|
||||
<asp:HiddenField ID="HdnCveIE" runat="server" Value='<%# Eval("CveIE")%>' />
|
||||
<asp:HiddenField ID="HdnActual" runat="server" />
|
||||
<asp:HiddenField ID="HdnIVA" runat="server" Value='<%# Eval("IVA")%>' />
|
||||
<asp:HiddenField ID="HdnRetIVA" runat="server" Value='<%# Eval("RetIVA")%>' />
|
||||
<asp:HiddenField ID="HdnRetISR" runat="server" Value='<%# Eval("RetISR")%>' />
|
||||
<asp:HiddenField ID="HdnSerie" runat="server" Value='<%# Eval("Serie")%>' />
|
||||
<asp:HiddenField ID="HdnFolio" runat="server" Value='<%# Eval("Folio")%>' />
|
||||
<asp:HiddenField ID="HdnSerieFolio" runat="server" Value='<%# Eval("SerieFolio")%>' />
|
||||
<asp:HiddenField ID="HdnSubTotalCompra" runat="server" Value='<%# Eval("SubTotal")%>' />
|
||||
<asp:HiddenField ID="HdnTotal" runat="server" Value='<%# Eval("Total")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContProveedores" runat="server" Value='<%# Eval("IdCtaContProveedores")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContAnticipos" runat="server" Value='<%# Eval("IdCtaContAnticipos")%>' />
|
||||
<asp:HiddenField ID="HdnCveProveedor" runat="server" Value='<%# Eval("CveProveedor")%>' />
|
||||
<asp:HiddenField ID="HdnRazonSocial" runat="server" Value='<%# Eval("RazonSocial")%>' />
|
||||
<asp:HiddenField ID="HdnRFC" runat="server" Value='<%# Eval("RFC")%>' />
|
||||
<asp:HiddenField ID="HdnIVAPagadoCompra" runat="server" Value='<%# Eval("IVAPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnImportePagadoCompra" runat="server" Value='<%# Eval("ImportePagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnRetIVAPagadoCompra" runat="server" Value='<%# Eval("RetIVAPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnRetISRPagadoCompra" runat="server" Value='<%# Eval("RetISRPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnTCFechaCompra" runat="server" Value='<%# Eval("TC_Compra")%>'/>
|
||||
<asp:HiddenField ID="HdnTC" runat="server" />
|
||||
<asp:HiddenField ID="HdnIdCtaContRetIVA" runat="server" Value='<%# Eval("IdCtaContRetIVA")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContRetISR" runat="server" Value='<%# Eval("IdCtaContRetISR")%>' />
|
||||
|
||||
<asp:HiddenField ID="HdnCompraIdPoliza" runat="server" Value='<%# Eval("CompraIdPoliza")%>' />
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" runat="server" id="TbCompra">
|
||||
<tr class="SubTotales">
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr style="height: 20px;">
|
||||
<td style="width: 25px;"></td>
|
||||
<td>
|
||||
<table width="100%" cellspacing="0" cellpadding="0" id="TbH" runat="server">
|
||||
<tr>
|
||||
<td style="width: 250px; display: none;"><asp:HyperLink ID="HplProv" runat="server" Visible="False" CssClass="Texto" Text='<%# Eval("RazonSocial")%>' NavigateUrl='<%# Eval("CveProveedor", "/Compras/Proveedores.aspx?CveProveedor={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 100px;">F: <a href='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}") %>' class="Texto"><%# Eval("SerieFolio")%></a></td>
|
||||
<td style="width: 100px;"> <%# Eval("Fecha", "{0:d}")%></td>
|
||||
<td style="width: 120px;">SubTotal: <asp:Label ID="LblSubTotal" runat="server" Text='<%# Eval("SubTotal", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 100px;">IVA: <%# Eval("IVA", "{0:N2}")%></td>
|
||||
<td style="width: 70px;">Ret.IVA: <asp:Label ID="LblRetIVA" runat="server" Text='<%# Eval("RetIVA", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 70px;">Ret.ISR: <asp:Label ID="LblRetISR" runat="server" Text='<%# Eval("RetISR", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 100px;">Total: <%# Eval("Total", "{0:N2}")%> <%# Eval("Abreviatura")%>
|
||||
<asp:Label ID="LblTC" runat="server" Font-Size="6pt" Font-Italic="True" Text='<%# If(UsuarioActual.CveEmpresa = 66, Eval("TC_Fluctuacion", "T.C. {0}"), Eval("TC_Compra", "T.C. {0}"))%>' Visible='<%# Eval("CveMonedaCompra").ToString = "2"%>'></asp:Label>
|
||||
<asp:TextBox ID="TxtTC" Width="25px" runat="server" Visible="False"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:GridView ID="GvD" runat="server" GridLines="None" CssClass="table table-hover table-advance Widthall" AutoGenerateColumns="False" OnRowDataBound="GvD_RowDataBound" ForeColor="Gray" DataKeyNames="PS,SubTotalPS,CveCompra,TipoDocto,SerieFolio,Descripcion,SubTotal,CveIE,Fecha,IdCuentaGasto">
|
||||
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS">
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Proyecto">
|
||||
<ItemTemplate>
|
||||
<%#String.Format("{0} - {1}", Eval("Proyecto"), Eval("SubProyecto")) %>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Clasificacion" ItemStyle-Width="100px" HeaderText="Clasificación" HeaderStyle-HorizontalAlign="Center">
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="120px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Importe($)">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitSubtotalPS" runat="server" Text='<%# Eval("SubTotalPS", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlM" runat="server" Width="80px">
|
||||
</asp:DropDownList>
|
||||
<div style='width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'><%# Eval("CuentaGasto") %></div>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="260px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<%-- <AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />--%>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel runat="server" ID="TabComp" HeaderText="Comprobaciones" >
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvComp" GridLines="None" CssClass="table table-hover table-advance Widthall" Width="100%" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="CveEmpresa,CvePrePoliza,CveCompra,CveMonedaCompra,Total,CvePlantillaPoliza,IdCuentaIVAxAcreditar,IdCuentaIVAAcreditable">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="Titulos">
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr style="height: 20px;">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" Visible="False" /></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<ul class="list-inline text-size-12 magindate">
|
||||
<li>
|
||||
Fecha:
|
||||
</li>
|
||||
<li>
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 150px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFecha" type="date" runat="server" Width="113px" Text='<%# Eval("Fecha", "{0:yyyy-MM-dd}") %>' required></asp:TextBox>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Tipo Póliza:
|
||||
<asp:DropDownList ID="DdlPolizaTipo" DataValueField="Id" DataTextField="Nombre" runat="server" CssClass="input-sm"></asp:DropDownList>
|
||||
</li>
|
||||
<li>
|
||||
Concepto:
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" Width="350px" Text='<%# Eval("RazonSocial", "Comprobación {0}")%>'></asp:TextBox>
|
||||
</li>
|
||||
<%-- <asp:Literal ID="LitImp" runat="server" Text='<%# Eval("IEImporte", "{0:N2}")%>'></asp:Literal>
|
||||
<asp:Literal ID="LitMonAbr" runat="server" Text='<%# Eval("Abreviatura")%>'></asp:Literal>
|
||||
<asp:Label ID="LblTC" runat="server" Text="TC:" Font-Size="6pt" Font-Italic="True" Visible='<%# Eval("CveMoneda").ToString = "2"%>'></asp:Label>
|
||||
<asp:TextBox ID="TxtTC" runat="server" Width="35px" Font-Size="6pt" Font-Italic="True" Text='<%# Eval("TC")%>' Visible='<%# Eval("CveMoneda").ToString = "2"%>'></asp:TextBox>--%>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<%--<tr><td style="text-align:left">
|
||||
Personal: <asp:HyperLink ID="HplP" runat="server" CssClass="Texto" Text='<%# Eval("RazonSocial")%>' NavigateUrl='<%# Eval("CvePersonal", "/RH/Personal.aspx?CvePersonal={0}")%>'></asp:HyperLink>
|
||||
Cuenta: <asp:HyperLink ID="HplC" runat="server" CssClass="Texto" Text='<%# Eval("Cuenta")%>' NavigateUrl='<%# Eval("CveCuenta", "/Bancos/CuentasBancariasDetalle.aspx?CveCuenta={0}")%>'></asp:HyperLink>
|
||||
<asp:Literal ID="LitTT" runat="server" Text='<%# Eval("TipoTransaccion")%>'></asp:Literal>: <asp:HyperLink ID="HplTT" runat="server" CssClass="Texto" Text='<%# Eval("Folio")%>' NavigateUrl='<%# Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}")%>'></asp:HyperLink>
|
||||
</td></tr>--%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:GridView ID="GvPC" GridLines="None" CssClass="table table-hover table-advance Widthall" Width="100%" runat="server" ShowHeader="False" AutoGenerateColumns="False" OnRowDataBound="GvPC_RowDataBound" DataKeyNames="CveCompra,RazonSocial,TipoDocto,SerieFolio,Descripcion,SubTotal,Total,IVA,Fecha,CveProveedor,Conta_AsientoContableComprasContado,IdCuentaGasto,RetIVA,RetISR,IdCtaContRetIVA,IdCtaContRetISR,IdCtaContProveedores,CveMonedaCompra,CompraIdPoliza">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:HiddenField ID="HdnTipoDocto" runat="server" Value='<%# Eval("TipoDocto")%>' />
|
||||
<asp:HiddenField ID="HdnCveCompra" runat="server" Value='<%# Eval("CveCompra")%>' />
|
||||
<%-- <asp:HiddenField ID="HdnCveIE" runat="server" Value='<%# Eval("CveIE")%>' />--%>
|
||||
<asp:HiddenField ID="HdnActual" runat="server" />
|
||||
<asp:HiddenField ID="HdnIVA" runat="server" Value='<%# Eval("IVA")%>' />
|
||||
<asp:HiddenField ID="HdnRetIVA" runat="server" Value='<%# Eval("RetIVA")%>' />
|
||||
<asp:HiddenField ID="HdnRetISR" runat="server" Value='<%# Eval("RetISR")%>' />
|
||||
<asp:HiddenField ID="HdnSerie" runat="server" Value='<%# Eval("Serie")%>' />
|
||||
<asp:HiddenField ID="HdnFolio" runat="server" Value='<%# Eval("Folio")%>' />
|
||||
<asp:HiddenField ID="HdnSerieFolio" runat="server" Value='<%# Eval("SerieFolio")%>' />
|
||||
<asp:HiddenField ID="HdnSubTotalCompra" runat="server" Value='<%# Eval("SubTotal")%>' />
|
||||
<asp:HiddenField ID="HdnTotal" runat="server" Value='<%# Eval("Total")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContProveedores" runat="server" Value='<%# Eval("IdCtaContProveedores")%>' />
|
||||
<asp:HiddenField ID="HdnCveProveedor" runat="server" Value='<%# Eval("CveProveedor")%>' />
|
||||
<asp:HiddenField ID="HdnRazonSocial" runat="server" Value='<%# Eval("RazonSocial")%>' />
|
||||
<asp:HiddenField ID="HdnRFC" runat="server" Value='<%# Eval("RFC")%>' />
|
||||
<%--<asp:HiddenField ID="HdnIVAPagadoCompra" runat="server" Value='<%# Eval("IVAPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnImportePagadoCompra" runat="server" Value='<%# Eval("ImportePagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnRetIVAPagadoCompra" runat="server" Value='<%# Eval("RetIVAPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnRetISRPagadoCompra" runat="server" Value='<%# Eval("RetISRPagadoCompra")%>' />--%>
|
||||
<asp:HiddenField ID="HdnTCFechaCompra" runat="server" Value='<%# Eval("TC_Compra")%>'/>
|
||||
<asp:HiddenField ID="HdnTC" runat="server"/>
|
||||
<asp:HiddenField ID="HdnIdCtaContRetIVA" runat="server" Value='<%# Eval("IdCtaContRetIVA")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContRetISR" runat="server" Value='<%# Eval("IdCtaContRetISR")%>' />
|
||||
|
||||
<asp:HiddenField ID="HdnCompraIdPoliza" runat="server" Value='<%# Eval("CompraIdPoliza")%>' />
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" runat="server" id="TbCompra">
|
||||
<tr class="SubTotales">
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr style="height: 20px;">
|
||||
<td style="width: 25px;"></td>
|
||||
<td>
|
||||
<table width="100%" cellspacing="0" cellpadding="0" id="TbH" runat="server">
|
||||
<tr>
|
||||
<td style="width: 250px; display: none;">
|
||||
<asp:HyperLink ID="HplProv" runat="server" Visible="False" CssClass="Texto" Text='<%# Eval("RazonSocial")%>' NavigateUrl='<%# Eval("CveProveedor", "/Compras/Proveedores.aspx?CveProveedor={0}") %>'></asp:HyperLink>
|
||||
</td>
|
||||
<td style="width: 100px;">F: <a href='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}") %>' class="Texto"><%# Eval("SerieFolio")%></a></td>
|
||||
<td style="width: 100px;"> <%# Eval("Fecha", "{0:d}")%> </td>
|
||||
<td style="width: 120px;">SubTotal: <asp:Label ID="LblSubTotal" runat="server" Text='<%# Eval("SubTotal", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 100px;">IVA: <%# Eval("IVA", "{0:N2}")%></td>
|
||||
<td style="width: 70px;">Ret.IVA: <asp:Label ID="LblRetIVA" runat="server" Text='<%# Eval("RetIVA", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 70px;">Ret.ISR: <asp:Label ID="LblRetISR" runat="server" Text='<%# Eval("RetISR", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 100px;">Total: <%# Eval("Total", "{0:N2}")%> <%# Eval("Abreviatura")%>
|
||||
<%-- <asp:Label ID="LblTC" runat="server" Font-Size="6pt" Font-Italic="True" Text='<%# If(UsuarioActual.CveEmpresa = 66, Eval("TC_Fluctuacion", "T.C. {0}"), Eval("TC_Compra", "T.C. {0}"))%>' Visible='<%# Eval("CveMonedaCompra").ToString = "2"%>'></asp:Label>
|
||||
<asp:TextBox ID="TxtTC" Width="25px" runat="server" Visible="False"></asp:TextBox>--%>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:GridView ID="GvD" runat="server" GridLines="None" CssClass="table table-hover table-advance Widthall" AutoGenerateColumns="False" OnRowDataBound="GvD_RowDataBound" ForeColor="Gray" DataKeyNames="PS,SubTotalPS,CveCompra,TipoDocto,SerieFolio,Descripcion,SubTotal,CveIE,Fecha,IdCuentaGasto">
|
||||
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS">
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Proyecto">
|
||||
<ItemTemplate>
|
||||
<%#String.Format("{0} - {1}", Eval("Proyecto"), Eval("SubProyecto")) %>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Clasificacion" ItemStyle-Width="100px" HeaderText="Clasificación" HeaderStyle-HorizontalAlign="Center">
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="120px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Importe($)">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitSubtotalPS" runat="server" Text='<%# Eval("SubTotalPS", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlM" runat="server" Width="80px">
|
||||
</asp:DropDownList>
|
||||
<div style='width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'><%# Eval("CuentaGasto") %></div>
|
||||
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="260px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />--%>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel runat="server" ID="TabNC" HeaderText="Notas de Crédito" >
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvNC" GridLines="None" CssClass="table table-hover table-advance Widthall" Width="100%" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="CveEmpresa,CvePrePoliza,CveCompra,CveMoneda,CveMonedaCompra,Total,CvePlantillaPoliza,IdCuentaIVAxAcreditar,IdCuentaIVAAcreditable,IdCtaContComplementaria,FechaFluctuacion,TipoCambioFluctuacion,CveProveedor">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="Titulos">
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr style="height: 20px;">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" Visible="False" /></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<ul class="list-inline text-size-12 magindate">
|
||||
<li>
|
||||
Fecha:
|
||||
</li>
|
||||
<li>
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 150px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFecha" type="date" runat="server" Width="113px" Text='<%# Eval("Fecha", "{0:yyyy-MM-dd}") %>' required></asp:TextBox>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Tipo Póliza:
|
||||
<asp:DropDownList ID="DdlPolizaTipo" DataValueField="Id" DataTextField="Nombre" runat="server" CssClass="input-sm"></asp:DropDownList>
|
||||
</li>
|
||||
<li>
|
||||
Concepto:
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" Width="350px" Text='<%# Eval("NombreComercial") %>' ></asp:TextBox>
|
||||
</li>
|
||||
<%-- <asp:Literal ID="LitImp" runat="server" Text='<%# Eval("IEImporte", "{0:N2}")%>'></asp:Literal>
|
||||
<asp:Literal ID="LitMonAbr" runat="server" Text='<%# Eval("Abreviatura")%>'></asp:Literal>--%>
|
||||
<asp:Label ID="LblTC" runat="server" Text="TC:" Font-Size="6pt" Font-Italic="True" Visible='<%# Eval("CveMoneda").ToString = "2"%>'></asp:Label>
|
||||
<asp:TextBox ID="TxtTC" runat="server" Width="35px" Font-Size="6pt" Font-Italic="True" Text='<%# Eval("TC")%>' Visible='<%# Eval("CveMoneda").ToString = "2"%>'></asp:TextBox>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td style="text-align:left">
|
||||
Nota Crédito: <asp:HyperLink ID="HplNC" runat="server" CssClass="Texto" Text='<%# Eval("NCSerieFolio")%>' NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}")%>'></asp:HyperLink>
|
||||
<asp:Literal ID="LitImporte" runat="server" Text='<%# Eval("Importe", "{0:N2}")%>'></asp:Literal>
|
||||
Factura: <asp:HyperLink ID="HplFac" runat="server" CssClass="Texto" Text='<%# Eval("FSerieFolio")%>' NavigateUrl='<%# Eval("CveCompraAmortizacion", "/Compras/Compras.aspx?CveCompra={0}")%>'></asp:HyperLink> </td></tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:GridView ID="GvPC" GridLines="None" CssClass="table table-hover table-advance Widthall" Width="100%" runat="server" ShowHeader="False" AutoGenerateColumns="False" OnRowDataBound="GvPC_RowDataBound" DataKeyNames="CveCompra,RazonSocial,TipoDocto,SerieFolio,Descripcion,SubTotal,Total,IVA,Fecha,CveProveedor,Conta_AsientoContableComprasContado,IdCuentaGasto,RetIVA,RetISR,IdCtaContRetIVA,IdCtaContRetISR,IdCtaContProveedores,CveMonedaCompra,CompraIdPoliza">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:HiddenField ID="HdnTipoDocto" runat="server" Value='<%# Eval("TipoDocto")%>' />
|
||||
<asp:HiddenField ID="HdnCveCompra" runat="server" Value='<%# Eval("CveCompra")%>' />
|
||||
<%-- <asp:HiddenField ID="HdnCveIE" runat="server" Value='<%# Eval("CveIE")%>' />--%>
|
||||
<asp:HiddenField ID="HdnActual" runat="server" />
|
||||
<asp:HiddenField ID="HdnIVA" runat="server" Value='<%# Eval("IVA")%>' />
|
||||
<asp:HiddenField ID="HdnRetIVA" runat="server" Value='<%# Eval("RetIVA")%>' />
|
||||
<asp:HiddenField ID="HdnRetISR" runat="server" Value='<%# Eval("RetISR")%>' />
|
||||
<asp:HiddenField ID="HdnSerie" runat="server" Value='<%# Eval("Serie")%>' />
|
||||
<asp:HiddenField ID="HdnFolio" runat="server" Value='<%# Eval("Folio")%>' />
|
||||
<asp:HiddenField ID="HdnSerieFolio" runat="server" Value='<%# Eval("SerieFolio")%>' />
|
||||
<asp:HiddenField ID="HdnSubTotalCompra" runat="server" Value='<%# Eval("SubTotal")%>' />
|
||||
<asp:HiddenField ID="HdnTotal" runat="server" Value='<%# Eval("Total")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContProveedores" runat="server" Value='<%# Eval("IdCtaContProveedores")%>' />
|
||||
<asp:HiddenField ID="HdnCveProveedor" runat="server" Value='<%# Eval("CveProveedor")%>' />
|
||||
<asp:HiddenField ID="HdnRazonSocial" runat="server" Value='<%# Eval("RazonSocial")%>' />
|
||||
<asp:HiddenField ID="HdnRFC" runat="server" Value='<%# Eval("RFC")%>' />
|
||||
<%--<asp:HiddenField ID="HdnIVAPagadoCompra" runat="server" Value='<%# Eval("IVAPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnImportePagadoCompra" runat="server" Value='<%# Eval("ImportePagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnRetIVAPagadoCompra" runat="server" Value='<%# Eval("RetIVAPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnRetISRPagadoCompra" runat="server" Value='<%# Eval("RetISRPagadoCompra")%>' />--%>
|
||||
<asp:HiddenField ID="HdnTCFechaCompra" runat="server" Value='<%# Eval("TC_Compra")%>'/>
|
||||
<asp:HiddenField ID="HdnTC" runat="server"/>
|
||||
<asp:HiddenField ID="HdnIdCtaContRetIVA" runat="server" Value='<%# Eval("IdCtaContRetIVA")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContRetISR" runat="server" Value='<%# Eval("IdCtaContRetISR")%>' />
|
||||
|
||||
<asp:HiddenField ID="HdnCompraIdPoliza" runat="server" Value='<%# Eval("CompraIdPoliza")%>' />
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" runat="server" id="TbCompra">
|
||||
<tr class="SubTotales">
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr style="height: 20px;">
|
||||
<td style="width: 25px;"></td>
|
||||
<td>
|
||||
<table width="100%" cellspacing="0" cellpadding="0" id="TbH" runat="server">
|
||||
<tr>
|
||||
<td style="width: 250px; display: none;">
|
||||
<asp:HyperLink ID="HplProv" runat="server" Visible="False" CssClass="Texto" Text='<%# Eval("RazonSocial")%>' NavigateUrl='<%# Eval("CveProveedor", "/Compras/Proveedores.aspx?CveProveedor={0}") %>'></asp:HyperLink>
|
||||
</td>
|
||||
<td style="width: 100px;">F: <a href='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}") %>' class="Texto"><%# Eval("SerieFolio")%></a></td>
|
||||
<td style="width: 100px;"> <%# Eval("Fecha", "{0:d}")%> </td>
|
||||
<td style="width: 120px;">SubTotal: <asp:Label ID="LblSubTotal" runat="server" Text='<%# Eval("SubTotal", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 100px;">IVA: <%# Eval("IVA", "{0:N2}")%></td>
|
||||
<td style="width: 70px;">Ret.IVA: <asp:Label ID="LblRetIVA" runat="server" Text='<%# Eval("RetIVA", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 70px;">Ret.ISR: <asp:Label ID="LblRetISR" runat="server" Text='<%# Eval("RetISR", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 100px;">Total: <%# Eval("Total", "{0:N2}")%> <%# Eval("Abreviatura")%>
|
||||
<%-- <asp:Label ID="LblTC" runat="server" Font-Size="6pt" Font-Italic="True" Text='<%# If(UsuarioActual.CveEmpresa = 66, Eval("TC_Fluctuacion", "T.C. {0}"), Eval("TC_Compra", "T.C. {0}"))%>' Visible='<%# Eval("CveMonedaCompra").ToString = "2"%>'></asp:Label>
|
||||
<asp:TextBox ID="TxtTC" Width="25px" runat="server" Visible="False"></asp:TextBox>--%>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:GridView ID="GvD" runat="server" GridLines="None" CssClass="table table-hover table-advance Widthall" AutoGenerateColumns="False" OnRowDataBound="GvD_RowDataBound" ForeColor="Gray" DataKeyNames="PS,SubTotalPS,CveCompra,TipoDocto,SerieFolio,Descripcion,SubTotal,CveIE,Fecha,IdCuentaGasto">
|
||||
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS">
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Proyecto">
|
||||
<ItemTemplate>
|
||||
<%#String.Format("{0} - {1}", Eval("Proyecto"), Eval("SubProyecto")) %>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Clasificacion" ItemStyle-Width="100px" HeaderText="Clasificación" HeaderStyle-HorizontalAlign="Center">
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="120px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Importe($)">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitSubtotalPS" runat="server" Text='<%# Eval("SubTotalPS", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlM" runat="server" Width="80px">
|
||||
</asp:DropDownList>
|
||||
<div style='width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'><%# Eval("CuentaGasto") %></div>
|
||||
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="260px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />--%>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" Runat="Server">
|
||||
<script>
|
||||
|
||||
var countChecked = function () {
|
||||
|
||||
var n = $(" input[name*=TabCompras]:checked").length;
|
||||
debugger;
|
||||
$get("LbSelC").innerText = (n + (n === 1 ? " Seleccionado" : " Seleccionados"));
|
||||
};
|
||||
|
||||
function pageLoad() {
|
||||
$("input[type=checkbox]").on("click", countChecked);
|
||||
|
||||
<%-- $(document).ready(function () {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 300;
|
||||
$('#<%=GvEE.ClientID%>').gridviewScroll({
|
||||
width: 990,
|
||||
height: Alto
|
||||
});
|
||||
});--%>
|
||||
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
1786
Contabilidad/DiarioAmortizaciones.aspx.vb
Normal file
1786
Contabilidad/DiarioAmortizaciones.aspx.vb
Normal file
File diff suppressed because it is too large
Load Diff
349
Contabilidad/DiarioCompras.aspx
Normal file
349
Contabilidad/DiarioCompras.aspx
Normal file
@@ -0,0 +1,349 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="DiarioCompras.aspx.vb" Inherits="Contabilidad_DiarioCompras" %>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="Css" runat="server">
|
||||
<style>
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td align="center" style="width: 55px">
|
||||
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:ImageButton ID="ImgCFDiMasivo" ImageUrl="/Imagenes/ListaActualizar.jpg" runat="server" Width="18px" Height="18px" ToolTip="Validación Masiva de CFDi" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Diario de Compras
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPPFiltros" 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-primary" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Proveedor:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlProveedores" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<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: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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="CalendarExtender1" TargetControlID="txtFechaI" PopupButtonID="ImgCalendarioI" 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>
|
||||
<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="txtFechaF" runat="server" CssClass="form-control" Width="99%" 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>
|
||||
<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>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<asp:Panel ID="PnlPoliza" runat="server" Visible="true">
|
||||
<asp:UpdatePanel ID="UPPPoliza" runat="server" UpdateMode="Conditional"> <ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-8 labelpadding" style="max-width:700px;">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Fecha:</label>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" >
|
||||
<asp:TextBox ID="TxtFecha" 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>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaC" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFecha" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaC" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha de Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaC" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha de Pago''</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="VCERFVFC" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECVFC" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6" runat="server" id="TbTipoCambio" visible="False">
|
||||
<div class="row">
|
||||
<label class="col-md-4">Tipo Cambio:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtTC" CssClass="form-control input-sm" onblur="$get('ImgTC').style.display='';" runat="server" Width="45px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="ImgTC" Style="display: none;" Height="16px" ClientIDMode="Static" ImageUrl="/Imagenes/accept.png"></asp:ImageButton>
|
||||
<asp:HiddenField ID="HdnTC" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2">Tipo de Póliza:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlPolizaTipo" CssClass="form-control input-sm" DataValueField="Id" DataTextField="Nombre" runat="server"></asp:DropDownList></td>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2">Concepto:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:TextBox ID="TxtDescripcion" CssClass="form-control input-sm" runat="server" Text="" Width="350px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" Display="None" ErrorMessage="El campo <b>''Concepto''</b> es necesario, por favor ingréselo)." ValidationGroup="GrpGuardar" ControlToValidate="TxtDescripcion"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2"></label>
|
||||
<div class="col-md-10"><asp:Button ID="BtnContabilizar" CssClass="btn btn-primary" runat="server" Text="Contabilizar" ValidationGroup="GrpGuardar" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate></asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Panel>
|
||||
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer runat="server" ID="Tabs">
|
||||
<ajax:TabPanel runat="server" ID="TabCompras" HeaderText="Compras">
|
||||
<ContentTemplate>
|
||||
<asp:Label ID="LblTotComp" Font-Bold="True" runat="server" Text=""></asp:Label> <asp:Label ID="LbSelC" Font-Italic="True" ClientIDMode="Static" runat="server" Text=""></asp:Label>
|
||||
<asp:GridView ID="Gv" GridLines="None" Visible="true" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han encontrado Facturas." DataKeyNames="CveCompra,RazonSocial,TipoDocto,SerieFolio,Descripcion,SubTotal,Total,IVA,Contado,IdCtaContProveedores,IdCtaContBancos,IdCuentaIVAxAcreditar,IdCuentaIVAAcreditable,Fecha,CveProveedor,Conta_AsientoContableComprasContado,IdCuentaGasto, RetIVA,RetISR,IdCtaContRetIVA,IdCtaContRetISR,CveMoneda,TC,IdCtaContComplementaria,ValidacionFactura">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="">
|
||||
|
||||
<tr class="SubTotales" style="height: 20px;">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" Visible="False" /></td>
|
||||
<td style="width: 250px;">
|
||||
<asp:HyperLink ID="HplProv" runat="server" CssClass="Texto" Text='<%# Eval("RazonSocial")%>' NavigateUrl='<%# Eval("CveProveedor","/Compras/Proveedores.aspx?CveProveedor={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 100px;">F.<asp:HyperLink ID="HplFact" runat="server" Text='<%# Eval("SerieFolio")%>' NavigateUrl='<%# Eval("CveCompra","/Compras/Compras.aspx?CveCompra={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 100px;"> <asp:Literal ID="LitFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal></td>
|
||||
<td style="width: 120px;">SubTotal: <asp:Label ID="LblSubTotal" runat="server" Text='<%# Eval("SubTotal", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 100px;">IVA: <asp:Label ID="LblIVA" runat="server" Text='<%# Eval("IVA", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 70px;">Ret.IVA: <asp:Label ID="LblRetIVA" runat="server" Text='<%# Eval("RetIVA", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 70px;">Ret.ISR: <asp:Literal ID="LitRetISR" runat="server" Text='<%# Eval("RetISR", "{0:N2}")%>'></asp:Literal></td>
|
||||
<td style="width: 100px;">Total: <asp:Label ID="LblTotal" runat="server" Text='<%# Eval("Total", "{0:N2}")%>'></asp:Label><asp:Literal ID="LitMoneda" runat="server" Text='<%# Eval("Abreviatura")%>'></asp:Literal>
|
||||
<asp:Label ID="LblTC" runat="server" Font-Size="6pt" Font-Italic="True" Text='<%# Eval("TC", "T.C. {0}")%>' Visible='<%# Eval("CveMoneda").ToString = "2"%>'></asp:Label><asp:TextBox ID="TxtTC" Width="25px" runat="server" Visible="False"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:GridView ID="GvD" runat="server" GridLines="None" CssClass="table table-hover table-advance Widthall" AutoGenerateColumns="False" OnRowDataBound="GvDetalle_RowDataBound" ForeColor="Gray" DataKeyNames="PS,SubTotalPS,CveCompra,TipoDocto,SerieFolio,Descripcion,SubTotal,Contado,IdCtaContProveedores,Fecha,IdCuentaGasto">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Producto">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitPS" runat="server" Text='<%# Bind("PS") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Proyecto">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" ID="Literal1" Text='<%# string.Format("{0} - {1}",Eval("Proyecto"),Eval("SubProyecto")) %>'>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Clasificacion" ItemStyle-Width="100px" HeaderText="Clasificación" HeaderStyle-HorizontalAlign="Center">
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="120px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Importe($)">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitSubtotalPS" runat="server" Text='<%# Bind("SubTotalPS", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitProyecto" runat="server" Text='<%# string.Format("{0} - {1}",Eval("Proyecto"),Eval("SubProyecto")) %>'>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlM" runat="server" Width="80px">
|
||||
</asp:DropDownList>
|
||||
<asp:Literal ID="LitCta" runat="server" Text=""></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="260px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel runat="server" ID="TabFyE" HeaderText="F y E">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UpFye" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Label ID="LblTotFyE" Font-Bold="True" runat="server" Text=""></asp:Label> <asp:Label ID="LblSelFyE" Font-Italic="True" ClientIDMode="Static" runat="server" Text=""></asp:Label>
|
||||
<asp:GridView ID="GvFyE" GridLines="None" CssClass="table table-hover table-advance Widthall" Visible="true" Width="975px" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han encontrado Facturas." DataKeyNames="CveCompra,RazonSocial,TipoDocto,SerieFolio,Descripcion,SubTotal,Total,IVA,Contado,IdCtaContProveedores,IdCtaContBancos,IdCuentaIVAxAcreditar,IdCuentaIVAAcreditable,Fecha,CveProveedor,Conta_AsientoContableComprasContado,IdCuentaGasto, RetIVA,RetISR,IdCtaContRetIVA,IdCtaContRetISR,CveMoneda,ValidacionFactura">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="">
|
||||
|
||||
<tr class="SubTotales" style="height: 20px;">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" Visible="False" /></td>
|
||||
<td style="width: 250px; text-align: left;">Per:<asp:HyperLink ID="HplPer" runat="server" Text='<%# Eval("Personal")%>' CssClass="Texto" NavigateUrl='<%# Eval("CvePersonal","/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink>
|
||||
<hr />
|
||||
Prov:<asp:HyperLink ID="HplProv" runat="server" CssClass="Texto" Text='<%# Eval("RazonSocial")%>' NavigateUrl='<%# Eval("CveProveedor","/Compras/Proveedor.aspx?CveProveedor={0}") %>'></asp:HyperLink>
|
||||
</td>
|
||||
<td style="width: 100px;">F: <asp:HyperLink ID="HplFact" runat="server" Text='<%# Eval("SerieFolio")%>' NavigateUrl='<%# Eval("CveCompra","/Compras/Compras.aspx?CveCompra={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 100px;"> <asp:Literal ID="LitFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal></td>
|
||||
<td style="width: 120px;">SubTotal: <asp:Label ID="LblSubTotal" runat="server" Text='<%# Eval("SubTotal", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 100px;">IVA: <asp:Label ID="LblIVA" runat="server" Text='<%# Eval("IVA", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 70px;">Ret.IVA: <asp:Label ID="LblRetIVA" runat="server" Text='<%# Eval("RetIVA", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 70px;">Ret.ISR: <asp:Literal ID="LitRetISR" runat="server" Text='<%# Eval("RetISR", "{0:N2}")%>'></asp:Literal></td>
|
||||
<td style="width: 100px;">Total: <asp:Label ID="LblTotal" runat="server" Text='<%# Eval("Total", "{0:N2}")%>'></asp:Label><asp:Literal ID="LitMoneda" runat="server" Text='<%# Eval("Abreviatura")%>'></asp:Literal>
|
||||
|
||||
<asp:Label ID="LblTC" runat="server" Text="T.C." Visible="False"></asp:Label><asp:TextBox ID="TxtTC" Width="25px" runat="server" Visible="False"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:GridView ID="GvD" runat="server" GridLines="None" CssClass="table table-hover table-advance Widthall" AutoGenerateColumns="False" OnRowDataBound="GvDetalle_RowDataBound" ForeColor="Gray" DataKeyNames="PS,SubTotalPS,CveCompra,TipoDocto,SerieFolio,Descripcion,SubTotal,Contado,IdCtaContProveedores,Fecha,IdCuentaGasto">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Producto">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitPS" runat="server" Text='<%# Bind("PS") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Proyecto">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" ID="Literal1" Text='<%# string.Format("{0} - {1}",Eval("Proyecto"),Eval("SubProyecto")) %>'>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Clasificacion" ItemStyle-Width="100px" HeaderText="Clasificación" HeaderStyle-HorizontalAlign="Center">
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="120px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Importe($)">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitSubtotalPS" runat="server" Text='<%# Bind("SubTotalPS", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitProyecto" runat="server" Text='<%# string.Format("{0} - {1}",Eval("Proyecto"),Eval("SubProyecto")) %>'>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlM" runat="server" Width="80px">
|
||||
</asp:DropDownList>
|
||||
<asp:Literal ID="LitCta" runat="server" Text=""></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="260px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="JS" runat="server">
|
||||
<script type="text/javascript" >
|
||||
|
||||
var countChecked = function () {
|
||||
|
||||
var n = $(" input[name*=TabCompras]:checked").length;
|
||||
debugger;
|
||||
$get("LbSelC").innerText = (n + (n === 1 ? " Seleccionado" : " Seleccionados"));
|
||||
|
||||
var nF = $(" input[name*=TabFyE]:checked").length;
|
||||
debugger;
|
||||
$get("LblSelFyE").innerText = (nF + (nF === 1 ? " Seleccionado" : " Seleccionados"));
|
||||
};
|
||||
|
||||
function pageLoad() {
|
||||
$("input[type=checkbox]").on("click", countChecked);
|
||||
|
||||
$(document).ready(function () {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 300;
|
||||
$('#<%=Gv.ClientID%>').gridviewScroll({
|
||||
width: 990,
|
||||
height: Alto
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
647
Contabilidad/DiarioCompras.aspx.vb
Normal file
647
Contabilidad/DiarioCompras.aspx.vb
Normal file
@@ -0,0 +1,647 @@
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.Web.Services
|
||||
Imports System.Xml
|
||||
|
||||
Partial Class Contabilidad_DiarioCompras
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
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 DtDatosFyE As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtDatosFyE"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatosFyE") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
TxtFecha.Text = Today.ToShortDateString
|
||||
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
DdlProveedores.DataBind()
|
||||
|
||||
txtFechaI.Text = Now.AddMonths(0).FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
|
||||
If UsuarioActual.Sesion("DiarioCompras-CveProveedor").ToString <> "" Then DdlProveedores.SelectedValue = UsuarioActual.Sesion("DiarioCompras-CveProveedor").ToString.Trim
|
||||
If UsuarioActual.Sesion("DiarioCompras-FI").ToString <> "" Then txtFechaI.Text = UsuarioActual.Sesion("DiarioCompras-FI").ToString.Trim
|
||||
If UsuarioActual.Sesion("DiarioCompras-FF").ToString <> "" Then txtFechaF.Text = UsuarioActual.Sesion("DiarioCompras-FF").ToString.Trim
|
||||
|
||||
|
||||
CargaDatos()
|
||||
|
||||
'Dim wsTC As New wsTipoCambio.DgieWSPortClient
|
||||
|
||||
'Dim StrTC As String = wsTC.tiposDeCambioBanxico
|
||||
'Dim XMLDoc As New XmlDocument
|
||||
'Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
|
||||
|
||||
'XMLDoc.Load(StrTC)
|
||||
'Dim nodo As XmlNode = XMLDoc.DocumentElement
|
||||
'XMLDoc.SelectSingleNode(String.Format("//{0}:DataSet", "bm"), namespaces)
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim Conta As New ClsContabilidad
|
||||
If Conta.GetDiarioCompras(DdlProveedores.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, 1, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
DtDatos = Conta.DtResultados
|
||||
|
||||
|
||||
'Conta.GetConta_TiposPoliza()
|
||||
|
||||
Dim Cc As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If Cc.GetTiposPoliza(-1, "-1") Then
|
||||
DdlPolizaTipo.DataSource = Cc.DtResultados
|
||||
DdlPolizaTipo.DataBind()
|
||||
End If
|
||||
'busco si se ocupa el tipo de cambio
|
||||
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
DdlPolizaTipo.SelectedValue = "3"
|
||||
|
||||
End If
|
||||
|
||||
If DtDatos.FiltraParametros("CveMoneda <> 1").Rows.Count > 0 Then
|
||||
'hay movimientos que son diferentes a pesos
|
||||
TbTipoCambio.Visible = True
|
||||
TxtTC.Text = Cc.getTipoCambio(Today).ToString
|
||||
TxtFecha.AutoPostBack = True
|
||||
If TxtTC.Text.ToDouble > 0 Then TxtTC.Enabled = False Else TxtTC.Text = ""
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Cc.Dispose()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If Conta.GetDiarioCompras(DdlProveedores.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, 2, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
DtDatosFyE = Conta.DtResultados
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Conta.Dispose()
|
||||
|
||||
|
||||
|
||||
CargaGrid()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaGrid()
|
||||
'hago un filtro, primero muestro lo encabezados de las facturas y dentro del grid filtro los detalles de cada factura
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
Dim dtt As DataTable = DtDatos.FiltraParametros("CvePS = -1")
|
||||
|
||||
LblTotComp.Text = String.Format("{0} Registros", DtDatos.COUNT("CvePS", "CvePS = -1"))
|
||||
Gv.DataSource = dtt
|
||||
Gv.DataBind()
|
||||
|
||||
'hago un filtro, primero muestro lo encabezados de las facturas y dentro del grid filtro los detalles de cada factura
|
||||
dtt = DtDatosFyE.FiltraParametros("CvePS = -1")
|
||||
LblTotFyE.Text = String.Format("{0} Registros", DtDatosFyE.COUNT("CvePS", "CvePS = -1"))
|
||||
GvFyE.DataSource = dtt
|
||||
GvFyE.DataBind()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
UPPDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub Gv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles Gv.RowDataBound, GvFyE.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim Grid As String = DirectCast(sender, GridView).ID
|
||||
|
||||
If e.Row.DBCampo("IdCtaContProveedores").ToEntero = 0 Then
|
||||
'falta vicularse el proveedor
|
||||
e.Row.FCHyperLink("HplProv").ForeColor = Drawing.Color.OrangeRed
|
||||
e.Row.FCHyperLink("HplProv").ToolTip = "Falta vincular la cuenta contable"
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("CveMoneda") = "2" AndAlso e.Row.DBCampo("IdCtaContComplementaria").ToEntero = 0 Then
|
||||
' 'falta vicularse al proveedor la cuenta contable
|
||||
' e.Row.FCHyperLink("HplProv").ForeColor = Drawing.Color.OrangeRed
|
||||
' e.Row.FCHyperLink("HplProv").ToolTip = "Falta vincular la cuenta contable complementaria"
|
||||
'End If
|
||||
|
||||
|
||||
If e.Row.DBCampo("IdCuentaIVAxAcreditar").ToEntero = 0 Then
|
||||
'falta vicularse el proveedor
|
||||
e.Row.FCLabel("LblIVA").ForeColor = Drawing.Color.OrangeRed
|
||||
e.Row.FCLabel("LblIVA").ToolTip = "Falta vincular la cuenta contable"
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("RetIVA").ToDouble > 0 AndAlso e.Row.DBCampo("IdCtaContRetIVA").ToEntero = 0 Then
|
||||
e.Row.FCLabel("LblRetIVA").ForeColor = Drawing.Color.OrangeRed
|
||||
e.Row.FCLabel("LblRetIVA").ToolTip = "Falta vincular la cuenta contable a la Retencion de IVA"
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'validaci[on para que sea active el chkbox
|
||||
If e.Row.DBCampo("FacturasSinCuenta") = "0" AndAlso
|
||||
(e.Row.DBCampo("IVA").ToDouble <= 0 OrElse (e.Row.DBCampo("IVA").ToDouble > 0 AndAlso e.Row.DBCampo("IdCuentaIVAxAcreditar").ToEntero > 0)) AndAlso
|
||||
(e.Row.DBCampo("RetIVA").ToDouble <= 0 OrElse (e.Row.DBCampo("RetIVA").ToDouble > 0 AndAlso e.Row.DBCampo("IdCtaContRetIVA").ToEntero > 0)) AndAlso
|
||||
(e.Row.DBCampo("RetISR").ToDouble <= 0 OrElse (e.Row.DBCampo("RetISR").ToDouble > 0 AndAlso e.Row.DBCampo("IdCtaContRetISR").ToEntero > 0)) Then
|
||||
'si la factura fue a credito, que no tiene cveie, checo si está cargada la cuenta contable del proveedor para afectarla
|
||||
If e.Row.DBCampo("Contado").ToEntero = 0 Then
|
||||
If e.Row.DBCampo("IdCtaContProveedores").ToEntero > 0 Then
|
||||
e.Row.FCCheckBox("Chk").Visible = True
|
||||
|
||||
End If
|
||||
Else
|
||||
If e.Row.DBCampo("IdCtaContBancos").ToEntero > 0 Then
|
||||
e.Row.FCCheckBox("Chk").Visible = True
|
||||
Else
|
||||
|
||||
If Grid = "GvFyE" Then
|
||||
e.Row.FCHyperLink("HplPer").ToolTip = String.Format("No se tiene vinculada la cuenta del personal ({0})", e.Row.DBCampo("Personal"))
|
||||
e.Row.FCHyperLink("HplPer").ForeColor = Drawing.Color.OrangeRed
|
||||
Else
|
||||
e.Row.FCLabel("LblTotal").ForeColor = Drawing.Color.OrangeRed
|
||||
e.Row.FCLabel("LblTotal").ToolTip = "No se tiene vinculada la cuenta bancaria"
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
'si fue la compra en un solo pago, no credito
|
||||
If e.Row.DBCampo("Contado").ToEntero > 0 AndAlso 1 = 2 Then
|
||||
e.Row.FCCheckBox("Chk").Visible = True
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CveMoneda") = "2" AndAlso e.Row.DBCampo("TC").ToDecimal = 0 Then
|
||||
' 'falta vicularse al proveedor la cuenta contable
|
||||
e.Row.FCLabel("LblTC").ForeColor = Drawing.Color.OrangeRed
|
||||
e.Row.FCLabel("LblTC").Text = "S/TC"
|
||||
e.Row.FCCheckBox("Chk").Visible = False
|
||||
End If
|
||||
|
||||
|
||||
If Math.Abs(e.Row.DBCampo("SubTotal").ToDouble - e.Row.DBCampo("Descuentos").ToDouble - e.Row.DBCampo("SubTotalPS").ToDouble) > 0.01 Then
|
||||
e.Row.FCLabel("LblSubTotal").ForeColor = Drawing.Color.Red
|
||||
e.Row.FCLabel("LblSubTotal").ToolTip = String.Format("Factura: {0} - Productos:{1}", e.Row.DBCampo("SubTotal").ToDouble.FormatoNumero, e.Row.DBCampo("SubTotalPS").ToDouble.FormatoNumero)
|
||||
e.Row.FCCheckBox("Chk").Visible = False
|
||||
End If
|
||||
|
||||
Dim gv As GridView = e.Row.FCGridView("GvD")
|
||||
|
||||
|
||||
Dim dttf As DataTable
|
||||
|
||||
If Grid = "Gv" Then
|
||||
dttf = DtDatos
|
||||
Else
|
||||
dttf = DtDatosFyE
|
||||
End If
|
||||
|
||||
Dim dtt As DataTable = dttf.FiltraParametros(String.Format("CveCompra = {0} AND CvePS <> -1", e.Row.DBCampo("CveCompra")))
|
||||
|
||||
gv.DataSource = dtt
|
||||
gv.DataBind()
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<WebMethod()> <Script.Services.ScriptMethodAttribute()> _
|
||||
Public Shared Function wsCuentaNombre(ByVal contextKey As System.String) As System.String
|
||||
Dim Retorno As String = ""
|
||||
|
||||
If contextKey.ToEntero > 0 Then
|
||||
|
||||
Retorno = String.Format("---{0}---", contextKey.ToDouble.Texto2Letras)
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Protected Sub GvDetalle_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
If e.Row.DBCampo("IdCuentaGasto").ToEntero > 0 Then e.Row.FCDropDownList("DdlM").Items.Add(New ListItem("Gasto", e.Row.DBCampo("IdCuentaGasto")))
|
||||
' If e.Row.DBCampo("IdCuentaAnticipo").ToEntero > 0 Then e.Row.FCDropDownList("DdlM").Items.Add(New ListItem("Anticipo", e.Row.DBCampo("IdCuentaAnticipo")))
|
||||
'If e.Row.DBCampo("IdCuentaInventario").ToEntero > 0 Then e.Row.FCDropDownList("DdlM").Items.Add(New ListItem("Inventario", e.Row.DBCampo("IdCuentaInventario")))
|
||||
e.Row.FCLiteral("LitCta").Text = String.Format("<div style='width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>{0}</div>", e.Row.DBCampo("CuentaGasto"))
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnContabilizar_Click(sender As Object, e As EventArgs) Handles BtnContabilizar.Click
|
||||
|
||||
Dim Total As Decimal = 0 '(From gvr As GridViewRow In Gv.Rows Where gvr.FCCheckBox("Chk").Checked).Sum(Function(gvr) gvr.DataKey("Total").ToDouble + gvr.DataKey("RetIVA").ToDouble + gvr.DataKey("RetISR").ToDouble)
|
||||
Dim MultNC As Integer
|
||||
Dim TipoCambio As Decimal
|
||||
Dim Contador As Integer = 0
|
||||
Dim ContadorME As Integer = 0
|
||||
Dim EsPersonal As Boolean = False
|
||||
|
||||
Dim GvT As GridView = Gv
|
||||
|
||||
If Tabs.ActiveTabIndex = 1 Then
|
||||
GvT = GvFyE
|
||||
EsPersonal = True
|
||||
End If
|
||||
|
||||
|
||||
For Each gvr As GridViewRow In GvT.Rows
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
Contador += 1
|
||||
If gvr.DataKey("CveMoneda") <> "1" AndAlso gvr.DataKey("IdCtaContComplementaria").ToEntero > 0 Then
|
||||
TipoCambio = TxtTC.Text.ToDouble : ContadorME += 1
|
||||
Else : TipoCambio = 1
|
||||
End If
|
||||
If gvr.DataKey("TipoDocto") = "NC" Then MultNC = -1 Else MultNC = 1
|
||||
Total += (gvr.DataKey("Total").ToDouble + gvr.DataKey("RetIVA").ToDecimal + gvr.DataKey("RetISR").ToDecimal) * TipoCambio * MultNC
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If ContadorME > 0 AndAlso TxtTC.Text.ToDouble <= 0 Then
|
||||
Alert("Ingrese un tipo de cambio.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Dim TipoMovto As Boolean = False
|
||||
If Contador > 0 Then
|
||||
Dim Conta As ClsContPAQi = Nothing
|
||||
Dim Compra As ClsCompras = Nothing
|
||||
Dim IDPoliza As Integer = 0
|
||||
Dim CuentaAfectable As Integer
|
||||
Dim NumPoliza As String
|
||||
Dim Concepto As String
|
||||
Dim ConceptoDetalle As String
|
||||
Dim Cargos As Decimal
|
||||
Dim TipoPoliza As String = ""
|
||||
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
TipoPoliza = "1-000"
|
||||
End If
|
||||
|
||||
Dim MonExt As Boolean
|
||||
|
||||
Dim MsgError As String = ""
|
||||
Try
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
Conta = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Compra = New ClsCompras()
|
||||
Conta.IniciaTransacSQL()
|
||||
Compra.IniciaTransacSQL()
|
||||
IDPoliza = Conta.AddPoliza(DdlPolizaTipo.SelectedValue.ToEntero, TxtDescripcion.Text, Total, Total, UsuarioActual.CveUsuario, TxtFecha.Text.ToDate, pTipo:=TipoPoliza)
|
||||
NumPoliza = Conta.DtResultados.FiltroPrimero("")("Folio").ToString
|
||||
'inserto la póliza
|
||||
If IDPoliza = 0 Then
|
||||
MsgError = "No se pudo insertar la póliza contable."
|
||||
Else
|
||||
For Each gvr As GridViewRow In GvT.Rows
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
|
||||
'si es otra diferente al peso y sino tiene cuenta complementaria, entonces hace el calculo por el tipo de cambio
|
||||
If gvr.DataKey("CveMoneda") <> "1" Then
|
||||
TipoCambio = gvr.DataKey("TC").ToDecimal 'TxtTC.Text.ToDouble
|
||||
MonExt = True
|
||||
Else
|
||||
TipoCambio = 1
|
||||
MonExt = False
|
||||
End If
|
||||
|
||||
Cargos = 0
|
||||
|
||||
If gvr.DataKey("TipoDocto") = "NC" Then
|
||||
|
||||
If UsuarioActual.Empresa.ContaContabilizacionNC <> 0 Then
|
||||
'cuando el movimiento de las nc, sea <> cero, quiero decir que solo convertimos a negativos los valores
|
||||
MultNC = -1
|
||||
Else
|
||||
'cuando sea 0. los cargos se convierten en abonos y viceversa, pero los importes son positivos
|
||||
MultNC = 1
|
||||
TipoMovto = True
|
||||
End If
|
||||
|
||||
Else
|
||||
MultNC = 1
|
||||
TipoMovto = False
|
||||
End If 'cuando es NC, se registran en negativos todos los valores
|
||||
|
||||
'Registro los movimientos de la compra
|
||||
Dim GvDetalle As GridView = gvr.FCGridView("GVD")
|
||||
|
||||
If GvDetalle IsNot Nothing Then
|
||||
For Each gvrr As GridViewRow In GvDetalle.Rows
|
||||
ConceptoDetalle = gvr.DataKey("RazonSocial") ' gvrr.FCLiteral("LitPS").Text
|
||||
Cargos += Math.Round(gvrr.FCLiteral("LitSubTotalPS").Text.ToDecimal * TipoCambio * MultNC, 2)
|
||||
If Not Conta.AddMovimiento(IDPoliza, gvrr.FCDropDownList("DdlM").SelectedValue.ToEntero, TipoMovto, Math.Round(gvrr.FCLiteral("LitSubTotalPS").Text.ToDecimal * TipoCambio * MultNC, 2), gvr.DataKey("SerieFolio"), ConceptoDetalle, 0, TxtFecha.Text.ToDate, gvr.DataKey("CveCompra").ContaReferencia(TipoContaReferencia.Compra), If(MonExt, gvrr.FCLiteral("LitSubTotalPS").Text.ToDouble, 0.0) * MultNC) Then
|
||||
MsgError = "No se pudo insertar movimiento contable"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
Dim IdCtaContProveedoresMoneda As Integer = gvr.DataKey("IdCtaContProveedores").ToEntero
|
||||
|
||||
If MsgError = "" Then
|
||||
|
||||
|
||||
If gvr.DataKey("IVA").ToDecimal > 0 Then
|
||||
'INSERTO EL IVA DE LA FACTURA
|
||||
ConceptoDetalle = gvr.DataKey("RazonSocial")
|
||||
Dim CveIVA As Integer = gvr.DataKey("IdCuentaIVAxAcreditar").ToEntero
|
||||
If gvr.DataKey("Contado").ToEntero = 1 Then
|
||||
CveIVA = gvr.DataKey("IdCuentaIVAAcreditable").ToEntero
|
||||
End If
|
||||
Cargos += Math.Round(gvr.DataKey("IVA").ToDecimal * TipoCambio * MultNC, 2)
|
||||
If Not Conta.AddMovimiento(IDPoliza, CveIVA, TipoMovto, Math.Round(gvr.DataKey("IVA").ToDecimal * TipoCambio * MultNC, 2), gvr.DataKey("SerieFolio"), ConceptoDetalle, 0, TxtFecha.Text.ToDate, gvr.DataKey("CveCompra").ContaReferencia(TipoContaReferencia.Compra), If(MonExt, gvr.DataKey("IVA").ToDouble, 0.0) * MultNC) Then
|
||||
MsgError = "No se pudo insertar movimiento contable"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If MsgError <> "" Then Exit For
|
||||
|
||||
If gvr.DataKey("RetIVA").ToDecimal > 0 Then
|
||||
'INSERTO LA RETENCION DE IVA DE LA FACTURA
|
||||
ConceptoDetalle = gvr.DataKey("RazonSocial")
|
||||
If Not Conta.AddMovimiento(IDPoliza, gvr.DataKey("IdCtaContRetIVA").ToEntero, Not TipoMovto, gvr.DataKey("RetIVA").ToDouble * TipoCambio * MultNC, gvr.DataKey("SerieFolio"), ConceptoDetalle, 0, TxtFecha.Text.ToDate, gvr.DataKey("CveCompra").ContaReferencia(TipoContaReferencia.Compra), If(MonExt, gvr.DataKey("RetIVA").ToDouble, 0.0) * MultNC) Then
|
||||
MsgError = "No se pudo insertar movimiento contable"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If MsgError <> "" Then Exit For
|
||||
|
||||
If gvr.DataKey("RetISR").ToDouble > 0 Then
|
||||
'INSERTO LA RETENCION DE ISR DE LA FACTURA
|
||||
ConceptoDetalle = gvr.DataKey("RazonSocial")
|
||||
If Not Conta.AddMovimiento(IDPoliza, gvr.DataKey("IdCtaContRetISR").ToEntero, Not TipoMovto, gvr.DataKey("RetISR").ToDouble * TipoCambio * MultNC, gvr.DataKey("SerieFolio"), ConceptoDetalle, 0, TxtFecha.Text.ToDate, gvr.DataKey("CveCompra").ContaReferencia(TipoContaReferencia.Compra), If(MonExt, gvr.DataKey("RetISR").ToDouble, 0.0) * MultNC) Then
|
||||
MsgError = "No se pudo insertar movimiento contable"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If MsgError <> "" Then Exit For
|
||||
|
||||
Dim ImporteMovimiento As Double = gvr.DataKey("Total").ToDouble * TipoCambio * MultNC
|
||||
If gvr.DataKey("CveMoneda") = "2" AndAlso gvr.DataKey("IdCtaContComplementaria").ToEntero > 0 Then
|
||||
ImporteMovimiento = gvr.DataKey("Total").ToDouble * MultNC
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'VERIFICO SI LA CUENTA ES DE CREDITO O NO
|
||||
If gvr.DataKey("Contado").ToEntero = 0 Then
|
||||
CuentaAfectable = IdCtaContProveedoresMoneda
|
||||
Else
|
||||
CuentaAfectable = gvr.DataKey("IdCtaContBancos").ToEntero
|
||||
|
||||
|
||||
' SI LA EMPRESA TIENE HABILITADA LA OPCION, PARA INCLUIR LOS MOVIMIENTOS DEL PROVEEDOR EN COMPRAS DE CONTADO, Y ESTOS DOS MOIVMIENTOS SOLOS SE SALDAN
|
||||
If CBool(gvr.DataKey("Conta_AsientoContableComprasContado")) And Not EsPersonal Then
|
||||
|
||||
'INSERTO LOS MOVIMIENTOS DEL PROVEEDOR
|
||||
If Not Conta.AddMovimiento(IDPoliza, IdCtaContProveedoresMoneda, TipoMovto, ImporteMovimiento, gvr.DataKey("SerieFolio"), gvr.DataKey("SerieFolio"), 0, TxtFecha.Text.ToDate, gvr.DataKey("CveProveedor").ContaReferencia(TipoContaReferencia.Proveedor), If(MonExt, gvr.DataKey("Total").ToDouble, 0.0) * MultNC) Then
|
||||
MsgError = "No se pudo insertar movimiento contable"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Not Conta.AddMovimiento(IDPoliza, IdCtaContProveedoresMoneda, Not TipoMovto, ImporteMovimiento, gvr.DataKey("SerieFolio"), gvr.DataKey("SerieFolio"), 0, TxtFecha.Text.ToDate, gvr.DataKey("CveProveedor").ContaReferencia(TipoContaReferencia.Proveedor), If(MonExt, gvr.DataKey("Total").ToDouble, 0.0) * MultNC) Then
|
||||
MsgError = "No se pudo insertar movimiento contable"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
Concepto = gvr.DataKey("SerieFolio")
|
||||
|
||||
Dim TmpTotal As Double = Math.Round(ImporteMovimiento, 2)
|
||||
If gvr.DataKey("CveMoneda") <> "1" AndAlso gvr.DataKey("IdCtaContComplementaria").ToEntero = 0 Then
|
||||
Concepto = String.Format("{0} TC:{1} ${2}", gvr.DataKey("SerieFolio"), TipoCambio, gvr.DataKey("Total").ToDouble.FormatoNumero)
|
||||
'si hay un tipo de cambio, va a requerir un ajuste en la conversion
|
||||
If Math.Abs(Cargos - TmpTotal) > 0 Then
|
||||
TmpTotal = Cargos
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'INSERTO EN PROVEEDORES O BANCOS
|
||||
If Not Conta.AddMovimiento(IDPoliza, CuentaAfectable, Not TipoMovto, TmpTotal, gvr.DataKey("SerieFolio"), Concepto, 0, TxtFecha.Text.ToDate, gvr.DataKey("CveProveedor").ContaReferencia(TipoContaReferencia.Proveedor), If(MonExt, gvr.DataKey("Total").ToDouble, 0.0) * MultNC) Then
|
||||
MsgError = "No se pudo insertar movimiento contable"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'hago el movimiento de fluctuacion cambiaria
|
||||
If gvr.DataKey("CveMoneda") = "2" AndAlso gvr.DataKey("IdCtaContComplementaria").ToEntero > 0 Then
|
||||
Dim Dif As Decimal = Math.Round(gvr.DataKey("TC") * gvr.DataKey("Total").ToDecimal, 2)
|
||||
Concepto = String.Format("{0} TC:{1} ${2}", gvr.DataKey("SerieFolio"), TipoCambio, gvr.DataKey("Total").ToDouble.FormatoNumero)
|
||||
''si hay un tipo de cambio, va a requerir un ajuste en la conversion
|
||||
If Math.Abs(Math.Abs(Cargos) - Dif) > 0 AndAlso Math.Abs(Math.Abs(Cargos) - Dif) <= 0.02 Then
|
||||
Dif = Math.Abs(Cargos)
|
||||
End If
|
||||
Dif = (Dif - (gvr.DataKey("Total").ToDecimal)) * MultNC
|
||||
|
||||
If Not Conta.AddMovimiento(IDPoliza, gvr.DataKey("IdCtaContComplementaria").ToEntero, Not TipoMovto, Dif, gvr.DataKey("SerieFolio"), Concepto, 0, TxtFecha.Text.ToDate, gvr.DataKey("CveProveedor").ContaReferencia(TipoContaReferencia.Proveedor), 0) Then ' no lleva moneda extranjera
|
||||
MsgError = "No se pudo insertar movimiento contable"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If MsgError <> "" Then
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'ACTUALIZO LA COMPRA CON LA POLIZA
|
||||
|
||||
If Not Compra.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, NumPoliza, IDPoliza, 0, gvr.DataKey("CveCompra").ToEntero, -1) Then
|
||||
MsgError = "Error al actualizar compra"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
'If Not Conta.AddMovimiento( IDPoliza, gvr.fcdrop.ToEntero, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.FCLiteral("LtlConcepto").Text, 0, TxtFechaDocumento.Text.ToDate, "", "") Then
|
||||
' MsgError = "No se pudo insertar movimiento contable"
|
||||
' 'Exit For
|
||||
'End If
|
||||
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If MsgError = "" Then
|
||||
Conta.AjustaPoliza(IDPoliza)
|
||||
Conta.Commit()
|
||||
Compra.Commit()
|
||||
UPPDatos.Update()
|
||||
Alert(String.Format("<center>La póliza se ha generado correctamente <br/><br/> <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a></center>", IDPoliza), TipoMensaje.MsgInformacion)
|
||||
CargaDatos()
|
||||
Else
|
||||
Conta.RollBack()
|
||||
Compra.RollBack()
|
||||
End If
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Conta.RollBack()
|
||||
Compra.RollBack()
|
||||
Alert("Ocurrio un error al contabilizar", TipoMensaje.MsgError)
|
||||
GuardaLog(ex.ToString)
|
||||
End Try
|
||||
|
||||
|
||||
Conta.Dispose()
|
||||
Else
|
||||
Alert("Seleccione factura(s) para contabilizar", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub TxtFecha_TextChanged(sender As Object, e As EventArgs) Handles TxtFecha.TextChanged
|
||||
|
||||
If TbTipoCambio.Visible Then
|
||||
Dim Cc As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
TxtTC.Text = Cc.getTipoCambio(TxtFecha.Text.ToDate).ToString
|
||||
Cc.Dispose()
|
||||
If TxtTC.Text.ToDouble > 0 Then
|
||||
TxtTC.Enabled = False
|
||||
Else
|
||||
TxtTC.Text = ""
|
||||
'busco en la tabla de nosotros
|
||||
Dim Gral As New ClsGenerales
|
||||
|
||||
If Gral.GetTipoCambio(-1, TxtFecha.Text.ToDate) Then
|
||||
Dim dr As DataRow = Gral.DtResultados.FiltroPrimero("")
|
||||
If dr IsNot Nothing Then
|
||||
TxtTC.Text = dr("TipoCambio").ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
Gral.Dispose()
|
||||
TxtTC.Enabled = True
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgTC_Click(sender As Object, e As ImageClickEventArgs) Handles ImgTC.Click
|
||||
If TxtTC.Text.ToDouble <= 0 Then
|
||||
Alert("Ingrese un importe", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Cc As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If Cc.AddTipoCambio(55555, TxtFecha.Text.ToDate, TxtTC.Text.ToDouble) Then
|
||||
TxtTC.Enabled = False
|
||||
End If
|
||||
Cc.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
UsuarioActual.Sesion("DiarioCompras-CveProveedor") = DdlProveedores.SelectedValue
|
||||
UsuarioActual.Sesion("DiarioCompras-FI") = txtFechaI.Text
|
||||
UsuarioActual.Sesion("DiarioCompras-FF") = txtFechaF.Text
|
||||
If DdlProveedores.SelectedValue.ToEntero > 0 Then TxtDescripcion.Text = DdlProveedores.SelectedItem.Text Else TxtDescripcion.Text = ""
|
||||
UPPPoliza.Update()
|
||||
CargaDatos()
|
||||
UPPDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgCFDiMasivo_Click(sender As Object, e As ImageClickEventArgs) Handles ImgCFDiMasivo.Click
|
||||
Dim Msg As New StringBuilder
|
||||
Dim GvT As GridView = Gv
|
||||
Dim UUID, RFCDe, RFCPara As String
|
||||
|
||||
If Tabs.ActiveTabIndex = 1 Then
|
||||
GvT = GvFyE
|
||||
End If
|
||||
|
||||
|
||||
For Each gvr As GridViewRow In GvT.Rows
|
||||
|
||||
'recorro las que no se han validado
|
||||
If gvr.DataKey("ValidacionFactura") <> "" Then
|
||||
UUID = gvr.DataKey("ValidacionFactura").Split("|"c)(1)
|
||||
RFCDe = gvr.DataKey("ValidacionFactura").Split("|"c)(2)
|
||||
RFCPara = gvr.DataKey("ValidacionFactura").Split("|"c)(3)
|
||||
|
||||
Dim Valida As New ClsValidaCFDi(UUID, RFCDe, RFCPara)
|
||||
If Valida.EsValida > 0 Then
|
||||
If Valida.EsValida = 2 Then
|
||||
Msg.AppendFormat("{0} - {1}<br/>", gvr.DataKey("RazonSocial"), gvr.DataKey("SerieFolio"))
|
||||
End If
|
||||
|
||||
'Dim ObjDatos As New ClsCompras
|
||||
|
||||
'If ObjDatos.UpdateEstatus(Valida.EsValida, gvr.DataKey("CveFactura").ToEntero) Then
|
||||
|
||||
'End If
|
||||
'ObjDatos.Dispose()
|
||||
|
||||
End If
|
||||
Valida.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Next
|
||||
|
||||
If Msg.Length > 0 Then
|
||||
Alert(String.Format("Se Encontraron las siguientes facturas canceladas en el SAT: <br/>,{0}", Msg.ToString), TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert("La validación de facturas terminó correctamente")
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
816
Contabilidad/DiarioPagos.aspx
Normal file
816
Contabilidad/DiarioPagos.aspx
Normal file
@@ -0,0 +1,816 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="DiarioPagos.aspx.vb" Inherits="Contabilidad_DiarioPagos" %>
|
||||
<%@ Import Namespace="Extensiones" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Diario de Pagos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 400;
|
||||
<%--$('#<%=Gv.ClientID%>').Scrollable({
|
||||
ScrollHeight: Alto,
|
||||
IsInUpdatePanel: true
|
||||
});
|
||||
$('#<%=GvP.ClientID%>').Scrollable({
|
||||
ScrollHeight: Alto,
|
||||
IsInUpdatePanel: true
|
||||
});--%>
|
||||
<%-- $('#<%=GvE.ClientID%>').Scrollable({
|
||||
ScrollHeight: Alto,
|
||||
IsInUpdatePanel: true
|
||||
});--%>
|
||||
});
|
||||
</script>
|
||||
|
||||
<asp:UpdatePanel ID="UPPFiltros" 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" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 " style="width: 100px;">Proveedor:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProveedores" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 " style="width: 60px;">Cuenta:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" DataTextField="NumCuenta" DataValueField="CveCuenta">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 " style="width: 50px;">Tipo:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" AutoPostBack="false" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1" style="width: 50px;">F.I.:</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: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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="CalendarExtender1" TargetControlID="txtFechaI" PopupButtonID="ImgCalendarioI" 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>
|
||||
<label class="col-md-1" style="width: 50px;">F.F.:</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: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" Width="99%" 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>
|
||||
<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>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<asp:Panel ID="PnlPoliza" runat="server" Visible="true">
|
||||
<asp:UpdatePanel ID="UPPPoliza" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:RadioButtonList ID="RBLOpcion" runat="server" RepeatDirection="Horizontal" AutoPostBack="True">
|
||||
<asp:ListItem Value="1" >Póliza Agrupadora</asp:ListItem>
|
||||
<asp:ListItem Value="2" Selected="true">Póliza Por Separado</asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
<asp:Panel runat="server" ID="PnlAgrupadora" Visible="false">
|
||||
<div class="row">
|
||||
<div class="col-md-8 labelpadding" style="max-width: 700px;">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Fecha:</label>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFecha" 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>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaC" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFecha" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaC" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaC" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="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="VCERFVFC" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECVFC" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6" runat="server" id="TbTipoCambio" visible="False">
|
||||
<div class="row">
|
||||
<label class="col-md-4">Tipo Cambio:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtTC" CssClass="form-control input-sm" onblur="$get('ImgTC').style.display='';" runat="server" Width="45px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="ImgTC" Style="display: none;" Height="16px" ClientIDMode="Static" ImageUrl="/Imagenes/accept.png"></asp:ImageButton>
|
||||
<asp:HiddenField ID="HdnTC" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2">Tipo de Póliza:</label>
|
||||
<div class="col-md-4" >
|
||||
<asp:DropDownList ID="DdlPolizaTipo" CssClass="form-control input-sm select2me" DataValueField="Id" DataTextField="Nombre" runat="server"></asp:DropDownList></td>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2">Concepto:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:TextBox CssClass="form-control input-sm" ID="TxtDescripcion" runat="server" Text="" Width="350px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" Display="None" ErrorMessage="El campo <b>''Concepto''</b> es necesario, por favor ingréselo)." ValidationGroup="GrpGuardar" ControlToValidate="TxtDescripcion"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<div class="row">
|
||||
<label class="col-md-2"></label>
|
||||
<div class="col-md-10" style="padding:5px;">
|
||||
<asp:Button ID="BtnContabilizar" CssClass="btn btn-primary" runat="server" Text="Contabilizar" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Panel>
|
||||
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<ajax:TabContainer runat="server" ID="Tabs">
|
||||
|
||||
<ajax:TabPanel runat="server" ID="TabC" HeaderText="Compras">
|
||||
<ContentTemplate>
|
||||
<asp:Label ID="LblTotComp" Font-Bold="True" runat="server" Text=""></asp:Label> <asp:Label ID="LbSelC" Font-Italic="True" ClientIDMode="Static" runat="server" Text=""></asp:Label>
|
||||
<asp:GridView ID="GvC" GridLines="None" CssClass="table table-hover table-advance Widthall" Visible="true" Width="100%" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="CveIE,CveEstatusIE,IdPoliza,FechaDocumento,IdCtaContProveedores,IdCtaContAnticipos,IdCtaContAnticiposComplementaria,IdCtaContBancos,IdCtaContBancosComplementaria,IdCtaContComplementaria,IdCtaContExtranjera,IdCuentaIVAAcreditable,IdCuentaIVAxAcreditar,CveProveedor,CveMoneda,CveTipoTransaccion,TipoTransAbreviatura,Folio,Importe,IVAPagado,ImportePagado,TC,PrefijoConta,CvePrePoliza,TipoCambioFluctuacion,FechaFluctuacion,CvePlantillaPoliza">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="Titulos">
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr style="height: 20px;">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" Visible="False" /></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr runat="server" id="TrConta">
|
||||
<td style="text-align: left; background-color: #949494;">Fecha:<asp:TextBox ID="TxtFecha" runat="server" Width="85px" Text='<%# Eval("FechaDocumento","{0:d}") %>'></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="imgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaC" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFecha" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaC" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaC" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="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="VCERFVFC" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECVFC" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
Tipo Póliza:
|
||||
<asp:DropDownList ID="DdlPolizaTipo" DataValueField="Id" DataTextField="Nombre" runat="server"></asp:DropDownList>
|
||||
Concepto:
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" Width="350px" Text='<%# Eval("RazonSocial") %>'></asp:TextBox>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:Literal ID="LitTT" runat="server" Text='<%# Eval("TipoTransaccion")%>'></asp:Literal>
|
||||
- #<asp:HyperLink ID="HplFolio" runat="server" CssClass="Texto" Text='<%# Eval("Folio")%>' NavigateUrl='<%# Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}")%>'></asp:HyperLink>
|
||||
- <%# Eval("Banco")%>
|
||||
- Cta:
|
||||
<asp:HyperLink ID="HplCuenta" runat="server" CssClass="Texto" Text='<%# Eval("NumCuenta")%>' NavigateUrl='<%# Eval("CveCuenta", "/Bancos/CuentasBancariasDetalle.aspx?CveCuenta={0}")%>'></asp:HyperLink>
|
||||
- <%# Eval("FechaDocumento","{0:d}")%>
|
||||
- Importe: $<%# Eval("Importe","{0:N2}")%><%# Eval("MonAbreviatura")%>
|
||||
|
||||
<asp:Label ID="LblTC" runat="server" Text="TC:" Font-Size="6pt" Font-Italic="True" Visible='<%# Eval("CveMoneda").ToString = "2"%>'></asp:Label>
|
||||
<asp:TextBox ID="TxtTC" runat="server" Width="35px" Font-Size="6pt" Font-Italic="True" Text='<%# Eval("TC")%>' Visible='<%# Eval("CveMoneda").ToString = "2"%>'></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:GridView ID="GvPC" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" ShowHeader="False" AutoGenerateColumns="False" OnRowDataBound="GvPC_RowDataBound" DataKeyNames="CveCompra,RazonSocial,TipoDocto,SerieFolio,Descripcion,SubTotal,Total,IVA,CveIE,Fecha,CveProveedor,Conta_AsientoContableComprasContado,IdCuentaGasto,RetIVA,RetISR,IdCtaContRetIVA,IdCtaContRetISR,IdCtaContProveedores,CveMonedaCompra,CompraIdPoliza">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:HiddenField ID="HdnTipoDocto" runat="server" Value='<%# Eval("TipoDocto")%>' />
|
||||
<asp:HiddenField ID="HdnCveCompra" runat="server" Value='<%# Eval("CveCompra")%>' />
|
||||
<asp:HiddenField ID="HdnCveIE" runat="server" Value='<%# Eval("CveIE")%>' />
|
||||
<asp:HiddenField ID="HdnActual" runat="server" />
|
||||
<asp:HiddenField ID="HdnIVA" runat="server" Value='<%# Eval("IVA")%>' />
|
||||
<asp:HiddenField ID="HdnRetIVA" runat="server" Value='<%# Eval("RetIVA")%>' />
|
||||
<asp:HiddenField ID="HdnRetISR" runat="server" Value='<%# Eval("RetISR")%>' />
|
||||
<asp:HiddenField ID="HdnSerie" runat="server" Value='<%# Eval("Serie")%>' />
|
||||
<asp:HiddenField ID="HdnFolio" runat="server" Value='<%# Eval("Folio")%>' />
|
||||
<asp:HiddenField ID="HdnUUID" runat="server" Value='<%# Eval("UUID")%>' />
|
||||
<asp:HiddenField ID="HdnSerieFolio" runat="server" Value='<%# Eval("SerieFolio")%>' />
|
||||
<asp:HiddenField ID="HdnSubTotalCompra" runat="server" Value='<%# Eval("SubTotal")%>' />
|
||||
<asp:HiddenField ID="HdnTotal" runat="server" Value='<%# Eval("Total")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContProveedores" runat="server" Value='<%# Eval("IdCtaContProveedores")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContAnticipos" runat="server" Value='<%# Eval("IdCtaContAnticipos")%>' />
|
||||
<asp:HiddenField ID="HdnCveProveedor" runat="server" Value='<%# Eval("CveProveedor")%>' />
|
||||
<asp:HiddenField ID="HdnRazonSocial" runat="server" Value='<%# Eval("RazonSocial")%>' />
|
||||
<asp:HiddenField ID="HdnRFC" runat="server" Value='<%# Eval("RFC")%>' />
|
||||
<asp:HiddenField ID="HdnIVAPagadoCompra" runat="server" Value='<%# Eval("IVAPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnImportePagadoCompra" runat="server" Value='<%# Eval("ImportePagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnRetIVAPagadoCompra" runat="server" Value='<%# Eval("RetIVAPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnRetISRPagadoCompra" runat="server" Value='<%# Eval("RetISRPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnTCFechaCompra" runat="server" Value='<%# Eval("TC_Compra")%>' />
|
||||
<asp:HiddenField ID="HdnTC" runat="server" />
|
||||
<asp:HiddenField ID="HdnIdCtaContRetIVA" runat="server" Value='<%# Eval("IdCtaContRetIVA")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContRetISR" runat="server" Value='<%# Eval("IdCtaContRetISR")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContRetIVACirculacion" runat="server" Value='<%# Eval("IdCuentaRetIVACirculacion")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContRetISRCirculacion" runat="server" Value='<%# Eval("IdCuentaRetISRCirculacion")%>' />
|
||||
<asp:HiddenField ID="HdnIdSegNeg" runat="server" Value='<%# Eval("IdSegNeg")%>' />
|
||||
<asp:HiddenField ID="HdnCompraIdPoliza" runat="server" Value='<%# Eval("CompraIdPoliza")%>' />
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" runat="server" id="TbCompra">
|
||||
<tr class="SubTotales">
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr style="height: 20px;">
|
||||
<td style="width: 25px;"></td>
|
||||
<td>
|
||||
<table width="100%" cellspacing="0" cellpadding="0" id="TbH" runat="server">
|
||||
<tr>
|
||||
<td style="width: 250px;">
|
||||
<asp:HyperLink ID="HplProv" runat="server" CssClass="Texto" Text='<%# Eval("RazonSocial")%>' NavigateUrl='<%# Eval("CveProveedor","/Compras/Proveedores.aspx?CveProveedor={0}") %>'></asp:HyperLink>
|
||||
</td>
|
||||
<td style="width: 100px;">F: <asp:HyperLink ID="HplFact" runat="server" Text='<%# Eval("SerieFolio")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveCompra","/Compras/Compras.aspx?CveCompra={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 100px;"> <%# Eval("Fecha", "{0:d}")%></td>
|
||||
<td style="width: 120px;">SubTotal: <asp:Label ID="LblSubTotal" runat="server" Text='<%# Eval("SubTotal", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 100px;">IVA: <asp:Label ID="LblIVA" runat="server" Text='<%# Eval("IVA", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 70px;">Ret.IVA: <asp:Label ID="LblRetIVA" runat="server" Text='<%# Eval("RetIVA", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 70px;">Ret.ISR: <asp:Label ID="LblRetISR" runat="server" Text='<%# Eval("RetISR", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 100px;">Total: <asp:Label ID="LblTotal" runat="server" Text='<%# Eval("Total", "{0:N2}")%>'></asp:Label><asp:Literal ID="LitMoneda" runat="server" Text='<%# Eval("Abreviatura")%>'></asp:Literal>
|
||||
<asp:Label ID="LblTC" runat="server" Font-Size="6pt" Font-Italic="True" Text='<%# If(UsuarioActual.CveEmpresa = 66, Eval("TC_Fluctuacion", "T.C. {0}"), Eval("TC_Compra", "T.C. {0}"))%>' Visible='<%# Eval("CveMonedaCompra").ToString = "2"%>'></asp:Label>
|
||||
<asp:TextBox ID="TxtTC" Width="25px" runat="server" Visible="False"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:GridView ID="GvD" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" OnRowDataBound="GvD_RowDataBound" ForeColor="Gray" DataKeyNames="PS,SubTotalPS,CveCompra,TipoDocto,SerieFolio,Descripcion,SubTotal,CveIE,Fecha,IdCuentaGasto">
|
||||
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS">
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Proyecto">
|
||||
<ItemTemplate>
|
||||
<%#String.Format("{0} - {1}", Eval("Proyecto"), Eval("SubProyecto")) %>
|
||||
<asp:HiddenField ID="HdnIdSegNeg" runat="server" Value='<%# Eval("IdSegNeg")%>' />
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Clasificacion" ItemStyle-Width="100px" HeaderText="Clasificación" HeaderStyle-HorizontalAlign="Center">
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="120px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Importe($)">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitSubtotalPS" runat="server" Text='<%# Bind("SubTotalPS", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlM" runat="server" Width="80px">
|
||||
</asp:DropDownList>
|
||||
<div style='width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'><%# Eval("CuentaGasto") %></div>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="260px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel runat="server" ID="TabFyE" HeaderText="F y E">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UpFye" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvFyE" GridLines="None" CssClass="table table-hover table-advance Widthall" Width="100%" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="Importe,CveEstatusIE,CveMoneda,CvePrePoliza,IdPoliza,FechaDocumento,CvePlantillaPoliza,CveEmpresa,IdCtaContPersonal,IdCtaContComplementaria,IdCtaContBancos,IdCtaContBancosComplementaria,CveIE,PrefijoConta,TipoTransAbreviatura,Folio,CveTipoTransaccion,IdCuentaIVAxAcreditar,IdCuentaIVAAcreditable,CveProveedor">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="Titulos">
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr style="height: 20px;">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" Visible="False" /></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="text-align: left;">Fecha:<asp:TextBox ID="TxtFecha" runat="server" Width="85px" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="imgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaC" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFecha" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaC" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaC" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="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="VCERFVFC" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECVFC" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
Tipo Póliza:
|
||||
<asp:DropDownList ID="DdlPolizaTipo" DataValueField="Id" DataTextField="Nombre" runat="server"></asp:DropDownList>
|
||||
Concepto:
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" Width="350px" Text='<%# Eval("RazonSocial", "Gasto por Comprobar: {0}")%>'></asp:TextBox>
|
||||
- $
|
||||
<%# Eval("Importe", "{0:N2}")%><%# Eval("Abreviatura")%>
|
||||
<asp:Label ID="LblTC" runat="server" Text="TC:" Font-Size="6pt" Font-Italic="True" Visible='<%# Eval("CveMoneda").ToString = "2"%>'></asp:Label>
|
||||
<asp:TextBox ID="TxtTC" runat="server" Width="35px" Font-Size="6pt" Font-Italic="True" Text='<%# Eval("TC")%>' Visible='<%# Eval("CveMoneda").ToString = "2"%>'></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">Personal: <asp:HyperLink ID="HplP" runat="server" CssClass="Texto" Text='<%# Eval("RazonSocial")%>' NavigateUrl='<%# Eval("CvePersonal", "/RH/Personal.aspx?CvePersonal={0}")%>'></asp:HyperLink>
|
||||
Cuenta: <asp:HyperLink ID="HplC" runat="server" CssClass="Texto" Text='<%# Eval("Cuenta")%>' NavigateUrl='<%# Eval("CveCuenta", "/Bancos/CuentasBancariasDetalle.aspx?CveCuenta={0}")%>'></asp:HyperLink>
|
||||
<asp:Literal ID="LitTT" runat="server" Text='<%# Eval("TipoTransaccion")%>'></asp:Literal>: <asp:HyperLink ID="HplTT" runat="server" CssClass="Texto" Text='<%# Eval("Folio")%>' NavigateUrl='<%# Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}")%>'></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:GridView ID="GvPC" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" ShowHeader="False" AutoGenerateColumns="False" OnRowDataBound="GvPC_RowDataBound" DataKeyNames="CveCompra,RazonSocial,TipoDocto,SerieFolio,Descripcion,SubTotal,Total,IVA,CveIE,Fecha,CveProveedor,Conta_AsientoContableComprasContado,IdCuentaGasto,RetIVA,RetISR,IdCtaContRetIVA,IdCtaContRetISR,IdCtaContProveedores,CveMonedaCompra,CompraIdPoliza">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:HiddenField ID="HdnTipoDocto" runat="server" Value='<%# Eval("TipoDocto")%>' />
|
||||
<asp:HiddenField ID="HdnCveCompra" runat="server" Value='<%# Eval("CveCompra")%>' />
|
||||
<asp:HiddenField ID="HdnCveIE" runat="server" Value='<%# Eval("CveIE")%>' />
|
||||
<asp:HiddenField ID="HdnActual" runat="server" />
|
||||
<asp:HiddenField ID="HdnIVA" runat="server" Value='<%# Eval("IVA")%>' />
|
||||
<asp:HiddenField ID="HdnRetIVA" runat="server" Value='<%# Eval("RetIVA")%>' />
|
||||
<asp:HiddenField ID="HdnRetISR" runat="server" Value='<%# Eval("RetISR")%>' />
|
||||
<asp:HiddenField ID="HdnSerie" runat="server" Value='<%# Eval("Serie")%>' />
|
||||
<asp:HiddenField ID="HdnFolio" runat="server" Value='<%# Eval("Folio")%>' />
|
||||
<asp:HiddenField ID="HdnUUID" runat="server" Value='<%# Eval("UUID")%>' />
|
||||
<asp:HiddenField ID="HdnSerieFolio" runat="server" Value='<%# Eval("SerieFolio")%>' />
|
||||
<asp:HiddenField ID="HdnSubTotalCompra" runat="server" Value='<%# Eval("SubTotal")%>' />
|
||||
<asp:HiddenField ID="HdnTotal" runat="server" Value='<%# Eval("Total")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContProveedores" runat="server" Value='<%# Eval("IdCtaContProveedores")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContAnticipos" runat="server" Value='<%# Eval("IdCtaContAnticipos")%>' />
|
||||
<asp:HiddenField ID="HdnCveProveedor" runat="server" Value='<%# Eval("CveProveedor")%>' />
|
||||
<asp:HiddenField ID="HdnRazonSocial" runat="server" Value='<%# Eval("RazonSocial")%>' />
|
||||
<asp:HiddenField ID="HdnRFC" runat="server" Value='<%# Eval("RFC")%>' />
|
||||
<asp:HiddenField ID="HdnIVAPagadoCompra" runat="server" Value='<%# Eval("IVAPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnImportePagadoCompra" runat="server" Value='<%# Eval("ImportePagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnRetIVAPagadoCompra" runat="server" Value='<%# Eval("RetIVAPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnRetISRPagadoCompra" runat="server" Value='<%# Eval("RetISRPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnTCFechaCompra" runat="server" Value='<%# Eval("TC_Compra")%>' />
|
||||
<asp:HiddenField ID="HdnTC" runat="server" />
|
||||
<asp:HiddenField ID="HdnIdCtaContRetIVA" runat="server" Value='<%# Eval("IdCtaContRetIVA")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContRetISR" runat="server" Value='<%# Eval("IdCtaContRetISR")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContRetIVACirculacion" runat="server" Value='<%# Eval("IdCuentaRetIVACirculacion")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContRetISRCirculacion" runat="server" Value='<%# Eval("IdCuentaRetISRCirculacion")%>' />
|
||||
<asp:HiddenField ID="HdnIdSegNeg" runat="server" Value='<%# Eval("IdSegNeg")%>' />
|
||||
<asp:HiddenField ID="HdnCompraIdPoliza" runat="server" Value='<%# Eval("CompraIdPoliza")%>' />
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" runat="server" id="TbCompra">
|
||||
<tr class="SubTotales">
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr style="height: 20px;">
|
||||
<td style="width: 25px;"></td>
|
||||
<td>
|
||||
<table width="100%" cellspacing="0" cellpadding="0" id="TbH" runat="server">
|
||||
<tr>
|
||||
<td style="width: 250px; display: none;">
|
||||
<asp:HyperLink ID="HplProv" runat="server" Visible="False" CssClass="Texto" Text='<%# Eval("RazonSocial")%>' NavigateUrl='<%# Eval("CveProveedor", "/Compras/Proveedores.aspx?CveProveedor={0}") %>'></asp:HyperLink>
|
||||
</td>
|
||||
<td style="width: 100px;">F: <asp:HyperLink ID="HplFact" runat="server" Text='<%# Eval("SerieFolio")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 100px;"> <asp:Literal ID="LitFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal></td>
|
||||
<td style="width: 120px;">SubTotal: <asp:Label ID="LblSubTotal" runat="server" Text='<%# Eval("SubTotal", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 100px;">IVA: <asp:Label ID="LblIVA" runat="server" Text='<%# Eval("IVA", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 70px;">Ret.IVA: <asp:Label ID="LblRetIVA" runat="server" Text='<%# Eval("RetIVA", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 70px;">Ret.ISR: <asp:Label ID="LblRetISR" runat="server" Text='<%# Eval("RetISR", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 100px;">Total: <asp:Label ID="LblTotal" runat="server" Text='<%# Eval("Total", "{0:N2}")%>'></asp:Label><asp:Literal ID="LitMoneda" runat="server" Text='<%# Eval("Abreviatura")%>'></asp:Literal>
|
||||
<asp:Label ID="LblTC" runat="server" Font-Size="6pt" Font-Italic="True" Text='<%# If(UsuarioActual.CveEmpresa = 66, Eval("TC_Fluctuacion", "T.C. {0}"), Eval("TC_Compra", "T.C. {0}"))%>' Visible='<%# Eval("CveMonedaCompra").ToString = "2"%>'></asp:Label>
|
||||
<asp:TextBox ID="TxtTC" Width="25px" runat="server" Visible="False"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:GridView ID="GvD" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" OnRowDataBound="GvD_RowDataBound" ForeColor="Gray" DataKeyNames="PS,SubTotalPS,CveCompra,TipoDocto,SerieFolio,Descripcion,SubTotal,CveIE,Fecha,IdCuentaGasto">
|
||||
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS">
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Proyecto">
|
||||
<ItemTemplate>
|
||||
<%#String.Format("{0} - {1}", Eval("Proyecto"), Eval("SubProyecto")) %>
|
||||
<asp:HiddenField ID="HdnIdSegNeg" runat="server" Value='<%# Eval("IdSegNeg")%>' />
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Clasificacion" ItemStyle-Width="100px" HeaderText="Clasificación" HeaderStyle-HorizontalAlign="Center">
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="120px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Importe($)">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitSubtotalPS" runat="server" Text='<%# Bind("SubTotalPS", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlM" runat="server" Width="80px">
|
||||
</asp:DropDownList>
|
||||
<div style='width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'><%# Eval("CuentaGasto") %></div>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="260px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel runat="server" ID="TabTransf" HeaderText="Transferencias">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvT" GridLines="None" CssClass="table table-hover table-advance Widthall" Visible="true" Width="100%" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="Importe,CveMoneda,CvePrePoliza,CveEmpresa">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr style="height: 20px;">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" Visible="False" /></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr runat="server" id="TrConta">
|
||||
<td style="text-align: left;">Fecha:<asp:TextBox ID="TxtFecha" runat="server" Width="85px" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="imgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaC" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFecha" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaC" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaC" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="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="VCERFVFC" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECVFC" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
Tipo Póliza:
|
||||
<asp:DropDownList ID="DdlPolizaTipo" DataValueField="Id" DataTextField="Nombre" runat="server"></asp:DropDownList>
|
||||
Concepto:
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" Width="350px" Text="Transferencia Entre Cuentas"></asp:TextBox>
|
||||
- $
|
||||
<%# Eval("Importe", "{0:N2}")%><%# Eval("Abreviatura")%>
|
||||
<asp:Label ID="LblTC" runat="server" Text="TC:" Font-Size="6pt" Font-Italic="True" Visible='<%# Eval("CveMoneda").ToString = "2"%>'></asp:Label>
|
||||
<asp:TextBox ID="TxtTC" runat="server" Width="35px" Font-Size="6pt" Font-Italic="True" Text='<%# Eval("TC")%>' Visible='<%# Eval("CveMoneda").ToString = "2"%>'></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" runat="server" id="TbCompra">
|
||||
<tr>
|
||||
<td>
|
||||
<pre> </pre>
|
||||
</td>
|
||||
<td style="text-align: left">
|
||||
<asp:GridView ID="GvTD" runat="server" OnRowDataBound="GvTD_RowDataBound" DataKeyNames="IDCtaContable,TipoMovto,CveIE" AutoGenerateColumns="False">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cuenta">
|
||||
<ItemTemplate>
|
||||
<asp:HiddenField ID="HdnIdCta" runat="server" Value='<%# Eval("IDCtaContable")%>' />
|
||||
<asp:HiddenField ID="HdnTipoMovto" runat="server" Value='<%# Eval("TipoMovto")%>' />
|
||||
<asp:HiddenField ID="HdnCveIE" runat="server" Value='<%# Eval("CveIE")%>' />
|
||||
<asp:HyperLink ID="HplCuenta" runat="server" Text='<%# Bind("Cuenta")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveCuenta", "/Bancos/CuentasBancariasDetalle.aspx?CveCuenta={0}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitFolio" Text='<%#Eval("Folio") %>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="100px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel runat="server" ID="TabAnticipos" HeaderText="Anticipos">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvAnt" GridLines="None" CssClass="table table-hover table-advance Widthall" Width="100%" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="Importe,CveEstatusIE,CveMoneda,IdPoliza,FechaDocumento,CvePrePoliza,CvePlantillaPoliza,CveEmpresa,IdCtaContAnticipos,IdCtaContComplementaria,IdCtaContAnticiposComplementaria,IdCtaContBancos,IdCtaContBancosComplementaria,CveIE,PrefijoConta,TipoTransAbreviatura,Folio,CveTipoTransaccion,IdCuentaIVAxAcreditar,IdCuentaIVAAcreditable,CveProveedor,FechaFluctuacion,TipoCambioFluctuacion">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="Titulos">
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr style="height: 20px;">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" Visible="False" /></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="text-align: left;">Fecha:<asp:TextBox ID="TxtFecha" runat="server" Width="85px" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="imgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaC" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFecha" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaC" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaC" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="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="VCERFVFC" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECVFC" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
Tipo Póliza:
|
||||
<asp:DropDownList ID="DdlPolizaTipo" DataValueField="Id" DataTextField="Nombre" runat="server"></asp:DropDownList>
|
||||
Concepto:
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" Width="350px" Text='<%# Eval("RazonSocial", "Anticipo {0}") %>'></asp:TextBox>
|
||||
- $
|
||||
<%# Eval("Importe", "{0:N2}")%><%# Eval("Abreviatura")%>
|
||||
<asp:Label ID="LblTC" runat="server" Text="TC:" Font-Size="6pt" Font-Italic="True" Visible='<%# Eval("CveMoneda").ToString = "2"%>'></asp:Label>
|
||||
<asp:TextBox ID="TxtTC" runat="server" Width="35px" Font-Size="6pt" Font-Italic="True" Text='<%# Eval("TC")%>' Visible='<%# Eval("CveMoneda").ToString = "2"%>'></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">Proveedor: <asp:HyperLink ID="HplP" runat="server" CssClass="Texto" Text='<%# Eval("RazonSocial")%>' NavigateUrl='<%# Eval("CveProveedor", "/Compras/Proveedores.aspx?CveProveedor={0}")%>'></asp:HyperLink>
|
||||
Cuenta: <asp:HyperLink ID="HplC" runat="server" CssClass="Texto" Text='<%# Eval("Cuenta")%>' NavigateUrl='<%# Eval("CveCuenta", "/Bancos/CuentasBancariasDetalle.aspx?CveCuenta={0}")%>'></asp:HyperLink>
|
||||
<asp:Literal ID="LitTT" runat="server" Text='<%# Eval("TipoTransaccion")%>'></asp:Literal>: <asp:HyperLink ID="HplTT" runat="server" CssClass="Texto" Text='<%# Eval("Folio")%>' NavigateUrl='<%# Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}")%>'></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:GridView ID="GvPC" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" ShowHeader="False" AutoGenerateColumns="False" OnRowDataBound="GvPC_RowDataBound" DataKeyNames="CveCompra,RazonSocial,TipoDocto,SerieFolio,Descripcion,SubTotal,Total,IVA,CveIE,Fecha,CveProveedor,Conta_AsientoContableComprasContado,IdCuentaGasto,RetIVA,RetISR,IdCtaContRetIVA,IdCtaContRetISR,IdCtaContProveedores,CveMonedaCompra,CompraIdPoliza">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:HiddenField ID="HdnTipoDocto" runat="server" Value='<%# Eval("TipoDocto")%>' />
|
||||
<asp:HiddenField ID="HdnCveCompra" runat="server" Value='<%# Eval("CveCompra")%>' />
|
||||
<asp:HiddenField ID="HdnCveIE" runat="server" Value='<%# Eval("CveIE")%>' />
|
||||
<asp:HiddenField ID="HdnActual" runat="server" />
|
||||
<asp:HiddenField ID="HdnIVA" runat="server" Value='<%# Eval("IVA")%>' />
|
||||
<asp:HiddenField ID="HdnRetIVA" runat="server" Value='<%# Eval("RetIVA")%>' />
|
||||
<asp:HiddenField ID="HdnRetISR" runat="server" Value='<%# Eval("RetISR")%>' />
|
||||
<asp:HiddenField ID="HdnSerie" runat="server" Value='<%# Eval("Serie")%>' />
|
||||
<asp:HiddenField ID="HdnFolio" runat="server" Value='<%# Eval("Folio")%>' />
|
||||
<asp:HiddenField ID="HdnUUID" runat="server" Value='<%# Eval("UUID")%>' />
|
||||
<asp:HiddenField ID="HdnSerieFolio" runat="server" Value='<%# Eval("SerieFolio")%>' />
|
||||
<asp:HiddenField ID="HdnSubTotalCompra" runat="server" Value='<%# Eval("SubTotal")%>' />
|
||||
<asp:HiddenField ID="HdnTotal" runat="server" Value='<%# Eval("Total")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContProveedores" runat="server" Value='<%# Eval("IdCtaContProveedores")%>' />
|
||||
<asp:HiddenField ID="HdnCveProveedor" runat="server" Value='<%# Eval("CveProveedor")%>' />
|
||||
<asp:HiddenField ID="HdnRazonSocial" runat="server" Value='<%# Eval("RazonSocial")%>' />
|
||||
<asp:HiddenField ID="HdnRFC" runat="server" Value='<%# Eval("RFC")%>' />
|
||||
<asp:HiddenField ID="HdnIVAPagadoCompra" runat="server" Value='<%# Eval("IVAPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnImportePagadoCompra" runat="server" Value='<%# Eval("ImportePagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnRetIVAPagadoCompra" runat="server" Value='<%# Eval("RetIVAPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnRetISRPagadoCompra" runat="server" Value='<%# Eval("RetISRPagadoCompra")%>' />
|
||||
<asp:HiddenField ID="HdnTCFechaCompra" runat="server" Value='<%# Eval("TC_Compra")%>' />
|
||||
<asp:HiddenField ID="HdnTC" runat="server" />
|
||||
<asp:HiddenField ID="HdnIdCtaContRetIVA" runat="server" Value='<%# Eval("IdCtaContRetIVA")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContRetISR" runat="server" Value='<%# Eval("IdCtaContRetISR")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContRetIVACirculacion" runat="server" Value='<%# Eval("IdCuentaRetIVACirculacion")%>' />
|
||||
<asp:HiddenField ID="HdnIdCtaContRetISRCirculacion" runat="server" Value='<%# Eval("IdCuentaRetISRCirculacion")%>' />
|
||||
<asp:HiddenField ID="HdnCvePrePoliza" runat="server" Value='<%# Eval("CvePrePoliza")%>' />
|
||||
<asp:HiddenField ID="HdnCompraIdPoliza" runat="server" Value='<%# Eval("CompraIdPoliza")%>' />
|
||||
<asp:HiddenField ID="HdnIdSegNeg" runat="server" Value='<%# Eval("IdSegNeg")%>' />
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" runat="server" id="TbCompra">
|
||||
<tr class="SubTotales">
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr style="height: 20px;">
|
||||
<td style="width: 25px;"></td>
|
||||
<td>
|
||||
<table width="100%" cellspacing="0" cellpadding="0" id="TbH" runat="server">
|
||||
<tr>
|
||||
<td style="width: 250px; display: none;">
|
||||
<asp:HyperLink ID="HplProv" runat="server" Visible="False" CssClass="Texto" Text='<%# Eval("RazonSocial")%>' NavigateUrl='<%# Eval("CveProveedor", "/Compras/Proveedores.aspx?CveProveedor={0}") %>'></asp:HyperLink>
|
||||
</td>
|
||||
<td style="width: 100px;">F: <asp:HyperLink ID="HplFact" runat="server" Text='<%# Eval("SerieFolio")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 100px;"> <asp:Literal ID="LitFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal></td>
|
||||
<td style="width: 120px;">SubTotal: <asp:Label ID="LblSubTotal" runat="server" Text='<%# Eval("SubTotal", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 100px;">IVA: <asp:Label ID="LblIVA" runat="server" Text='<%# Eval("IVA", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 70px;">Ret.IVA: <asp:Label ID="LblRetIVA" runat="server" Text='<%# Eval("RetIVA", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 70px;">Ret.ISR: <asp:Label ID="LblRetISR" runat="server" Text='<%# Eval("RetISR", "{0:N2}")%>'></asp:Label></td>
|
||||
<td style="width: 100px;">Total: <asp:Label ID="LblTotal" runat="server" Text='<%# Eval("Total", "{0:N2}")%>'></asp:Label><asp:Literal ID="LitMoneda" runat="server" Text='<%# Eval("Abreviatura")%>'></asp:Literal>
|
||||
<asp:Label ID="LblTC" runat="server" Font-Size="6pt" Font-Italic="True" Text='<%# If(UsuarioActual.CveEmpresa = 66, Eval("TC_Fluctuacion", "T.C. {0}"), Eval("TC_Compra", "T.C. {0}"))%>' Visible='<%# Eval("CveMonedaCompra").ToString = "2"%>'></asp:Label>
|
||||
<asp:TextBox ID="TxtTC" Width="25px" runat="server" Visible="False"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:GridView ID="GvD" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" OnRowDataBound="GvD_RowDataBound" ForeColor="Gray" DataKeyNames="PS,SubTotalPS,CveCompra,TipoDocto,SerieFolio,Descripcion,SubTotal,CveIE,Fecha,IdCuentaGasto">
|
||||
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS">
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Proyecto">
|
||||
<ItemTemplate>
|
||||
<%#String.Format("{0} - {1}", Eval("Proyecto"), Eval("SubProyecto")) %>
|
||||
<asp:HiddenField ID="HdnIdSegNeg" runat="server" Value='<%# Eval("IdSegNeg")%>' />
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Clasificacion" ItemStyle-Width="100px" HeaderText="Clasificación" HeaderStyle-HorizontalAlign="Center">
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="120px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Importe($)">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitSubtotalPS" runat="server" Text='<%# Bind("SubTotalPS", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitProyecto" runat="server" Text='<%# string.Format("{0} - {1}",Eval("Proyecto"),Eval("SubProyecto")) %>'>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlM" runat="server" Width="80px">
|
||||
</asp:DropDownList>
|
||||
<div style='width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'><%# Eval("CuentaGasto") %></div>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle Width="260px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content runat="server" ID="Content5" ContentPlaceHolderID="JS">
|
||||
<script type="text/javascript" >
|
||||
|
||||
var countChecked = function () {
|
||||
|
||||
var n = $(" input[name*=TabC]:checked").length;
|
||||
debugger;
|
||||
$get("LbSelC").innerText = (n + (n === 1 ? " Seleccionado" : " Seleccionados"));
|
||||
};
|
||||
|
||||
function pageLoad() {
|
||||
$("input[type=checkbox]").on("click", countChecked);
|
||||
|
||||
<%-- $(document).ready(function () {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 300;
|
||||
$('#<%=GvEE.ClientID%>').gridviewScroll({
|
||||
width: 990,
|
||||
height: Alto
|
||||
});
|
||||
});--%>
|
||||
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
1825
Contabilidad/DiarioPagos.aspx.vb
Normal file
1825
Contabilidad/DiarioPagos.aspx.vb
Normal file
File diff suppressed because it is too large
Load Diff
53
Contabilidad/DiarioVentas.aspx
Normal file
53
Contabilidad/DiarioVentas.aspx
Normal file
@@ -0,0 +1,53 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="DiarioVentas.aspx.vb" Inherits="Contabilidad_DiarioVentas" %>
|
||||
|
||||
<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">
|
||||
Diario de Ventas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<fieldset>
|
||||
<legend>Diario de Ventas</legend>
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-striped table-advance table-hover" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Agrupador" HeaderText="Proveedor" DataFormatString="{0} " />
|
||||
<asp:BoundField DataField="Fecha" DataFormatString="{0:d}" HeaderText="Fecha" />
|
||||
<asp:BoundField DataField="SerieFolio" HeaderText="Factura" />
|
||||
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" />
|
||||
<asp:BoundField DataField="SubTotal" DataFormatString="{0:N2}" HeaderText="SubTotal" />
|
||||
<asp:TemplateField HeaderText="IVA">
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("IVA") %>'></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlIVA" runat="server" Text='<%# Bind("IVA", "{0:N2}") %>'></asp:Literal>
|
||||
<asp:DropDownList CssClass="form-control input-sm" ID="DdlM" runat="server" Width="100px" Visible="False">
|
||||
<asp:ListItem Value="-1">Seleccione</asp:ListItem>
|
||||
<asp:ListItem Value="1">Gasto</asp:ListItem>
|
||||
<asp:ListItem Value="2">Inventario</asp:ListItem>
|
||||
<asp:ListItem Value="3">Anticipo</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Ret IVA" />
|
||||
<asp:BoundField HeaderText="Ret ISR" />
|
||||
<asp:BoundField HeaderText="Total" />
|
||||
<%-- <asp:BoundField DataField="RetIVA" DataFormatString="{0:N2}" HeaderText="Ret IVA" />
|
||||
<asp:BoundField DataField="RetISR" DataFormatString="{0:N2}" HeaderText="Ret ISR" />
|
||||
<asp:BoundField DataField="Total" DataFormatString="{0:N2}" HeaderText="Total" />--%>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
</fieldset>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
67
Contabilidad/DiarioVentas.aspx.vb
Normal file
67
Contabilidad/DiarioVentas.aspx.vb
Normal file
@@ -0,0 +1,67 @@
|
||||
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contabilidad_DiarioVentas
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
Dim Conta As New ClsContabilidad
|
||||
If Conta.GetDiarioVentas(UsuarioActual.CveEmpresa) Then
|
||||
GvD.DataSource = Conta.DtResultados
|
||||
|
||||
End If
|
||||
|
||||
Conta.Dispose()
|
||||
GvD.DataBind()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvD_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowCreated
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(350)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(70)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(70)
|
||||
|
||||
End If
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CvePS") = "" Then
|
||||
e.Row.Height = Unit.Pixel(22)
|
||||
e.Row.CssClass = "SubTotales"
|
||||
|
||||
Else
|
||||
'e.Row.Cells(1).ColumnSpan = 2
|
||||
'e.Row.Cells.RemoveAt()
|
||||
e.Row.Cells(5).ColumnSpan = 4
|
||||
e.Row.Cells.RemoveAt(6) : e.Row.Cells.RemoveAt(6) : e.Row.Cells.RemoveAt(6)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CvePS") = "" Then
|
||||
|
||||
e.Row.Cells(6).Text = e.Row.DBCampo("RetIVA").FormatoNumero
|
||||
e.Row.Cells(7).Text = e.Row.DBCampo("RetISR").FormatoNumero
|
||||
e.Row.Cells(8).Text = e.Row.DBCampo("Total").FormatoNumero
|
||||
Else
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
|
||||
|
||||
e.Row.Cells(1).Text = e.Row.DBCampo("Proyecto")
|
||||
e.Row.Cells(2).Text = e.Row.DBCampo("SubProyecto")
|
||||
e.Row.Cells(3).Text = ""
|
||||
e.Row.Cells(4).Text = e.Row.DBCampo("SubTotalPS").FormatoNumero
|
||||
e.Row.FCDropDownList("DdlM").Visible = True
|
||||
e.Row.FCLiteral("LtlIVA").Visible = False
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
284
Contabilidad/FiltraPolizas.aspx
Normal file
284
Contabilidad/FiltraPolizas.aspx
Normal file
@@ -0,0 +1,284 @@
|
||||
<%@ Page Language="VB" AutoEventWireup="false" MasterPageFile="~/Site.master" CodeFile="FiltraPolizas.aspx.vb" Inherits="Contabilidad_FiltraPolizas" %>
|
||||
|
||||
|
||||
<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">
|
||||
Búsqueda de Pólizas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-ad-pdf"></i> Imprimir PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-ad-excel"></i> Imprimir EXCEL</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<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="Filtrar" CssClass="btn btn-primary" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1">Ejercicio: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="form-control input-sm" DataTextField="Ejercicio" DataValueField="Ejercicio" AutoPostBack="true"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Periodo: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" CssClass="form-control input-sm" AutoPostBack="true">
|
||||
<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">Tipo Póliza: </label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTipoPoliza" runat="server" CssClass="form-control input-sm" DataTextField="Ejercicio" DataValueField="Ejercicio" AutoPostBack="true">
|
||||
<asp:ListItem Text="Todas" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Ingresos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Egresos" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Diario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Orden" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1">Segmento: </label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlSegmentoNeg" DataTextField="Nombre" DataValueField="Id" CssClass="form-control input-sm select2me" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<div id="DivBusqueda" runat="server" align="Right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", Gv.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", Gv.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>
|
||||
<div class="portlet-body">
|
||||
|
||||
<table class="table table-striped" style="border: 1px solid #D3D3D3; min-width: 985px; width: 100%; display: none;">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFecha" runat="server" CausesValidation="false" Text="" CommandArgument="Fecha" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFecha" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbTipo" runat="server" CausesValidation="false" Text="" CommandArgument="Tipo" OnClick="LbOrden_Click">
|
||||
Tipo
|
||||
<asp:Literal ID="ImgTipo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="320px">
|
||||
<asp:LinkButton ID="LbFolio" runat="server" CausesValidation="false" Text="" CommandArgument="Folio" OnClick="LbOrden_Click">
|
||||
Folio
|
||||
<asp:Literal ID="ImgFolio" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LbConcepto" runat="server" CausesValidation="false" Text="" CommandArgument="Concepto" OnClick="LbOrden_Click">
|
||||
Concepto
|
||||
<asp:Literal ID="ImgConcepto" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LbCargos" runat="server" CausesValidation="false" Text="" CommandArgument="Cargos" OnClick="LbOrden_Click">
|
||||
Cargos
|
||||
<asp:Literal ID="ImgCargos" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LbAbonos" runat="server" CausesValidation="false" Text="" CommandArgument="Abonos" OnClick="LbOrden_Click">
|
||||
Abonos
|
||||
<asp:Literal ID="ImgAbonos" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="">
|
||||
<asp:GridView ID="Gv" runat="server" TShowHeader="true" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None" AutoGenerateColumns="false">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:dd/MM/yyyy}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="70px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipo" runat="server" Text='<%# Eval("TipoPol")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="70px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="Hpl" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("Id", "/Contabilidad/RegPoliza.aspx?IdPoliza={0}")%>' runat="server" Text='<%# Eval("Folio")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Concepto" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlConcepto" runat="server" Text='<%# Eval("Concepto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<%--<ItemStyle Width="580px"></ItemStyle>--%>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cargos" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos"></HeaderStyle>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<asp:UpdatePanel runat="server" ID="UpBitacora" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Historial de Eliminacion</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" align="right">
|
||||
<asp:Button ID="BtnMostrar" runat="server" Text="Mostrar" class="btn btn-primary" />
|
||||
<asp:Button ID="BtnOcultar" Visible="false" runat="server" Text="Ocultar" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="portlet-body">
|
||||
<div id="DivBusquedaBitacora" runat="server" align="Right" visible="false">
|
||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvBitacora.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvBitacora.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<div class="row" align="center" id="DivFiltrosBitacora" runat="server" visible="false">
|
||||
<div class="col-md-2">
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="text-align: left">Fecha Inicio:</div>
|
||||
<div class="col-md-4">
|
||||
<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="TxtFechaICredito" CssClass="form-control input-sm ADSMaskDate" Style="width: 90px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaI" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEEFechaI" runat="server" TargetControlID="TxtFechaICredito" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaICredito" PopupButtonID="LnkFechaI" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVVFechaI" runat="server" ControlToValidate="TxtFechaICredito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicial''</b> es necesario, por favor ingréselo." ValidationGroup="VGMConsultar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaI" runat="server" HighlightCssClass="vco" TargetControlID="RFVVFechaI"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="text-align: left">Fecha Fin:</div>
|
||||
<div class="col-md-4">
|
||||
<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="TxtFechaFCredito" CssClass="form-control input-sm ADSMaskDate" Style="width: 90px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaF" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEEFechaF" runat="server" TargetControlID="TxtFechaFCredito" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaF" TargetControlID="TxtFechaFCredito" PopupButtonID="LnkFechaF" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVVFechaF" runat="server" ControlToValidate="TxtFechaFCredito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Final''</b> es necesario, por favor ingréselo." ValidationGroup="VGMConsultar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaF" runat="server" HighlightCssClass="vco" TargetControlID="RFVVFechaF"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1" style="text-align: left">Tipo Poliza:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoPolizaFiltro" AppendDataBoundItems="true" runat="server" CssClass="form-control select2me input-sm" DataTextField="Nombre" DataValueField="Id" TabIndex="6">
|
||||
<asp:ListItem Text="Todas" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Ingresos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Egresos" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Diario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Orden" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:Button ID="BtnConsultarBitacora" runat="server" OnClick="BtnConsultarBitacora_Click" Text="Consultar" CssClass="btn btn-primary btn-circle" ValidationGroup="VGMConsultar" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<asp:GridView ID="GvBitacora" Visible="false" runat="server" GridLines="None" data-sort="true" Width="100%" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" CellSpacing="0" AutoGenerateColumns="False">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Id_Clave" HeaderText="Folio" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="TipoPoliza" HeaderText="Tipo Poliza" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Descripcion" HeaderText="Descripcion" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
219
Contabilidad/FiltraPolizas.aspx.vb
Normal file
219
Contabilidad/FiltraPolizas.aspx.vb
Normal file
@@ -0,0 +1,219 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contabilidad_FiltraPolizas
|
||||
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
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
DdlPeriodo.SelectedValue = Now.Month.ToString
|
||||
TxtFechaICredito.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
TxtFechaFCredito.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
CargaSegmentoNeg()
|
||||
CargaEjercicios()
|
||||
CargaDatos()
|
||||
CargaGvBitacora()
|
||||
Else
|
||||
Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia)
|
||||
BtnConsultar.Enabled = False
|
||||
LnkImprimir.Visible = False
|
||||
LnkExcel.Visible = False
|
||||
End If
|
||||
|
||||
'Dim httpApps As HttpApplication = HttpContext.ApplicationInstance
|
||||
|
||||
''Get list of active modules
|
||||
'Dim httpModuleCollections As HttpModuleCollection = httpApps.Modules
|
||||
'' ViewBag.ModulesCount = httpModuleCollections.Count
|
||||
'gvv.DataSource = httpModuleCollections
|
||||
'gvv.DataBind()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Public Sub CargaDatos()
|
||||
Dim Ejercicio As Integer = DdlEjercicio.SelectedValue.ToString().ToEntero()
|
||||
Dim Periodo As Integer = DdlPeriodo.SelectedValue.ToString().ToEntero()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ObjConta.GetPolizas(Ejercicio, Periodo, DdlTipoPoliza.SelectedValue.ToEntero(), DdlSegmentoNeg.SelectedValue.ToEntero()) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Gv.DataSource = ObjConta.DtResultados
|
||||
'If DdlTipoPoliza.SelectedValue.ToEntero > 0 Then
|
||||
' ViewState("DTPolizas") = ObjConta.DtResultados.FiltraParametros($"TipoPol = '{DdlTipoPoliza.SelectedItem}'")
|
||||
' DtDatos = ObjConta.DtResultados.FiltraParametros($"TipoPol = '{DdlTipoPoliza.SelectedItem}'")
|
||||
'Else
|
||||
' ViewState("DTPolizas") = ObjConta.DtResultados
|
||||
' DtDatos = ObjConta.DtResultados
|
||||
'End If
|
||||
|
||||
End If
|
||||
|
||||
Gv.DataBind()
|
||||
|
||||
ObjConta.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSegmentoNeg()
|
||||
Dim ObjContPAQ As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjContPAQ.GetSegmentosNegocio(-1, "-1") Then
|
||||
DdlSegmentoNeg.DataSource = ObjContPAQ.DtResultados
|
||||
DdlSegmentoNeg.DataBind()
|
||||
End If
|
||||
ObjContPAQ.Dispose()
|
||||
DdlSegmentoNeg.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEjercicios()
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ClsConta.GetEjercicios() Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Private Sub DdlEjercicio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEjercicio.SelectedIndexChanged
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Private Sub DdlPeriodo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPeriodo.SelectedIndexChanged
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
'Private Sub DdlTipoPoliza_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoPoliza.SelectedIndexChanged
|
||||
' CargaDatos()
|
||||
'End Sub
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
|
||||
Else
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
'CargaGrid(Orden)
|
||||
End Sub
|
||||
'Private Sub CargaGrid(Orden As String)
|
||||
' If Orden <> String.Empty Then
|
||||
' Dim DV As New DataView(CType(ViewState("DTPolizas"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
' Gv.DataSource = DV.ToTable()
|
||||
' DV.Dispose()
|
||||
' Else
|
||||
' Gv.DataSource = CType(ViewState("DTPolizas"), DataTable)
|
||||
' End If
|
||||
' Gv.DataBind()
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "IMPRIMIR"
|
||||
Private Sub ImprimirPoliza(Optional Formato As String = "PDF")
|
||||
If DtDatos IsNot Nothing Then
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim dt As DataTable = DtDatos
|
||||
|
||||
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Ejercicio", DdlEjercicio.SelectedItem.ToString))
|
||||
params.Add(New ReportParameter("Periodo", DdlPeriodo.SelectedItem.ToString))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
ImprimirPDF("Empresas/Grales/Formatos/PolizasPeriodo.rdlc", dt, params, String.Format("ReporteDePolizas-{0} {1}", DdlEjercicio.SelectedItem, DdlPeriodo.SelectedItem), Formato:=Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click
|
||||
ImprimirPoliza("PDF")
|
||||
End Sub
|
||||
|
||||
Private Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
ImprimirPoliza("EXCEL")
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "HISTORIAL DE ELIMINACION"
|
||||
|
||||
Private Sub CargaGvBitacora()
|
||||
Dim ObjGral As New ClsGenerales
|
||||
If ObjGral.GetHistorialBitacoraRemoveGet("Polizas", UsuarioActual.CveEmpresa, TxtFechaICredito.Text.ToDate, TxtFechaFCredito.Text.ToDate, DdlTipoPolizaFiltro.SelectedValue.ToEntero) Then
|
||||
GvBitacora.DataSource = ObjGral.DtResultados
|
||||
End If
|
||||
ObjGral.Dispose()
|
||||
GvBitacora.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnMostrar_Click(sender As Object, e As EventArgs) Handles BtnMostrar.Click
|
||||
GvBitacora.Visible = True
|
||||
DivBusquedaBitacora.Visible = True
|
||||
DivFiltrosBitacora.Visible = True
|
||||
BtnOcultar.Visible = True
|
||||
BtnMostrar.Visible = False
|
||||
UpBitacora.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnOcultar_Click(sender As Object, e As EventArgs) Handles BtnOcultar.Click
|
||||
GvBitacora.Visible = False
|
||||
DivBusquedaBitacora.Visible = False
|
||||
DivFiltrosBitacora.Visible = False
|
||||
BtnOcultar.Visible = False
|
||||
BtnMostrar.Visible = True
|
||||
UpBitacora.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultarBitacora_Click(sender As Object, e As EventArgs)
|
||||
CargaGvBitacora()
|
||||
UpBitacora.Update()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
529
Contabilidad/FisImpuestos.aspx
Normal file
529
Contabilidad/FisImpuestos.aspx
Normal file
@@ -0,0 +1,529 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="FisImpuestos.aspx.vb" Inherits="Contabilidad_FisImpuestos" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<link href="/Metronic/assets/global/plugins/dropzone/css/dropzone.css" rel="stylesheet"/>
|
||||
|
||||
<style type="text/css">
|
||||
.AutoExtender {
|
||||
font-family: Verdana, Helvetica, sans-serif;
|
||||
font-size: .9em;
|
||||
font-weight: normal;
|
||||
border: solid 1px #006699;
|
||||
line-height: 20px;
|
||||
padding: 2px;
|
||||
background-color: White;
|
||||
margin-left: 2px;
|
||||
overflow: auto;
|
||||
list-style-type: none;
|
||||
}
|
||||
.AutoExtenderList {
|
||||
cursor: pointer;
|
||||
color: darkgray;
|
||||
text-align: left;
|
||||
}
|
||||
.AutoExtenderHighlight {
|
||||
color: White;
|
||||
background-color: #084784;
|
||||
cursor: pointer;
|
||||
}
|
||||
#divwidth {
|
||||
width: 150px !important;
|
||||
}
|
||||
#divwidth div {
|
||||
width: 150px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label ID="LblEncabezado" runat="server" Text="Impuestos"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="left" style="width: 665px;">
|
||||
<asp:UpdatePanel ID="UPImpuesto" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="chequesie">
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-3">Dependencia:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlProveedores" CssClass="form-control input-sm select2me" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="250px" ValidationGroup="GrpGuardar">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlProveedores" runat="server" InitialValue="-1" ControlToValidate="DdlProveedores" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proveedor''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="RFVCDdlProveedores" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlProveedores" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-3">Moneda:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlMoneda" CssClass="form-control input-sm select2me" runat="server" DataTextField="Nombre" DataValueField="Id" Width="250px" ValidationGroup="GrpGuardar">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlMoneda" runat="server" InitialValue="-1" ControlToValidate="DdlMoneda" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="RFVCDdlMoneda" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlMoneda" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-3">Tipo Impuesto:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlTipoImpuesto" CssClass="form-control input-sm select2me" runat="server" DataTextField="ImpuestoTipo" DataValueField="CveImpuestoTipo" Width="250px" ValidationGroup="GrpGuardar">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlTipoImpuesto" runat="server" InitialValue="-1" ControlToValidate="DdlTipoImpuesto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Impuesto''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="RFVCDdlTipoImpuesto" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlTipoImpuesto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie2">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
<%--
|
||||
<label class="col-md-1 control-label text-right">Fecha:</label>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaImpuesto" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendario" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaImpuesto" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFechaImpuesto" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaImpuesto" runat="server" ControlToValidate="TxtFechaImpuesto" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVTxtFechaImpuesto" runat="server" ControlToValidate="TxtFechaImpuesto" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes 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="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtFechaImpuesto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaImpuesto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>--%>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2 control-label">
|
||||
<asp:Label ID="LblFolio" runat="server" Text="Folio:"></asp:Label></label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="TxtFolio" runat="server" MaxLength="14" class="form-control input-sm"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFolio" runat="server" ControlToValidate="TxtFolio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="RFVCTxtFolio" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtFolio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<label class="col-md-1 control-label text-right">Fecha:</label>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaImpuesto" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendario" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaImpuesto" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFechaImpuesto" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaImpuesto" runat="server" ControlToValidate="TxtFechaImpuesto" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVTxtFechaImpuesto" runat="server" ControlToValidate="TxtFechaImpuesto" Display="None" ErrorMessage="El campo <b>''Fecha''</b> no tienes 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="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtFechaImpuesto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaImpuesto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<%--
|
||||
<div class="col-md-2"></div>
|
||||
<label class="col-md-1 control-label text-right">Importe:</label>
|
||||
<asp:UpdatePanel ID="UPPImporte" class="col-md-2 input-icon" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtImporte" runat="server" CssClass="form-control input-sm" MaxLength="16" Width="110px" ClientIDMode="Static" Style="text-align: right;" onkeyup="FncImporteCuenta(this)"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnImporte" runat="server" ClientIDMode="Static" />
|
||||
<asp:HiddenField ID="HdnCuentaImporte" runat="server" ClientIDMode="Static" />
|
||||
<asp:RangeValidator ID="RVImporte" runat="server" Enabled="false" Type="Currency" MinimumValue="0" MaximumValue="0" ErrorMessage="Importe Excedido" ControlToValidate="TxtImporte" Display="Dynamic" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
--%>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-2">Concepto:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtConcepto" onkeyDown="checkTextAreaMaxLength(this,event,'100');" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtConcepto" runat="server" ControlToValidate="TxtConcepto" Display="None" ErrorMessage="El campo <b>''Concepto''</b> es requerido." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="RFVCTxtConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtConcepto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="trNotificar" runat="server" visible="False">
|
||||
<label class="col-md-2">Notificar:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtNotificarA" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<br />
|
||||
</td>
|
||||
<td style="text-align:left;vertical-align:top">
|
||||
|
||||
<div>
|
||||
<asp:UpdatePanel ID="UpAnexo" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:UpdatePanel ID="UPMovs" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<input id="HdnCveCuenta" runat="server" type="hidden" value="-1" clientidmode="Static" />
|
||||
|
||||
<br />
|
||||
<div style="width: 100%; min-height: 200px; overflow-scrolling:auto;">
|
||||
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CveSubProyecto,Importe" ShowHeaderWhenEmpty="true" Width="100%" CssClass="table table-striped table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<%-- <asp:TemplateField>
|
||||
<HeaderTemplate>Código</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlCodigo" Font-Italic="true" Font-Size="7pt" runat="server" Text='<%# Eval("CodigoCuenta")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cuenta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCuenta" runat="server" Text='<%# Eval("Cuenta") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Left" HeaderText="SubProyecto" DataField="SubProyecto" />
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Referencia</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlReferencia" runat="server" Text='<%# Eval("RazonSocial")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<%-- <asp:TemplateField Visible ="false">
|
||||
<HeaderTemplate>Concepto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" MaxLength="100" Text='<%# Eval("Concepto")%>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderStyle-Width="67px" ItemStyle-Width="136px">
|
||||
<HeaderTemplate>Cargo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCargo" CssClass="txtcargo" runat="server" Width="65px" Visible="False" style="text-align:right!important" autocomplete="off" ></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBTxtCargo" runat="server"
|
||||
TargetControlID="TxtCargo"
|
||||
FilterType="Custom, Numbers"
|
||||
ValidChars="+-.," />
|
||||
<asp:Literal ID="LtlCargo" runat="server" Text='<%# Eval("Cargo", "{0:###,###,###.##}")%>' ></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-Width="67px" ItemStyle-Width="136px">
|
||||
<HeaderTemplate>Abono</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtAbono" CssClass="txtabono" runat="server" Width="65px" Visible="False" style="text-align:right!important" autocomplete="off" ></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBTxtAbono" runat="server"
|
||||
TargetControlID="TxtAbono"
|
||||
FilterType="Custom, Numbers"
|
||||
ValidChars="+-.," />
|
||||
<asp:Literal ID="LtlAbono" runat="server" Text='<%# Eval("Abono", "{0:###,###,###.##}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="" Visible="False">
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<table style="width: 100%;" class="table table-striped table-advance table-hover">
|
||||
<tr>
|
||||
<td ></td>
|
||||
<th style="width: 136px;">
|
||||
<asp:TextBox ID="TxtTotalCargos" runat="server" Width="65px" autocomplete="off"></asp:TextBox> </th>
|
||||
<th style="width:136px;">
|
||||
<asp:TextBox ID="TxtTotalAbonos" runat="server" Width="65px" autocomplete="off"></asp:TextBox></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="text-align: center;">
|
||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
||||
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript" language="javascript">
|
||||
|
||||
function FnSuma(t, txt, importe) {
|
||||
|
||||
if (t.checked) {
|
||||
txt.value = FormatNumber(importe, 2, true, true, true);
|
||||
} else {
|
||||
txt.value = "";
|
||||
}
|
||||
}
|
||||
|
||||
function FncImporte(txt, rowtxt, opcion) {
|
||||
|
||||
if (opcion == 1) {
|
||||
$get(rowtxt).value = $get(txt).value == '' ? '' : FormatNumber(ToDouble($get(txt).value), 2, true, true, true);
|
||||
debugger;
|
||||
if ($get('ChkAbonoCuenta')) {
|
||||
$get('ChkAbonoCuenta').checked = ($get(txt).value > 2000);
|
||||
}
|
||||
FormatoMoneda($get(txt));
|
||||
} else {
|
||||
$get(txt).value = $get(rowtxt).value == '' ? '' : FormatNumber(ToDouble($get(rowtxt).value), 2, true, true, true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function FncImporteCuenta(txt) {
|
||||
|
||||
if ($get('ChkAbonoCuenta')) {
|
||||
$get('ChkAbonoCuenta').checked = (parseFloat(txt.value.replace(/,/g, '')) > 2000);
|
||||
}
|
||||
FormatoMoneda(txt);
|
||||
}
|
||||
|
||||
function SumaValores() {
|
||||
var Importe = 0;
|
||||
var topLevelElem = document.getElementById("form1");
|
||||
var textBoxes = topLevelElem.getElementsByTagName("input");
|
||||
for (var i = 0; i < textBoxes.length; i++) {
|
||||
if (textBoxes[i].type == "text") {
|
||||
if (textBoxes[i].id.indexOf('C_GvCxP_TxtAbonar') >= 0) {
|
||||
if (textBoxes[i].value != '') {
|
||||
Importe = parseFloat(Importe) + parseFloat(textBoxes[i].value.split(',').join(''));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Importe;
|
||||
}
|
||||
|
||||
function FnCambia(chk, txt) {
|
||||
|
||||
if (txt.value != '') {
|
||||
chk.checked = true;
|
||||
} else {
|
||||
chk.checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
function getCuenta(pId) {
|
||||
|
||||
$get('HdnCveCuenta').value = pId;
|
||||
|
||||
PageMethods.wsGetNombreCuenta(pId, OnSucceeded);
|
||||
|
||||
}
|
||||
|
||||
function OnSucceeded(result, userContext, methodName) {
|
||||
|
||||
if (methodName == 'wsGetNombreCuenta') {
|
||||
$get('TxtCuentaContable').value = result;
|
||||
}
|
||||
}
|
||||
|
||||
function myItemSelectedHandler(source, eventArgs) {
|
||||
|
||||
//debugger;
|
||||
var CC = $get('HdnCveCuenta');
|
||||
CC.value = eventArgs.get_value();
|
||||
|
||||
// var b = $get('C_Tabs_TabConyuge_BtnTruco');
|
||||
// b.Click;
|
||||
var aTargetElement = 'BtnSelCuenta';
|
||||
__doPostBack(aTargetElement, eventArgs.get_value());
|
||||
|
||||
//alert(" Key : " + eventArgs.get_text() + " Value : " + eventArgs.get_value());
|
||||
|
||||
}
|
||||
|
||||
function LimpiaImporte(t, txt) {
|
||||
|
||||
if (t.value != '' && $get(txt)) {
|
||||
$get(txt).value = '';
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
//iterate through each textboxes and add keyup
|
||||
//handler to trigger sum event
|
||||
CargaTxtFunciones();
|
||||
$('#<%= TxtTotalAbonos.ClientID %>').keypress(function (evt) { return false; });
|
||||
$('#<%= TxtTotalAbonos.ClientID %>').bind("cut copy paste", function (e) {e.preventDefault();});
|
||||
$('#<%= TxtTotalCargos.ClientID %>').keypress(function (evt) { return false; });
|
||||
$('#<%= TxtTotalCargos.ClientID %>').bind("cut copy paste", function (e) { e.preventDefault(); });
|
||||
calculateCargo();
|
||||
calculateAbono();
|
||||
comparar();
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
CargaTxtFunciones();
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
function comparar() {
|
||||
|
||||
var TextoCargos = document.getElementById('<%= TxtTotalCargos.ClientID %>');
|
||||
var TextoAbonos = document.getElementById('<%= TxtTotalAbonos.ClientID %>');
|
||||
|
||||
var tempVal = parseFloat(TextoCargos.value.replace(/,/g, ''));
|
||||
|
||||
if (TextoCargos.value == TextoAbonos.value && !isNaN(tempVal) && tempVal > 0) {
|
||||
|
||||
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.color = "";
|
||||
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.color = "";
|
||||
$('#<%= BtnGuardar.ClientID %>').prop('disabled', false);
|
||||
}
|
||||
else {
|
||||
|
||||
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.color = "#ff0000";
|
||||
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.color = "#ff0000";
|
||||
$('#<%= BtnGuardar.ClientID %>').prop('disabled', true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function CargaTxtFunciones() {
|
||||
|
||||
$(".txtcargo").each(function () {
|
||||
|
||||
$(this).keyup(function () {
|
||||
calculateCargo();
|
||||
comparar();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(".txtabono").each(function () {
|
||||
|
||||
$(this).keyup(function () {
|
||||
calculateAbono();
|
||||
comparar();
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
function calculateCargo() {
|
||||
var sum = 0;
|
||||
|
||||
//iterate through each textboxes and add the values
|
||||
|
||||
$(".txtcargo").each(function () {
|
||||
|
||||
|
||||
if (this.value.length != 0){
|
||||
var tempVal = this.value.replace(/,/g, '');
|
||||
|
||||
//add only if the value is number
|
||||
if(!isNaN(tempVal)){
|
||||
this.value = numberFormat(tempVal);
|
||||
sum += parseFloat(tempVal);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
//.toFixed() method will roundoff the final sum to 2 decimal places
|
||||
$('#<%= TxtTotalCargos.ClientID %>').val(sum.toFixed(2));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function calculateAbono() {
|
||||
var sum = 0;
|
||||
|
||||
$(".txtabono").each(function () {
|
||||
|
||||
if (this.value.length != 0) {
|
||||
var tempVal = this.value.replace(/,/g, '');
|
||||
if (!isNaN(tempVal)) {
|
||||
this.value = numberFormat(tempVal);
|
||||
sum += parseFloat(tempVal);
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#<%= TxtTotalAbonos.ClientID %>').val(sum.toFixed(2));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function checkTextAreaMaxLength(textBox, e, length) {
|
||||
|
||||
var mLen = textBox["MaxLength"];
|
||||
if (null == mLen)
|
||||
mLen = length;
|
||||
|
||||
var maxLength = parseInt(mLen);
|
||||
if (!checkSpecialKeys(e)) {
|
||||
if (textBox.value.length > maxLength - 1) {
|
||||
if (window.event)//IE
|
||||
e.returnValue = false;
|
||||
else//Firefox
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
function checkSpecialKeys(e) {
|
||||
if (e.keyCode != 8 && e.keyCode != 46 && e.keyCode != 37 && e.keyCode != 38 && e.keyCode != 39 && e.keyCode != 40)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function numberFormat(_number) {
|
||||
var _sep = ',';
|
||||
_number = typeof _number != "undefined" && _number > 0 ? _number : "";
|
||||
_number = _number.replace(new RegExp("^(\\d{" + (_number.length % 3 ? _number.length % 3 : 0) + "})(\\d{3})", "g"), "$1 $2").replace(/(\d{3})+?/gi, "$1 ").trim();
|
||||
if (typeof _sep != "undefined" && _sep != " ") {
|
||||
_number = _number.replace(/\s/g, _sep);
|
||||
}
|
||||
|
||||
return _number;
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
541
Contabilidad/FisImpuestos.aspx.vb
Normal file
541
Contabilidad/FisImpuestos.aspx.vb
Normal file
@@ -0,0 +1,541 @@
|
||||
Option Strict On
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
|
||||
|
||||
Partial Class Contabilidad_FisImpuestos
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "Propiedades"
|
||||
|
||||
Public Property DtMovimientos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtMovimientos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtMovimientos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property CveImpuesto As Integer
|
||||
Get
|
||||
If ViewState("CveImpuesto") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return DirectCast(ViewState("CveImpuesto"), Integer)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveImpuesto") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
Private Property RutaArchivo As String
|
||||
Get
|
||||
If ViewState("RutaArchivo") Is Nothing Then
|
||||
Return "-1"
|
||||
Else
|
||||
Return ViewState("RutaArchivo").ToString
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("RutaArchivo") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property DTCuentasContables As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTCuentasContables"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTCuentasContables") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
'Dim Dtplantilla As DataTable = GlobalDTContaPlantillasPolizasDetalle(62).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargaCombos()
|
||||
|
||||
Try
|
||||
If Not Request.QueryString("CveImpuesto") Is Nothing Then
|
||||
CveImpuesto = Request.QueryString("CveImpuesto").ToString.ToEntero
|
||||
' CargaDatos()
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
Dim DT As DataTable = Nothing
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ObjConta.GetCuentas(-1, "-1", 1) Then
|
||||
DT = ObjConta.DtResultados
|
||||
DTCuentasContables = ObjConta.DtResultados
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True
|
||||
|
||||
|
||||
|
||||
DtMovimientos = New DataTable("Movimientos")
|
||||
Dim IDMov As DataColumn = DtMovimientos.Columns.Add("IdMov", Type.GetType("System.Int32")) : IDMov.AutoIncrement = True
|
||||
With DtMovimientos.Columns
|
||||
.Add("IdCuenta", Type.GetType("System.Int32"))
|
||||
.Add("CodigoCuenta", Type.GetType("System.String"))
|
||||
.Add("Cuenta", Type.GetType("System.String"))
|
||||
.Add("Referencia", Type.GetType("System.String"))
|
||||
.Add("Concepto", Type.GetType("System.String"))
|
||||
.Add("Cargo", Type.GetType("System.Double"))
|
||||
.Add("Abono", Type.GetType("System.Double"))
|
||||
.Add("Importe", Type.GetType("System.Double"))
|
||||
.Add("TipoMovto", Type.GetType("System.Int32"))
|
||||
.Add("EsComodin", Type.GetType("System.Int32"))
|
||||
.Add("CveConcepto", Type.GetType("System.Int32"))
|
||||
.Add("CveProveedor", Type.GetType("System.Int32"))
|
||||
.Add("RazonSocial", Type.GetType("System.String"))
|
||||
.Add("SubProyecto", Type.GetType("System.String"))
|
||||
.Add("CveSubProyecto", Type.GetType("System.Int32"))
|
||||
End With
|
||||
|
||||
|
||||
Try
|
||||
If Not Request.QueryString("CveImpuesto") Is Nothing Then
|
||||
CveImpuesto = Request.QueryString("CveImpuesto").ToString.ToEntero
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
If CveImpuesto > 0 Then
|
||||
CargaDatos()
|
||||
Else
|
||||
CargaDetallesPlantilla()
|
||||
End If
|
||||
|
||||
|
||||
GvMov.DataBind()
|
||||
UPMovs.Update()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub CargaCombos()
|
||||
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjContabilidad As New ClsContabilidad
|
||||
|
||||
If ObjConta.GetMonedas() Then
|
||||
DdlMoneda.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
If ObjContabilidad.GetFisImpuestosTipos(1) Then
|
||||
DdlTipoImpuesto.DataSource = ObjContabilidad.DtResultados
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlMoneda.DataBind()
|
||||
DdlTipoImpuesto.DataBind()
|
||||
DdlProveedores.DataBind()
|
||||
|
||||
DdlMoneda.Items.Insert(0, New ListItem("Seleccione una moneda", "-1"))
|
||||
DdlTipoImpuesto.Items.Insert(0, New ListItem("Seleccione una opción", "-1"))
|
||||
DdlProveedores.Items.Insert(0, New ListItem("Seleccione un proveedor", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim objConta As New ClsContabilidad
|
||||
Dim DtTemp As New DataTable
|
||||
Dim _CvePrePoliza As Integer = 0
|
||||
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(62).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
|
||||
Dim DtTempDetalle As New DataTable
|
||||
|
||||
With DtTempDetalle.Columns
|
||||
.Add("IdMov", Type.GetType("System.Int32"))
|
||||
.Add("IdCuenta", Type.GetType("System.Int32"))
|
||||
.Add("CodigoCuenta", Type.GetType("System.String"))
|
||||
.Add("Cuenta", Type.GetType("System.String"))
|
||||
.Add("Referencia", Type.GetType("System.String"))
|
||||
.Add("Concepto", Type.GetType("System.String"))
|
||||
.Add("Cargo", Type.GetType("System.Double"))
|
||||
.Add("Abono", Type.GetType("System.Double"))
|
||||
.Add("TipoMovto", Type.GetType("System.Int32"))
|
||||
.Add("EsComodin", Type.GetType("System.Int32"))
|
||||
.Add("Importe", Type.GetType("System.Double"))
|
||||
.Add("CveConcepto", Type.GetType("System.Int32"))
|
||||
.Add("CveProveedor", Type.GetType("System.Int32"))
|
||||
.Add("RazonSocial", Type.GetType("System.String"))
|
||||
.Add("SubProyecto", Type.GetType("System.String"))
|
||||
.Add("CveSubProyecto", Type.GetType("System.Int32"))
|
||||
End With
|
||||
|
||||
If objConta.GetFisImpuestos(CveImpuesto, -1, -1, "-1", UsuarioActual.Empresa.CveEmpresa, Nothing, Nothing) Then
|
||||
|
||||
DtTemp = objConta.DtResultados
|
||||
|
||||
If DtTemp.Rows.Count > 0 Then
|
||||
|
||||
TxtFolio.Text = DtTemp(0)("Folio").ToString
|
||||
DdlProveedores.SelectedValueExist(DtTemp(0)("CveProveedor").ToString)
|
||||
DdlMoneda.SelectedValueExist(DtTemp(0)("CveMoneda").ToString)
|
||||
DdlTipoImpuesto.SelectedValueExist("CveTipoImpuesto")
|
||||
TxtConcepto.Text = DtTemp(0)("Concepto").ToString
|
||||
TxtFechaImpuesto.Text = DtTemp(0)("Fecha").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
_CvePrePoliza = DtTemp(0)("CvePrepoliza").ToString.ToEntero
|
||||
|
||||
BtnGuardar.Visible = False
|
||||
|
||||
UPImpuesto.Update()
|
||||
|
||||
If objConta.GetFisImpuestosDetalle(CveImpuesto, -1, -1, "-1", UsuarioActual.Empresa.CveEmpresa, Nothing, Nothing) Then
|
||||
|
||||
For Each DRD As DataRow In objConta.DtResultados.Rows
|
||||
Dim dr As DataRow = DtTempDetalle.NewRow
|
||||
|
||||
dr("IdCuenta") = DRD("IdCtaContable").ToString.ToEntero
|
||||
dr("CodigoCuenta") = ""
|
||||
dr("Cuenta") = DRD("ConceptoContable").ToString
|
||||
dr("RazonSocial") = ""
|
||||
dr("Concepto") = ""
|
||||
dr("TipoMovto") = If(DRD("TipoMovto").ToString = "False", 0, 1)
|
||||
dr("EsComodin") = 1
|
||||
dr("Importe") = DRD("Importe").ToString.ToDouble
|
||||
dr("CveConcepto") = 0
|
||||
dr("CveProveedor") = DRD("CveProveedor").ToString.ToEntero
|
||||
dr("SubProyecto") = DRD("SubProyecto")
|
||||
dr("CveSubProyecto") = DRD("CveSubProyecto").ToString.ToEntero
|
||||
|
||||
DtTempDetalle.Rows.Add(dr)
|
||||
|
||||
Next
|
||||
GvMov.DataSource = DtTempDetalle
|
||||
GvMov.DataBind()
|
||||
UPMovs.Update()
|
||||
End If
|
||||
Else
|
||||
Alert("No se encontron registros del impuesto solicitado.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
objConta.Dispose()
|
||||
Else
|
||||
objConta.Dispose()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDetallesPlantilla()
|
||||
|
||||
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(62).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
|
||||
Dim Cuenta As String = ""
|
||||
Dim IdCuenta As Integer = 0
|
||||
Dim CodigoCuenta As String = ""
|
||||
Dim NombreCuenta As String = ""
|
||||
Dim EsComodin As Integer = 0
|
||||
DtMovimientos.Clear()
|
||||
|
||||
For Each drt As DataRow In Dt.Rows
|
||||
|
||||
Cuenta = drt("ConceptoContable").ToString
|
||||
IdCuenta = 0
|
||||
CodigoCuenta = ""
|
||||
NombreCuenta = ""
|
||||
|
||||
If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables
|
||||
Dim drr As DataRow = DTCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString))
|
||||
If drr IsNot Nothing Then
|
||||
IdCuenta = drt("IdCtaContable").ToString.ToEntero
|
||||
CodigoCuenta = drr("CuentaFormato").ToString()
|
||||
NombreCuenta = drr("Nombre").ToString()
|
||||
'Cuenta = drr("Nombre").ToString()
|
||||
End If
|
||||
EsComodin = 0
|
||||
End If
|
||||
|
||||
Dim dr As DataRow = DtMovimientos.NewRow
|
||||
dr("IdCuenta") = IdCuenta
|
||||
dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
||||
dr("Cuenta") = Cuenta
|
||||
dr("RazonSocial") = drt("RazonSocial")
|
||||
dr("Concepto") = TxtConcepto.Text
|
||||
dr("TipoMovto") = If(drt("TipoMovto").ToString = "False", 0, 1)
|
||||
dr("EsComodin") = EsComodin
|
||||
|
||||
dr("CveConcepto") = drt("CveConcepto")
|
||||
dr("CveProveedor") = drt("CveProveedor")
|
||||
dr("SubProyecto") = drt("SubProyecto")
|
||||
dr("CveSubProyecto") = drt("CveSubProyecto")
|
||||
|
||||
DtMovimientos.Rows.Add(dr)
|
||||
|
||||
Next
|
||||
|
||||
GvMov.DataSource = DtMovimientos
|
||||
GvMov.DataBind()
|
||||
UPMovs.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function SubirComprobante(CveImpuesto As Integer) As Boolean
|
||||
Dim Respuesta As Boolean = False
|
||||
Dim RutaDirectorio As String = String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, "Comprobantes\")
|
||||
|
||||
Dim filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
||||
Dim filemove As String = ""
|
||||
Dim Comprobante As String = ""
|
||||
|
||||
If filesgral.Count > 0 Then
|
||||
For Each fileItem As Archivo In filesgral
|
||||
|
||||
Comprobante = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
filemove = fileItem.FileUrl
|
||||
RutaArchivo = String.Format("{0}{1}", RutaDirectorio, CveImpuesto)
|
||||
RutaArchivo = String.Format("{0}.{1}", RutaArchivo, fileItem.Extencion)
|
||||
|
||||
Try
|
||||
If Not Directory.Exists(RutaDirectorio) Then
|
||||
Directory.CreateDirectory(RutaDirectorio)
|
||||
End If
|
||||
|
||||
If File.Exists(RutaArchivo) Then
|
||||
File.Delete(RutaArchivo)
|
||||
End If
|
||||
|
||||
File.Move(filemove, RutaArchivo)
|
||||
Respuesta = True
|
||||
Catch ex As Exception
|
||||
OnError("Error al intentar guardar archivo ", ex)
|
||||
Respuesta = False
|
||||
RutaArchivo = "-1"
|
||||
End Try
|
||||
Anexo.Text = ""
|
||||
|
||||
Next
|
||||
Else
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
UpAnexo.Update()
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
|
||||
Protected Sub GvMov_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMov.RowDataBound
|
||||
|
||||
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(62).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(0).ToolTip = e.Row.DBCampo("IdCuenta")
|
||||
If e.Row.DBCampo("TipoMovto") = "1" Then e.Row.FCTextBox("TxtAbono").Visible = True Else e.Row.FCTextBox("TxtCargo").Visible = True
|
||||
|
||||
'cuando se modifica el importe de la cuenta bancaria que se actualice el importe del documento
|
||||
If e.Row.DBCampo("EsComodin") = "1" Then
|
||||
If e.Row.DBCampo("TipoMovto") = "1" Then
|
||||
e.Row.FCTextBox("TxtAbono").Attributes.Add("onkeyup", "FncImporte('TxtImporte',this.id,2)")
|
||||
If e.Row.DataKey("Importe").ToString.ToDouble > 0 Then
|
||||
e.Row.FCTextBox("TxtAbono").Text = e.Row.DataKey("Importe").ToString.ToDouble.ToString("###,###,###.00")
|
||||
e.Row.FCTextBox("TxtAbono").Enabled = False
|
||||
TxtTotalAbonos.Enabled = False
|
||||
End If
|
||||
'e.Row.FCTextBox("TxtAbono").Text = TxtImporte.Text
|
||||
Else
|
||||
e.Row.FCTextBox("TxtCargo").Attributes.Add("onkeyup", "FncImporte('TxtImporte',this.id,2)")
|
||||
If e.Row.DataKey("Importe").ToString.ToDouble > 0 Then
|
||||
e.Row.FCTextBox("TxtCargo").Text = e.Row.DataKey("Importe").ToString.ToDouble.ToString("###,###,###.00")
|
||||
e.Row.FCTextBox("TxtCargo").Enabled = False
|
||||
TxtTotalCargos.Enabled = False
|
||||
End If
|
||||
'e.Row.FCTextBox("TxtCargo").Text = TxtImporte.Text
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
Dim objConta As New ClsContabilidad
|
||||
Dim ErrorProceso As Boolean = True
|
||||
Dim InfoArchivo As FileInfo
|
||||
Dim CvePrepoliza As Integer = 0
|
||||
Dim NombreArchivo As String = "-1"
|
||||
Dim CargoTotal As Double = 0
|
||||
Dim AbonoTotal As Double = 0
|
||||
|
||||
For Each gvRow As GridViewRow In GvMov.Rows
|
||||
|
||||
Dim Cargo As Double = gvRow.FCTextBox("txtcargo").Text.ToDouble
|
||||
Dim Abono As Double = gvRow.FCTextBox("txtabono").Text.ToDouble
|
||||
|
||||
CargoTotal = CargoTotal + Cargo
|
||||
AbonoTotal = AbonoTotal + Abono
|
||||
Next
|
||||
|
||||
|
||||
If CargoTotal = AbonoTotal And CargoTotal > 0 Then
|
||||
|
||||
objConta.IniciaTransacSQL()
|
||||
|
||||
CvePrepoliza = objConta.AddPrePolizas("Contabilidad/Impuestos", 62, 0, 0, DdlMoneda.SelectedValue.ToEntero, Now, TxtConcepto.Text.Trim.ToUpper, UsuarioActual.CveUsuario, UsuarioActual.Empresa.CveEmpresa)
|
||||
If CvePrepoliza > 0 Then
|
||||
|
||||
If objConta.AddUpdateFisImpuestos(-1, DdlTipoImpuesto.SelectedValue.ToEntero, CvePrepoliza, DdlProveedores.SelectedValue.ToEntero, TxtFechaImpuesto.Text.ToDate, TxtFolio.Text.Trim.ToUpper, NombreArchivo, UsuarioActual.CveUsuario, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
ErrorProceso = False
|
||||
|
||||
CveImpuesto = objConta.DtResultados(0)("CveImpuesto").ToString.ToEntero
|
||||
|
||||
' If objConta.AddUpdateFisImpuestos(CveImpuesto, DdlTipoImpuesto.SelectedValue.ToEntero, -1, DdlProveedores.SelectedValue.ToEntero, TxtFechaImpuesto.Text.ToDate, TxtFolio.Text.Trim.ToUpper, "-1", UsuarioActual.CveUsuario, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
|
||||
ErrorProceso = False
|
||||
|
||||
Dim filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
||||
If filesgral.Count > 0 Then
|
||||
If SubirComprobante(CveImpuesto) Then
|
||||
InfoArchivo = New FileInfo(RutaArchivo)
|
||||
If InfoArchivo.Exists Then
|
||||
NombreArchivo = System.IO.Path.GetFileName(RutaArchivo)
|
||||
objConta.AddUpdateFisImpuestos(CveImpuesto, DdlTipoImpuesto.SelectedValue.ToEntero, CvePrepoliza, DdlProveedores.SelectedValue.ToEntero, TxtFechaImpuesto.Text.ToDate, TxtFolio.Text.Trim.ToUpper, NombreArchivo, UsuarioActual.CveUsuario, UsuarioActual.Empresa.CveEmpresa)
|
||||
ErrorProceso = False
|
||||
Else
|
||||
ErrorProceso = True
|
||||
OnError("", New Exception("No existe el archivo"))
|
||||
End If
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
|
||||
|
||||
Dim ContadorOrdern As Integer = 0
|
||||
For Each gvRow As GridViewRow In GvMov.Rows
|
||||
|
||||
'insercion de detalle ***********************************************************************************************
|
||||
Dim Importe As Decimal = 0
|
||||
Dim TipoMovto As Boolean = False
|
||||
|
||||
Dim Cargo As Double = gvRow.FCTextBox("txtcargo").Text.ToDouble
|
||||
Dim Abono As Double = gvRow.FCTextBox("txtabono").Text.ToDouble
|
||||
|
||||
Dim Concepto As String = TxtConcepto.Text.ToUpper.Trim
|
||||
Dim CveConcepto As Integer = gvRow.DataKey("CveConcepto").ToEntero
|
||||
|
||||
Dim IdCtaContable As Integer = gvRow.DataKey("IDCuenta").ToEntero
|
||||
Dim CveSubProtyecto As Integer = If(gvRow.DataKey("CveSubProyecto").ToEntero = 0, -1, gvRow.DataKey("CveSubProyecto").ToEntero)
|
||||
Dim CveProveedor As Integer = gvRow.DataKey("CveProveedor").ToEntero
|
||||
Dim TipoMovimientoString As String = gvRow.DataKey("TipoMovto")
|
||||
|
||||
If gvRow.DataKey("TipoMovto").ToDouble = 0 Then
|
||||
Importe = gvRow.FCTextBox("txtcargo").Text.ToDecimal
|
||||
TipoMovto = True
|
||||
Else
|
||||
Importe = gvRow.FCTextBox("txtabono").Text.ToDecimal
|
||||
TipoMovto = False
|
||||
End If
|
||||
|
||||
If Importe > 0 Then
|
||||
If objConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovto, Importe, TxtFolio.Text.Trim.ToUpper, CveConcepto, Concepto, Now, IdCtaContable, -1, CveProveedor:=CveProveedor, CveSubProyecto:=CveSubProtyecto) Then
|
||||
ContadorOrdern = ContadorOrdern + 1
|
||||
ErrorProceso = False
|
||||
Else
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
If Not ErrorProceso Then
|
||||
Alert($"Prepoliza { CvePrepoliza } Insertada correctamente, Impuesto { CveImpuesto } insertado y actualizado correctamente")
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
If Not ErrorProceso Then
|
||||
objConta.Commit()
|
||||
Response.Redirect($"FisImpuestos.aspx?CveImpuesto={CveImpuesto}", True)
|
||||
Else
|
||||
objConta.RollBack()
|
||||
End If
|
||||
|
||||
Else
|
||||
If CargoTotal = 0 Then
|
||||
Alert("El cargo total debe ser mayor a 0")
|
||||
End If
|
||||
|
||||
If CargoTotal <> AbonoTotal Then
|
||||
Alert("El cargo total y el abono total deben ser iguales.")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
objConta.Dispose()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function IdCuentaBancos(CveCuenta As Integer) As Integer
|
||||
Dim Retorno As Integer = 0
|
||||
|
||||
'saco de la póliza el importe del cheque, que coincida la cuenta contable con la bancaria
|
||||
If CveCuenta > 0 Then
|
||||
Dim drr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltroPrimero("CveCuenta=" & CveCuenta)
|
||||
If drr IsNot Nothing Then
|
||||
Retorno = drr("IdCtaContable").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Private Sub ResetControles()
|
||||
|
||||
DdlMoneda.SelectedIndex = 0
|
||||
DdlTipoImpuesto.SelectedIndex = 0
|
||||
DdlProveedores.SelectedIndex = 0
|
||||
TxtFechaImpuesto.Text = ""
|
||||
TxtConcepto.Text = ""
|
||||
TxtFolio.Text = ""
|
||||
UPImpuesto.Update()
|
||||
CargaDetallesPlantilla()
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
114
Contabilidad/LibroDiario.aspx
Normal file
114
Contabilidad/LibroDiario.aspx
Normal file
@@ -0,0 +1,114 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="LibroDiario.aspx.vb" Inherits="Contabilidad_LibroDiario" %>
|
||||
|
||||
<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">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" Visible="false" runat="server"><i class="fa fa-ad-excel"></i> Generar EXCEL</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" Visible="false" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgExcel" />
|
||||
<asp:PostBackTrigger ControlID="Imprimir" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Libro Diario
|
||||
</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" CssClass="btn btn-primary" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" Enabled="false"/>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1" style="width: 90px; padding-right: 2px;">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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<%-- <br />
|
||||
<div class="text-right">Buscar :
|
||||
<input type="text" id="Buscar" style="margin-right: 30px;" />
|
||||
</div>--%>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server" style="margin-left: 15px; margin-right: 15px;">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover Widthall" GridLines="None" AutoGenerateColumns="False" runat="server">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Tipo" DataField="TipoPol" />
|
||||
<asp:BoundField HeaderText="Poliza" DataField="Folio" />
|
||||
<asp:BoundField HeaderText="Concepto" DataField="Concepto" />
|
||||
<asp:BoundField HeaderText="Cuenta" DataField="Codigo" />
|
||||
<asp:BoundField HeaderText="Nombre" DataField="Nombre" />
|
||||
<asp:BoundField HeaderText="Descripción" DataField="Descripcion" />
|
||||
<asp:BoundField HeaderText="Cargos" DataField="Cargos" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.00}" />
|
||||
<asp:BoundField HeaderText="Abonos" DataField="Abonos" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.00}" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
249
Contabilidad/LibroDiario.aspx.vb
Normal file
249
Contabilidad/LibroDiario.aspx.vb
Normal file
@@ -0,0 +1,249 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.Activities.Statements
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System
|
||||
|
||||
Partial Class Contabilidad_LibroDiario
|
||||
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
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
InicializaValores()
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
BtnConsultar.Enabled = True
|
||||
Else
|
||||
Alert("La empresa no usa Armonización Contable", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub InicializaValores()
|
||||
|
||||
TxtFechaDel.Text = $"01/01/{Now.Year}"
|
||||
TxtFechaAl.Text = Now.ToShortDateString
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A - D A T O S"
|
||||
Private Sub CargaDatos()
|
||||
|
||||
FechaInicio = If(IsDate(TxtFechaDel.Text), TxtFechaDel.Text.ToDate, MinFecha)
|
||||
FechaFin = If(IsDate(TxtFechaAl.Text), TxtFechaAl.Text.ToDate, MaxFecha)
|
||||
|
||||
'FechaInicio = New Date(2016, 1, 1)
|
||||
'FechaFin = New Date(2016, 1, 31)
|
||||
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConta.GetLibroDiario(FechaInicio, FechaFin) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
ImgExcel.Visible = True
|
||||
Imprimir.Visible = True
|
||||
CargaGrid()
|
||||
Else
|
||||
ImgExcel.Visible = False
|
||||
Imprimir.Visible = False
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#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) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
''CABECERA
|
||||
'If e.Row.DBCampo("Concepto").ToString <> "" And e.Row.DBCampo("Id").ToString = "" Then
|
||||
' e.Row.Font.Bold = True
|
||||
' 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.CssClass = "SubTotales" '
|
||||
'End If
|
||||
|
||||
''DETALLE
|
||||
'If e.Row.DBCampo("Codigo").ToString <> "" Then
|
||||
' e.Row.Cells(0).Text = ""
|
||||
' e.Row.Cells(1).Text = ""
|
||||
' e.Row.Cells(2).Text = ""
|
||||
' e.Row.Cells(3).Text = ""
|
||||
'End If
|
||||
|
||||
''SUBTOTAL
|
||||
'If e.Row.DBCampo("Fecha").ToString <> "" And e.Row.DBCampo("Concepto").ToString = "" Then
|
||||
' e.Row.Font.Bold = True
|
||||
' e.Row.Cells(0).Text = ""
|
||||
' 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).HorizontalAlign = HorizontalAlign.Right
|
||||
' e.Row.Cells(6).Text = "Total:"
|
||||
' e.Row.CssClass = "SubTotales"
|
||||
'End If
|
||||
|
||||
''TOTAL
|
||||
'If e.Row.DBCampo("Fecha").ToString = "" Then
|
||||
' e.Row.Font.Bold = True
|
||||
' e.Row.Cells(0).Text = ""
|
||||
' 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).HorizontalAlign = HorizontalAlign.Right
|
||||
' e.Row.Cells(6).Text = "Total:"
|
||||
' e.Row.CssClass = "Totales"
|
||||
'End If
|
||||
|
||||
'CABECERA
|
||||
If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 1 Then
|
||||
e.Row.Font.Bold = True
|
||||
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.CssClass = "SubTotales" '
|
||||
End If
|
||||
|
||||
'DETALLE
|
||||
If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 2 Then
|
||||
e.Row.Cells(0).Text = ""
|
||||
e.Row.Cells(1).Text = ""
|
||||
e.Row.Cells(2).Text = ""
|
||||
e.Row.Cells(3).Text = ""
|
||||
End If
|
||||
|
||||
'SUBTOTAL
|
||||
If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 3 Then
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.Cells(0).Text = ""
|
||||
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).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(6).Text = "Total:"
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
'TOTAL
|
||||
If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 4 Then
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.Cells(0).Text = ""
|
||||
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).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(6).Text = "Total:"
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " IMPRIMIR "
|
||||
|
||||
#End Region
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
|
||||
'DtDatos = DtDatos
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
|
||||
'DtDatos = DtDatos
|
||||
ImprimirReporte("EXCEL")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim lista = New List(Of CrystalParametro)
|
||||
lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
lista.Add(New CrystalParametro("FechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
lista.Add(New CrystalParametro("FechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
|
||||
If Imagen.Exists Then
|
||||
lista.Add(New CrystalParametro("LogoPath", logouri))
|
||||
Else
|
||||
lista.Add(New CrystalParametro("LogoPath", ""))
|
||||
End If
|
||||
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/LibroDiario.rpt"), DtDatos, lista, "LibroDiario", Formato), "LibroDiario", Formato)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
116
Contabilidad/LibroMayor.aspx
Normal file
116
Contabilidad/LibroMayor.aspx
Normal file
@@ -0,0 +1,116 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="LibroMayor.aspx.vb" Inherits="Contabilidad_LibroMayor" %>
|
||||
|
||||
<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">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" Visible="false" runat="server"><i class="fa fa-ad-excel"></i> Generar EXCEL</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" Visible="false" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgExcel" />
|
||||
<asp:PostBackTrigger ControlID="Imprimir" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Libro Mayor
|
||||
</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" CssClass="btn btn-primary" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" Enabled="false"/>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1" style="width: 90px; padding-right: 2px;">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-2" style="width: 60px;">Moneda:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlMoneda" CssClass="select2me" runat="server" DataTextField="Moneda" DataValueField="CveMoneda" TabIndex="5" ClientIDMode="Static">
|
||||
</asp:DropDownList>
|
||||
</div>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<%-- <br />
|
||||
<div class="text-right">Buscar :
|
||||
<input type="text" id="Buscar" style="margin-right: 30px;" />
|
||||
</div>--%>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server" style="margin-left: 15px; margin-right: 15px;">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover Widthall" GridLines="None" AutoGenerateColumns="False" runat="server">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Tipo" DataField="TipoPol" />
|
||||
<asp:BoundField HeaderText="Poliza" DataField="Folio" />
|
||||
<asp:BoundField HeaderText="Descripción" DataField="Concepto" />
|
||||
<asp:BoundField HeaderText="Cargos" DataField="Cargos" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.00}" />
|
||||
<asp:BoundField HeaderText="Abonos" DataField="Abonos" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.00}" />
|
||||
<asp:BoundField HeaderText="Saldo" DataField="Saldo" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.00}" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
195
Contabilidad/LibroMayor.aspx.vb
Normal file
195
Contabilidad/LibroMayor.aspx.vb
Normal file
@@ -0,0 +1,195 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contabilidad_LibroMayor
|
||||
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
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
InicializaValores()
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
BtnConsultar.Enabled = True
|
||||
Else
|
||||
Alert("La empresa no usa Armonización Contable", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub InicializaValores()
|
||||
|
||||
TxtFechaDel.Text = $"01/01/{Now.Year}"
|
||||
TxtFechaAl.Text = Now.ToShortDateString
|
||||
|
||||
'DdlMoneda.DataSource = GlobalDTMonedas
|
||||
'DdlMoneda.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A - D A T O S"
|
||||
Private Sub CargaDatos()
|
||||
|
||||
FechaInicio = If(IsDate(TxtFechaDel.Text), TxtFechaDel.Text.ToDate, MinFecha)
|
||||
FechaFin = If(IsDate(TxtFechaAl.Text), TxtFechaAl.Text.ToDate, MaxFecha)
|
||||
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConta.GetLibroMayor(1, FechaInicio, FechaFin, 1) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
ImgExcel.Visible = True
|
||||
Imprimir.Visible = True
|
||||
CargaGrid()
|
||||
Else
|
||||
ImgExcel.Visible = False
|
||||
Imprimir.Visible = False
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#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) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
'0 Fecha
|
||||
'1 TipoPol
|
||||
'2 Folio
|
||||
'3 Concepto
|
||||
'4 Cargos
|
||||
'5 Abonos
|
||||
'6 Saldo
|
||||
|
||||
'CABECERA
|
||||
If e.Row.DBCampo("TipoRenglon") = "1" Then
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.Cells(0).Text = ""
|
||||
e.Row.Cells(1).Text = ""
|
||||
e.Row.Cells(2).Text = ""
|
||||
e.Row.Cells(3).Text = e.Row.DBCampo("Nombre")
|
||||
e.Row.Cells(4).Text = ""
|
||||
e.Row.Cells(5).Text = "Saldo inicial:"
|
||||
e.Row.Cells(6).Text = e.Row.DBCampo("SaldoInicial").FormatoNumero
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
|
||||
'DETALLE
|
||||
If e.Row.DBCampo("TipoRenglon") = "2" Then
|
||||
|
||||
End If
|
||||
|
||||
'SUBTOTAL
|
||||
If e.Row.DBCampo("TipoRenglon") = "3" Then
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.Cells(1).Text = ""
|
||||
e.Row.Cells(2).Text = ""
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(3).Text = "SubTotal:"
|
||||
e.Row.Cells(6).Text = ""
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
'TOTAL
|
||||
If e.Row.DBCampo("TipoRenglon") = "4" Then
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.Cells(0).Text = ""
|
||||
e.Row.Cells(1).Text = ""
|
||||
e.Row.Cells(2).Text = ""
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(3).Text = $"Total ({e.Row.DBCampo("Nombre")}):"
|
||||
e.Row.Cells(6).Text = ""
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " IMPRIMIR "
|
||||
|
||||
#End Region
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
|
||||
DtDatos = DtDatos
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
|
||||
DtDatos = DtDatos
|
||||
ImprimirReporte("EXCEL")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim lista = New List(Of CrystalParametro)
|
||||
lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
lista.Add(New CrystalParametro("FechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
lista.Add(New CrystalParametro("FechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
|
||||
If Imagen.Exists Then
|
||||
lista.Add(New CrystalParametro("LogoPath", logouri))
|
||||
Else
|
||||
lista.Add(New CrystalParametro("LogoPath", ""))
|
||||
End If
|
||||
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/LibroMayor.rpt"), DtDatos, lista, "LibroMayor", Formato), "LibroMayor", Formato)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
168
Contabilidad/PlantillasPolizas.aspx
Normal file
168
Contabilidad/PlantillasPolizas.aspx
Normal file
@@ -0,0 +1,168 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PlantillasPolizas.aspx.vb" Inherits="Contabilidad_PlantillasPolizas" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
<link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a{
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivGoPlantillaDetalle" ID="ImgDevoluciones" runat="server" > <i class="fa fa-pencil"></i> Registrar Plantilla Póliza</asp:HyperLink>
|
||||
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Plantillas de Pólizas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePlantillaPoliza" EmptyDataText="No se encontraron PlantillaPolizas Registrados" ToolTip="Listado de PlantillaPolizas" CssClass="table table-striped table-advance table-hoverv Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCvePlantillaPoliza" runat="server" Text='<%# Eval("CvePlantillaPoliza", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Plantilla Póliza">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPlantillaPoliza" runat="server" Text='<%# Eval("PlantillaPoliza", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo Póliza">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoPoliza" runat="server" Text='<%# Eval("TipoPolizaTexto", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usuario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DivGoPlantillaDetalle" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label7" runat="server" ClientIDMode="Static" Text="Selecccione Plantilla Poliza"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="Upplantillapoliza" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:DropDownList ID="DdlPlantillaPoliza" CssClass ="form-control input-sm select2me" style="width:400px !important" runat="server" AutoPostBack="true" DataValueField="CvePlantillaPoliza" DataTextField="PlantillaPoliza" ></asp:DropDownList>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="CancelarDevolucion" type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar la Plantilla y todos sus Detalles?');
|
||||
}
|
||||
</script>
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function OrdenarGV() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 270;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#C_GvDatos').DataTable({
|
||||
scrollY: Alto + 'px',
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
searching: false,
|
||||
info: false
|
||||
});
|
||||
$('#C_GvDatos').parent().parent().children().first().css("position", "static");
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
82
Contabilidad/PlantillasPolizas.aspx.vb
Normal file
82
Contabilidad/PlantillasPolizas.aspx.vb
Normal file
@@ -0,0 +1,82 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contabilidad_PlantillasPolizas
|
||||
Inherits ClsPaginas
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjPlantillaPolizas As New ClsContabilidad
|
||||
If ObjPlantillaPolizas.GetConta_PlantillasPolizas(-1, -1) Then
|
||||
GvDatos.DataSource = ObjPlantillaPolizas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GvDatos.DataBind()
|
||||
DdlPlantillaPoliza.DataSource = ObjPlantillaPolizas.DtResultados.FiltraParametros("", "", {"CvePlantillaPoliza", "PlantillaPoliza"})
|
||||
DdlPlantillaPoliza.DataBind()
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
OrdenaDatos()
|
||||
ObjPlantillaPolizas.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub DdlPlantillaPoliza_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPlantillaPoliza.SelectedIndexChanged
|
||||
Response.Redirect(String.Format("/Contabilidad/PlantillasPolizasDetalle.aspx?CvePlantillaPoliza={0}", DdlPlantillaPoliza.SelectedValue))
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(250)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(80)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.FCLiteral("LtlPlantillaPoliza").Text = "<a class=""Texto"" href=""/Contabilidad/PlantillasPolizasDetalle.aspx?CvePlantillaPoliza=" & e.Row.DBCampo("CvePlantillaPoliza") & """>" & e.Row.FCLiteral("LtlPlantillaPoliza").Text & "</a>"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjPlantillaPolizas As New ClsContabilidad
|
||||
If ObjPlantillaPolizas.RemoveConta_PlantillasPolizasDetalle(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
If ObjPlantillaPolizas.RemoveConta_PlantillasPolizas(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.EditIndex = -1
|
||||
GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa) = ObjPlantillaPolizas.DtResultados
|
||||
CargaDatos()
|
||||
Alert("La Plantilla Poliza se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End If
|
||||
ObjPlantillaPolizas.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " O R D E N A M I E N T O JAVASCRIPT"
|
||||
Private Sub OrdenaDatos()
|
||||
If (GvDatos.Rows.Count > 0) Then
|
||||
GvDatos.UseAccessibleHeader = True
|
||||
GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
RegistraScript("OrdenarGV();")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
375
Contabilidad/PlantillasPolizasDetalle.aspx
Normal file
375
Contabilidad/PlantillasPolizasDetalle.aspx
Normal file
@@ -0,0 +1,375 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PlantillasPolizasDetalle.aspx.vb" Inherits="Contabilidad_PlantillasPolizasDetalle" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
<link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a{
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="/Contabilidad/PlantillasPolizas.aspx" runat="server"><i class="fa fa-list"></i> Plantilla Póliza Listado</asp:HyperLink>
|
||||
</li>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Pantillas de Pólizas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li> <asp:LinkButton runat="server" ID="BtnAgregarSucursalModal" OnClick="BtnAgregarSucursalModal_Click" data-toggle="tooltip" data-placement="left" title="Agregar un Concepto a la Póliza." Text="<i class='fa fa-plus'></i> Agregar Concepto"></asp:LinkButton> </li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped Widthall">
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr id="TRClave" runat="server" >
|
||||
<td>
|
||||
<asp:Label ID="Label1" runat="server" Text="Clave Póliza:"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtClave" type="number" runat="server" Width="300px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="rfvClave" runat="server" ControlToValidate="TxtPlantillaPoliza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clave Póliza''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoClave" runat="server" HighlightCssClass="vco" TargetControlID="rfvClave" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
|
||||
<td>
|
||||
<asp:Label ID="LblPlantillaPoliza" runat="server" Text="Plantilla Póliza:"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtPlantillaPoliza" runat="server" Width="300px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPP" runat="server" ControlToValidate="TxtPlantillaPoliza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Plantilla Póliza''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPP" runat="server" HighlightCssClass="vco" TargetControlID="RFVPP" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<table id="tableopcional" runat="server">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label ID="LblTipoPoliza" runat="server" Text="Tipo de Póliza:"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlTipoPoliza" runat="server" AppendDataBoundItems="true" DataTextField="Tipo" DataValueField="Id" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 95px !important;">
|
||||
<asp:ListItem Value="-1" Text="Seleccione" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Egreso"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="Ingreso"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlTipoPoliza" runat="server" ControlToValidate="DdlTipoPoliza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Póliza''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCODdlTipoPoliza" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlTipoPoliza" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label ID="LblTPP" runat="server" Text="Tipo Plantilla:"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlTPP" runat="server" AppendDataBoundItems="true" DataTextField="TipoPlantillaPoliza" DataValueField="CveTipoPlantillaPoliza" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 138px !important;">
|
||||
<asp:ListItem Value="-1" Text="Seleccione" Selected="True"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlTPP" runat="server" ControlToValidate="DdlTPP" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Plantilla''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDdlTPP" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlTPP" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label ID="LblEstatus" runat="server" Text="Estatus:"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkEstatus" Checked="true" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label ID="LblFechaIng" runat="server" Text="Fecha:"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtFechaIng" runat="server" Enabled="false"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label ID="LblUsuario" runat="server" Enabled="false" Text="Usuario:"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtUsuario" runat="server" Enabled="false"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePlantillaPolizaDetalle, TipoMovimiento, CveSubProyecto, CveProveedor, CvePersonal, CveConcepto, IdCtaContable, Orden" EmptyDataText="No se encontraron Plantilla de Pólizas Registradas" ToolTip="Listado de Plantilla de Pólizas" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto Contable">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlConcepto" runat="server" Text='<%# Eval("ConceptoContable", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo Movimiento">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoMovto" runat="server" Text='<%# Eval("TipoMovimiento", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Cuenta Contable">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCtaContable" runat="server" Text='<%# Eval("IdCtaContable", "{0}") %>'>></asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="100px" HeaderText="SubProyecto">
|
||||
<ItemTemplate>
|
||||
<asp:label ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto") %>' data-toggle="tooltip" title='<%# Eval("Proyecto") %>'></asp:label>
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="100px" HeaderText="Razón Social">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlProveedor" runat="server" Text='<%# Eval("RazonSocial") %>' ></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="100px" HeaderText="Personal">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPersonal" runat="server" Text='<%# Eval("Personal") %>' ></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Orden">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlOrden" runat="server" Text='<%# Eval("Orden", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usuario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%#Eval("Usuario")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px">
|
||||
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgE" OnClick="Edit_Click" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField >
|
||||
<asp:TemplateField ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" OnClick="BtnGuardar_Click" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<div id="divAgregarSucursal" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title"> <asp:Literal ID="LtlTituloModal" runat="server">Agregar Concepto Contable</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlConcepto" CssClass="form-control input-sm select2me js-concepto-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="240px" ValidationGroup="GrpAgregar" AutoPostBack="true"></asp:DropDownList>
|
||||
<label for="<%= DdlConcepto.ClientID.ToString()%>">Concepto Contable</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoMovimiento" CssClass="form-control input-sm select2me js-movimiento-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="TipoMovimiento" DataValueField="CveTipoMovimiento" Width="240px" ValidationGroup="GrpAgregar">
|
||||
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Abono" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cargo" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoMovimiento.ClientID.ToString()%>">Tipo Movimiento:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlCtaContable" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
|
||||
<label for="<%= DdlCtaContable.ClientID.ToString()%>">Cuenta Contable:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DDLSubProyecto" CssClass="form-control input-sm select2me js-subproyecto-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
|
||||
<label for="<%= DDLSubProyecto.ClientID.ToString()%>">SubProyecto:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DDLProveedor" CssClass="form-control input-sm select2me js-referencia-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
|
||||
<label ID="LblProveedor" runat="server" for="<%= DDLProveedor.ClientID.ToString()%>">Razón Social:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtOrden" CssClass="form-control " runat="server" MaxLength="4" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="TxtOrden" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Orden''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtOrden.ClientID.ToString()%>">Orden:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPersonal" CssClass="form-control input-sm select2me js-referencia-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
|
||||
<label ID="LblPersonal" runat="server" for="<%= DdlPersonal.ClientID.ToString()%>">Personal:</label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardarRegistro" />
|
||||
<button id="BtnCancelarSucursal" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
<asp:HiddenField ID="HdnModalidad" runat="server" Value="I" ClientIDMode="Static" />
|
||||
<asp:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript" language="javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar el Detalle de la Plantilla?');
|
||||
}
|
||||
|
||||
function validarNum(e) {
|
||||
tecla = (document.all) ? e.keyCode : e.which;
|
||||
if (tecla == 8) return true;
|
||||
patron = /\d/;
|
||||
te = String.fromCharCode(tecla);
|
||||
return patron.test(te);
|
||||
}
|
||||
function quitaNoNumero(obj) {
|
||||
patron = /\d/;
|
||||
if (!patron.test(obj.value)) {
|
||||
obj.value = "";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function showDivEC() {
|
||||
$('#divAgregarSucursal').modal('show');
|
||||
}
|
||||
function hideDivEC() {
|
||||
$('#divAgregarSucursal').modal('hide');
|
||||
}
|
||||
|
||||
|
||||
function ShowDivRegistro() {
|
||||
$('#divAgregarSucursal').modal();
|
||||
}
|
||||
function HideDivRegistro() {
|
||||
$('#divAgregarSucursal').modal('hide');
|
||||
}
|
||||
|
||||
function SetValue(Hidden, Value) {
|
||||
document.getElementById(Hidden).value = Value;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function OrdenarGV() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 270;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#C_GvDatos').DataTable({
|
||||
scrollY: Alto + 'px',
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
searching: false,
|
||||
info: false
|
||||
});
|
||||
$('#C_GvDatos').parent().parent().children().first().css("position", "static");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
418
Contabilidad/PlantillasPolizasDetalle.aspx.vb
Normal file
418
Contabilidad/PlantillasPolizasDetalle.aspx.vb
Normal file
@@ -0,0 +1,418 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contabilidad_PlantillasPolizasDetalle
|
||||
Inherits ClsPaginas
|
||||
#Region "PROPIEDADES"
|
||||
|
||||
Private Property DTSubProyectos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTSubProyectos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTSubProyectos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property DTCuentasContables As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTCuentasContables"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTCuentasContables") = value
|
||||
End Set
|
||||
End Property
|
||||
Private ReadOnly Property CvePlantillaPoliza As Integer
|
||||
Get
|
||||
Return ViewState("CvePlantillaPoliza").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
Public Property DTDetalle As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTDetalle"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTDetalle") = 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
|
||||
ViewState("Orden") = ""
|
||||
TxtFechaIng.Text = Date.Today.ToString("dd/MM/yyyy")
|
||||
TxtUsuario.Text = UsuarioActual.CveUsuario.ToString
|
||||
CreadDTDetalle()
|
||||
|
||||
Dim ObjPlantillaPolizasTipo As New ClsContabilidad
|
||||
If ObjPlantillaPolizasTipo.GetConta_PlantillasPolizasTipo() Then
|
||||
Dim row As DataRow = ObjPlantillaPolizasTipo.DtResultados().NewRow()
|
||||
row("CveTipoPlantillaPoliza") = -1
|
||||
row("TipoPlantillaPoliza") = "Seleccione"
|
||||
ObjPlantillaPolizasTipo.DtResultados.Rows.Add(row)
|
||||
ObjPlantillaPolizasTipo.DtResultados.AcceptChanges()
|
||||
DdlTPP.DataSource = ObjPlantillaPolizasTipo.DtResultados()
|
||||
DdlTPP.DataBind()
|
||||
End If
|
||||
ObjPlantillaPolizasTipo.Dispose()
|
||||
|
||||
Dim dt As DataTable = Nothing
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If Conta.GetCuentas(-1, "-1", 1) Then
|
||||
dt = Conta.DtResultados
|
||||
DTCuentasContables = Conta.DtResultados
|
||||
Session("DtCuentas") = Conta.DtResultados
|
||||
End If
|
||||
Conta.Dispose()
|
||||
End If
|
||||
CargaCuenta()
|
||||
CargaDDL()
|
||||
CargaDDLProveedor()
|
||||
CargarConcepto()
|
||||
ViewState("CvePlantillaPoliza") = 0
|
||||
|
||||
If Request("CvePlantillaPoliza") IsNot Nothing AndAlso IsNumeric(Request("CvePlantillaPoliza")) AndAlso Request("CvePlantillaPoliza").ToEntero > 0 Then
|
||||
ViewState("CvePlantillaPoliza") = Request("CvePlantillaPoliza")
|
||||
TRClave.Visible = False
|
||||
TxtPlantillaPoliza.Enabled = False
|
||||
DdlTipoPoliza.Enabled = False
|
||||
DdlTPP.Enabled = False
|
||||
ChkEstatus.Enabled = False
|
||||
BtnGuardar.Visible = False
|
||||
tableopcional.Visible = False
|
||||
CargaDatos()
|
||||
CargaDatosPoliza(CvePlantillaPoliza)
|
||||
Else
|
||||
ViewState("CvePlantillaPoliza") = -1
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A - D A T O S"
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjPlantillaPolizaDetalle As New ClsContabilidad
|
||||
If ObjPlantillaPolizaDetalle.GetConta_PlantillasPolizasDetalle(CvePlantillaPoliza, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjPlantillaPolizaDetalle.DtResultados
|
||||
ObjPlantillaPolizaDetalle.Dispose()
|
||||
GvDatos.DataBind()
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
OrdenaDatos()
|
||||
End Sub
|
||||
Public Sub CargaDatosPoliza(CvePlantillaPoliza As Integer)
|
||||
Dim ObjPlantillaPolizas As New ClsContabilidad
|
||||
If ObjPlantillaPolizas.GetConta_PlantillasPolizas(CvePlantillaPoliza, -1) Then
|
||||
TxtPlantillaPoliza.Text = ObjPlantillaPolizas.PlantillaPoliza
|
||||
DdlTipoPoliza.SelectedValue = ObjPlantillaPolizas.TipoPoliza.ToString
|
||||
DdlTPP.SelectedValue = ObjPlantillaPolizas.CveTipoPlantillaPoliza.ToString
|
||||
If ObjPlantillaPolizas.Estatus = "Activo" Then
|
||||
ChkEstatus.Checked = True
|
||||
End If
|
||||
TxtFechaIng.Text = ObjPlantillaPolizas.FechaIng.ToShortDateString
|
||||
TxtUsuario.Text = ObjPlantillaPolizas.Usuario
|
||||
BtnGuardar.Text = "Actualizar"
|
||||
Else
|
||||
End If
|
||||
|
||||
ObjPlantillaPolizas.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiaDatos()
|
||||
TxtPlantillaPoliza.Text = ""
|
||||
DdlTipoPoliza.SelectedValue = "-1"
|
||||
DdlTPP.SelectedValue = "-1"
|
||||
ChkEstatus.Checked = False
|
||||
ViewState("CvePlantillaPoliza") = -1
|
||||
GvDatos.DataSource = Nothing
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuenta()
|
||||
DdlCtaContable.Items.Clear()
|
||||
DdlCtaContable.DataSource = DTCuentasContables
|
||||
DdlCtaContable.DataBind()
|
||||
DdlCtaContable.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargarConcepto()
|
||||
DdlConcepto.DataSource = GlobalDTContaConceptosContables(-1)
|
||||
DdlConcepto.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CreadDTDetalle()
|
||||
DTDetalle = New DataTable
|
||||
DTDetalle.Columns.Add("CvePlantillaPolizaDetalle", GetType(Integer)) 'Consec
|
||||
DTDetalle.Columns.Add("ConceptoContable", GetType(String))
|
||||
DTDetalle.Columns.Add("CveConcepto", GetType(Integer))
|
||||
DTDetalle.Columns.Add("TipoMovimiento", GetType(String))
|
||||
DTDetalle.Columns.Add("TipoMovto", GetType(Integer))
|
||||
DTDetalle.Columns.Add("IdCtaContable", GetType(Integer))
|
||||
DTDetalle.Columns.Add("Orden", GetType(String))
|
||||
DTDetalle.Columns.Add("Usuario", GetType(String))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjPlantillaPoliza As New ClsContabilidad
|
||||
Dim ErrorPlantilla = False
|
||||
Dim CvePlantilla = -1
|
||||
ObjPlantillaPoliza.IniciaTransacSQL()
|
||||
|
||||
If CvePlantillaPoliza < 0 Then
|
||||
If ObjPlantillaPoliza.AddConta_PlantillasPolizas(TxtClave.Text.ToEntero, TxtPlantillaPoliza.Text.Trim, DdlTPP.SelectedValue.ToEntero, DdlTipoPoliza.SelectedValue.ToEntero, ChkEstatus.Checked, TxtFechaIng.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
CvePlantilla = ObjPlantillaPoliza.CvePlantillaPoliza
|
||||
If DTDetalle.Rows.Count > 0 Then
|
||||
For Each Row As DataRow In DTDetalle.Rows
|
||||
If Not ObjPlantillaPoliza.AddConta_PlantillasPolizasDetalles(CvePlantilla, Row("CveConcepto").ToString.ToEntero, Row("TipoMovto").ToString.ToEntero, Row("IdCtaContable").ToString.ToEntero, Row("Orden").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero) Then
|
||||
ErrorPlantilla = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Else
|
||||
ErrorPlantilla = True
|
||||
End If
|
||||
|
||||
Else
|
||||
If ObjPlantillaPoliza.UpdateConta_PlantillasPolizas(TxtPlantillaPoliza.Text.Trim, DdlTPP.SelectedValue.ToEntero, DdlTipoPoliza.SelectedValue.ToEntero, ChkEstatus.Checked, CvePlantillaPoliza) Then
|
||||
ObjPlantillaPoliza.Commit()
|
||||
ObjPlantillaPoliza.Dispose()
|
||||
LimpiaDatos()
|
||||
Alert("La Plantilla Póliza y sus Detalles fueron Actualizados correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Contabilidad/PlantillasPolizas.aspx?"";")
|
||||
Exit Sub
|
||||
Else
|
||||
ErrorPlantilla = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If Not ErrorPlantilla Then
|
||||
ObjPlantillaPoliza.Commit()
|
||||
LimpiaDatos()
|
||||
Alert("La Plantilla Póliza y su Detalle fue agregado correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Contabilidad/PlantillasPolizas.aspx?"";")
|
||||
Else
|
||||
ObjPlantillaPoliza.RollBack()
|
||||
Alert("Error al agregar la Plantilla Póliza y el Detalle.", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjPlantillaPoliza.Dispose()
|
||||
End Sub
|
||||
Public Sub updatatos()
|
||||
|
||||
Dim ObjPlantillaPolizaDetalle As New ClsContabilidad
|
||||
If ObjPlantillaPolizaDetalle.GetConta_PlantillasPolizasDetalle(-1, -1) Then
|
||||
ViewState("DTPlantillaPolizaDetalle") = ObjPlantillaPolizaDetalle.DtResultados.FiltraParametros(String.Format(" CvePlantillaPoliza={0} AND CveEmpresa = {1}", CvePlantillaPoliza, UsuarioActual.CveEmpresa))
|
||||
|
||||
GlobalDTContaPlantillasPolizasDetalle(CvePlantillaPoliza) = ObjPlantillaPolizaDetalle.DtResultados
|
||||
End If
|
||||
If ObjPlantillaPolizaDetalle.GetConta_PlantillasPolizas(-1, -1) Then
|
||||
GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa) = ObjPlantillaPolizaDetalle.DtResultados
|
||||
End If
|
||||
ObjPlantillaPolizaDetalle.Dispose()
|
||||
End Sub
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
OcultaDiv()
|
||||
Dim ObjPlantillaPolizaDetalle As New ClsContabilidad
|
||||
Dim Row As DataRow
|
||||
Dim ErrorActualizar = False
|
||||
Dim ErrorDetalle = False
|
||||
|
||||
|
||||
If HdnModalidad.Value = "I" Then
|
||||
If CvePlantillaPoliza > 0 Then
|
||||
If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero) Then
|
||||
TxtOrden.Text = ""
|
||||
updatatos()
|
||||
Alert("El nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
Else
|
||||
ErrorDetalle = True
|
||||
End If
|
||||
Else
|
||||
Try
|
||||
Row = DTDetalle.NewRow
|
||||
Row("CvePlantillaPolizaDetalle") = DTDetalle.Rows.Count + 1
|
||||
Row("ConceptoContable") = DdlConcepto.SelectedItem.ToString
|
||||
Row("CveConcepto") = DdlConcepto.SelectedValue.ToEntero
|
||||
Row("TipoMovimiento") = DdlTipoMovimiento.SelectedItem.ToString
|
||||
Row("TipoMovto") = DdlTipoMovimiento.SelectedValue.ToEntero
|
||||
Row("IdCtaContable") = DdlCtaContable.SelectedValue.ToEntero
|
||||
Row("Orden") = TxtOrden.Text.Trim.ToEntero
|
||||
Row("Usuario") = UsuarioActual.Usuario
|
||||
|
||||
DTDetalle.Rows.Add(Row)
|
||||
|
||||
TxtOrden.Text = ""
|
||||
UpTitulos.Update()
|
||||
Catch ex As Exception
|
||||
ErrorDetalle = True
|
||||
End Try
|
||||
End If
|
||||
Else
|
||||
If HdnID.Value.ToEntero <> -1 Then
|
||||
If CvePlantillaPoliza > 0 Then
|
||||
If ObjPlantillaPolizaDetalle.UpdateConta_PlantillasPolizasDetalle(DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero,
|
||||
HdnID.Value.ToEntero, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero) Then
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
updatatos()
|
||||
Else
|
||||
ErrorActualizar = True
|
||||
End If
|
||||
Else
|
||||
Try
|
||||
Row = DTDetalle.NewRow
|
||||
Row("CvePlantillaPolizaDetalle") = DTDetalle.Rows.Count + 1
|
||||
Row("ConceptoContable") = DdlConcepto.SelectedItem.ToString
|
||||
Row("CveConcepto") = DdlConcepto.SelectedValue.ToEntero
|
||||
Row("TipoMovimiento") = DdlTipoMovimiento.SelectedItem.ToString
|
||||
Row("TipoMovto") = DdlTipoMovimiento.SelectedValue.ToEntero
|
||||
Row("IdCtaContable") = DdlCtaContable.SelectedValue.ToEntero
|
||||
Row("Orden") = TxtOrden.Text.Trim.ToEntero
|
||||
Row("Usuario") = UsuarioActual.Usuario
|
||||
DTDetalle.Rows.Add(Row)
|
||||
Catch ex As Exception
|
||||
ErrorActualizar = True
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjPlantillaPolizaDetalle.Dispose()
|
||||
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "G V - D A T O S"
|
||||
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim Cuenta As Integer = e.Row.DataKey("IdCtaContable").ToString.ToEntero
|
||||
e.Row.FCLiteral("LtlCtaContable").Text = DTCuentasContables.FiltroPrimeroValor("Nombre", $"Id = {Cuenta}")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjPlantillaPolizaDetalle As New ClsContabilidad
|
||||
If CvePlantillaPoliza > 0 Then
|
||||
If ObjPlantillaPolizaDetalle.RemoveConta_PlantillasPolizasDetalle(CvePlantillaPoliza, GvDatos.Rows(e.RowIndex).DataKey("CvePlantillaPolizaDetalle").ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
updatatos()
|
||||
Alert("El Concepto se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
Else
|
||||
Dim index = GvDatos.Rows(e.RowIndex).DataKey("CvePlantillaPolizaDetalle").ToString.ToEntero - 1
|
||||
DTDetalle.Rows.RemoveAt(index)
|
||||
End If
|
||||
ObjPlantillaPolizaDetalle.Dispose()
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Public Sub CargaDDL()
|
||||
|
||||
|
||||
DTSubProyectos = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DDLSubProyecto.DataSource = DTSubProyectos
|
||||
DDLSubProyecto.DataBind()
|
||||
DDLSubProyecto.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDDLProveedor()
|
||||
DDLProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
DDLProveedor.DataBind()
|
||||
DDLProveedor.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlPersonal.DataBind()
|
||||
DdlPersonal.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub DdlConcepto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConcepto.SelectedIndexChanged
|
||||
If DdlConcepto.SelectedValue.Contiene("130", "29") Then
|
||||
DdlPersonal.Visible = True
|
||||
LblPersonal.Visible = True
|
||||
Else
|
||||
DdlPersonal.Visible = False
|
||||
LblPersonal.Visible = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region " O R D E N A M I E N T O JAVASCRIPT"
|
||||
Private Sub OrdenaDatos()
|
||||
If (GvDatos.Rows.Count > 0) Then
|
||||
GvDatos.UseAccessibleHeader = True
|
||||
GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
RegistraScript("OrdenarGV();")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub OcultaDiv()
|
||||
ScriptManager.RegisterStartupScript(Me, Me.GetType, "Llave", "HideDivRegistro();", True)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnModalidad.Value = "U"
|
||||
HdnID.Value = GvRow.DataKey("CvePlantillaPolizaDetalle")
|
||||
DdlConcepto.SelectedValueExist(GvRow.DataKey("CveConcepto"))
|
||||
DdlTipoMovimiento.SelectedValueExist(IIf(GvRow.DataKey("TipoMovimiento") = "Abono", 1, 0).ToString)
|
||||
DdlCtaContable.SelectedValueExist(GvRow.DataKey("IdCtaContable"))
|
||||
DDLSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
|
||||
TxtOrden.Text = GvRow.DataKey("Orden")
|
||||
LbAgregar.Text = "Actualizar"
|
||||
LtlTituloModal.Text = String.Format("{0}{1}", "Actualizar Concepto: ", DdlConcepto.SelectedItem)
|
||||
|
||||
If DdlConcepto.SelectedValue.Contiene("130", "29") Then
|
||||
DdlPersonal.SelectedValueExist(GvRow.DataKey("CvePersonal"))
|
||||
DdlPersonal.Visible = True
|
||||
LblPersonal.Visible = True
|
||||
Else
|
||||
DdlPersonal.SelectedIndex = 0
|
||||
DdlPersonal.Visible = False
|
||||
LblPersonal.Visible = False
|
||||
End If
|
||||
UpModal.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "divAgregarSucursal"))
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Public Sub BtnAgregarSucursalModal_Click(sender As Object, e As EventArgs)
|
||||
DdlPersonal.Visible = False
|
||||
LblPersonal.Visible = False
|
||||
LbAgregar.Text = "Agregar"
|
||||
LtlTituloModal.Text = "Agregar Concepto Contable"
|
||||
DdlConcepto.SelectedIndex = 0
|
||||
DdlTipoMovimiento.SelectedIndex = 0
|
||||
DdlCtaContable.SelectedIndex = 0
|
||||
DDLSubProyecto.SelectedIndex = 0
|
||||
DDLProveedor.SelectedIndex = 0
|
||||
DdlPersonal.SelectedIndex = 0
|
||||
TxtOrden.Text = ""
|
||||
UpModal.Update()
|
||||
HdnModalidad.Value = "I"
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "divAgregarSucursal"))
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
285
Contabilidad/Poliza.aspx
Normal file
285
Contabilidad/Poliza.aspx
Normal file
@@ -0,0 +1,285 @@
|
||||
<%@ Page Title="Contabilidad - Pólizas" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Poliza.aspx.vb" Inherits="Contabilidad_Poliza" %>
|
||||
|
||||
<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">
|
||||
<img src="/Imagenes/printer.png" alt="Imprimir Póliza" onclick="fnPrint();" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Pólizas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnPoliza" runat="server" CssClass="btn btn-default" Text="Pólizas" Style="display: none;" PostBackUrl="/Contabilidad/RegPolizas.aspx" />
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1" id="colFiltros" runat="server" width="20px"></div>
|
||||
<div class="col-md-3" id="tdD" runat="server">
|
||||
<div class="row">
|
||||
<label class="col-md-3">Tipo:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlTipoPoliza" runat="server" DataValueField="Id" DataTextField="Nombre" CssClass="form-control input-sm input-small">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1">Fecha:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="TxtFechaPol" runat="server" CssClass="Texto" MaxLength="10" ValidationGroup="Consultar" Width="70px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaPol" runat="server" ControlToValidate="TxtFechaPol" Display="None" ErrorMessage="El campo <b>''Fecha de póliza''</b> es requerido por la aplicación, por favor ingresélo." ValidationGroup="Consultar"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
<label class="col-md-2">Número de póliza:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="txtNumPol" runat="server" CssClass="Texto" MaxLength="8" ValidationGroup="Consultar" Width="44px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="rfvNumPol" runat="server" ControlToValidate="txtNumPol" Display="None" ErrorMessage="El campo <b>''Número de póliza''</b> es requerido por la aplicación, por favor ingresélo." ValidationGroup="Consultar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvNumPol" runat="server" ControlToValidate="txtNumPol" Display="None" ErrorMessage="El campo <b>''Número de póliza''</b> no tiene el formato correcto, por favor corrija. (Solo digítos númericos)." Operator="DataTypeCheck" Type="Integer" ValidationGroup="Consultar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvNumPol" runat="server" HighlightCssClass="vco" TargetControlID="rfvNumPol" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvNumPol" runat="server" HighlightCssClass="vco" TargetControlID="cvNumPol" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="TbGral" width="100%" border="0" cellpadding='0' cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
<table id="tbl">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel ID="upTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table" style="width: 100%;">
|
||||
<tr style="height: 18px;">
|
||||
<th align="center" colspan="2">
|
||||
<asp:Label ID="LblEmpresa" runat="server" Font-Size="Large"></asp:Label></th>
|
||||
</tr>
|
||||
<tr style="height: 18px;">
|
||||
<th align="center" colspan="2">Diario Cronológico del <asp:Label ID="LblFechaDe" runat="server"></asp:Label> al <asp:Label ID="LblFechaAl" runat="server"></asp:Label></th>
|
||||
</tr>
|
||||
<tr style="height: 18px;">
|
||||
<td align="left" colspan="2"> <b>Fecha:</b> <asp:Label ID="LblFechaActual" runat="server"></asp:Label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="table table-striped table-advance table-hover" style="width: 100%;">
|
||||
<tr style="height: 18px;">
|
||||
<th style="text-align: left;"> <b>Tipo de Póliza:</b> <asp:Label ID="LblTipoPoliza" runat="server"></asp:Label></th>
|
||||
</tr>
|
||||
<tr style="height: 18px;">
|
||||
<th style="text-align: left;"> <b>Número de Póliza:</b> <asp:Label ID="LblNumPoliza" runat="server"></asp:Label></th>
|
||||
</tr>
|
||||
<tr style="height: 18px;">
|
||||
<th style="text-align: left;"> <b>Concepto:</b> <asp:Label ID="LblConcepto" runat="server"></asp:Label></th>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height: 10px;">
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="width: 100%;" class="table">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th align="center" width="70px">
|
||||
<asp:LinkButton ID="LbNumMovto" runat="server" Text="" CommandArgument="NumMovto" OnClick="LbOrden_Click">
|
||||
N°
|
||||
<asp:Literal ID="ImgNumMovto" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th align="center" width="100px">
|
||||
<asp:LinkButton ID="LbRef" runat="server" Text="" CommandArgument="REFERENCIA" OnClick="LbOrden_Click">
|
||||
Referencia
|
||||
<asp:Literal ID="ImgREFERENCIA" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th align="center" width="150px">
|
||||
<asp:LinkButton ID="LbCuenta" runat="server" Text="" CommandArgument="CuentaFormato" OnClick="LbOrden_Click">
|
||||
Cuenta
|
||||
<asp:Literal ID="ImgCuentaFormato" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th align="center" width="100px">SegNeg</th>
|
||||
<th align="center" width="250px">
|
||||
<asp:LinkButton ID="LbNombre" runat="server" Text="Nombre">
|
||||
</asp:LinkButton> / <asp:LinkButton ID="lnkConcepto" runat="server" Text="Concepto">
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th align="center" width="100px">
|
||||
<asp:LinkButton ID="LbCargo" runat="server" Text="" CommandArgument="CARGO" OnClick="LbOrden_Click">
|
||||
Cargo
|
||||
<asp:Literal ID="ImgCARGO" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th align="center" width="100px">
|
||||
<asp:LinkButton ID="LbAbono" runat="server" Text="" CommandArgument="AMOBO" OnClick="LbOrden_Click">
|
||||
Abono
|
||||
<asp:Literal ID="ImgABONO" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="DivDetalle" style="overflow-y: auto;">
|
||||
<asp:UpdatePanel ID="upDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="false" ClientIDMode="Static" EmptyDataText="No se encontraron datos en la Póliza solicitada." ShowHeader="false" CssClass="table table-striped table-advance table-hover" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Right" Width="70" />
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="A" runat="server" Text='<%# Eval("NumMovto") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" Width="80" />
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="B" runat="server" Text='<%# Eval("REFERENCIA") %>' CssClass="Texto"></asp:HyperLink>
|
||||
<asp:Literal ID="LitSIGRef" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" Width="150" />
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="C" runat="server" Text='<%# Eval("CuentaFormato", "{0}") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" Width="100" />
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblSegNeg" runat="server" Text='<%# Eval("SEGNEG", "{0}") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Left" Width="250" />
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="D" runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Right" Width="100" />
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="E" runat="server" Text='<%# Eval("CARGO","{0:N2}") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Right" Width="100" />
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="F" runat="server" Text='<%# Eval("ABONO","{0:N2}") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> </ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" width="606px">Total Póliza: </td>
|
||||
<td style="border-top: solid 1px #000000;" width="210px">
|
||||
<table border="0" cellpadding="0" cellspacing="0" rules="all" style="border-collapse: collapse;" class="Texto">
|
||||
<tr>
|
||||
<td align="right" width="105px">
|
||||
<asp:Label ID="LblCargo" runat="server"></asp:Label></td>
|
||||
<td align="right" width="105px">
|
||||
<asp:Label ID="LblAbono" runat="server"></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function fnPrint() {
|
||||
//var divToPrint = document.getElementById('TbGral');
|
||||
//var newWin = window.open("");
|
||||
//newWin.document.write(divToPrint.outerHTML);
|
||||
//newWin.print();
|
||||
//newWin.close();
|
||||
|
||||
var data = $('#TbGral').html();
|
||||
var mywindow = window.open();
|
||||
mywindow.document.write('<html><head><title>Impresión Póliza</title>');
|
||||
mywindow.document.write('<link type="text/css" rel="stylesheet" href="/Styles/Estilos.css"/>');
|
||||
mywindow.document.write('</head><body>');
|
||||
|
||||
mywindow.document.write(data);
|
||||
|
||||
mywindow.document.write('</body></html>');
|
||||
|
||||
mywindow.print();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
var t;
|
||||
function Acomoda() {
|
||||
var g = t - document.body.offsetHeight + document.getElementById('GvDatos').offsetHeight;
|
||||
g = g + 'px';
|
||||
var obj;
|
||||
obj = document.getElementById("DivDetalle");
|
||||
obj.style.height = g;
|
||||
document.getElementById("GvDatos").style.width = document.body.offsetWidth - 17;
|
||||
}
|
||||
|
||||
function Browser() {
|
||||
var g;
|
||||
var AdaptedHeight = document.getElementById('IEhackInnerHeight').offsetTop;
|
||||
document.getElementById('IEhackInnerHeight').style.top = AdaptedHeight + 'px';
|
||||
if (typeof innerHeight == 'number')
|
||||
t = window.innerHeight;
|
||||
else
|
||||
t = document.getElementById('IEhackInnerHeight').offsetTop;
|
||||
}
|
||||
|
||||
function MuestraPoliza() {
|
||||
var Boton = document.getElementById("C_cmdPoliza");
|
||||
var ddl = document.getElementById("C_ddlTipo");
|
||||
if (Boton && ddl && ddl.value != "1") {
|
||||
Boton.style.display = "";
|
||||
}
|
||||
else
|
||||
Boton.style.display = "none";
|
||||
}
|
||||
|
||||
function PrintPoliza(Pagina, Ancho, Alto) {
|
||||
var left = (screen.availWidth / 2) - (Ancho / 2) + self.screenLeft;
|
||||
var top = (screen.availHeight / 2) - (Alto / 2) - 20;
|
||||
|
||||
PopUp = window.open(Pagina, 'Pop', 'width=' + Ancho + ', height=' + Alto + ',left=' + left + ',top=' + top);
|
||||
|
||||
if (!PopUp)
|
||||
alert('No se pudo abrir la ventana.\nverifique que no tenga activado el bloqueador de ventanas emergentes.');
|
||||
PopUp.print();
|
||||
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
152
Contabilidad/Poliza.aspx.vb
Normal file
152
Contabilidad/Poliza.aspx.vb
Normal file
@@ -0,0 +1,152 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contabilidad_Poliza
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CvePoliza As Integer
|
||||
'Private Property CveEmpresa As Integer
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.LoadComplete
|
||||
If Not IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
Dim cont As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If cont.GetTiposPoliza(-1, "-1") Then
|
||||
DdlTipoPoliza.DataSource = cont.DtResultados
|
||||
DdlTipoPoliza.DataBind()
|
||||
End If
|
||||
|
||||
cont.Dispose()
|
||||
|
||||
If Request("IdPoliza") IsNot Nothing AndAlso Request("IdPoliza").ToEntero() > 0 Then
|
||||
CvePoliza = Request("IdPoliza").ToEntero()
|
||||
|
||||
'CveEmpresa = Request("CveEmpresa").ToEntero()
|
||||
'ViewState("Empresa") = If(Request("Empresa") IsNot Nothing, Request("Empresa"), EmpresaActual)
|
||||
CargaDatos()
|
||||
'btnImprimir.OnClientClick = "javascript:PrintPoliza('/Direccion/EdosFinancieros/PopUpImpPoliza.aspx?Empresa=" & Request("Empresa") & "&IdPoliza=" & Request("IdPoliza") & "', 900, 800); return false;"
|
||||
End If
|
||||
'LblEmpresa.Text = NombreEmpresa
|
||||
'LblFechaDe.Text = Filtros1.FechaFinal.Text
|
||||
'LblFechaAl.Text = Filtros1.FechaFinal.Text
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjEdosFinancieros As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim DT As DataTable = Nothing
|
||||
LblEmpresa.Text = UsuarioActual.Empresa.Empresa
|
||||
If ObjEdosFinancieros.GetPoliza(CvePoliza, -1, -1, -1, -1) Then
|
||||
DT = ObjEdosFinancieros.DtResultados
|
||||
End If
|
||||
ObjEdosFinancieros.Dispose()
|
||||
|
||||
|
||||
|
||||
GvDatos.DataSource = DT
|
||||
GvDatos.DataBind()
|
||||
If DT IsNot Nothing Then DT.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub gvDetalle_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
LblCargo.Text = e.Row.DBCampo("cargos").FormatoNumero(2)
|
||||
LblAbono.Text = e.Row.DBCampo("abonos").FormatoNumero(2)
|
||||
LblConcepto.Text = e.Row.DBCampo("ConceptoPoliza")
|
||||
LblNumPoliza.Text = e.Row.DBCampo("folio")
|
||||
txtNumPol.Text = e.Row.DBCampo("folio")
|
||||
TxtFechaPol.Text = e.Row.DBCampo("fecha").ToDate.ToShortDateString
|
||||
DdlTipoPoliza.SelectedValue = e.Row.DBCampo("CodigoTipoPoliza").ToString.Trim
|
||||
LblFechaActual.Text = e.Row.DBCampo("fecha").ToDate.ToShortDateString
|
||||
LblTipoPoliza.Text = e.Row.DBCampo("TipoPoliza")
|
||||
If LblFechaDe.Text = "" Then
|
||||
LblFechaDe.Text = e.Row.DBCampo("fecha").ToDate.ToShortDateString
|
||||
End If
|
||||
If LblFechaAl.Text = "" Then
|
||||
LblFechaAl.Text = e.Row.DBCampo("fecha").ToDate.ToShortDateString
|
||||
End If
|
||||
'Filtros1.TipoPoliza.SelectedValue = e.Row.DBCampo("CodigoTipoPoliza").Trim
|
||||
'Filtros1.FechaFinal.Text = e.Row.DBCampo("fecha").ToDate.ToShortDateString
|
||||
'Filtros1.TipoPoliza.SelectedItem.Text = e.Row.DBCampo("TipoPoliza")
|
||||
End If
|
||||
|
||||
e.Row.FCLabel("D").Text = String.Format("<b>{0}</b><br />{1}", e.Row.DBCampo("Cuenta"), e.Row.DBCampo("CONCEPTO"))
|
||||
|
||||
e.Row.FCHyperLink("B").NavigateUrl = e.Row.DBCampo("SIGReferencia").ContaReferenciaLiga
|
||||
|
||||
' e.Row.FCLabel("C").Text = e.Row.DBCampo("CODIGO").Substring(0, 4) & "-" & e.Row.DBCampo("CODIGO").Substring(4, 2) & "-" & e.Row.DBCampo("CODIGO").Substring(6)
|
||||
If e.Row.DBCampo("CARGO") = "0" Then e.Row.Cells(5).Text = ""
|
||||
If e.Row.DBCampo("ABONO") = "0" Then e.Row.Cells(6).Text = ""
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Protected Sub cmdExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles cmdExcel.Click
|
||||
' tbl.ExportToExcel("Poliza_" & Now.Year & If(Now.Month.ToString.Length = 1, "0" & Now.Month.ToString, Now.Month.ToString) & If(Now.Day.ToString.Length = 1, "0" & Now.Day.ToString, Now.Day.ToString))
|
||||
'End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
|
||||
|
||||
Dim ObjEdosFinancieros As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim DT As DataTable = Nothing
|
||||
|
||||
If ObjEdosFinancieros.GetPoliza(-1, TxtFechaPol.Text.Trim.ToDate.Year, TxtFechaPol.Text.Trim.ToDate.Month, DdlTipoPoliza.SelectedValue.ToEntero, txtNumPol.Text.Trim.ToEntero) Then
|
||||
DT = ObjEdosFinancieros.DtResultados
|
||||
End If
|
||||
ObjEdosFinancieros.Dispose()
|
||||
|
||||
GvDatos.DataSource = DT
|
||||
GvDatos.DataBind()
|
||||
|
||||
If DT.Rows.Count = 0 Then
|
||||
LblCargo.Text = ""
|
||||
LblAbono.Text = ""
|
||||
LblConcepto.Text = ""
|
||||
LblNumPoliza.Text = ""
|
||||
LblTipoPoliza.Text = ""
|
||||
LblFechaActual.Text = ""
|
||||
Alert("La póliza solicitada no existe.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If DT IsNot Nothing Then DT.Dispose()
|
||||
|
||||
'LblFechaDe.Text = Filtros1.FechaFinal.Text
|
||||
'LblFechaAl.Text = Filtros1.FechaFinal.Text
|
||||
|
||||
upTitulos.Update()
|
||||
upDatos.Update()
|
||||
End Sub
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
|
||||
Else
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
'CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
96
Contabilidad/PolizasImpresion.aspx
Normal file
96
Contabilidad/PolizasImpresion.aspx
Normal file
@@ -0,0 +1,96 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PolizasImpresion.aspx.vb" Inherits="Contabilidad_PolizasImpresion" %>
|
||||
|
||||
<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="E" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:Panel ID="Panel1" runat="server" DefaultButton="BtnConsultar">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px;">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Generar" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row" style="padding-top: 1px;">
|
||||
<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: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaInicio" PopupButtonID="ImgFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVEFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" 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="VcoFechaInicio1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaInicio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoFechaInicio2" runat="server" HighlightCssClass="vco" TargetControlID="CVEFechaInicio" 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: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFechaFin" PopupButtonID="ImgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaFin" runat="server" ControlToValidate="TxtFechaFin" 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="VCOFechaFin1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaFin2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Tipo Póliza:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="ddlTipoPoliza" DataTextField="Nombre" DataValueField="Id" CssClass="form-control input-sm select2-me" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Folio Inicio:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="FolioInicio" CssClass="form-control input-sm" runat="server" Width="60px"></asp:TextBox>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Folio Fin:</label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:TextBox ID="FolioFin" CssClass="form-control input-sm" runat="server" Width="60px"></asp:TextBox>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Registró:</label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlUsuarioRegistro" DataTextField="Nombre" DataValueField="CveUsuario" CssClass="form-control input-sm select2me" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate" data-toggle="tooltip" data-placement="top" title="Segmento de Negocio">Segmento de Neg.:</label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSegmentoNeg" DataTextField="Nombre" DataValueField="Id" CssClass="form-control input-sm select2me" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" data-toggle="tooltip" data-placement="top" title="Segmento de Negocio">Cuenta:</label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlCuenta" DataTextField="CodigoNombre" DataValueField="Id" CssClass="form-control input-sm select2me" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<rvweb:ReportViewer ID="ReportViewer1" Width="100%" runat="server"></rvweb:ReportViewer>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
123
Contabilidad/PolizasImpresion.aspx.vb
Normal file
123
Contabilidad/PolizasImpresion.aspx.vb
Normal file
@@ -0,0 +1,123 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.Activities.Statements
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contabilidad_PolizasImpresion
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.LoadComplete
|
||||
If Not IsPostBack Then
|
||||
TxtFechaInicio.Text = Now.AddDays(-1).ToShortDateString
|
||||
TxtFechaFin.Text = Now.ToShortDateString
|
||||
|
||||
DdlUsuarioRegistro.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlUsuarioRegistro.DataBind()
|
||||
cargaddlpolizas()
|
||||
CargaSegmentoNeg()
|
||||
cargaCuentas()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub BtnConsultar_click(sender As Object, args As EventArgs) Handles BtnConsultar.Click
|
||||
Dim foli As Integer = -1
|
||||
Dim folf As Integer = -1
|
||||
If Not FolioInicio.Text = "" Then
|
||||
foli = FolioInicio.Text.ToEntero()
|
||||
End If
|
||||
If Not FolioFin.Text = "" Then
|
||||
folf = FolioFin.Text.ToEntero()
|
||||
End If
|
||||
|
||||
Dim ArchivoReporte As String = "Empresas/Grales/Formatos/Polizas.rdlc"
|
||||
|
||||
If IO.File.Exists(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta)) Then
|
||||
ArchivoReporte = String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta)
|
||||
End If
|
||||
|
||||
|
||||
Dim objcont As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If objcont.GetPolizasMasivo(TxtFechaInicio.Text.ToDate, TxtFechaFin.Text.ToDate, foli, folf, ddlTipoPoliza.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlSegmentoNeg.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero) Then
|
||||
If objcont.DtResultados.Rows.Count < 10000 Then
|
||||
|
||||
If objcont.DtResultados.Rows.Count > 0 Then
|
||||
Dim dr As DataRow
|
||||
dr = objcont.DtResultados.Rows(0)
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString))
|
||||
params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
'params.Add(New ReportParameter("Nombre", dr("Cuenta").ToString))
|
||||
'params.Add(New ReportParameter("Cuenta", dr("Codigo").ToString))
|
||||
params.Add(New ReportParameter("Numero", dr("Folio").ToString))
|
||||
params.Add(New ReportParameter("Moneda", ""))
|
||||
params.Add(New ReportParameter("CodigoPostal", ""))
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("IdUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
|
||||
End If
|
||||
|
||||
ImprimirPDF(ArchivoReporte, objcont.DtResultados, params)
|
||||
|
||||
Else
|
||||
Alert("Los Filtros Actuales no contienen datos")
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Los Filtros Actuales contienen muchos datos")
|
||||
End If
|
||||
End If
|
||||
objcont.Dispose()
|
||||
|
||||
End Sub
|
||||
Private Sub cargaddlpolizas()
|
||||
Dim objcont As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If objcont.GetTiposPoliza(-1, "-1") Then
|
||||
ddlTipoPoliza.DataSource = objcont.DtResultados
|
||||
ddlTipoPoliza.DataBind()
|
||||
ddlTipoPoliza.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
End If
|
||||
objcont.Dispose()
|
||||
DdlUsuarioRegistro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSegmentoNeg()
|
||||
Dim ObjContPAQ As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjContPAQ.GetSegmentosNegocio(-1, "-1") Then
|
||||
DdlSegmentoNeg.DataSource = ObjContPAQ.DtResultados
|
||||
DdlSegmentoNeg.DataBind()
|
||||
End If
|
||||
ObjContPAQ.Dispose()
|
||||
DdlSegmentoNeg.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSegmentoNeg.Items.Insert(1, New ListItem("Sin Asignar", "-2"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentas()
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
Dim DtTable As New DataTable
|
||||
DtTable.Columns.Add("Id", GetType(Integer))
|
||||
DtTable.Columns.Add("CodigoNombre", GetType(String))
|
||||
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConta.GetCuentas(-1, "-1", 1) Then
|
||||
For Each dr As DataRow In ObjConta.DtResultados.Rows
|
||||
Dim DrC = DtTable.NewRow
|
||||
DrC("Id") = dr("Id").ToString
|
||||
DrC("CodigoNombre") = dr("Codigo").ToString + " - " + dr("Nombre").ToString
|
||||
DtTable.Rows.Add(DrC)
|
||||
Next
|
||||
DdlCuenta.DataSource = DtTable
|
||||
DdlCuenta.DataBind()
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
DdlCuenta.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
173
Contabilidad/PopUpAuxiliar.aspx
Normal file
173
Contabilidad/PopUpAuxiliar.aspx
Normal file
@@ -0,0 +1,173 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PopUpAuxiliar.aspx.vb" Inherits="PopUpAuxiliar" %>
|
||||
|
||||
<%@ Import Namespace="Extensiones" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.note {
|
||||
margin: 0 0 3px 0;
|
||||
padding: 5px 30px 5px 15px;
|
||||
}
|
||||
|
||||
.note.note-success {
|
||||
background-color: #c0edf1;
|
||||
border-color: #58d0da;
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.note.note-success label.title {
|
||||
font-size: 14px;
|
||||
font-weight: 900;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Auxiliar Contable -
|
||||
<asp:Literal ID="LtlTipo1" runat="server"></asp:Literal>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<table border="0" class="contenido Widthall">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<div class="note note-success">
|
||||
<label class="title">Auxiliar contable de:</label>
|
||||
|
||||
<label>
|
||||
<asp:Literal ID="LtlTipo2" runat="server"></asp:Literal>: </label><asp:Literal ID="LtlFolio" runat="server"></asp:Literal>
|
||||
<label>
|
||||
<asp:Literal ID="LtlTipo3" runat="server"></asp:Literal>: </label><asp:Literal ID="LtlFechaVenta" runat="server"></asp:Literal>
|
||||
<label>
|
||||
<asp:Literal runat="server" Text="Importe"></asp:Literal>: </label><asp:Literal ID="LtlImporte" runat="server"></asp:Literal>
|
||||
<label>
|
||||
<asp:Literal runat="server" Text="Saldo"></asp:Literal>: </label><asp:Literal ID="LtlSaldo" runat="server"></asp:Literal>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-th-list font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Movimientos</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpRepClientesPagosBancos">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkPagosClientesBancosPDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkPagosClientesBancosExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkPagosClientesBancosPDF" />
|
||||
<asp:PostBackTrigger ControlID="LnkPagosClientesBancosExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:GridView ID="GVAuxiliar" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePrePoliza, Cargo, Abono, CveReferencia, IdPoliza,CvePrePolizaOriginal" EmptyDataText="No se encontraron Movimientos de Auxiliar" ToolTip="Listado de Auxiliar Contable" CssClass="table table-striped table-advance table-hover mysmallbtn Widthall" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Fecha</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaMovto" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Concepto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlConcepto" runat="server" Text='<%# Eval("ConceptoContable") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cargo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCargo" runat="server" Text='<%# If(CDbl(Eval("Cargo")) = 0, "", Eval("Cargo", "{0:N2}")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Abono</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAbono" runat="server" Text='<%# If(CDbl(Eval("Abono")) = 0, "", Eval("Abono", "{0:N2}")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Folio (Ref.)</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplReferencia" runat="server" Text='<%# Eval("Referencia", "{0}") %>' Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Contabilizado</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlContabilizado" runat="server" Text='<%# Eval("Contabilizado") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Num. Póliza</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPoliza" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Fecha Conta.</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaConta" runat="server" Text='<%# Eval("FechaConta", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="8000px">
|
||||
<HeaderTemplate>Referencia</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="LtlConceptoInfo" runat="server" Text='<%# Eval("Concepto") %>' NavigateUrl='<%# Eval("CvePrePoliza", "/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Usuario</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ToolTip='<%# Eval("Usuario") %>' runat="server">
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# If(Eval("Usuario").ToString.Length > 15, Eval("Usuario").ToString.Substring(0, 15), Eval("Usuario")) %>'></asp:Literal>
|
||||
</asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" Visible='<%# Eval("Eliminable").ToString() = "1" AndAlso Eval("CvePrePoliza").ToString.Length > 0 %>' AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cancelar" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgE" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Update" ImageUrl="/Imagenes/Btn_Delete.png" Visible='<%# Eval("Cancelable").ToString.ToEntero > 0 And Eval("CvePrePoliza").ToString.ToEntero > 0 And Eval("CveReferencia").ToString.ToEntero > 0 And (Eval("Cargo").ToString.ToDecimal > 0 OrElse Eval("Abono").ToString.ToDecimal > 0) %>' OnClientClick="javascript:return C();" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
354
Contabilidad/PopUpAuxiliar.aspx.vb
Normal file
354
Contabilidad/PopUpAuxiliar.aspx.vb
Normal file
@@ -0,0 +1,354 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Data
|
||||
|
||||
Partial Class PopUpAuxiliar
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property Tipo As String
|
||||
Get
|
||||
Return ViewState("Tipo").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Tipo") = 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 CveVenta As Integer
|
||||
Get
|
||||
Return ViewState("CveVenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveVenta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
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 CveCompra As Integer
|
||||
Get
|
||||
Return ViewState("CveCompra").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCompra") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DTDatos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTDatos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CType(Me.Master, BaseMasterPage).EsPopup = True
|
||||
CType(Me.Master, BaseMasterPage).PopupWidth = 915
|
||||
RegistraScript("$get('tdContenido').style.height='1000'")
|
||||
|
||||
Tipo = Request("Tipo")
|
||||
CveCliente = 0
|
||||
CveProveedor = 0
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
GVAuxiliar.Columns(10).Visible = UsuarioActual.TienePermisoProceso(94)
|
||||
'GVAuxiliar.Columns(11).Visible = UsuarioActual.TienePermisoProceso(94)
|
||||
|
||||
Select Case Tipo
|
||||
Case "CxCClientes"
|
||||
CveCliente = Request("CveCliente").ToEntero
|
||||
CveVenta = Request("CveVenta").ToEntero
|
||||
CargaAuxiliarClienteCxC(CveCliente, CveVenta)
|
||||
LtlTipo1.Text = "Cuentas por Cobrar"
|
||||
LtlTipo2.Text = "Folio de la Venta"
|
||||
LtlTipo3.Text = "Fecha de la Venta"
|
||||
Case "AnticiposClientes"
|
||||
CveCliente = Request("CveCliente").ToEntero
|
||||
CveVenta = Request("CveVenta").ToEntero
|
||||
CargaAuxiliarClienteAnticipos(CveCliente, CveVenta)
|
||||
LtlTipo1.Text = "Anticipo de Clientes"
|
||||
LtlTipo2.Text = "Folio de la Venta"
|
||||
LtlTipo3.Text = "Fecha de la Venta"
|
||||
Case "CxPProveedor"
|
||||
CveProveedor = Request("CveProveedor").ToEntero
|
||||
CveCompra = Request("CveCompra").ToEntero
|
||||
CargaAuxiliarProveedor(CveProveedor, CveCompra)
|
||||
LtlTipo1.Text = "Cuentas por Pagar"
|
||||
LtlTipo2.Text = "Folio de la Compra"
|
||||
LtlTipo3.Text = "Fecha de la Compra"
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveVenta As Integer)
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
If ObjMovtos.GetCxCClienteAuxiliar(CveCliente, CveVenta) Then
|
||||
DTDatos = ObjMovtos.DtResultados
|
||||
GVAuxiliar.DataSource = ObjMovtos.DtResultados
|
||||
If ObjMovtos.DtResultados.Rows.Count > 0 Then
|
||||
LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
|
||||
LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
|
||||
LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
|
||||
LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
|
||||
End If
|
||||
Else
|
||||
GVAuxiliar.DataSource = Nothing
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
GVAuxiliar.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAuxiliarClienteAnticipos(CveCliente As Integer, CveVenta As Integer)
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
If ObjMovtos.GetAnticiposClienteAuxiliar(CveCliente, CveVenta) Then
|
||||
DTDatos = ObjMovtos.DtResultados
|
||||
GVAuxiliar.DataSource = ObjMovtos.DtResultados
|
||||
If ObjMovtos.DtResultados.Rows.Count > 0 Then
|
||||
LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
|
||||
LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
|
||||
'LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
|
||||
'LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
|
||||
End If
|
||||
Else
|
||||
GVAuxiliar.DataSource = Nothing
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
GVAuxiliar.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAuxiliarProveedor(CveProveedor As Integer, CveCompra As Integer)
|
||||
Dim ObjMovtos As New ClsContabilidad()
|
||||
If ObjMovtos.GetProveedorAuxiliar(CveProveedor, CveCompra) Then
|
||||
DTDatos = ObjMovtos.DtResultados
|
||||
GVAuxiliar.DataSource = ObjMovtos.DtResultados
|
||||
If ObjMovtos.DtResultados.Rows.Count > 0 Then
|
||||
LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
|
||||
LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
|
||||
LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
|
||||
LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
|
||||
End If
|
||||
Else
|
||||
GVAuxiliar.DataSource = Nothing
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
GVAuxiliar.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub GVAuxiliar_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAuxiliar.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.BackColor = Drawing.Color.LightGray
|
||||
e.Row.FCLiteral("LtlFechaMovto").Text = "Totales: "
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(0).ColumnSpan = 2
|
||||
e.Row.Cells(1).Visible = False
|
||||
e.Row.Cells(4).ColumnSpan = 3
|
||||
e.Row.Cells(5).Visible = False
|
||||
e.Row.Cells(6).Visible = False
|
||||
e.Row.Cells(7).Visible = False
|
||||
e.Row.Cells(8).Visible = False
|
||||
ElseIf e.Row.RowIndex = 1 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(95)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(180)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(83)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(93)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(85)
|
||||
e.Row.Cells(7).Width = Unit.Pixel(95)
|
||||
e.Row.Cells(8).Width = Unit.Pixel(70)
|
||||
End If
|
||||
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Left
|
||||
|
||||
If e.Row.FCLiteral("LtlContabilizado").Text = "Si" Then
|
||||
Dim Liga As String = String.Format("<a class=""Texto"" href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">", e.Row.DBCampo("IdPoliza"))
|
||||
e.Row.FCLiteral("LtlPoliza").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("Poliza"))
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(2) AndAlso e.Row.DBCampo("CvePersonal").ToEntero > 0 Then
|
||||
Dim Liga As String = String.Format("<a class=""Texto"" href=""/RH/Personal.aspx?CvePersonal={0}"">", e.Row.DBCampo("CvePersonal"))
|
||||
e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("ConceptoContable"))
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("TipoReferencia").ToEntero = 1 Then
|
||||
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Bancos/IE.aspx?CveIE={e.Row.DBCampo("CveReferencia").ToEntero}"
|
||||
'If e.Row.DBCampo("CveReferencia").ToEntero > 0 Then
|
||||
' e.Row.Cells(10).Text = ""
|
||||
'End If
|
||||
ElseIf e.Row.DBCampo("TipoReferencia").ToEntero = 2 Then
|
||||
Select Case Tipo
|
||||
Case "CxCClientes"
|
||||
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveReferencia").ToEntero}"
|
||||
Case "CxPProveedor"
|
||||
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Compras/Compras.aspx?CveCompra={e.Row.DBCampo("CveReferencia").ToEntero}"
|
||||
End Select
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(272) AndAlso e.Row.DBCampo("CveCompraAmortizacion").ToEntero > 0 Then
|
||||
' Dim Liga As String = String.Format("<a class=""Texto"" href=""/Compras/Compras.aspx?CveCompra={0}"">", e.Row.DBCampo("CveCompraAmortizacion"))
|
||||
' e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("ConceptoContable"))
|
||||
'End If
|
||||
|
||||
If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(275) AndAlso e.Row.DBCampo("CveVenta").ToEntero > 0 Then
|
||||
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta").ToEntero}"
|
||||
'Dim Liga As String = String.Format("<a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">", e.Row.DBCampo("CveVenta"))
|
||||
'e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("ConceptoContable"))
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles GVAuxiliar.RowDeleting
|
||||
|
||||
Dim ObjContPaq As ClsContPAQi = Nothing
|
||||
Dim Conta As New ClsContabilidad()
|
||||
Conta.IniciaTransacSQL()
|
||||
|
||||
Dim ClavePrePoliza = GVAuxiliar.Rows(e.RowIndex).DataKey("CvePrePolizaOriginal").ToEntero
|
||||
Dim IdPoliza = GVAuxiliar.Rows(e.RowIndex).DataKey("IdPoliza").ToEntero
|
||||
|
||||
Dim TieneError = False
|
||||
|
||||
If Not Conta.RemovePrePolizas(ClavePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Conta.ValidacionPrePolizaCuadre(ClavePrePoliza, -1) Then
|
||||
If Conta.ValorPolizaDescuadre > 0 Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
If IdPoliza > 0 Then
|
||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then
|
||||
ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContPaq.IniciaTransacSQL()
|
||||
|
||||
If Not ObjContPaq.RemovePoliza(IdPoliza) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
Alert("Movimiento Eliminado", TipoMensaje.MsgInformacion, "window.opener.location.reload(); window.close();")
|
||||
If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
|
||||
Conta.Commit()
|
||||
Else
|
||||
If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
|
||||
Conta.RollBack()
|
||||
End If
|
||||
If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose()
|
||||
Conta.Dispose()
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Private Sub GVAuxiliar_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GVAuxiliar.RowUpdating
|
||||
Dim CvePrePoliza As Integer
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
ObjConta.IniciaTransacSQL()
|
||||
Dim CvePlantillaPoliza As Integer = 0
|
||||
Dim Importe As Decimal
|
||||
Dim MsgError As String = ""
|
||||
|
||||
If GVAuxiliar.Rows(e.RowIndex).DataKey("Cargo").ToDecimal > GVAuxiliar.Rows(e.RowIndex).DataKey("Abono").ToDecimal Then
|
||||
Importe = GVAuxiliar.Rows(e.RowIndex).DataKey("Cargo").ToDecimal
|
||||
Else
|
||||
Importe = GVAuxiliar.Rows(e.RowIndex).DataKey("Abono").ToDecimal
|
||||
End If
|
||||
|
||||
If CveCliente > 0 Then CvePlantillaPoliza = 11
|
||||
If CveProveedor > 0 Then CvePlantillaPoliza = 2
|
||||
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Contabilidad/PopUpAuxiliar", CvePlantillaPoliza, Importe, Importe, 1, Now, "Cancelacion de Pago", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If CvePlantillaPoliza = 2 Then
|
||||
If Not ObjConta.CancelarPagoCompraConAnticipo(CvePrePoliza, CveCompra, GVAuxiliar.Rows(e.RowIndex).DataKey("CveReferencia").ToEntero) Then
|
||||
MsgError = "Ocurrió un error al cancelar el pago de la compra"
|
||||
End If
|
||||
End If
|
||||
|
||||
If CvePlantillaPoliza = 11 Then
|
||||
If Not ObjConta.CancelarPagoVentaConAnticipo(CvePrePoliza, CveVenta, GVAuxiliar.Rows(e.RowIndex).DataKey("CveReferencia").ToEntero) Then
|
||||
MsgError = "Ocurrió un error al cancelar el pago de la venta"
|
||||
End If
|
||||
End If
|
||||
|
||||
If MsgError = "" Then
|
||||
ObjConta.Commit()
|
||||
Alert("El movimiento se canceló exitosamente.")
|
||||
Else
|
||||
ObjConta.RollBack()
|
||||
Alert(MsgError, TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click
|
||||
GenerarPDF("Excel")
|
||||
End Sub
|
||||
Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosPDF.Click
|
||||
GenerarPDF()
|
||||
End Sub
|
||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
If DTDatos IsNot Nothing And DTDatos.Rows.Count > 0 Then
|
||||
|
||||
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("Tipo", LtlTipo1.Text))
|
||||
params.Add(New ReportParameter("Folio", LtlFolio.Text))
|
||||
params.Add(New ReportParameter("Fecha", LtlFechaVenta.Text))
|
||||
params.Add(New ReportParameter("Importe", LtlImporte.Text))
|
||||
params.Add(New ReportParameter("Saldo", LtlSaldo.Text))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
ImprimirPDF("Empresas\Grales\Formatos\RepAuxiliarContable.rdlc", DTDatos, params, "RepAuxiliarContable_" & LtlFolio.Text, Formato:=Formato)
|
||||
|
||||
Else
|
||||
Alert("No se encontró información suficiente.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
1482
Contabilidad/RegPoliza.aspx
Normal file
1482
Contabilidad/RegPoliza.aspx
Normal file
File diff suppressed because it is too large
Load Diff
1880
Contabilidad/RegPoliza.aspx.vb
Normal file
1880
Contabilidad/RegPoliza.aspx.vb
Normal file
File diff suppressed because it is too large
Load Diff
845
Contabilidad/RegPrePoliza.aspx
Normal file
845
Contabilidad/RegPrePoliza.aspx
Normal file
@@ -0,0 +1,845 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegPrePoliza.aspx.vb" Inherits="ContabilidadC_RegPrePoliza" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.GvMov input, .GvMov td {
|
||||
height: 20px !important;
|
||||
}
|
||||
|
||||
.GvSize tr > th:nth-child(1), .GvSize tr > th:nth-child(3), .GvSize tr > th:nth-child(5),
|
||||
.GvSize tr > td:nth-child(1), .GvSize tr > td:nth-child(3), .GvSize tr > td:nth-child(5) {
|
||||
width: 17%;
|
||||
}
|
||||
|
||||
.GvSize tr > th:nth-child(2), .GvSize tr > td:nth-child(2) {
|
||||
width: 9%;
|
||||
}
|
||||
|
||||
.GvSize tr > th:nth-child(4), .GvSize tr > th:nth-child(8),
|
||||
.GvSize tr > td:nth-child(4), .GvSize tr > td:nth-child(8) {
|
||||
width: 12%;
|
||||
}
|
||||
|
||||
.GvSize tr > th:nth-child(6), .GvSize tr > th:nth-child(7),
|
||||
.GvSize tr > td:nth-child(6), .GvSize tr > td:nth-child(7) {
|
||||
width: 8%;
|
||||
}
|
||||
|
||||
.AutoExtender {
|
||||
font-family: Verdana, Helvetica, sans-serif;
|
||||
font-size: .9em;
|
||||
font-weight: normal;
|
||||
border: solid 1px #006699;
|
||||
line-height: 20px;
|
||||
padding: 2px;
|
||||
background-color: White;
|
||||
margin-left: 2px;
|
||||
overflow: auto;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.AutoExtenderList {
|
||||
cursor: pointer;
|
||||
color: darkgray;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.AutoExtenderHighlight {
|
||||
color: White;
|
||||
background-color: #084784;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#divwidth {
|
||||
width: 150px !important;
|
||||
}
|
||||
|
||||
#divwidth div {
|
||||
width: 150px !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label ID="LblEncabezado" runat="server" Text=" Registro de Póliza"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkComplementoPago" runat="server" Visible="false" OnClick="LnkComplementoPago_Click" Style="color: #686868;"><i class="fa fa-money" style="color:#686868;"></i> Crear Complemento de Pago</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="left" style="width: 665px;">
|
||||
|
||||
<asp:UpdatePanel ID="UPPDocumento" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivConceptoPrePoliza" runat="server" class="chequesie22">
|
||||
<div class="chequesie12" runat="server" id="divDatosPrincipales">
|
||||
<div class="row">
|
||||
<label class="col-md-2 control-label text-left">Fecha: </label>
|
||||
<div class="col-md-4" style="width: 42%;">
|
||||
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendario" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFecha" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaDocumento" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes 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="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-1" style="width: 5px;">
|
||||
<asp:CheckBox ID="ChkAutoConta" runat="server"></asp:CheckBox>
|
||||
</div>
|
||||
<label class="col-md-2">AutoContabilizar</label>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" id="divTipoPolAdd">
|
||||
<label class="col-md-2">Tipo Póliza:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlTipoPolizaAdd" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Width="150px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Text="Ingreso" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Egreso" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Diario" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie22" runat="server" id="divObservaciones">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones:</label>
|
||||
<div class="col-md-5">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Movimiento:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlPlantilla" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="True" DataTextField="PlantillaPoliza" DataValueField="CvePlantillaPoliza" Width="250px" ValidationGroup="GrpGuardar">
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row" id="trNotificar" runat="server" visible="False">
|
||||
<label class="col-md-2">Notificar:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtNotificarA" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="trCuentaDeposito" runat="server" visible="False">
|
||||
<label class="col-md-2">Cuenta Depósito:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" DataTextField="CuentaDeposito" DataValueField="CveCuentaDeposito" Width="400px" AppendDataBoundItems="True"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCuentaDeposito" runat="server" ControlToValidate="DdlCuentaDeposito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta de Depósito''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuentaDeposito" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie22">
|
||||
<div class="row" id="DivAgregarConceptos" runat="server" visible="true">
|
||||
<div class="col-md-12">
|
||||
<table border="0" rules="none" style="border-collapse: collapse; min-width: 980px;" class="table table-striped GvSize mygvps Widthall">
|
||||
<tr class="Titulos TextTab">
|
||||
<th>Concepto<asp:HiddenField ID="HdnCve" runat="server" />
|
||||
</th>
|
||||
<th>Cta. Contable</th>
|
||||
<th>Referencia</th>
|
||||
<th>Descripción</th>
|
||||
<th>SubProyecto</th>
|
||||
<th>Cargo</th>
|
||||
<th>Abono</th>
|
||||
<th style="width: 100px;">Comandos</th>
|
||||
<th runat="server" visible="false" id="nomostrar2"></th>
|
||||
</tr>
|
||||
<tr class="TextTab">
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlConceptosContables" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="160px" AutoPostBack="true">
|
||||
</asp:DropDownList><br />
|
||||
|
||||
<asp:TextBox ID="TxtTC" runat="server" Visible="false" ></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FtbeTC" runat="server" TargetControlID="TxtTC" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:DropDownList ID="DdlProveedores" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="160px" Visible="false" AutoPostBack="true"></asp:DropDownList><br />
|
||||
<asp:DropDownList ID="DdlCompras" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SerieFolio" DataValueField="CveCompra" Width="160px" Visible="false"></asp:DropDownList><br />
|
||||
<asp:DropDownList ID="DdlPersonal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="160px" Visible="false"></asp:DropDownList>
|
||||
<ADS:Dropdownlost ID="DdlClientes" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="160px" Visible="false" AutoPostBack="true"></ADS:Dropdownlost>
|
||||
<br />
|
||||
<asp:DropDownList ID="DdlVentas" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList><br />
|
||||
</th>
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlCtaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="160px">
|
||||
</asp:DropDownList><br />
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtReferencia" runat="server" Rows="2" TextMode="MultiLine" Width="150px"></asp:TextBox>
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" Rows="2" TextMode="MultiLine" Width="150px"></asp:TextBox>
|
||||
</th>
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="160px">
|
||||
</asp:DropDownList><br />
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtCargo" runat="server" Width="76px" Height="24px" CssClass="txtcargo"></asp:TextBox>
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtAbono" runat="server" Width="76px" Height="24px" CssClass="txtabono"></asp:TextBox>
|
||||
</th>
|
||||
<th align="center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" Enabled="true" Text="Agregar"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LbCancelarEdicion" runat="server" Visible="false" CssClass="Texto" Enabled="true" Text="Cancelar"></asp:LinkButton>
|
||||
</th>
|
||||
<th runat="server" visible="false" id="nomostrar"></th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpPoliza" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" visible="false" runat="server" id="DivDatosPoliza">
|
||||
<label class="col-md-1">Tipo Póliza:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoPoliza" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Width="100%" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Text="Ingreso" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Egreso" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Diario" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Fecha:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaDocumento" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendarioPoliza" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaDocumento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TxtFechaDocumento" PopupButtonID="ImgCalendarioPoliza" PopupPosition="Left" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaPoliza" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaPoliza" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes 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="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPoliza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPoliza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Concepto:</label>
|
||||
<div class="col-md-5">
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row" visible="false" runat="server" id="divContabilziada">
|
||||
<label class="col-md-1">Contabilizada:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:HyperLink ID="HplContabilizada" runat="server" Target="_blank">Si</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" visible="false" runat="server" id="DivTipoGasto">
|
||||
<label class="col-md-1">Tipo Gasto:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoGasto" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoGasto_SelectedIndexChanged" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Width="100%" ValidationGroup="GrpGuardar" DataTextField="TipoGasto" DataValueField="CveTipoGasto">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<asp:UpdatePanel ID="UPMovs" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<input id="HdnCveCuenta" runat="server" type="hidden" value="-1" clientidmode="Static" />
|
||||
<table style="width: 100%;" class="table GvSize table-striped table-advance table-hover">
|
||||
<tr class="Titulos">
|
||||
<th>Cuenta</th>
|
||||
<th>Referencia</th>
|
||||
<th>Descripción</th>
|
||||
<th>SubProyecto
|
||||
<br />
|
||||
<asp:DropDownList ID="DdlSubProyectoFiltroMov" Width="150px" AutoPostBack="true" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSubProyectoFiltroMov_SelectedIndexChanged" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AppendDataBoundItems="true"></asp:DropDownList></br/>
|
||||
<th id="ThTipoGasto" runat="server" visible="false">Tipo Gasto</th>
|
||||
<th>Ref. Bancaria</th>
|
||||
<th>Cargo</th>
|
||||
<th>Abono</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
||||
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,TC,CveOC" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cuenta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCuenta" runat="server" Text='<%# Eval("Cuenta") %>'></asp:Literal><br />
|
||||
<asp:Label ID="LblCuentaCon" Font-Italic="true" Font-Size="7pt" runat="server" Text='<%# Eval("CodigoCuenta") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Referencia</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlReferencia" runat="server" Text='<%# Eval("Referencia")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Concepto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" Width="150px" Text='<%# Eval("Concepto")%>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>SubProyecto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="140px"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>TipoGasto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="150px"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Ref. Bancaria</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSaldos" CssClass="select2me" runat="server" DataValueField="CveIE" DataTextField="RazonSocialSaldo" Visible="false" Style="width: 150px;"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cargo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCargo" CssClass="txtcargo" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Abono</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtAbono" CssClass="txtabono" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:ImageButton Visible="false" ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgBancos" runat="server" CausesValidation="False" CssClass="btn btn-circle btn-sm btn-warning" OnClick="Bancos_Click" Text="<i class='fa fa-money'></i>" Visible="false" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpPrePoliza" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
||||
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra,CveOC" Width="100%" CssClass="table table-striped table-advance table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Movimiento</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlConceptoContable" runat="server" Text='<%# Eval("ConceptoContable") %>'></asp:Literal><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Documento</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HlReferencia" Target="_blank" runat="server" Text='<%# Eval("FolioFactura") %>'></asp:HyperLink>
|
||||
<br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Concepto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" MaxLength="100" CssClass="form-control input-sm" Text='<%# Eval("Concepto") %>'></asp:TextBox><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="380px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
SubProyecto
|
||||
<asp:DropDownList ID="DdlSubProyectoFiltro" Width="150px" AutoPostBack="true" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSubProyectoFiltro_SelectedIndexChanged" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AppendDataBoundItems="true"></asp:DropDownList>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" Width="150px" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>TipoGasto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="150px"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cuenta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlCtaContable" runat="server" Width="200px" CssClass="form-control input-sm select2me" DataValueField="Id" DataTextField="CtaCodigo"></asp:DropDownList><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="200px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cargo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCargo" runat="server" Width="95px" CssClass=" txtcargo form-control input-sm" Style="text-align: right" Text='<%# If(Eval("TipoMovto").ToString = "False", Eval("ImporteMN", "{0:N2}"), "") %>'></asp:TextBox><br />
|
||||
<asp:CompareValidator ID="CVCargo" runat="server" ControlToValidate="TxtCargo" Display="None" ErrorMessage="El campo <b>''Cargo''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCCargo" runat="server" HighlightCssClass="vco" TargetControlID="CVCargo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Abono</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtAbono" runat="server" Width="95px" CssClass=" txtabono form-control input-sm" Style="text-align: right" Text='<%# If(Eval("TipoMovto").ToString = "True", Eval("ImporteMN", "{0:N2}"), "") %>'></asp:TextBox><br />
|
||||
<asp:CompareValidator ID="CVAbono" runat="server" ControlToValidate="TxtAbono" Display="None" ErrorMessage="El campo <b>''Abono''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCAbono" runat="server" HighlightCssClass="vco" TargetControlID="CVAbono" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEdit" runat="server" Visible="false" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<table class="table table-striped table-advance table-hover Widthall">
|
||||
<tr>
|
||||
<td style="width: 730px"> </td>
|
||||
<th style="width: 70px;">
|
||||
<asp:TextBox ID="TxtTotalCargos" runat="server" Style="text-align: right" Enabled="false" Width="95px" Text="0.00"></asp:TextBox></th>
|
||||
<th style="width: 70px;">
|
||||
<asp:TextBox ID="TxtTotalAbonos" runat="server" Style="text-align: right" Enabled="false" Width="95px" Text="0.00"></asp:TextBox></th>
|
||||
<asp:HiddenField ID="HdnTotales" runat="server" ClientIDMode="Static" />
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="text-align: center;">
|
||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnIEGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" CssClass="btn btn-primary" />
|
||||
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
||||
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" class="btn btn-danger" />
|
||||
<asp:Button ID="BtnContabilizar" runat="server" Text="Contabilizar" CssClass="btn btn-primary green" Visible="false" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="DivContadoModal" align="center" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel ID="UpBancos" runat="server" class="modal-content" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloPago" runat="server" Text="Contado" />
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:Panel ID="PnlContado" runat="server" Visible="False">
|
||||
<asp:RadioButtonList ID="RBLContado" runat="server" RepeatDirection="Horizontal" AutoPostBack="True">
|
||||
<asp:ListItem Value="1" Selected="True">Bancos</asp:ListItem>
|
||||
<asp:ListItem Value="6">Caja Chica</asp:ListItem>
|
||||
<asp:ListItem Value="2">F y E</asp:ListItem>
|
||||
<asp:ListItem Value="4">Deudores</asp:ListItem>
|
||||
<asp:ListItem Value="5">Acreedores</asp:ListItem>
|
||||
<asp:ListItem Value="3">Créditos</asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
</asp:Panel>
|
||||
<br />
|
||||
|
||||
<div runat="server" id="DivContado">
|
||||
<asp:Panel ID="PnlContadoBancos" CssClass="chequesie text-small" runat="server" Width="400px" Visible="true">
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Movimiento:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" Width="156px" ValidationGroup="GrpContado"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoTransaccion" runat="server" ControlToValidate="DdlTipoTransaccion" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETipoTransaccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2">Cuenta:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlCuenta" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="200px" ValidationGroup="GrpContado"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCuenta" runat="server" ControlToValidate="DdlCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie2">
|
||||
<div class="row">
|
||||
<asp:Label ID="LblFolio" runat="server" Text="Número:" class="col-md-2"></asp:Label>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox ID="TxtDocumentoFolio" CssClass="form-control input-sm" runat="server" MaxLength="12"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtDocumentoFolio" Display="None" ErrorMessage="El campo <b>''Folio''</b> es requerido por la aplicación, por favor ingrese uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<label class="col-md-2">Importe</label>
|
||||
<div class="col-md-4 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtDocumentoImporte" CssClass="form-control input-sm " Enabled="False" runat="server" MaxLength="12" Width="80px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBEDocumentoImporte" runat="server" TargetControlID="TxtDocumentoImporte" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<asp:Label ID="LblBeneficiario" runat="server" Text="Beneficiario:" class="col-md-2"></asp:Label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDocumentoBeneficiario" runat="server" CssClass="form-control input-sm"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDocumentoObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Panel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContado" runat="server" class="btn btn-success" Text="Guardar" ValidationGroup="GrpContado" />
|
||||
<button id="Button2" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
<asp:HiddenField ID="HiddenField1" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="DivEditConcepto" align="center" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" class="modal-content" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="Literal1" runat="server" Text="Editar Concepto" />
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="UppGrid" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvConcepto" runat="server" GridLines="none" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" DataKeyNames="CveSubProyecto, CveTipoGasto" EmptyDataText="Aún no hay registros." AutoGenerateColumns="False" AllowPaging="False" ShowHeaderWhenEmpty="True">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Movimiento</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlConceptoContable" runat="server" Text='<%# Eval("ConceptoContable") %>'></asp:Literal><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Documento</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HlReferencia" Target="_blank" runat="server" Text='<%# Eval("FolioFactura") %>'></asp:HyperLink>
|
||||
<br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Concepto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" MaxLength="100" CssClass="form-control input-sm" Text='<%# Eval("Concepto") %>'></asp:TextBox><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="380px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
SubProyecto
|
||||
<asp:DropDownList ID="DdlSubProyectoFiltro" Width="150px" AutoPostBack="true" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSubProyectoFiltro_SelectedIndexChanged" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AppendDataBoundItems="true"></asp:DropDownList>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" Width="150px" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>TipoGasto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="150px"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cuenta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlCtaContable" runat="server" Width="200px" CssClass="form-control input-sm select2me" DataValueField="Id" DataTextField="CtaCodigo"></asp:DropDownList><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="200px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cargo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCargo" runat="server" CssClass=" txtcargo form-control input-sm" Style="text-align: right" Text='<%# Eval("CargoImporteMN", "{0:N2}") %>'></asp:TextBox><br />
|
||||
<asp:CompareValidator ID="CVCargo" runat="server" ControlToValidate="TxtCargo" Display="None" ErrorMessage="El campo <b>''Cargo''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCCargo" runat="server" HighlightCssClass="vco" TargetControlID="CVCargo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Abono</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtAbono" runat="server" CssClass=" txtabono form-control input-sm" Style="text-align: right" Text='<%# Eval("AbonoImporteMN", "{0:N2}") %>'></asp:TextBox><br />
|
||||
<asp:CompareValidator ID="CVAbono" runat="server" ControlToValidate="TxtAbono" Display="None" ErrorMessage="El campo <b>''Abono''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCAbono" runat="server" HighlightCssClass="vco" TargetControlID="CVAbono" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAceptar" runat="server" class="btn btn-success" Text="Aceptar" />
|
||||
<button id="BtnCancelar" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript" language="javascript">
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
CargaTxtFunciones();
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
CargaTxtFunciones();
|
||||
});
|
||||
});
|
||||
|
||||
function FnSuma(t, txt, importe) {
|
||||
if (t.checked) {
|
||||
txt.value = FormatNumber(importe, 2, true, true, true);
|
||||
} else {
|
||||
txt.value = "";
|
||||
}
|
||||
$get('TxtAbono').value = FormatNumber(SumaValores(), 2, true, true, true);
|
||||
}
|
||||
|
||||
function FncImporte(txt, rowtxt, opcion) {
|
||||
// opcion = 1, se registro desde el txtimporte
|
||||
if (opcion == 1) {
|
||||
$get(rowtxt).value = $get(txt).value == '' ? '' : FormatNumber(ToDouble($get(txt).value), 2, true, true, true);
|
||||
debugger;
|
||||
if ($get('ChkAbonoCuenta')) {
|
||||
$get('ChkAbonoCuenta').checked = ($get(txt).value > 2000);
|
||||
}
|
||||
FormatoMoneda($get(txt));
|
||||
} else {
|
||||
$get(txt).value = $get(rowtxt).value == '' ? '' : FormatNumber(ToDouble($get(rowtxt).value), 2, true, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
function FncImporteCuenta(txt) {
|
||||
if ($get('ChkAbonoCuenta')) {
|
||||
$get('ChkAbonoCuenta').checked = (parseFloat(txt.value.replace(/,/g, '')) > 2000);
|
||||
}
|
||||
FormatoMoneda(txt);
|
||||
}
|
||||
|
||||
function SumaValores() {
|
||||
var Importe = 0;
|
||||
var topLevelElem = document.getElementById("form1");
|
||||
var textBoxes = topLevelElem.getElementsByTagName("input");
|
||||
for (var i = 0; i < textBoxes.length; i++) {
|
||||
if (textBoxes[i].type == "text") {
|
||||
if (textBoxes[i].id.indexOf('C_GvMov_TxtAbono') >= 0) {
|
||||
if (textBoxes[i].value != '') {
|
||||
Importe = parseFloat(Importe) + parseFloat(textBoxes[i].value.split(',').join(''));
|
||||
alert(Importe);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Importe;
|
||||
}
|
||||
|
||||
function FnCambia(chk, txt) {
|
||||
if (txt.value != '') {
|
||||
chk.checked = true;
|
||||
} else {
|
||||
chk.checked = false;
|
||||
}
|
||||
$get('TxtImporte').value = FormatNumber(SumaValores(), 2, true, true, true);
|
||||
}
|
||||
|
||||
function getCuenta(pId) {
|
||||
$get('HdnCveCuenta').value = pId;
|
||||
PageMethods.wsGetNombreCuenta(pId, OnSucceeded);
|
||||
}
|
||||
|
||||
function OnSucceeded(result, userContext, methodName) {
|
||||
if (methodName == 'wsGetNombreCuenta') {
|
||||
$get('TxtCuentaContable').value = result;
|
||||
}
|
||||
}
|
||||
|
||||
function myItemSelectedHandler(source, eventArgs) {
|
||||
//debugger;
|
||||
var CC = $get('HdnCveCuenta');
|
||||
CC.value = eventArgs.get_value();
|
||||
// var b = $get('C_Tabs_TabConyuge_BtnTruco');
|
||||
// b.Click;
|
||||
var aTargetElement = 'BtnSelCuenta';
|
||||
__doPostBack(aTargetElement, eventArgs.get_value());
|
||||
//alert(" Key : " + eventArgs.get_text() + " Value : " + eventArgs.get_value());
|
||||
}
|
||||
|
||||
function LimpiaImporte(t, txt) {
|
||||
if (t.value != '' && $get(txt)) {
|
||||
$get(txt).value = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function CargaTxtFunciones() {
|
||||
$(".txtcargo").each(function () {
|
||||
$(this).keyup(function () {
|
||||
calculateCargo();
|
||||
comparar();
|
||||
});
|
||||
});
|
||||
$(".txtabono").each(function () {
|
||||
$(this).keyup(function () {
|
||||
calculateAbono();
|
||||
comparar();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function comparar() {
|
||||
var TextoCargos = ToDouble(document.getElementById('<%= TxtTotalCargos.ClientID %>').value);
|
||||
var TextoAbonos = ToDouble(document.getElementById('<%= TxtTotalAbonos.ClientID %>').value);
|
||||
|
||||
if (TextoCargos == TextoAbonos) {
|
||||
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.color = "";
|
||||
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.color = "";
|
||||
$('#<%= HdnTotales.ClientID %>').value = 1;
|
||||
}
|
||||
else {
|
||||
|
||||
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.color = "#ff0000";
|
||||
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.color = "#ff0000";
|
||||
}
|
||||
}
|
||||
|
||||
function calculateCargo() {
|
||||
var sum = 0;
|
||||
$(".txtcargo").each(function () {
|
||||
if (!isNaN(this.value.split(',').join('')) && this.value.length != 0) {
|
||||
sum += parseFloat(this.value.split(',').join(''));
|
||||
}
|
||||
});
|
||||
$('#<%= TxtTotalCargos.ClientID %>').val(FormatoNumero(parseFloat(sum.toFixed(2)), 2));
|
||||
}
|
||||
|
||||
function calculateAbono() {
|
||||
var sum = 0;
|
||||
$(".txtabono").each(function () {
|
||||
if (!isNaN(this.value.split(',').join('')) && this.value.length != 0) {
|
||||
sum += parseFloat(this.value.split(',').join(''));
|
||||
}
|
||||
});
|
||||
$('#<%= TxtTotalAbonos.ClientID %>').val(FormatoNumero(parseFloat(sum.toFixed(2)), 2));
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
1508
Contabilidad/RegPrePoliza.aspx.vb
Normal file
1508
Contabilidad/RegPrePoliza.aspx.vb
Normal file
File diff suppressed because it is too large
Load Diff
876
Contabilidad/RegPrePoliza1.aspx
Normal file
876
Contabilidad/RegPrePoliza1.aspx
Normal file
@@ -0,0 +1,876 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegPrePoliza1.aspx.vb" Inherits="ContabilidadC_RegPrePoliza" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.GvMov input, .GvMov td {
|
||||
height: 20px !important;
|
||||
}
|
||||
|
||||
.GvSize tr > th:nth-child(1), .GvSize tr > th:nth-child(3), .GvSize tr > th:nth-child(5),
|
||||
.GvSize tr > td:nth-child(1), .GvSize tr > td:nth-child(3), .GvSize tr > td:nth-child(5) {
|
||||
width: 17%;
|
||||
}
|
||||
|
||||
.GvSize tr > th:nth-child(2), .GvSize tr > td:nth-child(2) {
|
||||
width: 9%;
|
||||
}
|
||||
|
||||
.GvSize tr > th:nth-child(4), .GvSize tr > th:nth-child(8),
|
||||
.GvSize tr > td:nth-child(4), .GvSize tr > td:nth-child(8) {
|
||||
width: 12%;
|
||||
}
|
||||
|
||||
.GvSize tr > th:nth-child(6), .GvSize tr > th:nth-child(7),
|
||||
.GvSize tr > td:nth-child(6), .GvSize tr > td:nth-child(7) {
|
||||
width: 8%;
|
||||
}
|
||||
|
||||
.AutoExtender {
|
||||
font-family: Verdana, Helvetica, sans-serif;
|
||||
font-size: .9em;
|
||||
font-weight: normal;
|
||||
border: solid 1px #006699;
|
||||
line-height: 20px;
|
||||
padding: 2px;
|
||||
background-color: White;
|
||||
margin-left: 2px;
|
||||
overflow: auto;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.AutoExtenderList {
|
||||
cursor: pointer;
|
||||
color: darkgray;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.AutoExtenderHighlight {
|
||||
color: White;
|
||||
background-color: #084784;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#divwidth {
|
||||
width: 150px !important;
|
||||
}
|
||||
|
||||
#divwidth div {
|
||||
width: 150px !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label ID="LblEncabezado" runat="server" Text=" Registro de Póliza"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkComplementoPago" runat="server" Visible="false" OnClick="LnkComplementoPago_Click" Style="color: #686868;"><i class="fa fa-money" style="color:#686868;"></i> Crear Complemento de Pago</asp:LinkButton>
|
||||
</li>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAddConcepto" runat="server" OnClick="LnkAddConcepto_Click" Visible="false"><i class="fa fa-plus" ></i> Agregar Concepto</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="left" style="width: 665px;">
|
||||
|
||||
<asp:UpdatePanel ID="UPPDocumento" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivConceptoPrePoliza" runat="server" class="chequesie22">
|
||||
<div class="chequesie12" runat="server" id="divDatosPrincipales">
|
||||
<div class="row">
|
||||
<label class="col-md-2 control-label text-left">Fecha: </label>
|
||||
<div class="col-md-4" style="width: 42%;">
|
||||
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendario" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFecha" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaDocumento" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes 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="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-1" style="width: 5px;">
|
||||
<asp:CheckBox ID="ChkAutoConta" runat="server"></asp:CheckBox>
|
||||
</div>
|
||||
<label class="col-md-2">AutoContabilizar</label>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" id="divTipoPolAdd">
|
||||
<label class="col-md-2">Tipo Póliza:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlTipoPolizaAdd" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Width="150px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Text="Ingreso" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Egreso" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Diario" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie22" runat="server" id="divObservaciones">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones:</label>
|
||||
<div class="col-md-5">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Movimiento:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlPlantilla" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="True" DataTextField="PlantillaPoliza" DataValueField="CvePlantillaPoliza" Width="250px" ValidationGroup="GrpGuardar">
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row" id="trNotificar" runat="server" visible="False">
|
||||
<label class="col-md-2">Notificar:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtNotificarA" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="trCuentaDeposito" runat="server" visible="False">
|
||||
<label class="col-md-2">Cuenta Depósito:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" DataTextField="CuentaDeposito" DataValueField="CveCuentaDeposito" Width="400px" AppendDataBoundItems="True"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCuentaDeposito" runat="server" ControlToValidate="DdlCuentaDeposito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta de Depósito''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuentaDeposito" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie22">
|
||||
<div class="row" id="DivAgregarConceptos" runat="server" visible="true">
|
||||
<div class="col-md-12">
|
||||
<table border="0" rules="none" style="border-collapse: collapse; min-width: 980px;" class="table table-striped GvSize mygvps Widthall">
|
||||
<tr class="Titulos TextTab">
|
||||
<th>Concepto<asp:HiddenField ID="HdnCve" runat="server" />
|
||||
</th>
|
||||
<th>Cta. Contable</th>
|
||||
<th>Referencia</th>
|
||||
<th>Descripción</th>
|
||||
<th>SubProyecto</th>
|
||||
<th>Cargo</th>
|
||||
<th>Abono</th>
|
||||
<th style="width: 100px;">Comandos</th>
|
||||
<th runat="server" visible="false" id="nomostrar2"></th>
|
||||
</tr>
|
||||
<tr class="TextTab">
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlConceptosContables" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="160px" AutoPostBack="true">
|
||||
</asp:DropDownList><br />
|
||||
|
||||
<asp:DropDownList ID="DdlProveedores" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="160px" Visible="false" AutoPostBack="true"></asp:DropDownList><br />
|
||||
<asp:DropDownList ID="DdlCompras" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SerieFolio" DataValueField="CveCompra" Width="160px" Visible="false"></asp:DropDownList><br />
|
||||
<asp:DropDownList ID="DdlPersonal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="160px" Visible="false"></asp:DropDownList>
|
||||
<ADS:Dropdownlost ID="DdlClientes" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="160px" Visible="false" AutoPostBack="true"></ADS:Dropdownlost>
|
||||
<br />
|
||||
<asp:DropDownList ID="DdlVentas" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList><br />
|
||||
</th>
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlCtaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="160px">
|
||||
</asp:DropDownList><br />
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtReferencia" runat="server" Rows="2" TextMode="MultiLine" Width="150px"></asp:TextBox>
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" Rows="2" TextMode="MultiLine" Width="150px"></asp:TextBox>
|
||||
</th>
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="160px">
|
||||
</asp:DropDownList><br />
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtCargo" runat="server" Width="76px" Height="24px" CssClass="txtcargo"></asp:TextBox>
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtAbono" runat="server" Width="76px" Height="24px" CssClass="txtabono"></asp:TextBox>
|
||||
</th>
|
||||
<th align="center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" Enabled="true" Text="Agregar"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LbCancelarEdicion" runat="server" Visible="false" CssClass="Texto" Enabled="true" Text="Cancelar"></asp:LinkButton>
|
||||
</th>
|
||||
<th runat="server" visible="false" id="nomostrar"></th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpPoliza" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" visible="false" runat="server" id="DivDatosPoliza">
|
||||
<label class="col-md-1">Tipo Póliza:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoPoliza" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Width="100%" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Text="Ingreso" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Egreso" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Diario" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Fecha:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaDocumento" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendarioPoliza" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaDocumento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TxtFechaDocumento" PopupButtonID="ImgCalendarioPoliza" PopupPosition="Left" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaPoliza" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaPoliza" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes 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="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPoliza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPoliza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Concepto:</label>
|
||||
<div class="col-md-5">
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row" visible="false" runat="server" id="divContabilziada">
|
||||
<label class="col-md-1">Contabilizada:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:HyperLink ID="HplContabilizada" runat="server" Target="_blank">Si</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" visible="false" runat="server" id="DivTipoGasto">
|
||||
<label class="col-md-1">Tipo Gasto:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoGasto" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoGasto_SelectedIndexChanged" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Width="100%" ValidationGroup="GrpGuardar" DataTextField="TipoGasto" DataValueField="CveTipoGasto">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<asp:UpdatePanel ID="UPMovs" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<input id="HdnCveCuenta" runat="server" type="hidden" value="-1" clientidmode="Static" />
|
||||
<table style="width: 100%;" class="table GvSize table-striped table-advance table-hover">
|
||||
<tr class="Titulos">
|
||||
<th>Cuenta</th>
|
||||
<th>Referencia</th>
|
||||
<th>Descripción</th>
|
||||
<th>SubProyecto
|
||||
<br />
|
||||
<asp:DropDownList ID="DdlSubProyectoFiltroMov" Width="150px" AutoPostBack="true" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSubProyectoFiltroMov_SelectedIndexChanged" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AppendDataBoundItems="true"></asp:DropDownList></br/>
|
||||
<th id="ThTipoGasto" runat="server" visible="false">Tipo Gasto</th>
|
||||
<th>Ref. Bancaria</th>
|
||||
<th>Cargo</th>
|
||||
<th>Abono</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
||||
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cuenta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCuenta" runat="server" Text='<%# Eval("Cuenta") %>'></asp:Literal><br />
|
||||
<asp:Label ID="LblCuentaCon" Font-Italic="true" Font-Size="7pt" runat="server" Text='<%# Eval("CodigoCuenta") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Referencia</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlReferencia" runat="server" Text='<%# Eval("Referencia")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Concepto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" Width="150px" Text='<%# Eval("Concepto")%>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>SubProyecto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="140px"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>TipoGasto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="150px"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Ref. Bancaria</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSaldos" CssClass="select2me" runat="server" DataValueField="CveIE" DataTextField="RazonSocialSaldo" Visible="false" Style="width: 150px;"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cargo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCargo" CssClass="txtcargo" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Abono</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtAbono" CssClass="txtabono" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:ImageButton Visible="false" ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgBancos" runat="server" CausesValidation="False" CssClass="btn btn-circle btn-sm btn-warning" OnClick="Bancos_Click" Text="<i class='fa fa-money'></i>" Visible="false" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpPrePoliza" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
||||
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal" Width="100%" CssClass="table table-striped table-advance table-hover mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Movimiento</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlConceptoContable" runat="server" Text='<%# Eval("ConceptoContable") %>'></asp:Literal><br />
|
||||
<%-- <asp:HiddenField ID="HdnConceptoContable" runat="server" Value='<%# Eval("CveConceptoContable") %>' />
|
||||
<asp:HiddenField ID="HdnProveedor" runat="server" Value='<%# Eval("CveProveedor") %>' />
|
||||
<asp:HiddenField ID="HdnCompra" runat="server" Value='<%# Eval("CveCompra") %>' />
|
||||
<asp:HiddenField ID="HdnPersonal" runat="server" Value='<%# Eval("CvePersonal") %>' />
|
||||
<asp:HiddenField ID="HdnCliente" runat="server" Value='<%# Eval("CveCliente") %>' />
|
||||
<asp:HiddenField ID="HdnVenta" runat="server" Value='<%# Eval("CveVenta") %>' />--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Documento</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HlReferencia" Target="_blank" runat="server" Text='<%# Eval("FolioFactura") %>'></asp:HyperLink>
|
||||
<br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Referencia</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="TxtRef" runat="server" Text='<%# Eval("Referencia") %>'></asp:Literal><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="280px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Concepto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="TxtConcepto" runat="server" Text='<%# Eval("Concepto") %>'></asp:Literal><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="400px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
SubProyecto
|
||||
<%-- <asp:DropDownList ID="DdlSubProyectoFiltro" Width="150px" AutoPostBack="true" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSubProyectoFiltro_SelectedIndexChanged" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AppendDataBoundItems="true"></asp:DropDownList>--%>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="DdlSubProyecto" runat="server" Text='<%# If(Eval("CveSubProyecto").ToString = "0", "-", Eval("SubProyecto")) %>'></asp:Literal><br />
|
||||
<%--<asp:HiddenField ID="HdnSubProyecto" runat="server" Value='<%# Eval("CveSubProyecto") %>' />--%>
|
||||
<%--<asp:DropDownList ID="DdlSubProyecto" runat="server" Width="150px" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList><br />--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>TipoGasto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="DdlTipoGasto" runat="server" Text='<%# Eval("TipoGasto") %>'></asp:Literal><br />
|
||||
<%--<asp:HiddenField ID="HdnTipoGasto" runat="server" Value='<%# Eval("CveTipoGasto") %>' />--%>
|
||||
<%--<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="150px"></asp:DropDownList>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cuenta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="DdlCtaContable" runat="server" Text='<%# Eval("CtaCodigo") %>'></asp:Literal><br />
|
||||
<%--<asp:HiddenField ID="HdnCtaContable" runat="server" Value='<%# Eval("IdCtaContable") %>' />--%>
|
||||
<%--<asp:DropDownList ID="DdlCtaContable" runat="server" Width="200px" CssClass="form-control input-sm select2me" DataValueField="Id" DataTextField="CtaCodigo"></asp:DropDownList><br />--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="300px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cargo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="text-align: right">
|
||||
<asp:Literal ID="TxtCargo" runat="server" Text='<%# If(Eval("TipoMovto").ToString = "False", Eval("ImporteMN", "{0:N2}"), "") %>'></asp:Literal><br />
|
||||
</div>
|
||||
<%-- <asp:CompareValidator ID="CVCargo" runat="server" ControlToValidate="TxtCargo" Display="None" ErrorMessage="El campo <b>''Cargo''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCCargo" runat="server" HighlightCssClass="vco" TargetControlID="CVCargo" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Abono</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="text-align: right">
|
||||
<asp:Literal ID="TxtAbono" runat="server" Text='<%# If(Eval("TipoMovto").ToString = "True", Eval("ImporteMN", "{0:N2}"), "") %>'></asp:Literal><br />
|
||||
</div>
|
||||
<%-- <asp:CompareValidator ID="CVAbono" runat="server" ControlToValidate="TxtAbono" Display="None" ErrorMessage="El campo <b>''Abono''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCAbono" runat="server" HighlightCssClass="vco" TargetControlID="CVAbono" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEdit" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="20px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<table class="table table-striped table-advance table-hover Widthall">
|
||||
<tr>
|
||||
<td style="width: 730px"> </td>
|
||||
<th style="width: 70px;">
|
||||
<asp:TextBox ID="TxtTotalCargos" runat="server" Style="text-align: right" Enabled="false" Width="70px" Text="0.00"></asp:TextBox></th>
|
||||
<th style="width: 70px;">
|
||||
<asp:TextBox ID="TxtTotalAbonos" runat="server" Style="text-align: right" Enabled="false" Width="70px" Text="0.00"></asp:TextBox></th>
|
||||
<asp:HiddenField ID="HdnTotales" runat="server" ClientIDMode="Static" />
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="text-align: center;">
|
||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnIEGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" CssClass="btn btn-primary" />
|
||||
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
||||
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" class="btn btn-danger" />
|
||||
<asp:Button ID="BtnContabilizar" runat="server" Text="Contabilizar" CssClass="btn btn-primary green" Visible="false" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="DivContadoModal" align="center" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel ID="UpBancos" runat="server" class="modal-content" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloPago" runat="server" Text="Contado" />
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:Panel ID="PnlContado" runat="server" Visible="False">
|
||||
<asp:RadioButtonList ID="RBLContado" runat="server" RepeatDirection="Horizontal" AutoPostBack="True">
|
||||
<asp:ListItem Value="1" Selected="True">Bancos</asp:ListItem>
|
||||
<asp:ListItem Value="6">Caja Chica</asp:ListItem>
|
||||
<asp:ListItem Value="2">F y E</asp:ListItem>
|
||||
<asp:ListItem Value="4">Deudores</asp:ListItem>
|
||||
<asp:ListItem Value="5">Acreedores</asp:ListItem>
|
||||
<asp:ListItem Value="3">Créditos</asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
</asp:Panel>
|
||||
<br />
|
||||
|
||||
<div runat="server" id="DivContado">
|
||||
<asp:Panel ID="PnlContadoBancos" CssClass="chequesie text-small" runat="server" Width="400px" Visible="true">
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Movimiento:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" Width="156px" ValidationGroup="GrpContado"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoTransaccion" runat="server" ControlToValidate="DdlTipoTransaccion" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETipoTransaccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2">Cuenta:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlCuenta" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="200px" ValidationGroup="GrpContado"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCuenta" runat="server" ControlToValidate="DdlCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie2">
|
||||
<div class="row">
|
||||
<asp:Label ID="LblFolio" runat="server" Text="Número:" class="col-md-2"></asp:Label>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox ID="TxtDocumentoFolio" CssClass="form-control input-sm" runat="server" MaxLength="12"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtDocumentoFolio" Display="None" ErrorMessage="El campo <b>''Folio''</b> es requerido por la aplicación, por favor ingrese uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<label class="col-md-2">Importe</label>
|
||||
<div class="col-md-4 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtDocumentoImporte" CssClass="form-control input-sm " Enabled="False" runat="server" MaxLength="12" Width="80px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBEDocumentoImporte" runat="server" TargetControlID="TxtDocumentoImporte" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<asp:Label ID="LblBeneficiario" runat="server" Text="Beneficiario:" class="col-md-2"></asp:Label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDocumentoBeneficiario" runat="server" CssClass="form-control input-sm"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDocumentoObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Panel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContado" runat="server" class="btn btn-success" Text="Guardar" ValidationGroup="GrpContado" />
|
||||
<button id="Button2" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
<asp:HiddenField ID="HiddenField1" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="DivEditConcepto" align="center" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" class="modal-content" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTitulo" runat="server" Text="Editar Concepto" />
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body" style="margin-left: 20px">
|
||||
<asp:UpdatePanel ID="UppGrid" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Concepto:</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:DropDownList ID="DdlConceptosContablesE" CssClass="form-control input-sm select2me" runat="server" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="160px" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlProveedoresE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="160px" Visible="false" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlComprasE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SerieFolio" DataValueField="CveCompra" Width="160px" Visible="false"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlPersonalE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="160px" Visible="false"></asp:DropDownList>
|
||||
<ADS:Dropdownlost ID="DdlClientesE" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="160px" Visible="false" AutoPostBack="true"></ADS:Dropdownlost>
|
||||
<asp:DropDownList ID="DdlVentasE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">
|
||||
Cuenta:
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:DropDownList ID="DdlCtaContableE" runat="server" CssClass="form-control input-sm select2me" DataValueField="Id" DataTextField="CtaCodigo"></asp:DropDownList><br />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Referencia:</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox ID="TxtReferenciaE" runat="server" Width="405px" MaxLength="100" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Descripción:</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox ID="TxtConceptoE" runat="server" Width="405px" MaxLength="100" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">
|
||||
SubProyecto:
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:DropDownList ID="DdlSubProyectoE" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList><br />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="DivTG" runat="server">
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Tipo Gasto:</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:DropDownList ID="DdlTipoGastoE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="150px"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">
|
||||
Cargo:
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:TextBox ID="TxtCargoE" runat="server" CssClass=" txtcargo form-control input-sm" Style="text-align: right"></asp:TextBox><br />
|
||||
<asp:CompareValidator ID="CVCargo" runat="server" ControlToValidate="TxtCargo" Display="None" ErrorMessage="El campo <b>''Cargo''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCCargo" runat="server" HighlightCssClass="vco" TargetControlID="CVCargo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-xs-1" style="text-align: left">
|
||||
Abono:
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:TextBox ID="TxtAbonoE" runat="server" CssClass=" txtabono form-control input-sm" Style="text-align: right"></asp:TextBox><br />
|
||||
<asp:CompareValidator ID="CVAbono" runat="server" ControlToValidate="TxtAbono" Display="None" ErrorMessage="El campo <b>''Abono''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCAbono" runat="server" HighlightCssClass="vco" TargetControlID="CVAbono" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAceptar" runat="server" class="btn btn-success" Text="Aceptar" />
|
||||
<button id="BtnCancelar" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript" language="javascript">
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
CargaTxtFunciones();
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
CargaTxtFunciones();
|
||||
});
|
||||
});
|
||||
|
||||
function FnSuma(t, txt, importe) {
|
||||
if (t.checked) {
|
||||
txt.value = FormatNumber(importe, 2, true, true, true);
|
||||
} else {
|
||||
txt.value = "";
|
||||
}
|
||||
$get('TxtAbono').value = FormatNumber(SumaValores(), 2, true, true, true);
|
||||
}
|
||||
|
||||
function FncImporte(txt, rowtxt, opcion) {
|
||||
// opcion = 1, se registro desde el txtimporte
|
||||
if (opcion == 1) {
|
||||
$get(rowtxt).value = $get(txt).value == '' ? '' : FormatNumber(ToDouble($get(txt).value), 2, true, true, true);
|
||||
debugger;
|
||||
if ($get('ChkAbonoCuenta')) {
|
||||
$get('ChkAbonoCuenta').checked = ($get(txt).value > 2000);
|
||||
}
|
||||
FormatoMoneda($get(txt));
|
||||
} else {
|
||||
$get(txt).value = $get(rowtxt).value == '' ? '' : FormatNumber(ToDouble($get(rowtxt).value), 2, true, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
function FncImporteCuenta(txt) {
|
||||
if ($get('ChkAbonoCuenta')) {
|
||||
$get('ChkAbonoCuenta').checked = (parseFloat(txt.value.replace(/,/g, '')) > 2000);
|
||||
}
|
||||
FormatoMoneda(txt);
|
||||
}
|
||||
|
||||
function SumaValores() {
|
||||
var Importe = 0;
|
||||
var topLevelElem = document.getElementById("form1");
|
||||
var textBoxes = topLevelElem.getElementsByTagName("input");
|
||||
for (var i = 0; i < textBoxes.length; i++) {
|
||||
if (textBoxes[i].type == "text") {
|
||||
if (textBoxes[i].id.indexOf('C_GvMov_TxtAbono') >= 0) {
|
||||
if (textBoxes[i].value != '') {
|
||||
Importe = parseFloat(Importe) + parseFloat(textBoxes[i].value.split(',').join(''));
|
||||
alert(Importe);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Importe;
|
||||
}
|
||||
|
||||
function FnCambia(chk, txt) {
|
||||
if (txt.value != '') {
|
||||
chk.checked = true;
|
||||
} else {
|
||||
chk.checked = false;
|
||||
}
|
||||
$get('TxtImporte').value = FormatNumber(SumaValores(), 2, true, true, true);
|
||||
}
|
||||
|
||||
function getCuenta(pId) {
|
||||
$get('HdnCveCuenta').value = pId;
|
||||
PageMethods.wsGetNombreCuenta(pId, OnSucceeded);
|
||||
}
|
||||
|
||||
function OnSucceeded(result, userContext, methodName) {
|
||||
if (methodName == 'wsGetNombreCuenta') {
|
||||
$get('TxtCuentaContable').value = result;
|
||||
}
|
||||
}
|
||||
|
||||
function myItemSelectedHandler(source, eventArgs) {
|
||||
//debugger;
|
||||
var CC = $get('HdnCveCuenta');
|
||||
CC.value = eventArgs.get_value();
|
||||
// var b = $get('C_Tabs_TabConyuge_BtnTruco');
|
||||
// b.Click;
|
||||
var aTargetElement = 'BtnSelCuenta';
|
||||
__doPostBack(aTargetElement, eventArgs.get_value());
|
||||
//alert(" Key : " + eventArgs.get_text() + " Value : " + eventArgs.get_value());
|
||||
}
|
||||
|
||||
function LimpiaImporte(t, txt) {
|
||||
if (t.value != '' && $get(txt)) {
|
||||
$get(txt).value = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function CargaTxtFunciones() {
|
||||
$(".txtcargo").each(function () {
|
||||
$(this).keyup(function () {
|
||||
calculateCargo();
|
||||
comparar();
|
||||
});
|
||||
});
|
||||
$(".txtabono").each(function () {
|
||||
$(this).keyup(function () {
|
||||
calculateAbono();
|
||||
comparar();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function comparar() {
|
||||
var TextoCargos = ToDouble(document.getElementById('<%= TxtTotalCargos.ClientID %>').value);
|
||||
var TextoAbonos = ToDouble(document.getElementById('<%= TxtTotalAbonos.ClientID %>').value);
|
||||
|
||||
if (TextoCargos == TextoAbonos) {
|
||||
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.color = "";
|
||||
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.color = "";
|
||||
$('#<%= HdnTotales.ClientID %>').value = 1;
|
||||
}
|
||||
else {
|
||||
|
||||
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.color = "#ff0000";
|
||||
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.color = "#ff0000";
|
||||
}
|
||||
}
|
||||
|
||||
function calculateCargo() {
|
||||
var sum = 0;
|
||||
$(".txtcargo").each(function () {
|
||||
if (!isNaN(this.value.split(',').join('')) && this.value.length != 0) {
|
||||
sum += parseFloat(this.value.split(',').join(''));
|
||||
}
|
||||
});
|
||||
$('#<%= TxtTotalCargos.ClientID %>').val(FormatoNumero(sum.toFixed(2), 2));
|
||||
}
|
||||
|
||||
function calculateAbono() {
|
||||
var sum = 0;
|
||||
$(".txtabono").each(function () {
|
||||
if (!isNaN(this.value.split(',').join('')) && this.value.length != 0) {
|
||||
sum += parseFloat(this.value.split(',').join(''));
|
||||
}
|
||||
});
|
||||
$('#<%= TxtTotalAbonos.ClientID %>').val(FormatoNumero(sum.toFixed(2), 2));
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
1714
Contabilidad/RegPrePoliza1.aspx.vb
Normal file
1714
Contabilidad/RegPrePoliza1.aspx.vb
Normal file
File diff suppressed because it is too large
Load Diff
304
Contabilidad/RepAnexoCatalogo.aspx
Normal file
304
Contabilidad/RepAnexoCatalogo.aspx
Normal file
@@ -0,0 +1,304 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogo.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>
|
||||
326
Contabilidad/RepAnexoCatalogo.aspx.vb
Normal file
326
Contabilidad/RepAnexoCatalogo.aspx.vb
Normal file
@@ -0,0 +1,326 @@
|
||||
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 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
|
||||
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.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(Now), Month(Now), 1)
|
||||
FechaFin = Date.Now
|
||||
|
||||
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 = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, 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}", e.Row.DBCampo("ID"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString)
|
||||
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))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
312
Contabilidad/RepAnexoCatalogoMes.aspx
Normal file
312
Contabilidad/RepAnexoCatalogoMes.aspx
Normal file
@@ -0,0 +1,312 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoMes.aspx.vb" Inherits="AC_RepAnexoCatalogoMes" %>
|
||||
|
||||
<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 Por Mes"></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 style="display:none!important">Tipo de Cuentas:
|
||||
</li>
|
||||
<li style="display:none!important">
|
||||
<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="300px" ClientIDMode="Static" Enabled="false" TabIndex="5" CssClass="form-control input-sm"></asp:TextBox>
|
||||
</li>
|
||||
|
||||
<li runat="server" id="tdTipoReporte" visible="false" tyle="display:none!important" >Tipo: </li>
|
||||
|
||||
<li runat="server" id="tdTipoReporte2" visible="false" style="display:none!important">
|
||||
<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" style="display:none!important" >
|
||||
<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="120" />
|
||||
</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="350" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Iniciales" Visible="false">
|
||||
<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 Visible="false">
|
||||
<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 Visible="false">
|
||||
<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:BoundField DataFormatString="{0:N2}" HeaderText="Enero" DataField="SaldoActualEnero" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Febrero" DataField="SaldoActualFebrero" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Marzo" DataField="SaldoActualMarzo" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Abril" DataField="SaldoActualAbril" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Mayo" DataField="SaldoActualMayo" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Junio" DataField="SaldoActualJunio" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Julio" DataField="SaldoActualJulio" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Agosto" DataField="SaldoActualAgosto" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Septiembre" DataField="SaldoActualSeptiembre" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Octubre" DataField="SaldoActualOctubre" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Noviembre" DataField="SaldoActualNoviembre" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Diciembre" DataField="SaldoActualDiciembre" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Saldos Actuales" Visible="false">
|
||||
<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;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
328
Contabilidad/RepAnexoCatalogoMes.aspx.vb
Normal file
328
Contabilidad/RepAnexoCatalogoMes.aspx.vb
Normal file
@@ -0,0 +1,328 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepAnexoCatalogoMes
|
||||
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 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.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(Now), Month(Now), 1)
|
||||
FechaFin = Date.Now
|
||||
|
||||
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("Ejercicio") IsNot Nothing Then
|
||||
IdCuenta = Request("ID").ToEntero
|
||||
'FechaInicio = Request("FI").ToDate
|
||||
FechaFin = Request("FF").ToDate
|
||||
|
||||
|
||||
FechaInicio = Date.Parse($"01/01/{ Request("Ejercicio") }")
|
||||
FechaFin = Date.Parse($"31/12/{ Request("Ejercicio") }")
|
||||
|
||||
|
||||
|
||||
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 = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, 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.GetAnexoCatalogoMes(IdCuenta, FechaInicio, FechaFin, DdlCuenta.SelectedValue.ToEntero, TipoReporte, DdlSegmentoNegocio.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()
|
||||
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}", e.Row.DBCampo("ID"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString)
|
||||
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))
|
||||
' params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
' params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
|
||||
' ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
'End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
410
Contabilidad/RepAnexoCatalogoSegmento.aspx
Normal file
410
Contabilidad/RepAnexoCatalogoSegmento.aspx
Normal file
@@ -0,0 +1,410 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoSegmento.aspx.vb" Inherits="AC_RepAnexoCatalogoSegmento" %>
|
||||
|
||||
<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 Por Segmento"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UpLnkAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server" OnClick="LnkExcel_Click"> <i class="fa fa-ad-excel"></i> Exportal Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</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 style="display: none!important">Tipo de Cuentas:
|
||||
</li>
|
||||
<li style="display: none!important">
|
||||
<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="350px" ClientIDMode="Static" Enabled="false" TabIndex="5" CssClass="form-control input-sm"></asp:TextBox>
|
||||
</li>
|
||||
|
||||
<li runat="server" id="tdTipoReporte" visible="false" style="display: none!important">Tipo:
|
||||
</li>
|
||||
<li runat="server" id="tdTipoReporte2" visible="false" style="display: none!important">
|
||||
<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" style="display: none!important">
|
||||
<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" AutoGenerateColumns="False" DataKeyNames="" ShowHeader="true"
|
||||
CssClass="ADSCROLLER2 table table-striped table-advance table-hover" data-cols="3" data-heightmenos="300"
|
||||
Style="text-align: center;" GridLines="None" OnRowDataBound="GvIngresos_RowDataBound">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("Codigo")%>' Width="120px"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>' Width="200px"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Total" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Total", "{0:N2}")%>' Width="100px"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
|
||||
</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;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
332
Contabilidad/RepAnexoCatalogoSegmento.aspx.vb
Normal file
332
Contabilidad/RepAnexoCatalogoSegmento.aspx.vb
Normal file
@@ -0,0 +1,332 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepAnexoCatalogoSegmento
|
||||
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 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
|
||||
|
||||
|
||||
Private Property Segmentos As String
|
||||
Get
|
||||
Segmentos = ViewState("Segmentos").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Segmentos") = 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
|
||||
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(Now), Month(Now), 1)
|
||||
FechaFin = Date.Now
|
||||
|
||||
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
|
||||
|
||||
|
||||
Segmentos = Request("Segmentos")
|
||||
|
||||
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)
|
||||
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
|
||||
'IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero)
|
||||
CargaDatos()
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim DTCabeceras As New DataTable
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
If ObjConta.GetEstadoActividadesSegmentoDetalle(FechaInicio, FechaFin, IdCuenta, Segmentos) Then
|
||||
DtDatos = ObjConta.DSResultados.Tables(1)
|
||||
DTCabeceras = ObjConta.DSResultados.Tables(0)
|
||||
Else
|
||||
DtDatos = New DataTable
|
||||
DTCabeceras = New DataTable
|
||||
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
Dim IndexActual As Integer = 0
|
||||
|
||||
For Each Dr As DataRow In DTCabeceras.Rows
|
||||
|
||||
Dim IndexGV As Integer = 3 + IndexActual
|
||||
|
||||
GvDatos.Columns(IndexGV).Visible = True
|
||||
CType(GvDatos.Columns(IndexGV), BoundField).DataField = Dr("id").ToString
|
||||
GvDatos.Columns(IndexGV).HeaderText = Dr("Nombre").ToString
|
||||
|
||||
|
||||
GvDatos.Columns(IndexGV).Visible = True
|
||||
CType(GvDatos.Columns(IndexGV), BoundField).DataField = Dr("id").ToString
|
||||
GvDatos.Columns(IndexGV).HeaderText = Dr("Nombre").ToString
|
||||
|
||||
|
||||
|
||||
IndexActual = IndexActual + 1
|
||||
If IndexGV >= 200 Then
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
|
||||
|
||||
CargaGrid()
|
||||
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("IdCuenta").ToEntero = IdCuenta Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
|
||||
Else
|
||||
e.Row.ControlStyle.Font.Bold = False
|
||||
End If
|
||||
|
||||
|
||||
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
|
||||
'GvDatos.ExportToExcelG("RepAnexoCatalogoSegmento", "RepAnexoCatalogoSegmento", UsuarioActual)
|
||||
GvDatos.ExportToExcelx("RepAnexoCatalogoSegmento")
|
||||
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("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
' params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
|
||||
' ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
'End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
265
Contabilidad/RepAuxiliar.aspx
Normal file
265
Contabilidad/RepAuxiliar.aspx
Normal file
@@ -0,0 +1,265 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAuxiliar.aspx.vb" Inherits="RepAuxiliar" %>
|
||||
|
||||
<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 Auxiliar
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1 " style="width:130px;"><asp:Literal ID="LitFechaIni" runat="server" Text="Movimientos del"></asp:Literal>:</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 " style="width:40px;""><asp:Literal ID="LitFechaFin" runat="server" Text="Al"></asp:Literal>:</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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table border="0" id="TbHeader" class="tablenopadding" runat="server">
|
||||
|
||||
<tr>
|
||||
<td >
|
||||
<asp:Panel ID="PanCuentas" runat="server" GroupingText="Cuentas con movimientos y saldos" Width="300">
|
||||
<asp:RadioButtonList ID="RblCuentas" TabIndex="3" runat="server">
|
||||
<asp:ListItem>Todas</asp:ListItem>
|
||||
<asp:ListItem>Con Movimientos</asp:ListItem>
|
||||
<asp:ListItem>Saldo actual no igual a cero</asp:ListItem>
|
||||
<asp:ListItem>Movimientos y saldo no cero</asp:ListItem>
|
||||
<asp:ListItem>Movimientos o saldo no cero</asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
</asp:Panel>
|
||||
</td>
|
||||
<td style="vertical-align:top;" >
|
||||
<table>
|
||||
<tr>
|
||||
<th style="text-align: left; width:150px;" >
|
||||
<asp:Literal ID="LitTipoCuenta" runat="server" Text="Tipo de Cuentas:"></asp:Literal>
|
||||
</th>
|
||||
<td width="150px">
|
||||
<asp:DropDownList ID="DdlTipoCuentas" runat="server" DataTextField="Nombre" DataValueField="Id" TabIndex="4" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 290px !important;" onchange="Enable(this);">
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align: left;" >
|
||||
<asp:Literal ID="LitCuenta" runat="server" Text="Cuenta:"></asp:Literal>
|
||||
</th>
|
||||
<td width="150px">
|
||||
<asp:HiddenField ID="HdnCveCuenta" runat="server" ClientIDMode="Static" />
|
||||
<asp:TextBox ID="TxtCuenta" runat="server" ClientIDMode="Static" Enabled="false" TabIndex="5" Width="290px"></asp:TextBox>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align: left;" >
|
||||
<asp:Literal ID="LitMoneda" runat="server" Text="Moneda:"></asp:Literal>
|
||||
</th>
|
||||
<td width="150px">
|
||||
<asp:DropDownList ID="DdlMoneda" runat="server" TabIndex="6" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 290px !important;">
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2" width="400px">
|
||||
<asp:Button ID="ButConsultar" runat="server" TabIndex="7" Text="Consultar" class="btn btn-primary" /></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table border="0" class="table table-striped Widthall" style="min-width:900px;" >
|
||||
<tr>
|
||||
<td width="70">Cuenta</td>
|
||||
<td colspan="2"></td>
|
||||
<td align="center">Nombre</td>
|
||||
<td colspan="3"></td>
|
||||
<td align="right">Saldo Inicial</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="70">Fecha</td>
|
||||
<td width="70">Tipo</td>
|
||||
<td align="center" width="50">Número</td>
|
||||
<td align="center" width="180">Concepto</td>
|
||||
<td width="140">Referencia</td>
|
||||
<td align="right" width="80">Cargos</td>
|
||||
<td align="right" width="80">Abonos</td>
|
||||
<td align="right" width="80">Saldo</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table id="TblPolizas" runat="server" border="0" style="border-collapse: collapse;">
|
||||
<tr>
|
||||
<td>
|
||||
<%--<asp:GridView ID="GvPolizas" runat="server" AutoGenerateColumns="True" EmptyDataText="No se han encontrado polizas con los datos proporcionados">--%>
|
||||
<asp:GridView ID="GvPolizas" runat="server" AutoGenerateColumns="False" ShowHeader="false" BorderStyle="None" EmptyDataText="No se han encontrado polizas con los datos proporcionados" CssClass="table table-striped table-advance table-hover Widthall" Style=" text-align: center;min-width:900px;" GridLines="None">
|
||||
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblFecha" runat="server" Text='<%# Eval("Fecha","{0:d}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="TipoPoliza" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplIdPoliza" runat="server" CssClass="Texto" Text='<%# Eval("Folio")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblConcepto" runat="server" Text='<%# Eval("Concepto")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblReferencia" runat="server" Text='<%# Eval("Referencia")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblSI" runat="server" Text='<%# Eval("SI", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</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(objCombo) {
|
||||
var Producto = objCombo.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>
|
||||
158
Contabilidad/RepAuxiliar.aspx.vb
Normal file
158
Contabilidad/RepAuxiliar.aspx.vb
Normal file
@@ -0,0 +1,158 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class RepAuxiliar
|
||||
Inherits ClsPaginas
|
||||
|
||||
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 Saldo As Double
|
||||
Get
|
||||
Return CType(ViewState("Saldo"), Double)
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("Saldo") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
'*************************************************************************
|
||||
'* NOTA: Borrar las siguientes 2 lineas cuando este operando normalmente *
|
||||
'*************************************************************************
|
||||
TxtFechaDel.Text = "01/01/2002"
|
||||
TxtFechaAl.Text = Date.Today.ToShortDateString
|
||||
CargaTipoCuentas()
|
||||
TxtCuenta.Enabled = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
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', '_RAACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
End If
|
||||
ObjTipoCuenta.Dispose()
|
||||
DdlTipoCuentas.DataBind()
|
||||
If strGlobal.Length > 0 Then DdlTipoCuentas.Items.Insert(0, New ListItem("Todas", strGlobal))
|
||||
DdlTipoCuentas.Items.Add(New ListItem("Algun específico", "-2"))
|
||||
DdlTipoCuentas.SelectedIndex = 0
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub ButConsultar_Click(sender As Object, e As EventArgs) Handles ButConsultar.Click
|
||||
CargaPolizas()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaPolizas()
|
||||
''*************************************************************************
|
||||
''* NOTA: Borrar las siguientes 2 lineas cuando este operando normalmente *
|
||||
''*************************************************************************
|
||||
Dim strFechaDel As String = TxtFechaDel.Text
|
||||
Dim strFechaAl As String = TxtFechaAl.Text
|
||||
|
||||
Dim ObjPolizas As New ClsEdosFinancieros(UsuarioActual.Empresa)
|
||||
|
||||
If DdlTipoCuentas.SelectedValue <> "-2" Then
|
||||
If ObjPolizas.GetMovimientosAuxiliares(DdlTipoCuentas.SelectedValue.ToEntero, strFechaDel.ToDate, strFechaAl.ToDate) Then
|
||||
GvPolizas.DataSource = ObjPolizas.Data
|
||||
Else
|
||||
GvPolizas.DataSource = Nothing
|
||||
End If
|
||||
Else
|
||||
If ObjPolizas.GetMovimientosAuxiliares(HdnCveCuenta.Value.ToEntero, strFechaDel.ToDate, strFechaAl.ToDate) Then
|
||||
GvPolizas.DataSource = ObjPolizas.Data
|
||||
Else
|
||||
GvPolizas.DataSource = Nothing
|
||||
End If
|
||||
End If
|
||||
ObjPolizas.Dispose()
|
||||
GvPolizas.DataBind()
|
||||
'UpPolizas.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvPolizas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvPolizas.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(83) 'Fecha
|
||||
e.Row.Cells(1).Width = Unit.Pixel(83) 'TipoPoliza
|
||||
e.Row.Cells(2).Width = Unit.Pixel(60) 'Numero
|
||||
e.Row.Cells(3).Width = Unit.Pixel(205) 'Concepto
|
||||
e.Row.Cells(4).Width = Unit.Pixel(162) 'Referencias
|
||||
e.Row.Cells(5).Width = Unit.Pixel(92) 'Cargos
|
||||
e.Row.Cells(6).Width = Unit.Pixel(92) 'Abonos
|
||||
e.Row.Cells(7).Width = Unit.Pixel(92) 'Saldos
|
||||
End If
|
||||
If e.Row.DBCampo("Id").ToEntero > 0 And e.Row.DBCampo("IdPoliza").ToEntero = -1 Then
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.FCLabel("LblFecha").Text = e.Row.DBCampo("Codigo")
|
||||
e.Row.FCLabel("LblConcepto").Text = e.Row.DBCampo("Nombre")
|
||||
If e.Row.FCLabel("LblSI").Text.ToEntero > -1 Then
|
||||
e.Row.FCHyperLink("HplIdPoliza").Text = ""
|
||||
e.Row.FCLabel("LblCargos").Text = ""
|
||||
e.Row.FCLabel("LblAbonos").Text = "Saldo inicial:"
|
||||
Saldo = 0
|
||||
Else
|
||||
e.Row.FCLabel("LblFecha").Text = ""
|
||||
e.Row.FCHyperLink("HplIdPoliza").Text = ""
|
||||
e.Row.FCLabel("LblConcepto").Text = ""
|
||||
e.Row.FCLabel("LblReferencia").Text = "Total:"
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(5).Style.Add("border-top-style", "solid")
|
||||
e.Row.Cells(6).Style.Add("border-top-style", "solid")
|
||||
e.Row.Cells(7).Style.Add("border-top-style", "solid")
|
||||
e.Row.FCLabel("LblSI").Text = Saldo.FormatoNumero
|
||||
If Saldo < 0 Then e.Row.FCLabel("LblSI").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
Else
|
||||
Saldo = Saldo + e.Row.FCLabel("LblCargos").Text.ToDouble - e.Row.FCLabel("LblAbonos").Text.ToDouble
|
||||
e.Row.FCLabel("LblSI").Text = Saldo.FormatoNumero
|
||||
If Saldo < 0 Then e.Row.FCLabel("LblSI").ForeColor = Drawing.Color.Red
|
||||
If e.Row.FCLabel("LblAbonos").Text.ToEntero = 0 Then e.Row.FCLabel("LblAbonos").Text = ""
|
||||
If e.Row.FCLabel("LblCargos").Text.ToEntero = 0 Then e.Row.FCLabel("LblCargos").Text = ""
|
||||
End If
|
||||
If e.Row.DBCampo("IdPoliza").ToEntero > 0 Then e.Row.FCHyperLink("HplIdPoliza").NavigateUrl = String.Format("/contabilidad/RegPoliza.aspx?IdPoliza={0}", e.Row.DBCampo("IdPoliza"))
|
||||
e.Row.Cells(0).BorderStyle = BorderStyle.None
|
||||
e.Row.Cells(1).BorderStyle = BorderStyle.None
|
||||
e.Row.Cells(2).BorderStyle = BorderStyle.None
|
||||
e.Row.Cells(3).BorderStyle = BorderStyle.None
|
||||
e.Row.Cells(4).BorderStyle = BorderStyle.None
|
||||
e.Row.Cells(5).BorderStyle = BorderStyle.None
|
||||
e.Row.Cells(6).BorderStyle = BorderStyle.None
|
||||
e.Row.Cells(7).BorderStyle = BorderStyle.None
|
||||
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")
|
||||
|
||||
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
|
||||
|
||||
Return Str.ToString
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
935
Contabilidad/RepBalanceGeneral.aspx
Normal file
935
Contabilidad/RepBalanceGeneral.aspx
Normal file
@@ -0,0 +1,935 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepBalanceGeneral.aspx.vb" Inherits="Contabilidad_RepBalanceGeneral" %>
|
||||
|
||||
<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>
|
||||
1161
Contabilidad/RepBalanceGeneral.aspx.vb
Normal file
1161
Contabilidad/RepBalanceGeneral.aspx.vb
Normal file
File diff suppressed because it is too large
Load Diff
218
Contabilidad/RepBalanceGeneralAnual.aspx
Normal file
218
Contabilidad/RepBalanceGeneralAnual.aspx
Normal file
@@ -0,0 +1,218 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepBalanceGeneralAnual.aspx.vb" Inherits="Contabilidad_RepBalanceGeneralAnual" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="CSS" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="E" Runat="Server">
|
||||
</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" CssClass="btn btn-default" runat="server" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1 " style="width: 80px;">Ejercicio:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" 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-3" runat="server" id="tdTipoReporte" visible="false">
|
||||
<div class="row">
|
||||
<label class="col-md-5 truncate">Tipo:</label>
|
||||
<div class="col-md-7">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" 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: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>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="JS" Runat="Server">
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function pageLoad() {
|
||||
$(document).ready(function () {
|
||||
gridviewScroll();
|
||||
});
|
||||
|
||||
function gridviewScroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 210;
|
||||
|
||||
$('#<%=GvDatos.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto,
|
||||
freezesize: 1,
|
||||
headerrowcount: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
148
Contabilidad/RepBalanceGeneralAnual.aspx.vb
Normal file
148
Contabilidad/RepBalanceGeneralAnual.aspx.vb
Normal file
@@ -0,0 +1,148 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad_RepBalanceGeneralAnual
|
||||
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 ReporteComplementario As Boolean
|
||||
Get
|
||||
ReporteComplementario = CBool(ViewState("ReporteComplementario").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ReporteComplementario") = 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
|
||||
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
|
||||
|
||||
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
|
||||
tdTipoReporte.Visible = True
|
||||
TipoReporte = 1
|
||||
End If
|
||||
|
||||
DdlEjercicio.SelectedValue = Now.Year.ToString
|
||||
|
||||
Anos = 0
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
If ObjConta.GetBalanceGeneralAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del balance general anual", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1
|
||||
|
||||
'Esconde todo
|
||||
For index = 1 To 20
|
||||
GvDatos.Columns(index).Visible = False
|
||||
Next
|
||||
|
||||
For index = 1 To Anos
|
||||
GvDatos.Columns(index).Visible = True
|
||||
GvDatos.Columns(index).HeaderText = (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString
|
||||
Next
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
CargaGrid()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 5 Or e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then
|
||||
For index = 1 To Anos
|
||||
e.Row.FCHyperLink("HLAno" + index.ToString).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 = 5 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;")
|
||||
|
||||
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}", 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)
|
||||
Next
|
||||
|
||||
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").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 Class
|
||||
220
Contabilidad/RepBalanceGeneralMensual.aspx
Normal file
220
Contabilidad/RepBalanceGeneralMensual.aspx
Normal file
@@ -0,0 +1,220 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepBalanceGeneralMensual.aspx.vb" Inherits="Contabilidad_RepBalanceGeneralMensual" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="CSS" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="E" runat="Server">
|
||||
Balance General Mensual
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
function pageLoad() {
|
||||
$(document).ready(function () {
|
||||
gridviewScroll();
|
||||
});
|
||||
|
||||
function gridviewScroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 210;
|
||||
|
||||
$('#<%=GvDatos.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>
|
||||
<asp:UpdatePanel runat="server" ID="UpdatePanel1" 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 truncate" style="width: 80px;">Ejercicio:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" CssClass="form-control input-sm" runat="server" Width="100px">
|
||||
<asp:ListItem Text="2014" Value="2014"></asp:ListItem>
|
||||
<asp:ListItem Text="2015" Value="2015"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-3" runat="server" id="tdTipoReporte" visible="false">
|
||||
<div class="row">
|
||||
<label class="col-md-5 truncate">Tipo:</label>
|
||||
<div class="col-md-7">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" 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:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">SubTotales:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubtotales" CssClass="form-control input-sm" 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>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-advance table-striped table-hover" 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"></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>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
170
Contabilidad/RepBalanceGeneralMensual.aspx.vb
Normal file
170
Contabilidad/RepBalanceGeneralMensual.aspx.vb
Normal file
@@ -0,0 +1,170 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad_RepBalanceGeneralMensual
|
||||
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 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
|
||||
End If
|
||||
|
||||
DdlEjercicio.SelectedValue = Now.Year.ToString
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
If ObjConta.GetBalanceGeneralMensual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, DdlSubtotales.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrió un error al cargar los datos del balance general mensual", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
EscondeSubtotales()
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
CargaGrid()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub EscondeSubtotales()
|
||||
|
||||
'Esconde Trimestral
|
||||
GvDatos.Columns(4).Visible = False
|
||||
GvDatos.Columns(9).Visible = False
|
||||
GvDatos.Columns(14).Visible = False
|
||||
GvDatos.Columns(18).Visible = False
|
||||
|
||||
'Esconde Cuatrimestral
|
||||
GvDatos.Columns(6).Visible = False
|
||||
GvDatos.Columns(12).Visible = False
|
||||
GvDatos.Columns(19).Visible = False
|
||||
|
||||
If DdlSubtotales.SelectedValue = "2" Then
|
||||
GvDatos.Columns(4).Visible = True
|
||||
GvDatos.Columns(9).Visible = True
|
||||
GvDatos.Columns(14).Visible = True
|
||||
GvDatos.Columns(18).Visible = True
|
||||
ElseIf DdlSubtotales.SelectedValue = "3" Then
|
||||
GvDatos.Columns(6).Visible = True
|
||||
GvDatos.Columns(12).Visible = True
|
||||
GvDatos.Columns(19).Visible = True
|
||||
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
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 5 Or 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 = ""
|
||||
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 = 5 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;")
|
||||
|
||||
e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}", 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}", 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}", 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}", 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}", 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}", 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}", 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}", 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}", 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}", 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}", 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}", e.Row.DBCampo("Id"), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
|
||||
e.Row.FCHyperLink("HLTrimestral1").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FI={1}&FF={2}&TP={3}", 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}", 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}", 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}", 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("HLCuatrimestral1").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FI={1}&FF={2}&TP={3}", 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}", 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}", e.Row.DBCampo("Id"), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
|
||||
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").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
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
End Class
|
||||
132
Contabilidad/RepBalanceGeneralProForma.aspx
Normal file
132
Contabilidad/RepBalanceGeneralProForma.aspx
Normal file
@@ -0,0 +1,132 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepBalanceGeneralProForma.aspx.vb" Inherits="Contabilidad_RepBalanceGeneralProForma" %>
|
||||
|
||||
<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 () {
|
||||
gridviewScroll();
|
||||
});
|
||||
|
||||
function gridviewScroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 210;
|
||||
|
||||
$('#<%=GvDatos.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 truncate">Divisor:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlUnidad" CssClass="form-control input-sm" runat="server" Width="100px">
|
||||
<asp:ListItem Text="1" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="1000" Value="1000"></asp:ListItem>
|
||||
<asp:ListItem Text="10,000" Value="10000"></asp:ListItem>
|
||||
<asp:ListItem Text="100,000" Value="100000"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" 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("Cuenta")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="300" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Anio0" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnio0" runat="server" Text='<%# Eval("Anio0", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAnio1" DataFormatString="{0:N4}" ItemStyle-Width="100px"/>--%>
|
||||
<asp:TemplateField HeaderText="Anio11" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnio11" runat="server" Text='<%# Eval("Anio11", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAnio2" DataFormatString="{0:N4}" ItemStyle-Width="100px"/>--%>
|
||||
<asp:TemplateField HeaderText="Anio12" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnio12" runat="server" Text='<%# Eval("Anio12", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAnio3" DataFormatString="{0:N4}" ItemStyle-Width="100px"/>--%>
|
||||
<asp:TemplateField HeaderText="Anio13" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnio13" runat="server" Text='<%# Eval("Anio13", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="true" HeaderText="%" DataField="PorcentajeAnio1" ItemStyle-Width="100px"/>
|
||||
<asp:TemplateField HeaderText="Anio2" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnio2" runat="server" Text='<%# Eval("Anio2", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAnio5" DataFormatString="{0:N4}" ItemStyle-Width="100px"/>--%>
|
||||
<asp:TemplateField HeaderText="Anio3" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnio3" runat="server" Text='<%# Eval("Anio3", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAnio6" DataFormatString="{0:N4}" ItemStyle-Width="100px"/>--%>
|
||||
<asp:TemplateField HeaderText="Anio4" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnio4" runat="server" Text='<%# Eval("Anio4", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
153
Contabilidad/RepBalanceGeneralProForma.aspx.vb
Normal file
153
Contabilidad/RepBalanceGeneralProForma.aspx.vb
Normal file
@@ -0,0 +1,153 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad_RepBalanceGeneralProForma
|
||||
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 TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TipoReporte").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoReporte") = 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
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
CargaDatos()
|
||||
Else
|
||||
Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia)
|
||||
BtnConsultar.Enabled = False
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ObjConta.GetBalanceGeneralProForma(DdlUnidad.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del balance general proforma", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
|
||||
GvDatos.Columns(1).HeaderText = (Year(Date.Now) - 1).ToString
|
||||
GvDatos.Columns(2).HeaderText = (Year(Date.Now) + 0).ToString
|
||||
GvDatos.Columns(3).HeaderText = (Year(Date.Now) + 0).ToString
|
||||
GvDatos.Columns(4).HeaderText = (Year(Date.Now) + 0).ToString
|
||||
GvDatos.Columns(6).HeaderText = (Year(Date.Now) + 1).ToString
|
||||
GvDatos.Columns(7).HeaderText = (Year(Date.Now) + 2).ToString
|
||||
GvDatos.Columns(8).HeaderText = (Year(Date.Now) + 3).ToString
|
||||
|
||||
'Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1
|
||||
|
||||
''Esconde todo
|
||||
'For index = 1 To 40 Step 2
|
||||
' GvDatos.Columns(index).Visible = False
|
||||
' GvDatos.Columns(index + 1).Visible = False
|
||||
'Next
|
||||
|
||||
'Dim i = 0
|
||||
'For index = 1 To Anos * 2 Step 2
|
||||
' GvDatos.Columns(index).Visible = True
|
||||
' GvDatos.Columns(index + 1).Visible = True
|
||||
' GvDatos.Columns(index).HeaderText = (DdlEjercicio.SelectedValue.ToEntero + i).ToString
|
||||
' i = i + 1
|
||||
'Next
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
CargaGrid()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Nivel").ToString.ToEntero = 1 Then
|
||||
e.Row.FCHyperLink("HLAnio0").Text = ""
|
||||
e.Row.FCHyperLink("HLAnio11").Text = ""
|
||||
e.Row.FCHyperLink("HLAnio12").Text = ""
|
||||
e.Row.FCHyperLink("HLAnio13").Text = ""
|
||||
e.Row.FCHyperLink("HLAnio2").Text = ""
|
||||
e.Row.FCHyperLink("HLAnio3").Text = ""
|
||||
e.Row.FCHyperLink("HLAnio4").Text = ""
|
||||
e.Row.Cells(5).Text = ""
|
||||
End If
|
||||
|
||||
'AGRUPADOR DE CUENTAS
|
||||
If e.Row.DBCampo("Nivel").ToString.ToEntero = 1 Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
'TITULO DE CUENTAS
|
||||
If e.Row.DBCampo("Nivel").ToString.ToEntero = 2 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("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FI={1}&FF={2}&TP={3}", 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)
|
||||
' Next
|
||||
'End If
|
||||
|
||||
'TOTALES
|
||||
If e.Row.DBCampo("CveCuenta").ToString = "" And e.Row.DBCampo("Nivel").ToString = "" 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 Class
|
||||
146
Contabilidad/RepBalanzaComprobacion.aspx
Normal file
146
Contabilidad/RepBalanzaComprobacion.aspx
Normal file
@@ -0,0 +1,146 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepBalanzaComprobacion.aspx.vb" Inherits="Contabilidad_RepBalanzaComprobacion" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" 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="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" 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>
|
||||
|
||||
270
Contabilidad/RepBalanzaComprobacion.aspx.vb
Normal file
270
Contabilidad/RepBalanzaComprobacion.aspx.vb
Normal file
@@ -0,0 +1,270 @@
|
||||
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(Now), Month(Now), 1).ToShortDateString
|
||||
TxtFechaAl.Text = Date.Now.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 = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, 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 = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, 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 = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, 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(AppDomain.CurrentDomain.BaseDirectory & "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 = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, 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", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
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")))
|
||||
|
||||
If Imagen.Exists Then
|
||||
lista.Add(New CrystalParametro("pImg", logouri))
|
||||
Else
|
||||
lista.Add(New CrystalParametro("pImg", ""))
|
||||
End If
|
||||
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Contabilidad/Reportes/RepBalanzaComprobacion.rpt"), DtDatos, 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")
|
||||
' '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", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
' 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
|
||||
176
Contabilidad/RepContabilidadDiaria.aspx
Normal file
176
Contabilidad/RepContabilidadDiaria.aspx
Normal file
@@ -0,0 +1,176 @@
|
||||
<%@ Page Language="VB" AutoEventWireup="false" MasterPageFile="~/Site.master" CodeFile="RepContabilidadDiaria.aspx.vb" Inherits="Contabilidad_FiltraPolizas" %>
|
||||
|
||||
|
||||
<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 de polizas diarias
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<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="Filtrar" class="btn btn-primary" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
|
||||
<div class="row">
|
||||
<label class="col-xs-1 control-label">Fecha Inicio:</label>
|
||||
<div class="col-xs-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 133px !important; margin-top: -5px; margin-left: -10px;">
|
||||
<asp:TextBox ID="TxtFechaI" runat="server" CssClass="form-control" Width="99%"></asp:TextBox>
|
||||
<span class="input-group-btn">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendario" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFechaI" PopupButtonID="ImgCalendario" PopupPosition="Left" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaDocumento" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicio''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicio''</b> no tienes 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="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
|
||||
<label class="col-xs-1 control-label">Fecha Fin:</label>
|
||||
<div class="col-xs-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 133px !important; margin-top: -5px; margin-left: -10px;">
|
||||
<asp:TextBox ID="TxtFechaF" runat="server" CssClass="form-control" Width="99%"></asp:TextBox>
|
||||
<span class="input-group-btn">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendarioFin" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TxtFechaF" PopupButtonID="ImgCalendarioFin" PopupPosition="Left" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Fin''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Fin''</b> no tienes 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="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<div align="Right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", Gv.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", Gv.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>
|
||||
<div class="portlet-body">
|
||||
|
||||
<table class="table table-striped" style="border: 1px solid #D3D3D3; min-width: 985px; width: 100%; display: none;">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFecha" runat="server" CausesValidation="false" Text="" CommandArgument="Fecha" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFecha" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbTipo" runat="server" CausesValidation="false" Text="" CommandArgument="Tipo" OnClick="LbOrden_Click">
|
||||
Tipo
|
||||
<asp:Literal ID="ImgTipo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="320px">
|
||||
<asp:LinkButton ID="LbFolio" runat="server" CausesValidation="false" Text="" CommandArgument="Folio" OnClick="LbOrden_Click">
|
||||
Folio
|
||||
<asp:Literal ID="ImgFolio" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LbConcepto" runat="server" CausesValidation="false" Text="" CommandArgument="Concepto" OnClick="LbOrden_Click">
|
||||
Concepto
|
||||
<asp:Literal ID="ImgConcepto" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LbCargos" runat="server" CausesValidation="false" Text="" CommandArgument="Cargos" OnClick="LbOrden_Click">
|
||||
Cargos
|
||||
<asp:Literal ID="ImgCargos" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LbAbonos" runat="server" CausesValidation="false" Text="" CommandArgument="Abonos" OnClick="LbOrden_Click">
|
||||
Abonos
|
||||
<asp:Literal ID="ImgAbonos" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="">
|
||||
<asp:GridView ID="Gv" runat="server" TShowHeader="true" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None" AutoGenerateColumns="false">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:dd/MM/yyyy}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="70px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipo" runat="server" Text='<%# Eval("TipoPol")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="70px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="Hpl" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("Id", "/Contabilidad/RegPoliza.aspx?IdPoliza={0}")%>' runat="server" Text='<%# Eval("Folio")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Concepto" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlConcepto" runat="server" Text='<%# Eval("Concepto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<%--<ItemStyle Width="580px"></ItemStyle>--%>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cargos" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos"></HeaderStyle>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
84
Contabilidad/RepContabilidadDiaria.aspx.vb
Normal file
84
Contabilidad/RepContabilidadDiaria.aspx.vb
Normal file
@@ -0,0 +1,84 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class Contabilidad_FiltraPolizas
|
||||
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
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
TxtFechaI.Text = Now.ToDate
|
||||
TxtFechaF.Text = Now.ToShortDateString
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim FechaFin As DateTime = $"{TxtFechaF.Text} 23:59:59"
|
||||
|
||||
If ObjConta.GetPolizasXDia(TxtFechaI.Text.ToDate, FechaFin) Then
|
||||
ViewState("DTPolizas") = ObjConta.DtResultados
|
||||
DtDatos = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
|
||||
Else
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTPolizas"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
Gv.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
Gv.DataSource = CType(ViewState("DTPolizas"), DataTable)
|
||||
End If
|
||||
Gv.DataBind()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
238
Contabilidad/RepEdoResultados2.aspx
Normal file
238
Contabilidad/RepEdoResultados2.aspx
Normal file
@@ -0,0 +1,238 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEdoResultados2.aspx.vb" Inherits="Contabilidad_RepEdoResultados2" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.dataTables_scrollHead {
|
||||
background-color: #95A5A6;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.ADScroller-body {
|
||||
overflow-x: auto !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte Estado de Resultado
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="HLImprimir" Target="_blank" runat="server"> <i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPPFiltros" 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" OnClick="BtnConsultar_Click" CssClass="btn btn-primary" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Clasificación:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<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: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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="CalendarExtender1" TargetControlID="txtFechaI" PopupButtonID="ImgCalendarioI" 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>
|
||||
<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="txtFechaF" runat="server" CssClass="form-control" Width="99%" 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>
|
||||
<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>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Centro de Costo:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Tipo de Gasto:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Agrupador:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlAgrupador" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true">
|
||||
<asp:ListItem Selected="True" Text="Centro de Costo" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Clasificacion" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Tipo de Gasto" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate">Divisor:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlMedida" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true">
|
||||
<asp:ListItem Selected="True" Text="Unidad" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Miles" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Millones" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<h4><b>Ingresos</b></h4>
|
||||
<asp:GridView ID="GvI" runat="server" EmptyDataText="No se encontraron datos con los filtros seleccionados" DataKeyNames="Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre, Total" OnRowDataBound="GvI_RowDataBound" CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="99%" GridLines="None" AutoGenerateColumns="false">
|
||||
<Columns>
|
||||
<asp:HyperLinkField DataTextField="Agrupador" DataNavigateUrlFields="Gpo,CveAgrupador,FechaI,FechaF,CveTipoGasto,CveSubProyecto,CveClasificacion" Target="_blank" DataNavigateUrlFormatString="/Contabilidad/RepEdoResultados2Detalle.aspx?Gpo={0}&CveAgrupador={1}&FechaInicio={2}&FechaFin={3}&CveTipoGasto={4}&CveSubProyecto={5}&CveClasificacion={6}" HeaderText="" ItemStyle-Width="200px" />
|
||||
<asp:BoundField DataField="Enero" HeaderText="Enero" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeEnero" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Febrero" HeaderText="Febrero" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeFebrero" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Marzo" HeaderText="Marzo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeMarzo" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Abril" HeaderText="Abril" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAbril" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Mayo" HeaderText="Mayo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeMayo" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Junio" HeaderText="Junio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeJunio" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Julio" HeaderText="Julio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeJulio" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Agosto" HeaderText="Agosto" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAgosto" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Septiembre" HeaderText="Septiembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeSeptiembre" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Octubre" HeaderText="Octubre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeOctubre" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Noviembre" HeaderText="Noviembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeNoviembre" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Diciembre" HeaderText="Diciembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeDiciembre" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Total" HeaderText="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
|
||||
<h4><b>Egresos</b></h4>
|
||||
<asp:GridView ID="GvG" runat="server" EmptyDataText="No se encontraron datos con los filtros seleccionados" DataKeyNames="CveAgrupador,Gpo,Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre,Total" GridLines="None" OnRowDataBound="GvG_RowDataBound" CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" Width="99%" AutoGenerateColumns="false">
|
||||
<Columns>
|
||||
<asp:HyperLinkField DataTextField="Agrupador" DataNavigateUrlFields="Gpo,CveAgrupador,FechaI,FechaF,CveTipoGasto,CveSubProyecto,CveClasificacion" Target="_blank" DataNavigateUrlFormatString="/Contabilidad/RepEdoResultados2Detalle.aspx?Gpo={0}&CveAgrupador={1}&FechaInicio={2}&FechaFin={3}&CveTipoGasto={4}&CveSubProyecto={5}&CveClasificacion={6}" HeaderText="" ItemStyle-Width="200px" />
|
||||
<asp:BoundField DataField="Enero" HeaderText="Enero" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeEnero" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Febrero" HeaderText="Febrero" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeFebrero" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Marzo" HeaderText="Marzo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeMarzo" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Abril" HeaderText="Abril" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAbril" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Mayo" HeaderText="Mayo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeMayo" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Junio" HeaderText="Junio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeJunio" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Julio" HeaderText="Julio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeJulio" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Agosto" HeaderText="Agosto" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAgosto" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Septiembre" HeaderText="Septiembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeSeptiembre" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Octubre" HeaderText="Octubre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeOctubre" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Noviembre" HeaderText="Noviembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeNoviembre" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Diciembre" HeaderText="Diciembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeDiciembre" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Total" HeaderText="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
|
||||
<div id="TableDiferencias" runat="server" visible="false">
|
||||
<h4><b>Diferencias</b></h4>
|
||||
<asp:GridView ID="GvDiferencias" runat="server" EmptyDataText="No se encontraron datos con los filtros seleccionados" DataKeyNames="Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre,Total" GridLines="None" CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" Width="99%" AutoGenerateColumns="false">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Agrupador" HeaderText="" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Enero" HeaderText="Enero" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeEnero" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Febrero" HeaderText="Febrero" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeFebrero" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Marzo" HeaderText="Marzo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeMarzo" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Abril" HeaderText="Abril" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAbril" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Mayo" HeaderText="Mayo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeMayo" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Junio" HeaderText="Junio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeJunio" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Julio" HeaderText="Julio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeJulio" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Agosto" HeaderText="Agosto" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAgosto" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Septiembre" HeaderText="Septiembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeSeptiembre" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Octubre" HeaderText="Octubre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeOctubre" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Noviembre" HeaderText="Noviembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeNoviembre" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Diciembre" HeaderText="Diciembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeDiciembre" ItemStyle-Font-Size="X-Small" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="30px" ItemStyle-CssClass="ceros" />
|
||||
<asp:BoundField DataField="Total" HeaderText="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" ItemStyle-CssClass="ceros" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
|
||||
$(function () {
|
||||
$('.ceros').each(function (i, obj) {
|
||||
|
||||
if ($(this).html() == '0.00' || $(this).html() == '0.00%') {
|
||||
$(this).html('-');
|
||||
}
|
||||
|
||||
if (ToDouble($(this).html()) < 0) {
|
||||
$(this).css("color", "red");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
245
Contabilidad/RepEdoResultados2.aspx.vb
Normal file
245
Contabilidad/RepEdoResultados2.aspx.vb
Normal file
@@ -0,0 +1,245 @@
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
Imports System.Data
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Linq
|
||||
Imports System.Web
|
||||
Imports System.Web.UI.WebControls
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contabilidad_RepEdoResultados2
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Public Property DtIngresos() As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtIngresos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtIngresos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property DtEgresos() As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtEgresos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtEgresos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property DtDiferencias() As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtDiferencias"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDiferencias") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Private Sub Contabilidad_RepEdoResultados2_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaCombos()
|
||||
txtFechaI.Text = $"01/01/{Now.Year}"
|
||||
txtFechaF.Text = $"31/12/{Now.Year}"
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataBind()
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
||||
DdlTipoGasto.DataBind()
|
||||
DdlTipoGasto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim Conta As New ClsContabilidad
|
||||
Dim FechaInicio As Date = txtFechaI.Text.ToDate
|
||||
Dim FechaFin As Date = txtFechaF.Text.ToDate
|
||||
Dim CveClasificacion As Integer = DdlClasificacion.SelectedValue.ToEntero
|
||||
Dim CveTipoGasto As Integer = DdlTipoGasto.SelectedValue.ToEntero
|
||||
Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero
|
||||
Dim Agrupador As Integer = DdlAgrupador.SelectedValue.ToEntero
|
||||
|
||||
Dim ds As Data.DataSet = Conta.GetEdoResultadosMes(FechaInicio, FechaFin, CveTipoGasto, CveClasificacion, CveSubProyecto, Agrupador, UsuarioActual.CveEmpresa, DdlMedida.SelectedValue.ToEntero)
|
||||
|
||||
If ds IsNot Nothing AndAlso ds.Tables.Count = 2 Then
|
||||
Dim dting As Data.DataTable = ds.Tables(0)
|
||||
Dim dtgastos As Data.DataTable = ds.Tables(1)
|
||||
DtIngresos = dting
|
||||
DtEgresos = dtgastos
|
||||
|
||||
GvI.DataSource = dting
|
||||
GvG.DataSource = dtgastos
|
||||
End If
|
||||
|
||||
Conta.Dispose()
|
||||
GvG.DataBind()
|
||||
GvI.DataBind()
|
||||
CargaDiferencias()
|
||||
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDiferencias()
|
||||
|
||||
If GvG.Rows.Count > 0 And GvI.Rows.Count > 0 Then
|
||||
|
||||
DtDiferencias = New DataTable
|
||||
DtDiferencias.Columns.Add("Agrupador", GetType(String))
|
||||
DtDiferencias.Columns.Add("Enero", GetType(String))
|
||||
DtDiferencias.Columns.Add("PorcentajeEnero", GetType(String))
|
||||
DtDiferencias.Columns.Add("Febrero", GetType(String))
|
||||
DtDiferencias.Columns.Add("PorcentajeFebrero", GetType(String))
|
||||
DtDiferencias.Columns.Add("Marzo", GetType(String))
|
||||
DtDiferencias.Columns.Add("PorcentajeMarzo", GetType(String))
|
||||
DtDiferencias.Columns.Add("Abril", GetType(String))
|
||||
DtDiferencias.Columns.Add("PorcentajeAbril", GetType(String))
|
||||
DtDiferencias.Columns.Add("Mayo", GetType(String))
|
||||
DtDiferencias.Columns.Add("PorcentajeMayo", GetType(String))
|
||||
DtDiferencias.Columns.Add("Junio", GetType(String))
|
||||
DtDiferencias.Columns.Add("PorcentajeJunio", GetType(String))
|
||||
DtDiferencias.Columns.Add("Julio", GetType(String))
|
||||
DtDiferencias.Columns.Add("PorcentajeJulio", GetType(String))
|
||||
DtDiferencias.Columns.Add("Agosto", GetType(String))
|
||||
DtDiferencias.Columns.Add("PorcentajeAgosto", GetType(String))
|
||||
DtDiferencias.Columns.Add("Septiembre", GetType(String))
|
||||
DtDiferencias.Columns.Add("PorcentajeSeptiembre", GetType(String))
|
||||
DtDiferencias.Columns.Add("Octubre", GetType(String))
|
||||
DtDiferencias.Columns.Add("PorcentajeOctubre", GetType(String))
|
||||
DtDiferencias.Columns.Add("Noviembre", GetType(String))
|
||||
DtDiferencias.Columns.Add("PorcentajeNoviembre", GetType(String))
|
||||
DtDiferencias.Columns.Add("Diciembre", GetType(Double))
|
||||
DtDiferencias.Columns.Add("PorcentajeDiciembre", GetType(String))
|
||||
DtDiferencias.Columns.Add("Total", GetType(String))
|
||||
|
||||
Dim DR As DataRow = DtDiferencias.NewRow()
|
||||
DR("Agrupador") = ""
|
||||
|
||||
DR("Enero") = (GvI.Rows()(0).DataKey("Enero").ToDouble - GvG.Rows()(0).DataKey("Enero").ToDouble).FormatoNumero
|
||||
DR("PorcentajeEnero") = ((GvI.Rows()(0).DataKey("Enero").ToDouble - GvG.Rows()(0).DataKey("Enero").ToDouble) * 100 / If(GvI.Rows()(0).DataKey("Enero").ToDouble = 0, 1, GvI.Rows()(0).DataKey("Enero").ToDouble)).FormatoNumero
|
||||
|
||||
DR("Febrero") = (GvI.Rows()(0).DataKey("Febrero").ToDouble - GvG.Rows()(0).DataKey("Febrero").ToDouble).FormatoNumero
|
||||
DR("PorcentajeFebrero") = ((GvI.Rows()(0).DataKey("Febrero").ToDouble - GvG.Rows()(0).DataKey("Febrero").ToDouble) * 100 / If(GvI.Rows()(0).DataKey("Febrero").ToDouble = 0, 1, GvI.Rows()(0).DataKey("Febrero").ToDouble)).FormatoNumero
|
||||
|
||||
DR("Marzo") = (GvI.Rows()(0).DataKey("Marzo").ToDouble - GvG.Rows()(0).DataKey("Marzo").ToDouble).FormatoNumero
|
||||
DR("PorcentajeMarzo") = ((GvI.Rows()(0).DataKey("Marzo").ToDouble - GvG.Rows()(0).DataKey("Marzo").ToDouble) * 100 / If(GvI.Rows()(0).DataKey("Marzo").ToDouble = 0, 1, GvI.Rows()(0).DataKey("Marzo").ToDouble)).FormatoNumero
|
||||
|
||||
DR("Abril") = (GvI.Rows()(0).DataKey("Abril").ToDouble - GvG.Rows()(0).DataKey("Abril").ToDouble).FormatoNumero
|
||||
DR("PorcentajeAbril") = ((GvI.Rows()(0).DataKey("Abril").ToDouble - GvG.Rows()(0).DataKey("Abril").ToDouble) * 100 / If(GvI.Rows()(0).DataKey("Abril").ToDouble = 0, 1, GvI.Rows()(0).DataKey("Abril").ToDouble)).FormatoNumero
|
||||
|
||||
DR("Mayo") = (GvI.Rows()(0).DataKey("Mayo").ToDouble - GvG.Rows()(0).DataKey("Mayo").ToDouble).FormatoNumero
|
||||
DR("PorcentajeMayo") = ((GvI.Rows()(0).DataKey("Mayo").ToDouble - GvG.Rows()(0).DataKey("Mayo").ToDouble) * 100 / If(GvI.Rows()(0).DataKey("Mayo").ToDouble = 0, 1, GvI.Rows()(0).DataKey("Mayo").ToDouble)).FormatoNumero
|
||||
|
||||
DR("Junio") = (GvI.Rows()(0).DataKey("Junio").ToDouble - GvG.Rows()(0).DataKey("Junio").ToDouble).FormatoNumero
|
||||
DR("PorcentajeJunio") = ((GvI.Rows()(0).DataKey("Junio").ToDouble - GvG.Rows()(0).DataKey("Junio").ToDouble) * 100 / If(GvI.Rows()(0).DataKey("Junio").ToDouble = 0, 1, GvI.Rows()(0).DataKey("Junio").ToDouble)).FormatoNumero
|
||||
|
||||
DR("Julio") = (GvI.Rows()(0).DataKey("Julio").ToDouble - GvG.Rows()(0).DataKey("Julio").ToDouble).FormatoNumero
|
||||
DR("PorcentajeJulio") = ((GvI.Rows()(0).DataKey("Julio").ToDouble - GvG.Rows()(0).DataKey("Julio").ToDouble) * 100 / If(GvI.Rows()(0).DataKey("Julio").ToDouble = 0, 1, GvI.Rows()(0).DataKey("Julio").ToDouble)).FormatoNumero
|
||||
|
||||
DR("Agosto") = (GvI.Rows()(0).DataKey("Agosto").ToDouble - GvG.Rows()(0).DataKey("Agosto").ToDouble).FormatoNumero
|
||||
DR("PorcentajeAgosto") = ((GvI.Rows()(0).DataKey("Agosto").ToDouble - GvG.Rows()(0).DataKey("Agosto").ToDouble) * 100 / If(GvI.Rows()(0).DataKey("Agosto").ToDouble = 0, 1, GvI.Rows()(0).DataKey("Agosto").ToDouble)).FormatoNumero
|
||||
|
||||
DR("Septiembre") = (GvI.Rows()(0).DataKey("Septiembre").ToDouble - GvG.Rows()(0).DataKey("Septiembre").ToDouble).FormatoNumero
|
||||
DR("PorcentajeSeptiembre") = ((GvI.Rows()(0).DataKey("Septiembre").ToDouble - GvG.Rows()(0).DataKey("Septiembre").ToDouble) * 100 / If(GvI.Rows()(0).DataKey("Septiembre").ToDouble = 0, 1, GvI.Rows()(0).DataKey("Septiembre").ToDouble)).FormatoNumero
|
||||
|
||||
DR("Octubre") = (GvI.Rows()(0).DataKey("Octubre").ToDouble - GvG.Rows()(0).DataKey("Octubre").ToDouble).FormatoNumero
|
||||
DR("PorcentajeOctubre") = ((GvI.Rows()(0).DataKey("Octubre").ToDouble - GvG.Rows()(0).DataKey("Octubre").ToDouble) * 100 / If(GvI.Rows()(0).DataKey("Octubre").ToDouble = 0, 1, GvI.Rows()(0).DataKey("Octubre").ToDouble)).FormatoNumero
|
||||
|
||||
DR("Noviembre") = (GvI.Rows()(0).DataKey("Noviembre").ToDouble - GvG.Rows()(0).DataKey("Noviembre").ToDouble).FormatoNumero
|
||||
DR("PorcentajeNoviembre") = ((GvI.Rows()(0).DataKey("Noviembre").ToDouble - GvG.Rows()(0).DataKey("Noviembre").ToDouble) * 100 / If(GvI.Rows()(0).DataKey("Noviembre").ToDouble = 0, 1, GvI.Rows()(0).DataKey("Noviembre").ToDouble)).FormatoNumero
|
||||
|
||||
DR("Diciembre") = (GvI.Rows()(0).DataKey("Diciembre").ToDouble - GvG.Rows()(0).DataKey("Diciembre").ToDouble).FormatoNumero
|
||||
DR("PorcentajeDiciembre") = ((GvI.Rows()(0).DataKey("Diciembre").ToDouble - GvG.Rows()(0).DataKey("Diciembre").ToDouble) * 100 / If(GvI.Rows()(0).DataKey("Diciembre").ToDouble = 0, 1, GvI.Rows()(0).DataKey("Diciembre").ToDouble)).FormatoNumero
|
||||
|
||||
DR("Total") = (GvI.Rows()(0).DataKey("Total").ToDouble - GvG.Rows()(0).DataKey("Total").ToDouble).FormatoNumero
|
||||
|
||||
DtDiferencias.Rows.Add(DR)
|
||||
|
||||
GvDiferencias.DataSource = DtDiferencias
|
||||
GvDiferencias.DataBind()
|
||||
|
||||
TableDiferencias.Visible = True
|
||||
Else
|
||||
TableDiferencias.Visible = False
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvI_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.CssClass = "Totales"
|
||||
e.Row.Cells(0).Text = "Total"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvG_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.CssClass = "Totales"
|
||||
e.Row.Cells(0).Text = "Total"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub HLImprimir_Click(sender As Object, e As EventArgs) Handles HLImprimir.Click
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim StrFiltro As New StringBuilder
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
StrFiltro.AppendFormat("<b>Agrupado por</b>: {0}", DdlAgrupador.SelectedItem.Text)
|
||||
|
||||
If DdlClasificacion.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Clasificación</b>: {0}", DdlClasificacion.SelectedItem.Text)
|
||||
If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Inicio </b>: {0}", txtFechaI.Text.ToDate.ToShortDateString)
|
||||
If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Fin </b>: {0}", txtFechaF.Text.ToDate.ToShortDateString)
|
||||
|
||||
If DdlTipoGasto.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>TipoGasto</b>: {0}", DdlTipoGasto.SelectedItem.Text)
|
||||
If DdlSubProyecto.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>SubProyecto</b>: {0}", DdlSubProyecto.SelectedItem.Text)
|
||||
If DdlMedida.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Divisor</b>: {0}", DdlMedida.SelectedItem.Text)
|
||||
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToLongDateString))
|
||||
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
|
||||
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
|
||||
lrds.Add(rds1)
|
||||
|
||||
Dim rds2 As New ReportDataSource With {.Name = "DataSet2", .Value = If(DtEgresos IsNot Nothing, DtEgresos, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
|
||||
lrds.Add(rds2)
|
||||
|
||||
Dim rds3 As New ReportDataSource With {.Name = "DataSet3", .Value = If(DtDiferencias IsNot Nothing, DtDiferencias, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
|
||||
lrds.Add(rds3)
|
||||
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/EdoFinanciero.rdlc", lrds, params, "Estado Financiero")
|
||||
End Sub
|
||||
End Class
|
||||
110
Contabilidad/RepEdoResultados2Detalle.aspx
Normal file
110
Contabilidad/RepEdoResultados2Detalle.aspx
Normal file
@@ -0,0 +1,110 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepEdoResultados2Detalle.aspx.cs" Inherits="Contabilidad_RepEdoResultados2Detalle" %>
|
||||
|
||||
<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="E" Runat="Server">
|
||||
Reporte Estado de Resultado Detalle
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||
<asp:UpdatePanel ID="UPPFiltros" 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" OnClick="BtnConsultar_Click" CssClass="btn btn-primary" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Clasificación:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<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: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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="CalendarExtender1" TargetControlID="txtFechaI" PopupButtonID="ImgCalendarioI" 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>
|
||||
<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="txtFechaF" runat="server" CssClass="form-control" Width="99%" 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>
|
||||
<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>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Centro de Costo:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label id="LblTipoGasto" runat="server" class="col-md-1 truncate">Tipo de Gasto:</label>
|
||||
<div class="col-md-2" id="DivTipoGasto" runat="server">
|
||||
<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<%-- <label class="col-md-1 truncate">Agrupador:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlAgrupador" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true">
|
||||
<asp:ListItem Selected="True" Text="Centro de Costo" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Clasificacion" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Tipo de Gasto" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" OnRowDataBound="GvDatos_RowDataBound" data-sort="true" EmptyDataText="No se encontraron datos con los filtros seleccionados" CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="99%" GridLines="None" AutoGenerateColumns="false">
|
||||
<Columns>
|
||||
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Folio" />
|
||||
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveCompra" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" HeaderText="Folio" />
|
||||
<asp:BoundField DataField="RazonSocial" HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Nombre" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Fecha" ItemStyle-Width="15%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="TipoGasto" HeaderText="Tipo de Gasto" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
122
Contabilidad/RepEdoResultados2Detalle.aspx.cs
Normal file
122
Contabilidad/RepEdoResultados2Detalle.aspx.cs
Normal file
@@ -0,0 +1,122 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using static Extensiones.ModExtensiones;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
|
||||
public partial class Contabilidad_RepEdoResultados2Detalle : ClsPaginas
|
||||
{
|
||||
|
||||
|
||||
#region PROPIEDADES
|
||||
|
||||
private int Tipo
|
||||
{
|
||||
get { return (ViewState["Tipo"] == null) ? 0 : Convert.ToInt32(ViewState["Tipo"]); }
|
||||
set { ViewState["Tipo"] = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaValores();
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
public void InicializaValores()
|
||||
{
|
||||
|
||||
DdlClasificacion.DataSource = get_GlobalDTClasificaciones(CveEmpresa: UsuarioActual.CveEmpresa);
|
||||
DdlClasificacion.DataBind();
|
||||
DdlClasificacion.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
|
||||
DdlSubProyecto.DataSource = get_GlobalDTSubProyectos(-1, CveEmpresa: UsuarioActual.CveEmpresa);
|
||||
DdlSubProyecto.DataBind();
|
||||
DdlSubProyecto.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
|
||||
DdlTipoGasto.DataSource = get_GlobalDTTiposGastos(UsuarioActual.CveEmpresa);
|
||||
DdlTipoGasto.DataBind();
|
||||
DdlTipoGasto.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
|
||||
txtFechaI.Text = Request["FechaInicio"] == null ? DateTime.Now.ToShortDateString() : Request["FechaInicio"].ToString().ToDate().ToShortDateString();
|
||||
txtFechaF.Text = Request["FechaFin"] == null ? DateTime.Now.ToShortDateString() : Request["FechaFin"].ToString().ToDate().ToShortDateString();
|
||||
int CveAgrupador = Request["CveAgrupador"] == null ? -1 : Request["CveAgrupador"].ToString().ToEntero();
|
||||
int Gpo = Request["Gpo"] == null ? 0 : Request["Gpo"].ToString().ToEntero();
|
||||
if (Gpo == 1) { DdlSubProyecto.SelectedValueExist(CveAgrupador); DdlClasificacion.SelectedValueExist(Request["CveClasificacion"] == null ? -1 : Request["CveClasificacion"].ToString().ToEntero()); DdlTipoGasto.SelectedValueExist(Request["CveTipoGasto"] == null ? -1 : Request["CveTipoGasto"].ToString().ToEntero()); }
|
||||
if (Gpo == 2) { DdlClasificacion.SelectedValueExist(CveAgrupador); DdlSubProyecto.SelectedValueExist(Request["CveSubProyecto"] == null ? -1 : Request["CveSubProyecto"].ToString().ToEntero()); DdlTipoGasto.SelectedValueExist(Request["CveTipoGasto"] == null ? -1 : Request["CveTipoGasto"].ToString().ToEntero()); }
|
||||
if (Gpo == 3) { DdlTipoGasto.SelectedValueExist(CveAgrupador); DdlSubProyecto.SelectedValueExist(Request["CveSubProyecto"] == null ? -1 : Request["CveSubProyecto"].ToString().ToEntero()); DdlClasificacion.SelectedValueExist(Request["CveClasificacion"] == null ? -1 : Request["CveClasificacion"].ToString().ToEntero()); }
|
||||
if (Gpo == 0)
|
||||
{
|
||||
Tipo = 1;
|
||||
LblTipoGasto.Visible = false;
|
||||
DivTipoGasto.Visible = false;
|
||||
DdlSubProyecto.SelectedValueExist(CveAgrupador);
|
||||
DdlClasificacion.SelectedValueExist(Request["CveClasificacion"] == null ? -1 : Request["CveClasificacion"].ToString().ToEntero());
|
||||
DdlTipoGasto.SelectedValueExist(Request["CveTipoGasto"] == null ? -1 : Request["CveTipoGasto"].ToString().ToEntero());
|
||||
}
|
||||
else
|
||||
{
|
||||
Tipo = 2;
|
||||
}
|
||||
UPPFiltros.Update();
|
||||
|
||||
}
|
||||
|
||||
public void CargaDatos()
|
||||
{
|
||||
ClsContabilidad ObjCont = new ClsContabilidad();
|
||||
if (ObjCont.GetEdoResultadosDetalle(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlTipoGasto.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero(),
|
||||
DdlSubProyecto.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, Tipo))
|
||||
{
|
||||
GvDatos.DataSource = ObjCont.DtResultados;
|
||||
}
|
||||
ObjCont.Dispose();
|
||||
if (Tipo == 1)
|
||||
{
|
||||
GvDatos.Columns[0].Visible = true;
|
||||
GvDatos.Columns[1].Visible = false;
|
||||
GvDatos.Columns[2].Visible = false;
|
||||
GvDatos.Columns[3].Visible = true;
|
||||
GvDatos.Columns[7].Visible = false;
|
||||
}
|
||||
else if (Tipo == 2)
|
||||
{
|
||||
GvDatos.Columns[0].Visible = false;
|
||||
GvDatos.Columns[1].Visible = true;
|
||||
GvDatos.Columns[2].Visible = true;
|
||||
GvDatos.Columns[3].Visible = false;
|
||||
GvDatos.Columns[7].Visible = true;
|
||||
}
|
||||
GvDatos.DataBind();
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
|
||||
{
|
||||
if (e.Row.RowIndex == 0)
|
||||
{
|
||||
e.Row.CssClass = "Totales";
|
||||
if (Tipo == 1)
|
||||
{
|
||||
e.Row.Cells[0].Text = "Total";
|
||||
}else if (Tipo == 2)
|
||||
{
|
||||
e.Row.Cells[1].Text = "Total";
|
||||
902
Contabilidad/RepEstadoResultados.aspx
Normal file
902
Contabilidad/RepEstadoResultados.aspx
Normal file
File diff suppressed because one or more lines are too long
1150
Contabilidad/RepEstadoResultados.aspx.vb
Normal file
1150
Contabilidad/RepEstadoResultados.aspx.vb
Normal file
File diff suppressed because it is too large
Load Diff
237
Contabilidad/RepEstadoResultadosAnual.aspx
Normal file
237
Contabilidad/RepEstadoResultadosAnual.aspx
Normal file
@@ -0,0 +1,237 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoResultadosAnual.aspx.vb" Inherits="Contabilidad_RepEstadoResultadosAnual" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="CSS" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" 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 () {
|
||||
gridviewScroll();
|
||||
});
|
||||
|
||||
function gridviewScroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 210;
|
||||
|
||||
$('#<%=GvDatos.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" Text="Consultar" runat="server" CssClass="btn btn-default" OnClick="BtnConsultar_Click"/>
|
||||
</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="form-control input-sm">
|
||||
<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-3" runat="server" id="tdTipoReporte" visible="false">
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate">Tipo:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" CssClass="form-control input-sm">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-advance 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" ItemStyle-Width="100px"/>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
146
Contabilidad/RepEstadoResultadosAnual.aspx.vb
Normal file
146
Contabilidad/RepEstadoResultadosAnual.aspx.vb
Normal file
@@ -0,0 +1,146 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad_RepEstadoResultadosAnual
|
||||
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 TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TipoReporte").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoReporte") = 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
|
||||
|
||||
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
|
||||
|
||||
DdlEjercicio.SelectedValue = Now.Year.ToString
|
||||
|
||||
Anos = 0
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
If ObjConta.GetEstadoResultadosAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del balance general anual", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1
|
||||
|
||||
'Esconde todo
|
||||
For index = 1 To 40 Step 2
|
||||
GvDatos.Columns(index).Visible = False
|
||||
GvDatos.Columns(index + 1).Visible = False
|
||||
Next
|
||||
|
||||
Dim i = 0
|
||||
For index = 1 To Anos * 2 Step 2
|
||||
GvDatos.Columns(index).Visible = True
|
||||
GvDatos.Columns(index + 1).Visible = True
|
||||
GvDatos.Columns(index).HeaderText = (DdlEjercicio.SelectedValue.ToEntero + i).ToString
|
||||
i = i + 1
|
||||
Next
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
CargaGrid()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.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("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FI={1}&FF={2}&TP={3}", 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)
|
||||
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 Class
|
||||
229
Contabilidad/RepEstadoResultadosMensual.aspx
Normal file
229
Contabilidad/RepEstadoResultadosMensual.aspx
Normal file
@@ -0,0 +1,229 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoResultadosMensual.aspx.vb" Inherits="Contabilidad_RepEstadoResultadosMensual" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="CSS" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" 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 () {
|
||||
gridviewScroll();
|
||||
});
|
||||
|
||||
function gridviewScroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 210;
|
||||
|
||||
$('#<%=GvDatos.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" Text="Consultar" CssClass="btn btn-default" runat="server" OnClick="BtnConsultar_Click" />
|
||||
</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="form-control input-sm">
|
||||
<asp:ListItem Text="2014" Value="2014"></asp:ListItem>
|
||||
<asp:ListItem Text="2015" Value="2015"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-3" runat="server" id="tdTipoReporte" visible="false">
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate">Tipo:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" CssClass="form-control input-sm">
|
||||
<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>
|
||||
<label class="col-md-1 truncate">SubTotales:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubtotales" runat="server" CssClass="form-control input-sm">
|
||||
<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>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-advance 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" 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:N4}" ItemStyle-Width="100px"/>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
193
Contabilidad/RepEstadoResultadosMensual.aspx.vb
Normal file
193
Contabilidad/RepEstadoResultadosMensual.aspx.vb
Normal file
@@ -0,0 +1,193 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad_RepEstadoResultadosMensual
|
||||
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 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
|
||||
End If
|
||||
|
||||
DdlEjercicio.SelectedValue = Now.Year.ToString
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
If ObjConta.GetEstadoResultadosMensual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte) 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()
|
||||
|
||||
EscondeSubtotales()
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
CargaGrid()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub EscondeSubtotales()
|
||||
|
||||
'Esconde Trimestral
|
||||
GvDatos.Columns(7).Visible = False
|
||||
GvDatos.Columns(8).Visible = False
|
||||
GvDatos.Columns(17).Visible = False
|
||||
GvDatos.Columns(18).Visible = False
|
||||
GvDatos.Columns(27).Visible = False
|
||||
GvDatos.Columns(28).Visible = False
|
||||
GvDatos.Columns(35).Visible = False
|
||||
GvDatos.Columns(36).Visible = False
|
||||
|
||||
'Esconde Cuatrimestral
|
||||
GvDatos.Columns(11).Visible = False
|
||||
GvDatos.Columns(12).Visible = False
|
||||
GvDatos.Columns(23).Visible = False
|
||||
GvDatos.Columns(24).Visible = False
|
||||
GvDatos.Columns(37).Visible = False
|
||||
GvDatos.Columns(38).Visible = False
|
||||
|
||||
If DdlSubtotales.SelectedValue = "2" Then
|
||||
GvDatos.Columns(7).Visible = True
|
||||
GvDatos.Columns(8).Visible = True
|
||||
GvDatos.Columns(17).Visible = True
|
||||
GvDatos.Columns(18).Visible = True
|
||||
GvDatos.Columns(27).Visible = True
|
||||
GvDatos.Columns(28).Visible = True
|
||||
GvDatos.Columns(35).Visible = True
|
||||
GvDatos.Columns(36).Visible = True
|
||||
ElseIf DdlSubtotales.SelectedValue = "3" Then
|
||||
GvDatos.Columns(11).Visible = True
|
||||
GvDatos.Columns(12).Visible = True
|
||||
GvDatos.Columns(23).Visible = True
|
||||
GvDatos.Columns(24).Visible = True
|
||||
GvDatos.Columns(37).Visible = True
|
||||
GvDatos.Columns(38).Visible = True
|
||||
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
|
||||
|
||||
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("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}", 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}", 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}", 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}", 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}", 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}", 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}", 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}", 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}", 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}", 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}", 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}", e.Row.DBCampo("Id"), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
|
||||
e.Row.FCHyperLink("HLTrimestral1").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FI={1}&FF={2}&TP={3}", 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}", 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}", 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}", 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("HLCuatrimestral1").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FI={1}&FF={2}&TP={3}", 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}", 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}", e.Row.DBCampo("Id"), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte)
|
||||
|
||||
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
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
End Class
|
||||
685
Contabilidad/RepEstadoResultadosPorSegmento.aspx
Normal file
685
Contabilidad/RepEstadoResultadosPorSegmento.aspx
Normal file
File diff suppressed because one or more lines are too long
829
Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb
Normal file
829
Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb
Normal file
@@ -0,0 +1,829 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad_RepEstadoResultadosPorSegmento
|
||||
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 DSDatos As DataSet
|
||||
Get
|
||||
DSDatos = DirectCast(ViewState("DSDatos"), DataSet)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataSet)
|
||||
ViewState("DSDatos") = 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 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
|
||||
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
|
||||
|
||||
Private Property IndexFinal As Integer
|
||||
Get
|
||||
If ViewState("IndexFinal") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return ViewState("IndexFinal").ToString.ToEntero
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("IndexFinal") = 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
|
||||
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
|
||||
|
||||
CargaDatosGenerales()
|
||||
|
||||
DdlEjercicio.SelectedValue = Now.Year.ToString
|
||||
|
||||
Anos = 0
|
||||
|
||||
'Normal
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
DdlPeriodo.SelectedValue = Now.Month.ToString
|
||||
|
||||
TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty)
|
||||
Else
|
||||
Alert("La empresa no usa Contabilidad ni Armonización Contable", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatosGenerales()
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ClsConta.GetEjercicios() Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ClsConta.Dispose()
|
||||
|
||||
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()
|
||||
FechasReporte()
|
||||
|
||||
'ColumnasGv()
|
||||
|
||||
FechaI = String.Format("01/01/{0}", DdlEjercicio.SelectedValue)
|
||||
|
||||
Dim FechaInicial As Date
|
||||
Dim FechaFinal As Date = New DateTime(DdlEjercicio.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero, 1)
|
||||
FechaFinal = FechaFinal.LastDayOfMonth
|
||||
|
||||
|
||||
If DdlTipoConsulta.SelectedValue.ToEntero = 1 Then
|
||||
FechaInicial = FechaFinal.FirstDayOfMonth
|
||||
Else
|
||||
FechaInicial = FechaI.ToDate
|
||||
End If
|
||||
|
||||
FechaI = FechaInicial.ToString("dd/MM/yyyy")
|
||||
FechaF = FechaFinal.ToString("dd/MM/yyyy")
|
||||
' 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.GetEstadoActividadesSegmento(FechaInicial, FechaFinal, TipoReporte, -1) Then
|
||||
'If ObjConta.GetEstadoActividades(FechaI.ToDate, FechaFinal, TipoReporte, DdlSegmentoNegocio.SelectedValue.ToEntero) Then
|
||||
DSDatos = ObjConta.DSResultados
|
||||
|
||||
|
||||
If DSDatos IsNot Nothing AndAlso DSDatos.Tables.Count = 3 Then
|
||||
Try
|
||||
|
||||
|
||||
HDSegmentos.Value = DSDatos.Tables(2).Rows(0)(0).ToString
|
||||
liLnkDescarPersonalizado.Visible = True
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
CargaGrids()
|
||||
SumaTotales()
|
||||
|
||||
|
||||
End If
|
||||
Else
|
||||
Alert("Ocurrio un error al cargar los datos del Estado de Actividades", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
UpAcciones.Update()
|
||||
End Sub
|
||||
|
||||
Sub ColumnasGv()
|
||||
|
||||
If DdlTipoConsulta.SelectedValue.ToEntero = 1 Then 'Mensual
|
||||
|
||||
GvIngresos.Columns(1).Visible = False
|
||||
GvIngresos.Columns(2).Visible = False
|
||||
GvIngresos.Columns(3).Visible = True
|
||||
GvIngresos.Columns(4).Visible = True
|
||||
|
||||
GvIngresos2.Columns(1).Visible = False
|
||||
GvIngresos2.Columns(2).Visible = False
|
||||
GvIngresos2.Columns(3).Visible = True
|
||||
GvIngresos2.Columns(4).Visible = True
|
||||
|
||||
ElseIf DdlTipoConsulta.SelectedValue.ToEntero = 2 Then 'Acumulado
|
||||
|
||||
GvIngresos.Columns(1).Visible = True
|
||||
GvIngresos.Columns(2).Visible = True
|
||||
GvIngresos.Columns(3).Visible = False
|
||||
GvIngresos.Columns(4).Visible = False
|
||||
|
||||
GvIngresos2.Columns(1).Visible = True
|
||||
GvIngresos2.Columns(2).Visible = True
|
||||
GvIngresos2.Columns(3).Visible = False
|
||||
GvIngresos2.Columns(4).Visible = False
|
||||
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
UpDatosExelReder.Update()
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGrids()
|
||||
|
||||
DtIngresos = DSDatos.Tables(1).FiltraParametros("Orden Like '0004%' OR Tipo = 'H'")
|
||||
DtGastos = DSDatos.Tables(1).FiltraParametros("Orden Like '0005%' OR Tipo = 'G'")
|
||||
|
||||
Dim DTCabeceras As DataTable = DSDatos.Tables(0)
|
||||
Dim Row As DataRow = DtIngresos.NewRow
|
||||
Dim MaxColumns = DTCabeceras.Rows.Count + 6
|
||||
Dim IndexActual As Integer = 0
|
||||
|
||||
Dim TotalActualLocal = 0.0, TotalAnteriorLocal = 0.0
|
||||
|
||||
Row = DtIngresos.NewRow
|
||||
Row.Item("Nombre") = "INGRESOS"
|
||||
DtIngresos.Rows.InsertAt(Row, 0)
|
||||
|
||||
Row = DtIngresos.NewRow
|
||||
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") = If(TotalActualLocal > 0, (TotalActualLocal * 100 / TotalActualLocal).ToString, "0").FormatoNumero
|
||||
Row.Item("ImporteAcumulado") = TotalAnteriorLocal.ToString
|
||||
Row.Item("PorcentajeAcumulado") = If(TotalAnteriorLocal > 0, (TotalAnteriorLocal * 100 / TotalAnteriorLocal).ToString, "0").FormatoNumero
|
||||
Row.Item("CtaMayor") = -1
|
||||
|
||||
|
||||
IndexActual = 0
|
||||
For Each Dr As DataRow In DTCabeceras.Rows
|
||||
Dim IndexGV As Integer = 6 + IndexActual
|
||||
|
||||
If DSDatos.Tables(1).SUM($"[{Dr("id").ToString}]") <> 0 Then
|
||||
|
||||
Try
|
||||
Row.Item($"{Dr("id").ToString}") = DSDatos.Tables(1).SUM($"[{Dr("id").ToString}]", "tipo='H'")
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
IndexActual = IndexActual + 1
|
||||
If IndexGV >= 206 Then
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
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
|
||||
|
||||
Row = DtIngresos.NewRow
|
||||
Row.Item("Nombre") = "EGRESOS"
|
||||
DtIngresos.Rows.Add(Row)
|
||||
|
||||
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 EGRESOS"
|
||||
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)
|
||||
|
||||
IndexActual = 0
|
||||
For Each Dr As DataRow In DTCabeceras.Rows
|
||||
Dim IndexGV As Integer = 6 + IndexActual
|
||||
|
||||
If DSDatos.Tables(1).SUM($"[{Dr("id").ToString}]") <> 0 Then
|
||||
|
||||
Try
|
||||
Row.Item($"{Dr("id").ToString}") = DSDatos.Tables(1).SUM($"[{Dr("id").ToString}]", "tipo='G'")
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
IndexActual = IndexActual + 1
|
||||
If IndexGV >= 206 Then
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
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
|
||||
|
||||
'GvGastos.DataSource = DtGastos
|
||||
|
||||
|
||||
|
||||
|
||||
For x As Integer = 7 To GvIngresos.Columns.Count - 1
|
||||
GvIngresos.Columns(x).Visible = False
|
||||
GvIngresos2.Columns(x).Visible = False
|
||||
'GvGastos.Columns(x).Visible = False
|
||||
Next
|
||||
|
||||
|
||||
IndexActual = 0
|
||||
For Each Dr As DataRow In DTCabeceras.Rows
|
||||
Dim IndexGV As Integer = 6 + IndexActual
|
||||
|
||||
GvIngresos.Columns(IndexGV).Visible = True
|
||||
CType(GvIngresos.Columns(IndexGV), BoundField).DataField = Dr("id").ToString
|
||||
GvIngresos.Columns(IndexGV).HeaderText = Dr("Nombre").ToString
|
||||
|
||||
|
||||
GvIngresos2.Columns(IndexGV).Visible = True
|
||||
CType(GvIngresos2.Columns(IndexGV), BoundField).DataField = Dr("id").ToString
|
||||
GvIngresos2.Columns(IndexGV).HeaderText = Dr("Nombre").ToString
|
||||
|
||||
|
||||
If DSDatos.Tables(1).SUM($"[{Dr("id").ToString}]") = 0 Then
|
||||
GvIngresos.Columns(IndexGV).Visible = False
|
||||
GvIngresos2.Columns(IndexGV).Visible = False
|
||||
'GvGastos.Columns(IndexGV).Visible = False
|
||||
Else
|
||||
Try
|
||||
Row.Item($"{Dr("id").ToString}") = DSDatos.Tables(1).SUM($"[{Dr("id").ToString}]", "tipo='H'") - DSDatos.Tables(1).SUM($"[{Dr("id").ToString}]", "tipo='G'")
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
IndexActual = IndexActual + 1
|
||||
If IndexGV >= 206 Then
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
IndexActual = IndexActual + 7
|
||||
|
||||
Try
|
||||
|
||||
If DdlTipoConsulta.SelectedValue.ToEntero = 1 Then
|
||||
GvIngresos.Columns(IndexActual).Visible = True
|
||||
CType(GvIngresos.Columns(IndexActual), BoundField).DataField = "ImporteActual"
|
||||
GvIngresos.Columns(IndexActual).HeaderText = "Total"
|
||||
|
||||
GvIngresos2.Columns(IndexActual).Visible = True
|
||||
CType(GvIngresos2.Columns(IndexActual), BoundField).DataField = "ImporteActual"
|
||||
GvIngresos2.Columns(IndexActual).HeaderText = "Total"
|
||||
Else
|
||||
GvIngresos.Columns(IndexActual).Visible = True
|
||||
CType(GvIngresos.Columns(IndexActual), BoundField).DataField = "ImporteAcumulado"
|
||||
GvIngresos.Columns(IndexActual).HeaderText = "Total"
|
||||
|
||||
GvIngresos2.Columns(IndexActual).Visible = True
|
||||
CType(GvIngresos2.Columns(IndexActual), BoundField).DataField = "ImporteAcumulado"
|
||||
GvIngresos2.Columns(IndexActual).HeaderText = "Total"
|
||||
End If
|
||||
|
||||
IndexFinal = IndexActual
|
||||
Catch ex As Exception
|
||||
GuardaLog("Error al generar reporte estado de resultados" & ex.StackTrace)
|
||||
End Try
|
||||
|
||||
|
||||
DtGastos.Rows.Add(Row)
|
||||
DtIngresos.Merge(DtGastos, False, MissingSchemaAction.Add)
|
||||
DtIngresos.AcceptChanges()
|
||||
GvIngresos.DataSource = DtIngresos
|
||||
GvIngresos2.DataSource = DtIngresos
|
||||
|
||||
GvIngresos.DataBind()
|
||||
GvIngresos2.DataBind()
|
||||
'GvGastos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
UpDatosExelReder.Update()
|
||||
|
||||
PorcentajeActual = Row.Item("PorcentajeActual").ToString
|
||||
PorcentajeAcumulado = Row.Item("PorcentajeAcumulado").ToString
|
||||
DtGastos.Rows.Remove(Row)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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 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
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
If e.Row.DBCampo("Id").ToString.ToEntero > 0 Then
|
||||
|
||||
If Not e.Row.FCHyperLink("HLNombre") Is Nothing Then
|
||||
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoSegmento.aspx?Id={ e.Row.DBCampo("Id").ToString.ToEntero}&Ejercicio={DdlEjercicio.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}&Tipo={DdlTipoConsulta.SelectedValue}&Segmentos={HDSegmentos.Value}&FI={FechaI}&FF={FechaF}"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If 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", e.Row.DBCampo("Id"), e.Row.DBCampo("FechaFActual").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("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.Attributes.Add("style", "vertical-align: bottom;")
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
' e.Row.Cells(0).Attributes.Add("style", "padding-top:50px;")
|
||||
e.Row.Cells(0).Font.Size = 12
|
||||
e.Row.Cells(0).Font.Bold = True
|
||||
|
||||
' e.Row.Cells(1).Attributes.Add("style", "padding-top:50px;")
|
||||
e.Row.Cells(1).Font.Size = 12
|
||||
e.Row.Cells(1).Font.Bold = True
|
||||
|
||||
'e.Row.Cells(2).Attributes.Add("style", "padding-top:50px;")
|
||||
e.Row.Cells(2).Font.Size = 12
|
||||
e.Row.Cells(2).Font.Bold = True
|
||||
|
||||
' e.Row.Cells(3).Attributes.Add("style", "padding-top:50px;")
|
||||
e.Row.Cells(3).Font.Size = 12
|
||||
e.Row.Cells(3).Font.Bold = True
|
||||
|
||||
' e.Row.Cells(4).Attributes.Add("style", "padding-top:50px;")
|
||||
e.Row.Cells(4).Font.Size = 12
|
||||
e.Row.Cells(4).Font.Bold = True
|
||||
|
||||
' e.Row.Cells(5).Attributes.Add("style", "padding-top:50px;")
|
||||
e.Row.Cells(5).Font.Size = 12
|
||||
e.Row.Cells(5).Font.Bold = True
|
||||
'e.Row.Font.Size = 12
|
||||
|
||||
'e.Row.Cells(IndexFinal).ForeColor = Drawing.Color.Red
|
||||
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
|
||||
|
||||
|
||||
If e.Row.DBCampo("Nombre").ToString.Contiene("INGRESOS", "EGRESOS") Then
|
||||
e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
|
||||
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
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = -2 Then
|
||||
|
||||
e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
e.Row.Cells(IndexFinal).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
|
||||
|
||||
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)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
e.Row.FCHyperLink("HLActual").Font.Bold = True
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
e.Row.FCHyperLink("HLAnterior").Font.Bold = True
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#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
|
||||
#Region " IMPRESION "
|
||||
|
||||
#End Region
|
||||
|
||||
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
|
||||
|
||||
Private Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
If e.Row.DBCampo("Id").ToString.ToEntero > 0 Then
|
||||
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoSegmento.aspx?Id={ e.Row.DBCampo("Id").ToString.ToEntero}&Ejercicio={DdlEjercicio.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}&Tipo={DdlTipoConsulta.SelectedValue}&Segmentos={HDSegmentos.Value}&FI={FechaI}&FF={FechaF}"
|
||||
End If
|
||||
|
||||
|
||||
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 = Now.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, $"RepEstadoResultadosPorSegmento_{Now.ToString("yyyyMMddhhmmss")}.xlsx")
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
132
Contabilidad/RepEstadoResultadosProForma.aspx
Normal file
132
Contabilidad/RepEstadoResultadosProForma.aspx
Normal file
@@ -0,0 +1,132 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoResultadosProForma.aspx.vb" Inherits="Contabilidad_RepEstadoResultadosProForma" %>
|
||||
|
||||
<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 () {
|
||||
gridviewScroll();
|
||||
});
|
||||
|
||||
function gridviewScroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 210;
|
||||
|
||||
$('#<%=GvDatos.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 truncate">Divisor:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlUnidad" runat="server" CssClass="form-control input-sm">
|
||||
<asp:ListItem Text="1" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="1000" Value="1000"></asp:ListItem>
|
||||
<asp:ListItem Text="10,000" Value="10000"></asp:ListItem>
|
||||
<asp:ListItem Text="100,000" Value="100000"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-advance table-hover Widthall" runat="server" AutoGenerateColumns="False" GridLines="None" >
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Cuenta")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="300" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Anio0" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnio0" runat="server" Text='<%# Eval("Anio0", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="true" HeaderText="%" DataField="PorcentajeAnio0" ItemStyle-Width="100px"/>
|
||||
<asp:TemplateField HeaderText="Anio11" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnio11" runat="server" Text='<%# Eval("Anio11", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="true" HeaderText="%" DataField="PorcentajeAnio11" ItemStyle-Width="100px"/>
|
||||
<asp:TemplateField HeaderText="Anio12" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnio12" runat="server" Text='<%# Eval("Anio12", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="true" HeaderText="%" DataField="PorcentajeAnio12" ItemStyle-Width="100px"/>
|
||||
<asp:TemplateField HeaderText="Anio13" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnio13" runat="server" Text='<%# Eval("Anio13", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="true" HeaderText="%" DataField="PorcentajeAnio13" ItemStyle-Width="100px"/>
|
||||
<asp:TemplateField HeaderText="Anio2" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnio2" runat="server" Text='<%# Eval("Anio2", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="true" HeaderText="%" DataField="PorcentajeAnio2" ItemStyle-Width="100px"/>
|
||||
<asp:TemplateField HeaderText="Anio3" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnio3" runat="server" Text='<%# Eval("Anio3", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="true" HeaderText="%" DataField="PorcentajeAnio3" ItemStyle-Width="100px"/>
|
||||
<asp:TemplateField HeaderText="Anio4" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnio4" runat="server" Text='<%# Eval("Anio4", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="true" HeaderText="%" DataField="PorcentajeAnio4" ItemStyle-Width="100px"/>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
147
Contabilidad/RepEstadoResultadosProForma.aspx.vb
Normal file
147
Contabilidad/RepEstadoResultadosProForma.aspx.vb
Normal file
@@ -0,0 +1,147 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad_RepEstadoResultadosProForma
|
||||
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 TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TipoReporte").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoReporte") = 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
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ObjConta.GetEstadoResultadosProForma(DdlUnidad.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del balance general proforma", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
GvDatos.Columns(1).HeaderText = (Year(Date.Now) - 1).ToString
|
||||
GvDatos.Columns(3).HeaderText = (Year(Date.Now) + 0).ToString
|
||||
GvDatos.Columns(5).HeaderText = (Year(Date.Now) + 0).ToString
|
||||
GvDatos.Columns(7).HeaderText = (Year(Date.Now) + 0).ToString
|
||||
GvDatos.Columns(9).HeaderText = (Year(Date.Now) + 1).ToString
|
||||
GvDatos.Columns(11).HeaderText = (Year(Date.Now) + 2).ToString
|
||||
GvDatos.Columns(13).HeaderText = (Year(Date.Now) + 3).ToString
|
||||
|
||||
'Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1
|
||||
|
||||
''Esconde todo
|
||||
'For index = 1 To 40 Step 2
|
||||
' GvDatos.Columns(index).Visible = False
|
||||
' GvDatos.Columns(index + 1).Visible = False
|
||||
'Next
|
||||
|
||||
'Dim i = 0
|
||||
'For index = 1 To Anos * 2 Step 2
|
||||
' GvDatos.Columns(index).Visible = True
|
||||
' GvDatos.Columns(index + 1).Visible = True
|
||||
' GvDatos.Columns(index).HeaderText = (DdlEjercicio.SelectedValue.ToEntero + i).ToString
|
||||
' i = i + 1
|
||||
'Next
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
CargaGrid()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Nivel").ToString.ToEntero = 1 Then
|
||||
e.Row.FCHyperLink("HLAnio0").Text = ""
|
||||
e.Row.FCHyperLink("HLAnio11").Text = ""
|
||||
e.Row.FCHyperLink("HLAnio12").Text = ""
|
||||
e.Row.FCHyperLink("HLAnio13").Text = ""
|
||||
e.Row.FCHyperLink("HLAnio2").Text = ""
|
||||
e.Row.FCHyperLink("HLAnio3").Text = ""
|
||||
e.Row.FCHyperLink("HLAnio4").Text = ""
|
||||
e.Row.Cells(5).Text = ""
|
||||
End If
|
||||
|
||||
'AGRUPADOR DE CUENTAS
|
||||
If e.Row.DBCampo("Nivel").ToString.ToEntero = 1 Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
'TITULO DE CUENTAS
|
||||
If e.Row.DBCampo("Nivel").ToString.ToEntero = 2 Or (e.Row.DBCampo("Nivel").ToString.ToEntero = 0 And e.Row.DBCampo("CveCuenta").ToString <> "") 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("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FI={1}&FF={2}&TP={3}", 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)
|
||||
' Next
|
||||
'End If
|
||||
|
||||
'TOTALES
|
||||
If e.Row.DBCampo("CveCuenta").ToString = "" And e.Row.DBCampo("Nivel").ToString = "" 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 Class
|
||||
283
Contabilidad/RepGastosCC.aspx
Normal file
283
Contabilidad/RepGastosCC.aspx
Normal file
@@ -0,0 +1,283 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepGastosCC.aspx.vb" Inherits="RepGastosCC" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.select2 .select2-selection__rendered {
|
||||
line-height: 1;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.select2 .select2-selection--multiple {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
min-height: 20px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.select2-selection__rendered {
|
||||
margin-top: 0px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.select2-selection {
|
||||
margin-top: 0px;
|
||||
height: 31px;
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||
border: none;
|
||||
outline: 0;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label ID="LblTitulo" runat="server" Text="Gastos Acumulados"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server">
|
||||
|
||||
<%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="btn-group pull-right btn-separete">
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server" defaultbutton="BtnConsultar">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<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: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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="CalendarExtender1" TargetControlID="txtFechaI" PopupButtonID="ImgCalendarioI" 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>
|
||||
<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="txtFechaF" runat="server" CssClass="form-control" Width="99%" 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>
|
||||
<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>
|
||||
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; 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>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="True" EmptyDataText=""
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true" Style="text-align: center;" GridLines="None">
|
||||
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<%--<script type="text/javascript">
|
||||
|
||||
function Scroll() {
|
||||
$(document).ready(function () {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 300;
|
||||
$('#<%=GvDatos.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>--%>
|
||||
|
||||
<script type="text/javascript">
|
||||
function GetSelectedRow(lnk, txtf, txtoi) {
|
||||
|
||||
|
||||
//var row = lnk.parentNode.parentNode;
|
||||
//var txtoi = row.cells[10].getElementsByTagName("input")[1];
|
||||
if (lnk.checked) {
|
||||
debugger;
|
||||
if (txtf) { txtf.style.display = ""; }
|
||||
if (txtoi) { txtoi.style.display = ""; }
|
||||
// try {
|
||||
// row.cells[10].getElementsByTagName("input")[0].style.display = "";
|
||||
// if (txtoi) { txtoi.style.display = ""; }
|
||||
// }
|
||||
// catch (err) {
|
||||
// row = row.parentNode;
|
||||
// row.cells[10].getElementsByTagName("input")[0].style.display = "";
|
||||
// }
|
||||
} else {
|
||||
if (txtf) { txtf.style.display = "none"; }
|
||||
if (txtoi) { txtoi.style.display = "none"; }
|
||||
// try {
|
||||
// row.cells[10].getElementsByTagName("input")[0].style.display = "none";
|
||||
// }
|
||||
// catch (err) {
|
||||
// row = row.parentNode;
|
||||
// row.cells[10].getElementsByTagName("input")[0].style.display = "none";
|
||||
// }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function FechaGeneral(lnk, FechaDocumento) {
|
||||
debugger;
|
||||
var row = lnk.parentNode.parentNode;
|
||||
|
||||
var parts = FechaDocumento.split("/");
|
||||
var F1 = new Date(parts[2], parts[1], parts[0]);
|
||||
|
||||
|
||||
if (lnk.checked) {
|
||||
try {
|
||||
parts = $get("TxtFechaAplicadoHeader").value.split("/");
|
||||
var F2 = new Date(parts[2], parts[1], parts[0]);
|
||||
|
||||
if (F1 < F2) {
|
||||
row.cells[10].getElementsByTagName("input")[0].value = $get("TxtFechaAplicadoHeader").value;
|
||||
} else {
|
||||
row.cells[10].getElementsByTagName("input")[0].value = FechaDocumento;
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
row = row.parentNode;
|
||||
row.cells[10].getElementsByTagName("input")[0].value = $get("TxtFechaAplicadoHeader").value;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function OnClientShown(sender, args) {
|
||||
sender._popupBehavior._element.style.zIndex = 10005;
|
||||
sender._popupBehavior._element.style.position = "absolute";
|
||||
sender._popupBehavior._element.style.top = "0px";
|
||||
document.getElementById("C_GvDatosPanelItem").style.overflow = "initial";
|
||||
}
|
||||
</script>
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
//function OrdenarGV() {
|
||||
// var Tam = TamañoVentana();
|
||||
// var Alto = Tam.height - 270;
|
||||
// if (Alto < 100) {
|
||||
// Alto = 100;
|
||||
// }
|
||||
// $('#C_GvDatos').DataTable({
|
||||
// scrollY: Alto + 'px',
|
||||
// scrollCollapse: true,
|
||||
// paging: false,
|
||||
// searching: false,
|
||||
// info: false
|
||||
// });
|
||||
// $('#C_GvDatos').parent().parent().children().first().css("position", "static");
|
||||
//}
|
||||
</script>
|
||||
</asp:Content>
|
||||
155
Contabilidad/RepGastosCC.aspx.vb
Normal file
155
Contabilidad/RepGastosCC.aspx.vb
Normal file
@@ -0,0 +1,155 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Extensiones
|
||||
Partial Class RepGastosCC
|
||||
Inherits ClsPaginas
|
||||
Private Shared missing As Object = System.Reflection.Missing.Value
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtVentas As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtVentas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtVentas") = 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
|
||||
|
||||
|
||||
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString()
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
OrdenaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region " C A R G A - D A T O S "
|
||||
Public Sub CargaDatos()
|
||||
Dim Obj As New ClsContabilidad
|
||||
|
||||
If Obj.GetGastosRepCC(txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim().ToDate, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = Obj.DtResultados
|
||||
|
||||
End If
|
||||
|
||||
Obj.Dispose()
|
||||
GvDatos.DataBind()
|
||||
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Private Sub OrdenaDatos()
|
||||
'If (GvDatos.Rows.Count > 0) Then
|
||||
' GvDatos.UseAccessibleHeader = True
|
||||
' GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
' RegistraScript("OrdenarGV();")
|
||||
'End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "G V - D A T O S "
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
' e.Row.FCLiteral("LtlFolio").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepRemisionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & """>" & e.Row.FCLiteral("LtlFolio").Text & "</a>"
|
||||
|
||||
' If e.Row.DBCampo("FechaVencimiento").ToDate < Now Then
|
||||
' ' e.Row.Cells(2).CssClass = "danger"
|
||||
' e.Row.Cells(2).ForeColor = Drawing.Color.Red
|
||||
' End If
|
||||
|
||||
' e.Row.Cells(5).Text = e.Row.Cells(5).Text + "%"
|
||||
|
||||
e.Row.Cells(1).Width = 250
|
||||
e.Row.Cells(0).Visible = False
|
||||
|
||||
For Each Cells As TableCell In e.Row.Cells
|
||||
Dim Celda As String = Cells.Text
|
||||
If IsNumeric(Celda) Then
|
||||
|
||||
|
||||
If Celda.ToDouble = 0 Then
|
||||
Cells.Text = ""
|
||||
Else
|
||||
Dim ce = DirectCast(Cells, System.Web.UI.WebControls.DataControlFieldCell)
|
||||
|
||||
Cells.Text = Cells.Text.FormatoNumero(2)
|
||||
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If e.Row.DBCampo("CveCuenta").ToEntero() < 1 Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
ElseIf e.Row.RowType = DataControlRowType.Header Then
|
||||
e.Row.Cells(0).Visible = False
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region "PDF"
|
||||
'Private Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||
' If DtVentas IsNot Nothing Then
|
||||
' Dim StrFiltro As New StringBuilder
|
||||
' If DdlSubProyectos.GetSelectedText <> "" Then StrFiltro.AppendFormat(" <b>Sucursal</b>: {0}", DdlSubProyectos.GetSelectedText)
|
||||
' If DdlClientes.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Cliente</b>: {0}", DdlClientes.SelectedText)
|
||||
' If DdlContrato.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Contrato</b>: {0}", DdlContrato.SelectedItem.Text)
|
||||
|
||||
' If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Inicio </b>: {0}", txtFechaI.Text.ToDate.ToShortDateString)
|
||||
' If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Fin </b>: {0}", txtFechaF.Text.ToDate.ToShortDateString)
|
||||
' If TxtFechaVencimiento.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Vencimiento al</b>: {0}", txtFechaI.Text.ToDate.ToShortDateString)
|
||||
|
||||
' If DdlVendedor.GetSelectedText <> "" Then StrFiltro.AppendFormat(" <b>Vendedor</b>: {0}", DdlVendedor.GetSelectedText)
|
||||
|
||||
' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
' Dim FechaI, FechaF As String
|
||||
' FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text)
|
||||
' FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text)
|
||||
|
||||
' Dim params As New List(Of ReportParameter)
|
||||
' params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
' params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
' params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
' params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
' params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
' params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
' If Imagen.Exists Then
|
||||
' params.Add(New ReportParameter("LogoPath", logouri))
|
||||
' Else
|
||||
' params.Add(New ReportParameter("LogoPath", ""))
|
||||
' End If
|
||||
' ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", Now.ToDateTime.ToShortDateString))
|
||||
' Else
|
||||
' Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
' End If
|
||||
'End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
GvDatos.ExportToExcelG("ReporteGastos" & Now.ToShortDateString & ".xlsx")
|
||||
End Sub
|
||||
' Note, it is important to override the form verification in order to successfully call a GridView1.RenderControl method.
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
474
Contabilidad/RepIEPS.aspx
Normal file
474
Contabilidad/RepIEPS.aspx
Normal file
@@ -0,0 +1,474 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepIEPS.aspx.vb" Inherits="Contabilidad_RepIEPS" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
/*th > div {
|
||||
white-space: normal;
|
||||
width: 100px;
|
||||
}*/
|
||||
.ellipsis {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de IEPS
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:UpdatePanel ID="UpLnkAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkGenerar" OnClick="LnkGenerar_Click" runat="server" Visible="false"><i class="fa fa-file-o" style="font-weight:bold;"></i>Imprimir IEPS LAYOUT </asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server" Visible="false"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Imprimir PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server" Visible="false"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Imprimir Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkGenerar" />
|
||||
<asp:PostBackTrigger ControlID="LnkPdf" />
|
||||
<asp:PostBackTrigger ControlID="LnkExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPPFiltros" 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" OnClick="BtnConsultar_Click" CssClass="btn btn-primary" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<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>
|
||||
<label class="col-md-1">Tipo: </label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTipoOperacion" runat="server" CssClass="form-control input-sm select2me" Width="150px">
|
||||
<asp:ListItem Text="Cliente" Value="C"></asp:ListItem>
|
||||
<asp:ListItem Text="Proveedor" Value="P"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1">Tipo de Operación:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlModalidad" runat="server" CssClass="form-control input-sm select2me" Width="150px">
|
||||
<asp:ListItem Text="Agrupado" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Detallado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1">Visualizar:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlLimite" runat="server" CssClass="form-control input-sm select2me" Width="150px">
|
||||
<asp:ListItem Selected="True" Text="Primeros 50" Value="50"></asp:ListItem>
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" EmptyDataText="No se encontraron datos con los filtros seleccionados" OnRowDataBound="GvDatos_RowDataBound"
|
||||
CssClass="table table-hover table-striped ScrollAD" Width="100%" GridLines="None" AutoGenerateColumns="false">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Num" DataField="Num" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="Tipo de operación" ToolTip="Tipo de operación"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("TipoOperacion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="RFC del cliente o proveedor" ToolTip="RFC del cliente o proveedor"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("RFCCliente") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div>
|
||||
<asp:Label runat="server" Text="Nombre o denominación social" ToolTip="Nombre o denominación social"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("NombreCliente") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="Entidad federativa" ToolTip="Entidad federativa"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("EntidadFederativa") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="Tipo de producto" ToolTip="Tipo de producto"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("TipoProducto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="Empresa tabacalera" ToolTip="Empresa tabacalera"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("EmpresaTabacalera") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="Clave generica del producto" ToolTip="Clave generica del producto"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("ClaveGenericaProducto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Graduación" DataField="Graduacion" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="Volumen total de enajenacion por tipo de producto" ToolTip="Volumen total de enajenacion por tipo de producto"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("VolumenTotal", "{0:N0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Empaque" DataField="Empaque" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Presentación" DataField="Presentacion" DataFormatString="{0:N3}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Unidad de medida" DataField="UnidadMedida" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="Valor de la operación antes de impuestos" ToolTip="Valor de la operación antes de impuestos"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("ValorAntesDeImpuestos", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="Valor de la operación valuada al precio de venta al detallista" ToolTip="Valor de la operación valuada al precio de venta al detallista"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("ValorPrecioVentaDetallista", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="IEPS Pagado / Trasladado" ToolTip="IEPS Pagado / Trasladado"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("IEPSPagado", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="IVA Pagado / Trasladado" ToolTip="IVA Pagado / Trasladado"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("IVAPagado", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="IEPS trasladado por la aplicación de la cuota específica de cigarros enajenados"
|
||||
ToolTip="IEPS trasladado por la aplicación de la cuota específica de cigarros enajenados"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("IEPS1", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="IEPS trasladado por la aplicación de la cuota específica por el peso total en gramos de los puros y otros tabacos labrados enajenados"
|
||||
ToolTip="IEPS trasladado por la aplicación de la cuota específica por el peso total en gramos de los puros y otros tabacos labrados enajenados"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("IEPS2", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="IEPS trasladado por la aplicación de la cuota específica por el peso total en gramos de los puros y otros tabacos labrados hechos enteramente a mano enajenados"
|
||||
ToolTip="IEPS trasladado por la aplicación de la cuota específica por el peso total en gramos de los puros y otros tabacos labrados hechos enteramente a mano enajenados"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("IEPS3", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="IEPS trasladado por la aplicación de la cuota de bebidas saborizadas"
|
||||
ToolTip="IEPS trasladado por la aplicación de la cuota de bebidas saborizadas"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("IEPS4", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="IEPS trasladado por la aplicación de la cuota de bebidas saborizadas"
|
||||
ToolTip="IEPS trasladado por la aplicación de la cuota de bebidas saborizadas"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("IEPS4", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="IEPS trasladado por la aplicación de la cuota de bebidas energetizantes"
|
||||
ToolTip="IEPS trasladado por la aplicación de la cuota de bebidas energetizantes"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("IEPS5", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="IEPS pagados en la importación por la aplicación de la cuota específica de cigarros"
|
||||
ToolTip="IEPS pagados en la importación por la aplicación de la cuota específica de cigarros"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("IEPS6", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="IEPS pagados en la importación por la aplicación de la cuota específica de los puros y otros tabacos labrados"
|
||||
ToolTip="IEPS pagados en la importación por la aplicación de la cuota específica de los puros y otros tabacos labrados"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("IEPS7", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="IEPS pagados en la importación por la aplicación de la cuota específica de los puros y otros tabacos labrados hechos enteramente a mano"
|
||||
ToolTip="IEPS pagados en la importación por la aplicación de la cuota específica de los puros y otros tabacos labrados hechos enteramente a mano"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("IEPS8", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="IEPS pagado en la importación por la aplicación de la cuota de bebidas saborizadas"
|
||||
ToolTip="IEPS pagado en la importación por la aplicación de la cuota de bebidas saborizadas"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("IEPS9", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<div class="ellipsis">
|
||||
<asp:Label runat="server" Text="IEPS pagado en la importación por la aplicación de la cuota de bebidas energetizantes"
|
||||
ToolTip="IEPS pagado en la importación por la aplicación de la cuota de bebidas energetizantes"></asp:Label>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("IEPS10", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
|
||||
<ItemStyle Wrap="false" Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<%-- <script type="text/javascript">
|
||||
onload = function() {
|
||||
CargaPickers2();
|
||||
}
|
||||
function CargaPickers2() {
|
||||
if ($.datetimepicker) {
|
||||
$.datetimepicker.setLocale('es');
|
||||
$('input.ADDateTimePicker2').each(function () {
|
||||
var TThis = $(this);
|
||||
var formato = 'd/m/Y H:i';
|
||||
debugger;
|
||||
if (TThis.data('dateformat')) {
|
||||
formato = TThis.data('dateformat');
|
||||
}
|
||||
TThis.datetimepicker({
|
||||
dayOfWeekStart: 1,
|
||||
lang: 'es',
|
||||
format: formato,
|
||||
formatDate: formato,
|
||||
step: 30
|
||||
});
|
||||
var Div = TThis.parent()
|
||||
var boton = document.createElement('span');
|
||||
boton.className = "input-group-btn"
|
||||
|
||||
var subboton = document.createElement('a')
|
||||
subboton.className = "btn default"
|
||||
subboton.innerHTML = "<i class='fa fa-calendar'></i>"
|
||||
subboton.addEventListener('click', function () {
|
||||
TThis.datetimepicker('show')
|
||||
});
|
||||
boton.appendChild(subboton)
|
||||
|
||||
var agregar = true;
|
||||
for (var i = 0; i < Div[0].children.length; i++) {
|
||||
if (Div[0].children[i].isEqualNode(boton)) {
|
||||
agregar = false;
|
||||
}
|
||||
}
|
||||
if (agregar) {
|
||||
Div[0].appendChild(boton);
|
||||
}
|
||||
//Div[0].appendChild(boton)
|
||||
|
||||
});
|
||||
} else {
|
||||
console.error("caught TypeError: datetimepicker is undefined");
|
||||
}
|
||||
|
||||
}
|
||||
</script>--%>
|
||||
</asp:Content>
|
||||
|
||||
138
Contabilidad/RepIEPS.aspx.vb
Normal file
138
Contabilidad/RepIEPS.aspx.vb
Normal file
@@ -0,0 +1,138 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contabilidad_RepIEPS
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargaFechas()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaFechas()
|
||||
txtFechaI.Text = $"01/{Now.Month}/{Now.Year}"
|
||||
txtFechaF.Text = Now.ToString("dd/MM/yyyy")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjConta As New ClsContabilidad()
|
||||
If ObjConta.GetRepIEPS(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlTipoOperacion.SelectedValue, DdlModalidad.SelectedValue.ToEntero(), DdlLimite.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjConta.DtResultados.Copy()
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
||||
LnkGenerar.Visible = True
|
||||
LnkPdf.Visible = True
|
||||
LnkExcel.Visible = True
|
||||
If DdlTipoOperacion.SelectedValue = "C" AndAlso DdlModalidad.SelectedValue = "1" Then
|
||||
DtDatos = DtDatos.FiltraParametros("TipoDato in (1,2)")
|
||||
End If
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
Else
|
||||
Alert("No se encontraron resultados en la consulta")
|
||||
End If
|
||||
UpDatos.Update()
|
||||
UpLnkAcciones.Update()
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
'If e.Row.RowType = DataControlRowType.Header Then
|
||||
' For i = 0 To e.Row.Cells.Count - 1
|
||||
' e.Row.Cells(i).ToolTip = e.Row.Cells(i).Text.Replace("ó", "ó").Replace("í", "í")
|
||||
' Next
|
||||
'End If
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("TipoDato") = "1" Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
ElseIf e.Row.DBCampo("TipoDato") = "2" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
If e.Row.DBCampo("Num") = "0" Then
|
||||
e.Row.Cells(0).Text = ""
|
||||
End If
|
||||
If UsuarioActual.CveRol = 1 AndAlso e.Row.DBCampo("TipoDato") = "0" Then
|
||||
If Math.Abs(e.Row.DBCampo("SubTotalPorcentaje").ToDecimal - e.Row.DBCampo("ValorAntesDeImpuestos").ToDecimal) > 1000 Then
|
||||
e.Row.ForeColor = Drawing.Color.Red
|
||||
e.Row.ToolTip = String.Format("IEPSPagado:{0} - Porcentaje:{1} - SubTotalPorcentaje: {2} - SubTotal: {3}", e.Row.DBCampo("IEPSPagado").FormatoNumero, e.Row.DBCampo("ClaveGenericaPorcentaje").FormatoNumero, e.Row.DBCampo("SubTotalPorcentaje").FormatoNumero, e.Row.DBCampo("ValorAntesDeImpuestos").FormatoNumero)
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub LnkGenerar_Click(sender As Object, e As EventArgs)
|
||||
Dim txtFile As New StringBuilder()
|
||||
|
||||
Dim DtExportar As DataTable = DtDatos.FiltraParametros("TipoDato = 0")
|
||||
For Each row As DataRow In DtExportar.Rows
|
||||
txtFile.Append(row("Layout").ToString())
|
||||
txtFile.Append(vbCrLf)
|
||||
Next
|
||||
Dim NombreArchivo As String = $"LayoutIEPS-{DdlTipoOperacion.SelectedItem.Text}.txt"
|
||||
Response.Clear()
|
||||
Response.Buffer = True
|
||||
Response.AddHeader("content-disposition", $"attachment;filename={NombreArchivo}")
|
||||
Response.Charset = ""
|
||||
Response.ContentType = "application/text"
|
||||
Response.Output.Write(txtFile.ToString())
|
||||
Response.Flush()
|
||||
Response.End()
|
||||
End Sub
|
||||
Public Sub Imprimir(ByVal Opcion As String)
|
||||
Dim FechaF As String
|
||||
|
||||
If txtFechaF.Text = "" OrElse txtFechaF.Text = "__/__/____" Then
|
||||
FechaF = ""
|
||||
Else
|
||||
FechaF = $" <b>Fecha Final:</b> {txtFechaF.Text}"
|
||||
End If
|
||||
|
||||
Dim FechaI As String
|
||||
|
||||
If txtFechaI.Text = "" OrElse txtFechaI.Text = "__/__/____" Then
|
||||
FechaI = ""
|
||||
Else
|
||||
FechaI = $" <b>Fecha Inicial:</b> {txtFechaI.Text}"
|
||||
End If
|
||||
|
||||
Dim TipoOperacion As String = $" <b>Tipo de Operación:</b> {DdlTipoOperacion.SelectedItem.Text}"
|
||||
Dim Modalidad As String = $" <b>Modalidad:</b> {DdlModalidad.SelectedItem.Text}"
|
||||
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
Dim Imagen As System.IO.FileInfo = New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim para As List(Of ReportParameter) = New List(Of ReportParameter)()
|
||||
para.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
para.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
para.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString()))
|
||||
para.Add(New ReportParameter("Filtros", $"<b>Filtros:</b> {FechaI}{FechaF}{TipoOperacion}{Modalidad}"))
|
||||
|
||||
If Imagen.Exists Then
|
||||
para.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
para.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepIEPS.rdlc", DtDatos, para, "Reporte de IEPS", Opcion)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs)
|
||||
Imprimir("PDF")
|
||||
End Sub
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs)
|
||||
Imprimir("EXCEL")
|
||||
End Sub
|
||||
End Class
|
||||
266
Contabilidad/RepIVA.aspx
Normal file
266
Contabilidad/RepIVA.aspx
Normal file
@@ -0,0 +1,266 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepIVA.aspx.cs" Inherits="Contabilidad_RepIVA" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.truncate2 {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width:100px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Impuestos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
||||
</li>
|
||||
<asp:UpdatePanel runat="server" ID="UpAccionesDIOT" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAccionesDIOT" OnClick="LnkAccionesDIOT_Click" runat="server" Visible="false"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Generar DIOT</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkAccionesDIOT" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPPFiltros" 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" OnClick="BtnConsultar_Click" CssClass="btn btn-primary" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<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: 100px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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="CalendarExtender1" TargetControlID="txtFechaI" PopupButtonID="ImgCalendarioI" 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>
|
||||
<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: 100px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" Width="99%" 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>
|
||||
<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>
|
||||
<label class="col-md-1 truncate">Tipo Movto:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoMovto" runat="server">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Conciliados" Value="1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<ajax:TabContainer ID="TT" runat="server" ActiveTabIndex="0" Width="100%">
|
||||
<ajax:TabPanel ID="TTr" runat="server" HeaderText="IVA Trasladado">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<h4><b>IVA Trasladado</b></h4>
|
||||
<asp:GridView ID="GvT" runat="server" EmptyDataText="No se encontraron datos con los filtros seleccionados" OnRowDataBound="GvIVATrasladado_RowDataBound" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="99%" GridLines="None" AutoGenerateColumns="false">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Docto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha Documento" DataField="FechaDocumento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Folio" ControlStyle-Width="85px" />
|
||||
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="RetIVA" DataField="RetIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="RetISR" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
|
||||
<asp:HyperLinkField HeaderText="Cliente" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" DataTextField="Nombre" ControlStyle-CssClass="truncate2" />
|
||||
<asp:HyperLinkField HeaderText="Folio Bancario" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" DataTextField="FolioIE" Target="_blank" />
|
||||
|
||||
<asp:BoundField HeaderText="Num. Cuenta" DataField="NumCuenta" ItemStyle-CssClass="truncate2" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
|
||||
<div id="DvTipo" class="col-md-6">
|
||||
<h4><b>IEPS por Porcentaje</b></h4>
|
||||
<asp:GridView ID="GvIEPSA" runat="server" EmptyDataText="" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="400px" GridLines="None" AutoGenerateColumns="false">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeIEPS" />
|
||||
<asp:BoundField HeaderText="Categoria" DataField="Categoria" />
|
||||
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Base" DataField="Base" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h4><b>IVA por Porcentaje</b></h4>
|
||||
<asp:GridView ID="GvIVAA" runat="server" EmptyDataText="" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="400px" GridLines="None" AutoGenerateColumns="false">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeIVA" />
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Base" DataField="Base" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TA" runat="server" HeaderText="IVA Acreditable">
|
||||
<ContentTemplate>
|
||||
<h4><b>IVA Acreditable</b></h4>
|
||||
<asp:GridView ID="GvA" runat="server" EmptyDataText="No se encontraron datos con los filtros seleccionados" OnRowDataBound="GvIVAAcreditable_RowDataBound" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="99%" GridLines="None" AutoGenerateColumns="false">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Docto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="RFC" DataField="RFC" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:HyperLinkField HeaderText="Proveedor" DataNavigateUrlFields="CveProveedor" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataTextField="RazonSocial" ControlStyle-CssClass="truncate2" />
|
||||
<asp:BoundField HeaderText="Fecha Documento" DataField="FechaDocumento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveCompra" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" HeaderText="Folio" />
|
||||
<asp:BoundField HeaderText="SubTotal 16%" DataField="valorActos1516" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="SubTotal 8%" DataField="valorActosImp8" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="SubTotal 0%" DataField="valorActosImp0" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="%IVA" DataField="PorcentajeIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LblHRetIVAHon" data-toggle="tooltip" data-placement="top" ToolTip="Ret IVA Honorario/Serv. Prof." runat="server">RetIVA <br/>Hon/Ser.Prof.</asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblRetIVAHon" runat="server" Text='<%# Eval("RetIVAHonorario", "{0:N2}") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="RetIVA <br/> Fletes P.F" HtmlEncode="False" DataField="RetIVAFletePF" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="RetIVA <br/> Fletes P.M." HtmlEncode="False" DataField="RetIVAFletePM" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="RetIVA <br/> Arrenda." HtmlEncode="False" DataField="RetIVAArrend" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:BoundField HeaderText="RetISR <br/> Honorario" HtmlEncode="False" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="RetISR <br/> Arrendamiento" HtmlEncode="False" DataField="RetISRArrend" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<%-- <asp:BoundField HeaderText="IEPS 3%" DataField="IEPS3" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IEPS 6%" DataField="IEPS6" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IEPS 7%" DataField="IEPS7" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IEPS 9%" DataField="IEPS9" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
|
||||
|
||||
<asp:HyperLinkField HeaderText="Folio Bancario" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" DataTextField="FolioIE" Target="_blank" />
|
||||
|
||||
<asp:BoundField HeaderText="Num. Cuenta" DataField="NumCuenta" ItemStyle-CssClass ="truncate2"/>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
<div class="row">
|
||||
<h4><b>IVA por Porcentaje</b></h4>
|
||||
<asp:GridView ID="GvIVA2" runat="server" EmptyDataText="" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="400px" GridLines="None" AutoGenerateColumns="false">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeIVA" />
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Base" DataField="Base" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel runat="server" ID="UpTipoCambio" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivTipoCambio" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label2" runat="server" ClientIDMode="Static" Text="Cambiar Tipo Cambio de Dólares"></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpBodyTipoCambio" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:RadioButtonList runat="server" ID="RblTipoCambio" OnSelectedIndexChanged="RblTipoCambio_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Venta" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
<div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">
|
||||
Especifico:
|
||||
<asp:TextBox ID="TxtEspecifico" runat="server" Width="55px" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnTipoCambio" runat="server" OnClick="BtnTipoCambio_Click" Text="Aceptar" class="btn btn-primary" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
307
Contabilidad/RepIVA.aspx.cs
Normal file
307
Contabilidad/RepIVA.aspx.cs
Normal file
@@ -0,0 +1,307 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using static Extensiones.ModExtensiones;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using System.Activities.Expressions;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
{
|
||||
#region PROPIEDADES
|
||||
|
||||
private DataTable DtIVATrasladado
|
||||
{
|
||||
get { return DtIVATrasladado = (DataTable)ViewState["DtIVATrasladado"]; }
|
||||
set { ViewState["DtIVATrasladado"] = value; }
|
||||
}
|
||||
private DataTable DtIVAAcreditable
|
||||
{
|
||||
get { return DtIVAAcreditable = (DataTable)ViewState["DtIVAAcreditable"]; }
|
||||
set { ViewState["DtIVAAcreditable"] = value; }
|
||||
}
|
||||
private double TCEspecifico
|
||||
{
|
||||
get { return TCEspecifico = (double)ViewState["TCEspecifico"]; }
|
||||
set { ViewState["TCEspecifico"] = value; }
|
||||
}
|
||||
|
||||
private int TipoCambio
|
||||
{
|
||||
get { return TipoCambio = (int)ViewState["TipoCambio"]; }
|
||||
set { ViewState["TipoCambio"] = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaValores();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void InicializaValores()
|
||||
{
|
||||
TipoCambio = 1;
|
||||
TCEspecifico = -1;
|
||||
txtFechaI.Text = $"01/{DateTime.Now.Month}/{DateTime.Now.Year}";
|
||||
txtFechaF.Text = DateTime.Now.ToShortDateString();
|
||||
|
||||
LnkAccionesDIOT.Visible = true;
|
||||
|
||||
}
|
||||
|
||||
public void Consulta()
|
||||
{
|
||||
if (TipoCambio == 3 && TxtEspecifico.Text != "") { TCEspecifico = TxtEspecifico.Text.ToDouble(); } else { TCEspecifico = -1; }
|
||||
int Conciliado = DdlTipoMovto.SelectedValue.ToEntero();
|
||||
|
||||
ClsContabilidad ObjCont = new ClsContabilidad();
|
||||
if (ObjCont.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 1, UsuarioActual.CveUsuario, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
|
||||
{
|
||||
GvT.DataSource = ObjCont.DtResultados;
|
||||
DtIVATrasladado = ObjCont.DtResultados;
|
||||
if(ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvIEPSA.DataSource = ObjCont.DtResultados;
|
||||
}
|
||||
|
||||
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 2, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvIVAA.DataSource = ObjCont.DtResultados;
|
||||
}
|
||||
|
||||
}
|
||||
if (ObjCont.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
|
||||
{
|
||||
GvA.DataSource = ObjCont.DtResultados;
|
||||
DtIVAAcreditable = ObjCont.DtResultados;
|
||||
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvIVA2.DataSource = ObjCont.DtResultados;
|
||||
}
|
||||
}
|
||||
ObjCont.Dispose();
|
||||
GvT.DataBind();
|
||||
GvA.DataBind();
|
||||
GvIEPSA.DataBind();
|
||||
GvIVAA.DataBind();
|
||||
GvIVA2.DataBind();
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
Consulta();
|
||||
}
|
||||
|
||||
protected void GvIVATrasladado_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (e.Row.DBCampo("CveVenta").ToEntero() < 1)
|
||||
{
|
||||
e.Row.CssClass = "Totales";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvIVAAcreditable_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (e.Row.DBCampo("CveCompra").ToEntero() < 1)
|
||||
{
|
||||
e.Row.CssClass = "Totales";
|
||||
}
|
||||
if (e.Row.DBCampo("PorcentajeIVA").ToDecimal() > 0 )
|
||||
{
|
||||
Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() > 0? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() > 0? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0) );
|
||||
|
||||
Decimal dif = Math.Round(SubTotal * e.Row.DBCampo("PorcentajeIVA").ToDecimal(), 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal(), 2);
|
||||
if (dif > 1)
|
||||
{
|
||||
e.Row.ForeColor = System.Drawing.Color.Red;
|
||||
e.Row.Cells[0].Text = e.Row.Cells[0].Text + "Err";
|
||||
|
||||
e.Row.ToolTip = "Dif:" + dif.ToString() + "- Sub:" + e.Row.DBCampo("SubTotal")+ " - IVA:"+ e.Row.DBCampo("IVA");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkPdf_Click(object sender, EventArgs e)
|
||||
{
|
||||
Imprimir("PDF");
|
||||
}
|
||||
|
||||
protected void LnkExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Imprimir("EXCEL");
|
||||
}
|
||||
|
||||
public void Imprimir(String Opcion)
|
||||
{
|
||||
String FechaF;
|
||||
if (txtFechaF.Text == "" || txtFechaF.Text == "__/__/____") { FechaF = "-1"; } else { FechaF = $" <b>Fecha Final:</b> {txtFechaF.Text}"; }
|
||||
String FechaI;
|
||||
if (txtFechaI.Text == "" || txtFechaI.Text == "__/__/____") { FechaI = "-1"; } else { FechaI = $" <b>Fecha Inicial:</b> {txtFechaI.Text}"; }
|
||||
if (DtIVATrasladado.Rows.Count > 0 || DtIVAAcreditable.Rows.Count > 0)
|
||||
{
|
||||
System.IO.FileInfo Imagen;
|
||||
String logouri = "";
|
||||
|
||||
if (UsuarioActual.CveEmpresa.Contiene(119))
|
||||
{
|
||||
Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.jpg", UsuarioActual.Empresa.Ruta));
|
||||
logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
}
|
||||
else
|
||||
{
|
||||
Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
|
||||
logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
}
|
||||
|
||||
List<CrystalParametro> para = new List<CrystalParametro>();
|
||||
para.Add(new CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa));
|
||||
para.Add(new CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
para.Add(new CrystalParametro("Filtros", $"<b>Filtros:</b> {FechaI}{FechaF}"));
|
||||
if (Imagen.Exists)
|
||||
{
|
||||
para.Add(new CrystalParametro("LogoPath", logouri));
|
||||
}
|
||||
else
|
||||
{
|
||||
para.Add(new CrystalParametro("LogoPath", ""));
|
||||
}
|
||||
|
||||
DataTable Dt = TT.ActiveTabIndex == 0 ? DtIVATrasladado.Copy() : DtIVAAcreditable.Copy();
|
||||
string Formato = TT.ActiveTabIndex == 0 ? "RepIVA.rpt" : "RepIVAAcreditable.rpt";
|
||||
para.Add(new CrystalParametro("Excel", Formato));
|
||||
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath($"~/Empresas/Grales/Formatos/{Formato}"),Dt,para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
|
||||
protected void BtnTipoCambio_Click(object sender, EventArgs e)
|
||||
{
|
||||
Consulta();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio"));
|
||||
}
|
||||
|
||||
protected void RblTipoCambio_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
TipoCambio = RblTipoCambio.SelectedValue.ToEntero();
|
||||
if (TipoCambio == 3)
|
||||
{
|
||||
LiEspecifico.Visible = true;
|
||||
TCEspecifico = get_GlobalTipoCambio(DateTime.Now).ToString().ToDouble();
|
||||
TxtEspecifico.Text = TCEspecifico.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
LiEspecifico.Visible = false;
|
||||
}
|
||||
UpBodyTipoCambio.Update();
|
||||
}
|
||||
|
||||
|
||||
protected string GenerarDIOT()
|
||||
{
|
||||
System.Text.StringBuilder Respuesta = new System.Text.StringBuilder();
|
||||
|
||||
|
||||
|
||||
return Respuesta.ToString();
|
||||
}
|
||||
|
||||
protected void LnkAccionesDIOT_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
ClsContabilidad Objconta = new ClsContabilidad();
|
||||
StringBuilder SBDIOT = new StringBuilder();
|
||||
int Conciliado = DdlTipoMovto.SelectedValue.ToEntero();
|
||||
|
||||
if (Objconta.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
|
||||
{
|
||||
|
||||
foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0)
|
||||
{
|
||||
SBDIOT.AppendLine(
|
||||
Drow["TipoTercero"].ToString() + "|" +
|
||||
Drow["TipoOperacion"].ToString() + "|" +
|
||||
Drow["RFC"].ToString() +"|"+
|
||||
Drow["NumeroIDFiscal"].ToString() + "|" +
|
||||
Drow["NombreExtranjero"].ToString() +"|"+
|
||||
Drow["PaisResidencia"].ToString() + "|" +
|
||||
Drow["Nacionalidad"].ToString() +"|"+
|
||||
LV(Drow["valorActos1516"].ToString()) + "|"+
|
||||
LV(Drow["valorActos15"].ToString()) + "|" +
|
||||
LV(Drow["ValorIvaNo1516"].ToString()) +"|"+
|
||||
|
||||
LV(Drow["valorActos1011"].ToString()) + "|" +
|
||||
LV(Drow["valorActos10"].ToString()) + "|" +
|
||||
LV(Drow["valorActosImp8"].ToString()) + "|" +
|
||||
LV(Drow["ValorIvaNo10"].ToString()) + "|" +
|
||||
LV(Drow["ValorIvaNo08"].ToString()) + "|" +
|
||||
|
||||
LV(Drow["valorActosImp1516"].ToString()) + "|" +
|
||||
LV(Drow["ValorIvaNoImp16"].ToString()) + "|" +
|
||||
|
||||
LV(Drow["valorActosImp10"].ToString()) + "|" +
|
||||
LV(Drow["ValorIvaNoImp10"].ToString()) + "|" +
|
||||
|
||||
LV(Drow["IvaExentoImpo"].ToString()) + "|"+
|
||||
LV(Drow["IVACero"].ToString()) + "|" +
|
||||
LV(Drow["IvaExento"].ToString()) + "|"+
|
||||
LV(Drow["IvaRetenido"].ToString()) + "|" +
|
||||
LV(Drow["IvaDevoluciones"].ToString()) + "|");
|
||||
}
|
||||
}
|
||||
|
||||
Objconta.Dispose();
|
||||
|
||||
//MemoryStream ms = new MemoryStream();
|
||||
//TextWriter tw = new StreamWriter(ms, System.Text.Encoding.UTF8);
|
||||
|
||||
//tw.Write(SBDIOT.ToString());
|
||||
|
||||
//tw.Flush();
|
||||
|
||||
//byte[] bytes = ms.ToArray();
|
||||
//ms.Close();
|
||||
|
||||
//Response.Clear();
|
||||
//Response.AppendHeader("Content-Length", text.Length.ToString());
|
||||
//Response.ContentType = "text/plain";
|
||||
//Response.AddHeader("content-disposition", $"attachment; filename=DIOT_{ txtFechaI.Text.ToDate().ToString("ddMMyyyy") }_{txtFechaI.Text.ToDate().ToString("ddMMyyyy") }.txt");
|
||||
//Response.BinaryWrite(bytes);
|
||||
//Response.End();
|
||||
|
||||
Response.Clear();
|
||||
Response.ClearHeaders();
|
||||
|
||||
Response.AppendHeader("Content-Length", SBDIOT.ToString().Length.ToString());
|
||||
Response.ContentType = "text/plain";
|
||||
Response.AppendHeader("Content-Disposition", $"attachment;filename=DIOT_{ txtFechaI.Text.ToDate().ToString("ddMMyyyy") }_{txtFechaI.Text.ToDate().ToString("ddMMyyyy") }.txt");
|
||||
|
||||
Response.Write(SBDIOT.ToString());
|
||||
Response.End();
|
||||
}
|
||||
|
||||
protected string LV(string Valor )
|
||||
{
|
||||
return (Valor.ToDecimal() > 0) ? Valor.ToDecimal().ToString().FormatoNumero(0).Replace(",", string.Empty) : "";
|
||||
}
|
||||
}
|
||||
111
Contabilidad/RepIVADiferencias.aspx
Normal file
111
Contabilidad/RepIVADiferencias.aspx
Normal file
@@ -0,0 +1,111 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepIVADiferencias.aspx.vb" Inherits="Contabilidad_RepIVADiferencias" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte IVA Diferencias
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta a Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" 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">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-primary" Enabled="false"/>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1 ">
|
||||
<label class="truncate text-size-12">Ejercicio:</label></div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlEjercicio" CssClass="form-control input-sm" runat="server" DataTextField="" DataValueField="">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 ">
|
||||
<label class="truncate text-size-12">Periodo:</label></div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlPeriodo" CssClass="form-control input-sm" runat="server" DataTextField="" DataValueField="">
|
||||
<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>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="Gv" ClientIDMode="Static" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros" CssClass="table table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Nombre" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblNombre" runat="server" Text='<%# Eval("Nombre").ToString%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SerieFolio">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblSerieFolio" runat="server" Text='<%# Eval("SerieFolio").ToString%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Póliza">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblFolio" runat="server" Text='<%# Eval("Folio").ToString%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblFecha" runat="server" Text='<%# Eval("Fecha","{0:d}").ToString%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="ImpBase">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblImpBase" runat="server" Text='<%# Eval("ImpBase").ToString%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="ImpIVA">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblImpIVA" runat="server" Text='<%# Eval("ImpIVA").ToString%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Dif" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblDif" runat="server" Text='<%# Eval("Dif", "{0:N2}").ToString%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
129
Contabilidad/RepIVADiferencias.aspx.vb
Normal file
129
Contabilidad/RepIVADiferencias.aspx.vb
Normal file
@@ -0,0 +1,129 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contabilidad_RepIVADiferencias
|
||||
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 Ejercicio As Integer
|
||||
Get
|
||||
Ejercicio = ViewState("Ejercicio").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("Ejercicio") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property PeriodoNumero As Integer
|
||||
Get
|
||||
PeriodoNumero = ViewState("PeriodoNumero").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("PeriodoNumero") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Periodo As String
|
||||
Get
|
||||
Periodo = ViewState("Periodo").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Periodo") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargaCombos()
|
||||
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
|
||||
BtnConsultar.Enabled = True
|
||||
Ejercicio = DdlEjercicio.SelectedValue.ToEntero
|
||||
PeriodoNumero = DdlPeriodo.SelectedValue.ToEntero
|
||||
CargaDatos()
|
||||
Else
|
||||
Alert("La empresa no usa contabilidad ni Armonización Contable", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
DdlEjercicio.Items.Insert(0, Now.Year.ToString)
|
||||
DdlEjercicio.Items.Insert(1, Now.AddYears(-1).Year.ToString)
|
||||
DdlPeriodo.SelectedValue = Now.Month.ToString
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjCont As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjCont.GetIVAsDiferencias(Ejercicio, PeriodoNumero) Then
|
||||
DtDatos = ObjCont.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
End If
|
||||
ObjCont.Dispose()
|
||||
Gv.DataSource = DtDatos
|
||||
Gv.DataBind()
|
||||
UPPDatos.Update()
|
||||
Periodo = DdlPeriodo.SelectedItem.ToString
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
Ejercicio = DdlEjercicio.SelectedValue.ToEntero
|
||||
PeriodoNumero = DdlPeriodo.SelectedValue.ToEntero
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Private Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
'Gv.ExportToExcel("DiferenciasIVA")
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
Private Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click
|
||||
|
||||
ImprimirReporte()
|
||||
|
||||
End Sub
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = Server.MapPath("~/Empresas/Grales/Formatos/RepIvaDiferencias.rdlc") '"Empresas/Grales/Formatos/RepIvaDiferencias.rdlc"
|
||||
'nombre del reporte
|
||||
Dim fileName As String = "Diferencias IVA"
|
||||
Dim LogoRuta = String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta)
|
||||
|
||||
If Not IsNothing(DtDatos) AndAlso DtDatos.Rows.Count > 0 Then
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
If File.Exists(LogoRuta) Then
|
||||
|
||||
If File.Exists(LogoRuta) Then
|
||||
LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
'POR EMPRESA
|
||||
params.Add(New ReportParameter("pImg", LogoRuta))
|
||||
Else
|
||||
params.Add(New ReportParameter("pImg", ""))
|
||||
End If
|
||||
'parametros a enviar al reporte
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
'params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
params.Add(New ReportParameter("Ejercicio", Ejercicio.ToString))
|
||||
params.Add(New ReportParameter("Periodo", Periodo))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString))
|
||||
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
Else
|
||||
Alert("No se encontraron registros", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
313
Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx
Normal file
313
Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx
Normal file
@@ -0,0 +1,313 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepMovimientosAuxiliaresCatalogo.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-2" 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%; width:140%">
|
||||
</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>
|
||||
392
Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx.vb
Normal file
392
Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx.vb
Normal file
@@ -0,0 +1,392 @@
|
||||
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 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 = True
|
||||
|
||||
CargaTipoCuentas()
|
||||
TxtCuenta.Enabled = False
|
||||
DdlMoneda.DataSource = GlobalDTMonedas
|
||||
DdlMoneda.DataBind()
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, 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) 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 = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, 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))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
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
|
||||
1132
Contabilidad/RepOrigenAplicacion.aspx
Normal file
1132
Contabilidad/RepOrigenAplicacion.aspx
Normal file
File diff suppressed because it is too large
Load Diff
337
Contabilidad/RepOrigenAplicacion.aspx.vb
Normal file
337
Contabilidad/RepOrigenAplicacion.aspx.vb
Normal file
@@ -0,0 +1,337 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad_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(Now), Month(Now), 1).ToShortDateString
|
||||
TxtFechaAl.Text = Date.Now.ToShortDateString
|
||||
|
||||
'Anual
|
||||
Anos = 0
|
||||
DdlEjercicio.SelectedValue = Now.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 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)
|
||||
|
||||
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
|
||||
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)
|
||||
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
If ObjConta.GetOrigenAplicacionMensual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte) 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)
|
||||
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
If ObjConta.GetOrigenAplicacionAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte) 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()
|
||||
|
||||
Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1
|
||||
|
||||
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
|
||||
405
Contabilidad/RepOrigenAplicacionAnual.aspx
Normal file
405
Contabilidad/RepOrigenAplicacionAnual.aspx
Normal file
@@ -0,0 +1,405 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepOrigenAplicacionAnual.aspx.vb" Inherits="Contabilidad_RepOrigenAplicacionAnual" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="CSS" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="E" Runat="Server">
|
||||
Origen y Aplicación de Recursos - Anual
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="JS" Runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
function pageLoad() {
|
||||
$(document).ready(function () {
|
||||
gridviewScroll();
|
||||
});
|
||||
|
||||
function gridviewScroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 210;
|
||||
|
||||
$('#<%=GvDatos.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 truncate">Ejercicio:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="form-control input-sm">
|
||||
<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>
|
||||
<label class="col-md-1 truncate">Tipo:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" CssClass="form-control input-sm">
|
||||
<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>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-advance 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>
|
||||
<HeaderTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2"><asp:Label id="LbAno1" runat="server" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100px">Origen</td>
|
||||
<td width="100px">Aplicación</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLOrigen1" runat="server" Text='<%# Eval("Origen1", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLAplicacion1" runat="server" Text='<%# Eval("Aplicacion1", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="200" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2"><asp:Label id="LbAno2" runat="server" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100px">Origen</td>
|
||||
<td width="100px">Aplicación</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLOrigen2" runat="server" Text='<%# Eval("Origen2", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLAplicacion2" runat="server" Text='<%# Eval("Aplicacion2", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="200" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2"><asp:Label id="LbAno3" runat="server" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100px">Origen</td>
|
||||
<td width="100px">Aplicación</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLOrigen3" runat="server" Text='<%# Eval("Origen3", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLAplicacion3" runat="server" Text='<%# Eval("Aplicacion3", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="200" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2"><asp:Label id="LbAno4" runat="server" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100px">Origen</td>
|
||||
<td width="100px">Aplicación</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLOrigen4" runat="server" Text='<%# Eval("Origen4", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLAplicacion4" runat="server" Text='<%# Eval("Aplicacion4", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="200" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2"><asp:Label id="LbAno5" runat="server" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100px">Origen</td>
|
||||
<td width="100px">Aplicación</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLOrigen5" runat="server" Text='<%# Eval("Origen5", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLAplicacion5" runat="server" Text='<%# Eval("Aplicacion5", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="200" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2"><asp:Label id="LbAno6" runat="server" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100px">Origen</td>
|
||||
<td width="100px">Aplicación</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLOrigen6" runat="server" Text='<%# Eval("Origen6", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLAplicacion6" runat="server" Text='<%# Eval("Aplicacion6", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="200" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2"><asp:Label id="LbAno7" runat="server" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100px">Origen</td>
|
||||
<td width="100px">Aplicación</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLOrigen7" runat="server" Text='<%# Eval("Origen7", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLAplicacion7" runat="server" Text='<%# Eval("Aplicacion7", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="200" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2"><asp:Label id="LbAno8" runat="server" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100px">Origen</td>
|
||||
<td width="100px">Aplicación</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLOrigen8" runat="server" Text='<%# Eval("Origen8", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLAplicacion8" runat="server" Text='<%# Eval("Aplicacion8", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="200" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2"><asp:Label id="LbAno9" runat="server" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100px">Origen</td>
|
||||
<td width="100px">Aplicación</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLOrigen9" runat="server" Text='<%# Eval("Origen9", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLAplicacion9" runat="server" Text='<%# Eval("Aplicacion9", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="200" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2"><asp:Label id="LbAno10" runat="server" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100px">Origen</td>
|
||||
<td width="100px">Aplicación</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLOrigen10" runat="server" Text='<%# Eval("Origen10", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLAplicacion10" runat="server" Text='<%# Eval("Aplicacion10", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="200" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2"><asp:Label id="LbAno11" runat="server" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100px">Origen</td>
|
||||
<td width="100px">Aplicación</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLOrigen11" runat="server" Text='<%# Eval("Origen11", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLAplicacion11" runat="server" Text='<%# Eval("Aplicacion11", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="200" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2"><asp:Label id="LbAno12" runat="server" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100px">Origen</td>
|
||||
<td width="100px">Aplicación</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLOrigen12" runat="server" Text='<%# Eval("Origen12", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:HyperLink ID="HLAplicacion12" runat="server" Text='<%# Eval("Aplicacion12", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="200" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
116
Contabilidad/RepOrigenAplicacionAnual.aspx.vb
Normal file
116
Contabilidad/RepOrigenAplicacionAnual.aspx.vb
Normal file
@@ -0,0 +1,116 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad_RepOrigenAplicacionAnual
|
||||
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 TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TipoReporte").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoReporte") = 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
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
TipoReporte = -1
|
||||
Anos = 0
|
||||
|
||||
DdlEjercicio.SelectedValue = Now.Year.ToString
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
If ObjConta.GetOrigenAplicacionAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del estado de origen y aplicación de recursos", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
CargaGrid()
|
||||
End If
|
||||
|
||||
'Esconde todo
|
||||
For index = 1 To 12
|
||||
GvDatos.Columns(index).Visible = False
|
||||
Next
|
||||
|
||||
For index = 1 To Anos
|
||||
GvDatos.Columns(index).Visible = True
|
||||
'GvDatos.HeaderRow.FCLabel("LbAno" + index.ToString).Text = (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString
|
||||
Next
|
||||
|
||||
|
||||
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
|
||||
|
||||
'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
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user