From bb6b58a2bade0ec2137cd8b1972da04daac657f3 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 7 Jun 2024 07:57:09 -0700 Subject: [PATCH 01/59] -- si es tipoventa - uso material, que se mande el pedido sobre la cveventa de la OS --- Ventas/Ventas.aspx.vb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index ecce18717..caac8f105 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -38010,13 +38010,15 @@ Partial Class Ventas If ObjOrdenServicio.GetTipoOrdenesServicios(UsuarioActual.CveEmpresa) Then CveOSTipo = ObjOrdenServicio.DtResultados.FiltroPrimeroValor("CveOrdenServicioTipo", " Estatus = 'Activo' ").ToEntero End If + Dim CveVentaAdicional As Integer = -1 + If RBLTipoVenta.SelectedValue.Contiene("5", "6") Then + CveVentaAdicional = CveVentaOS + End If Dim EstatusOrdenServicio As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 1").ToEntero - - If ObjOrdenServicio.AddOrdenesServicios(CveClienteOS, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.Nombre, TxtFechaOS.Text.Replace(",", "").ToDateTime, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", UsuarioActual.CveUsuario, EstatusOrdenServicio, - UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVentaOS, -1, -1, CveOSTipo, CveClienteSucursal:=CveClienteSucursalOS, + UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVentaOS, CveVentaAdicional, -1, CveOSTipo, CveClienteSucursal:=CveClienteSucursalOS, Direccion:="", Telefono:="", CveModeloAuto:=-1, Año:="", CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFechaOS.Text.Replace(",", "").ToDateTime, Paciente:=TxtPaciente.Text, IdentificadorCliente:=TxtEpisodio.Text) Then From aa981bbc380d144206e6b0828820101089cf02d9 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 7 Jun 2024 08:10:50 -0700 Subject: [PATCH 02/59] -- cambio en textos, de lista de pago --- Nomina/Nomina.aspx | 2 +- Nomina/Nomina.aspx.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Nomina/Nomina.aspx b/Nomina/Nomina.aspx index 2ffbc6633..8948b426f 100644 --- a/Nomina/Nomina.aspx +++ b/Nomina/Nomina.aspx @@ -4975,7 +4975,7 @@ - + diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 190682ca2..babc4f621 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -9934,11 +9934,11 @@ public partial class Nomina_Nomina2 : ClsPaginas var libro = wb.AddWorksheet("Layout"); int row = 1; int column = 1; - libro.Cell(row, column++).Value = "Codigo"; + libro.Cell(row, column++).Value = "Código"; libro.Cell(row, column++).Value = "Nombre"; libro.Cell(row, column++).Value = "Banco"; libro.Cell(row, column++).Value = "Cuenta"; - libro.Cell(row, column++).Value = "Clabe"; + libro.Cell(row, column++).Value = "CLABE"; libro.Cell(row, column++).Value = "Neto"; int maxxolumn = column; libro.Range(1, 1, row, column - 1).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; @@ -9977,7 +9977,7 @@ public partial class Nomina_Nomina2 : ClsPaginas Response.Buffer = true; Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; - Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "Layout")); + Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "ListadePago")); Response.BinaryWrite(memoryStream.ToArray()); Response.End(); From 078b2e246e17fb0ca923242d0a8432859b781243 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 7 Jun 2024 16:55:50 -0700 Subject: [PATCH 03/59] -- mejora en tipodocto --- Ventas/RepVentas.aspx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Ventas/RepVentas.aspx b/Ventas/RepVentas.aspx index 5b1465d50..148775ebf 100644 --- a/Ventas/RepVentas.aspx +++ b/Ventas/RepVentas.aspx @@ -134,9 +134,8 @@ - - - + + <%-- From 9d7302846ea67a28b99016b6006b5991b67ae981 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 7 Jun 2024 22:16:53 -0700 Subject: [PATCH 04/59] Ayven - Formato OC, tomando como base el de E72 --- App_Code/ClsMovimientos.vb | 1 + App_Code/ClsOC.vb | 8 +- App_Code/ClsPaginas.vb | 65 ++++- Bancos/PopIEVentas.aspx | 17 +- Bancos/PopIEVentas.aspx.vb | 2 +- Compras/Proveedores.aspx | 10 +- Compras/Proveedores.aspx.vb | 46 +++- Compras/RepCxPDetalle.aspx | 19 +- General/SaldosMenores.aspx | 82 +++--- General/SaldosMenores.aspx.vb | 363 ++++++++++---------------- OC/OC.aspx | 6 +- OC/OC.aspx.vb | 57 +++- Ventas/ClientesAbonar.aspx | 2 +- Ventas/ClientesAbonar.aspx.vb | 2 +- Ventas/RepRecuperacionDetalle.aspx | 134 +++++++++- Ventas/RepRecuperacionDetalle.aspx.vb | 353 ++++++++++++++++++++++++- 16 files changed, 852 insertions(+), 315 deletions(-) diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index 4fe89fa64..dced0eeca 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -1539,6 +1539,7 @@ Public Class ClsMovimientos Optional CveCondicionesPago As Integer = -1, Optional CveTipoTransaccion As Integer = -1, Optional CveMoneda As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_RepRecuperacion") + SqlAdapter.SelectCommand.CommandTimeout = 0 With SqlAdapter.SelectCommand.Parameters .Add("@CveResponsable", SqlDbType.Int).Value = CveResponsable .Add("@FechaI", SqlDbType.Date).Value = FechaI diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb index 2be37d84d..aca7aa3b2 100644 --- a/App_Code/ClsOC.vb +++ b/App_Code/ClsOC.vb @@ -708,7 +708,7 @@ Public Class ClsOC Optional PorcentajeIVA As Decimal = 0.16D, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional FechaExpiracion As Date = Nothing, Optional CveCotizacion As Integer = -1, Optional FolioAdicional As String = "", Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1, Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Decimal = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1, Optional NumRemision As String = "-1", - Optional CveColectiva As Integer = -1, Optional MetodoPago As Integer = -1) As Boolean + Optional CveColectiva As Integer = -1, Optional MetodoPago As Integer = -1, Optional CveSubProyectoEntrega As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraAdd") @@ -754,6 +754,7 @@ Public Class ClsOC .Add("@NumRemision", SqlDbType.VarChar).Value = NumRemision .Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva .Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago ' 0 Contado, 1 Credito + .Add("@CveSubProyectoEntrega", SqlDbType.Int).Value = CveSubProyectoEntrega ' 0 Contado, 1 Credito .Add("@vCveOrdenCompra", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output @@ -917,7 +918,8 @@ Public Class ClsOC pCveProveedor As Integer, pCveOrdenCompra As Integer, pCveUsuarioModifico As Integer, Optional CveCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PrioridadObservacion As String = "", Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional IDPoliza As Integer = -1, Optional FechaExpiracion As Date = Nothing, Optional FolioAdicional As String = "", Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", - Optional pCveProveedorSucursal As Integer = -1, Optional CveProveedorContacto As Integer = -1, Optional PorcentajeIVA As Decimal = 0.16D, Optional NumRemision As String = "-1", Optional MetodoPago As Integer = -1) As Boolean + Optional pCveProveedorSucursal As Integer = -1, Optional CveProveedorContacto As Integer = -1, Optional PorcentajeIVA As Decimal = 0.16D, Optional NumRemision As String = "-1", Optional MetodoPago As Integer = -1, + Optional CveSubProyectoEntrega As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraUpdate") @@ -953,6 +955,8 @@ Public Class ClsOC .Add("@PorcentajeIVA", SqlDbType.SmallMoney).Value = PorcentajeIVA .Add("@NumRemision", SqlDbType.VarChar).Value = NumRemision .Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago ' 0 Contado, 1 Credito + .Add("@CveSubProyectoEntrega", SqlDbType.Int).Value = CveSubProyectoEntrega + End With Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index bf49e1ed5..3e4864e59 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -7632,8 +7632,67 @@ Public Class ClsPaginas DtDetalle = ObjOC.DtResultados End If - 'Obtenemos la sucursal de la OC PARA COMPU PROVEEDORES Dim DomicilioSucursal As String = "" + + + If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.CveEmpresa = 197 Then + + Dim SBDomicilioSucursal As New StringBuilder() + Dim CiudadSucursal As String = "" + Dim ObjClientes As New ClsClientes + + params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) + params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) + + If ObjOC.GetSucursalOC(ObjOC.CveOrdenCompra) AndAlso ObjOC.DtResultados.Rows.Count > 0 Then + + params.Add(New ReportParameter("Proyecto", ObjOC.SucSubProyecto.ToString)) + params.Add(New ReportParameter("Telefono", ObjOC.SucTelefono.ToString)) + + CiudadSucursal = String.Format("{0},{1}", ObjOC.SucMunicipio, ObjOC.SucEstado) + + SBDomicilioSucursal.AppendFormat("{0}", ObjOC.SucCalle) + If ObjOC.SucNoExt.Length > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", ObjOC.SucNoExt) + If ObjOC.SucNoInt.Length > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", ObjOC.SucNoInt) + If ObjOC.SucColonia.Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", ObjOC.SucColonia) + If ObjOC.SucCP.Length > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", ObjOC.SucCP) + If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal) + If ObjOC.SucPais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", ObjOC.SucPais) + + DomicilioSucursal = SBDomicilioSucursal.ToString + + + Dim DirecconSubProyectoEntrega As String = "" + Dim CveSubProyectoEntrega As Integer = dtOC(0)("CveSubProyectoEntrega").ToString.ToEntero + + If CveSubProyectoEntrega > 0 Then + + Dim DTSubProyectoEntrega As DataTable = GlobalDTSubProyectos(-1, CveSubProyectoEntrega) + + params.Add(New ReportParameter("SubProyectoEntrega", DTSubProyectoEntrega(0)("SubProyecto").ToString)) + + Dim SubProyectoEntregaDir As String = $"Calle {DTSubProyectoEntrega(0)("Calle").ToString}" + SubProyectoEntregaDir = $"{SubProyectoEntregaDir} No. {DTSubProyectoEntrega(0)("NoExt").ToString()}" + + If DTSubProyectoEntrega(0)("NoInt").ToString().Trim.Length > 0 Then + SubProyectoEntregaDir = $"{SubProyectoEntregaDir} No. int.{DTSubProyectoEntrega(0)("NoInt").ToString()}" + End If + + SubProyectoEntregaDir = $"{SubProyectoEntregaDir}{vbCrLf}" + + SubProyectoEntregaDir = $"{SubProyectoEntregaDir}{DTSubProyectoEntrega(0)("Colonia").ToString()} C.P. {DTSubProyectoEntrega(0)("CP").ToString()}{vbCrLf}" + SubProyectoEntregaDir = $"{SubProyectoEntregaDir}{DTSubProyectoEntrega(0)("Municipio").ToString()},{DTSubProyectoEntrega(0)("Estado").ToString()}{vbCrLf}Tel. { DTSubProyectoEntrega(0)("Telefono").ToString()}" + + params.Add(New ReportParameter("SubProyectoEntregaDir", SubProyectoEntregaDir)) + + End If + + End If + End If + + + + Dim CveUsuarioSol As Integer = dtOC(0)("CveUsuarioSolicito").ToString.ToEntero Dim CveUsuarioAut As Integer = dtOC(0)("CveUsuarioAutorizo").ToString.ToEntero Dim drSol As DataRow = GlobalDTUsuarios(CveUsuarioSol, EmpresaActual.CveEmpresa).FiltroPrimero("") 'DataRow (incluye el NOMBRE de quien SOLICITÓ la OC) @@ -7710,7 +7769,7 @@ Public Class ClsPaginas params.Add(New ReportParameter("TipoOC", If(ObjOC.Tipo = "OC", "Orden de Compra", "Requisición"))) params.Add(New ReportParameter("UsoCFDI", ObjOC.UsoCFDI)) - If UsuarioActual.CveEmpresa.Contiene(72, 80, 172) Then + If UsuarioActual.CveEmpresa.Contiene(72, 80, 172) Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.CveEmpresa = 197) Then params.Add(New ReportParameter("FolioAdicional", dtOC(0)("FolioAdicional").ToString)) params.Add(New ReportParameter("Vendedor", dtOC(0)("Vendedor").ToString)) params.Add(New ReportParameter("Observacion", dtOC(0)("PrioridadObservacion").ToString)) @@ -7723,6 +7782,7 @@ Public Class ClsPaginas params.Add(New ReportParameter("ProveedorContacto", ObjOC.ProveedorContacto)) params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado)) End If + If UsuarioActual.CveEmpresa.Contiene(13, 83) Then 'Dim ObjCuentasBancos As New ClsGenerales() 'If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=ObjOC.CveProveedor) Then @@ -7737,6 +7797,7 @@ Public Class ClsPaginas 'End If 'ObjCuentasBancos.Dispose() End If + 'params.Add(New ReportParameter("FechaOC", ObjOC.Fecha.ToShortDateString)) Dim RutaFisicaSol As String = String.Format("Empresas\{0}\Firmas\{1}.png", EmpresaActual.CveEmpresa, CveUsuarioSol) Dim RutaVirtuaSol As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(RutaFisicaSol)) diff --git a/Bancos/PopIEVentas.aspx b/Bancos/PopIEVentas.aspx index 7326ad20b..4f1afc7d8 100644 --- a/Bancos/PopIEVentas.aspx +++ b/Bancos/PopIEVentas.aspx @@ -7,10 +7,21 @@ .row { margin: 0 -10px; } - .calendar-extender-popup { + /*.calendar-extender-popup { position: absolute; - z-index: 10000; /* Asegura que se muestre sobre otros elementos */ + z-index: 10000;*/ /* Asegura que se muestre sobre otros elementos */ + /*}*/ + + #C_CETxtFechaEmision_popupDiv{ + z-index: 10000; /* Asegura que el calendario se muestre sobre otros elementos */ + margin-top:-160px!important; + position: absolute; /* Asegura que el calendario no desplace otros elementos */ } + #C_Calendario_popupDiv{ + z-index: 10000; /* Asegura que el calendario se muestre sobre otros elementos */ + margin-left:-50px!important; + position: absolute; /* Asegura que el calendario no desplace otros elementos */ + } @@ -559,7 +570,7 @@ - + diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index f8f7db127..9b3840b07 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -1112,7 +1112,7 @@ Partial Class Bancos_PopIEVentas Dim FechaEmision As Date = MinFecha - If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then + If ChkComplementoPago.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" Then FechaEmision = TxtFechaEmision.Text.ToDate If FechaEmision <= MinFecha Then diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx index 60c46cc56..f1f241e4d 100644 --- a/Compras/Proveedores.aspx +++ b/Compras/Proveedores.aspx @@ -2053,7 +2053,7 @@ + DataKeyNames="CveDocumentacion,Documentacion,Orden,CveDocumentacionElectronica,Adjunto,Estatus,Observacion,Fecha,FechaIng,Usuario,FechaLimite,FechaVigencia,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento"> @@ -2093,11 +2093,17 @@ CssClass="btn btn-circle btn-sm green" Text="" /> - + + + + + + 0 Then - ImgDownLoad.Text = String.Format(" ", linkDescarga, CveDocumentacionElectronica & "." & extencion) - Else - ImgDownLoad.Text = String.Format(" ", linkDescarga, CveDocumentacionElectronica) - End If + 'ImgDownLoad.Visible = True + + LnkDownLoadDoc.Visible = True + ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkDownLoadDoc) + + 'If extencion.Length > 0 Then + ' ImgDownLoad.Text = String.Format(" ", linkDescarga, CveDocumentacionElectronica & "." & extencion) + 'Else + ' ImgDownLoad.Text = String.Format(" ", linkDescarga, CveDocumentacionElectronica) + 'End If + + Else - ImgDownLoad.Visible = False + 'ImgDownLoad.Visible = False End If Else - ImgDownLoad.Visible = False + 'ImgDownLoad.Visible = False End If If requerido Then @@ -5835,6 +5843,28 @@ Partial Class Compras_Proveedores End Sub #End Region + + Protected Sub LnkDownLoadDoc_Click(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + Dim Adjunto As String = GvRow.DataKey("Adjunto") + + + Dim stringDescargaDocumento As String = UsuarioActual.Empresa.Ruta & String.Format("Edoc\\Proveedor\{0}\{1}", CveProveedor, Adjunto) + + + Dim File As New FileInfo(stringDescargaDocumento) + + If File.Exists Then + Response.Clear() + Response.AddHeader("Content-Disposition", "attachment; filename=" + File.Name) + Response.AddHeader("Content-Length", File.Length.ToString()) + Response.ContentType = "text/octet-stream" + Response.Flush() + Response.TransmitFile(File.FullName) + Response.End() + End If + + End Sub End Class diff --git a/Compras/RepCxPDetalle.aspx b/Compras/RepCxPDetalle.aspx index a7d940773..2a8531839 100644 --- a/Compras/RepCxPDetalle.aspx +++ b/Compras/RepCxPDetalle.aspx @@ -552,22 +552,15 @@ - - - - - - + + + - - - - - - - + + + diff --git a/General/SaldosMenores.aspx b/General/SaldosMenores.aspx index c3a4abe04..29cf6026e 100644 --- a/General/SaldosMenores.aspx +++ b/General/SaldosMenores.aspx @@ -157,48 +157,42 @@ - - -
-
Fecha:
-
-
- - - - - - - - -
-
-
Centro Costo:
-
- - -
-
Concepto:
-
- - - -
- -
- -
- +
+
Fecha:
+
+
+ + + + + + + +
- - - - - +
+ +
Centro Costo:
+
+ + +
+ +
Concepto:
+
+ + + +
+ +
+ +
+ +
- @@ -206,7 +200,7 @@ - +
@@ -271,7 +265,8 @@ --%> +
diff --git a/General/SaldosMenores.aspx.vb b/General/SaldosMenores.aspx.vb index e7e0e5987..a28a3f8d2 100644 --- a/General/SaldosMenores.aspx.vb +++ b/General/SaldosMenores.aspx.vb @@ -9,7 +9,7 @@ Partial Public Class General_SaldosMenores Inherits ClsPaginas #Region "PROPIEDADES" - Private Property DtDatos As DataTable + Private Property DtDatosIXC As DataTable Get Return DirectCast(ViewState("DtDatos"), DataTable) End Get @@ -61,6 +61,114 @@ Partial Public Class General_SaldosMenores End If End Sub + Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click + + DvSaldar.Visible = False + + If Tabs.ActiveTab Is TabIXC Then + CargaDatosIXC() + If DtDatosIXC.Rows.Count > 0 Then + DvSaldar.Visible = True + End If + End If + + Upsaldar.Update() + + End Sub + + Protected Sub BtnSaldar_Click(sender As Object, e As EventArgs) + + + If Tabs.ActiveTab Is TabIXC Then + Dim ObjConta As New ClsContabilidad() + ObjConta.IniciaTransacSQL() + Dim CvePrePoliza As Integer = 0, CveVenta As Integer = -1, CveIE As Integer = -1 + Dim Saldo As Decimal = 0 + Dim SaldoAdmin As Decimal = 0 + Dim ImporteTotalGasto As Decimal = 0 + Dim MsgError As String = "" + + CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepNCXAplicar", 6, 0, 0, 1, TxtFecha.Text.ToDate(), TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 3) + Dim tMovto As Boolean = True + Dim tConceptoSaldar As Integer = 78 + + If CvePrePoliza > 0 Then + For Each Gv As GridViewRow In GvDatosIXC.Rows + Dim ConPreP As New ConceptosTipoSaldo() + + If Gv.FCCheckBox("Chk").Checked Then + + If Gv.DataKey("CveVenta").ToEntero > 0 Then + ConPreP = ClsPaginas.ObtenerCveConceptoPrePoliza(6, Gv.DataKey("CveMoneda").ToEntero(), False, 2) + ElseIf Gv.DataKey("CveIE").ToEntero > 0 Then + ConPreP.CveConcepto = 3 + End If + + 'If Tipo = 1 OrElse Tipo = 2 Then + If Gv.DataKey("CveVenta").ToEntero() > 0 Then + CveVenta = Gv.DataKey("CveVenta").ToEntero() + Saldo = -Gv.DataKey("Saldo").ToDecimal() + SaldoAdmin = Saldo + + ElseIf Gv.DataKey("CveIE").ToEntero() > 0 Then + 'ElseIf Tipo = 3 Then + ConPreP = ClsPaginas.ObtenerCveConceptoPrePoliza(18, Gv.DataKey("CveMoneda").ToEntero(), True, 2) + CveIE = Gv.DataKey("CveIE").ToEntero() + Saldo = Gv.DataKey("Saldo").ToDecimal() + SaldoAdmin = Saldo + End If + + Saldo = -Saldo ' invertimos el saldo para que se haga negativo para que sea Abono + + ImporteTotalGasto += Saldo + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tMovto, SaldoAdmin, Saldo, ConPreP.CveConcepto, Gv.DataKey("SerieFolio").ToString(), TxtConcepto.Text, CveIE, CveVenta, CveCliente:=Gv.DataKey("CveCliente").ToEntero()) Then + MsgError = "Ocurrio un error al saldar el movimiento" + Exit For + End If + + If Gv.DataKey("CveMoneda").ToEntero() > 1 Then + Dim ImporteMN As Decimal = (Saldo * Gv.DataKey("TipoCambio").ToDecimal() - Saldo).RoundSQL() + ImporteTotalGasto += ImporteMN + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tMovto, Saldo, ImporteMN, ConPreP.CveConceptoComplementario, Gv.DataKey("SerieFolio").ToString(), TxtConcepto.Text, CveIE, CveVenta, CveCliente:=Gv.DataKey("CveCliente").ToEntero(), ImporteME:=Saldo, TipoCambio:=Gv.DataKey("TipoCambio").ToDecimal()) Then + MsgError = "Ocurrio un error al saldar el movimiento" + Exit For + End If + End If + End If + Next + + If ImporteTotalGasto <> 0 Then + ImporteTotalGasto *= -1 ' se invierte el valor, para cuadre de prepoliza + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tMovto, ImporteTotalGasto, ImporteTotalGasto, tConceptoSaldar, "", TxtConcepto.Text, CveIE, CveVenta, CveSubProyecto:=DdlSubProyectoSaldar.SelectedValue.ToEntero()) Then + MsgError = "Ocurrio un error al saldar el movimiento" + End If + Else + MsgError = "Poliza no insertada" + End If + End If + + If MsgError = "" Then + ObjConta.Commit() + Dim Msg As String = "Los movimientos se saldaron correctamente." + Msg &= $"

Ver Póliza   " + Alert(Msg) + Else + ObjConta.RollBack() + Alert(MsgError, ModExtensiones.TipoMensaje.MsgError) + End If + + CargaDatosIXC() + ObjConta.Dispose() + End If + + + TxtFecha.Text = DateTime.Today.ToString() + Upsaldar.Update() + End Sub + #Region "I X C" @@ -82,55 +190,45 @@ Partial Public Class General_SaldosMenores txtFechaF.Text = If(Request("FechaF") Is Nothing, NowADS().ToString(), Request("FechaF").ToString()) TipoCambio = If(Request("TipoCambio") Is Nothing, 1, Request("TipoCambio").ToString().ToEntero()) TCEspecifico = If(Request("TCEspecifico") Is Nothing, -1, Request("TCEspecifico").ToString().ToDouble()) - RblTipoCambio.SelectedValue = TipoCambio.ToString() - LiEspecifico.InnerText = TCEspecifico.FormatoNumero() + 'RblTipoCambio.SelectedValue = TipoCambio.ToString() + 'LiEspecifico.InnerText = TCEspecifico.FormatoNumero() Dim FechaICorte As DateTime FechaICorte = If(Request("FechaICorte") Is Nothing, DateTime.MinValue, Request("FechaICorte").ToString().ToDate()) - CargaDatos() + + Tipo = -1 + + End Sub Protected Sub CargaSucursales() - 'DdlSucursal.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa) - 'DdlSucursal.DataBind() - 'DdlSucursal.Items.Insert(0, New ListItem("Todos", "-1")) - 'DdlSucursal.SelectedValue = "-1" + DdlSubProyectoSaldar.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa) DdlSubProyectoSaldar.DataBind() End Sub - 'Protected Sub CargaVendedores() - ' DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa) - ' DdlVendedor.DataBind() - ' DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1")) - 'End Sub - Protected Sub CargaDatos() - If TipoCambio = 3 AndAlso TxtEspecifico.Text <> "" Then - TCEspecifico = TxtEspecifico.Text.ToDouble() - Else - TCEspecifico = -1 - End If - If TipoCambio <> 1 Then - CveMoneda = -1 - End If + Protected Sub CargaDatosIXC() + + + + + 'If TipoCambio = 3 AndAlso TxtEspecifico.Text <> "" Then + ' TCEspecifico = TxtEspecifico.Text.ToDouble() + 'Else + ' TCEspecifico = -1 + 'End If + + 'If TipoCambio <> 1 Then + ' CveMoneda = -1 + 'End If Dim FechaICorte As DateTime = MinFecha - 'If TxtFechaICorte.Text <> "" Then - ' FechaICorte = TxtFechaICorte.Text.ToDate() - 'Else - ' FechaICorte = DateTime.MinValue - 'End If - Dim FechaFCorte As DateTime = MaxFecha - 'If TxtFechaFCorte.Text <> "" Then - ' FechaFCorte = TxtFechaFCorte.Text.ToDate() - 'Else - ' FechaFCorte = DateTime.MaxValue - 'End If + Dim ObjVenta As New ClsVentas() Dim CveCliente As Integer = -1 @@ -140,30 +238,18 @@ Partial Public Class General_SaldosMenores If ObjVenta.GetRepAnticiposNCIXCDetalle(CveCliente, -1, txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa, 1, -1, CveMoneda, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico, SaldoMayorA:=TxtSaldoMayorA.Text.ToDecimal, SaldoMenorA:=TxtSaldoMenorA.Text.ToDecimal) Then GvDatosIXC.DataSource = ObjVenta.DtResultados - DtDatos = ObjVenta.DtResultados + DtDatosIXC = ObjVenta.DtResultados End If ObjVenta.Dispose() GvDatosIXC.DataBind() UpDatos.Update() - 'If TxtFechaFCorte.Text <> NowADS().ToShortDateString() AndAlso txtFechaI.Text <> "" Then - ' LnkHabilitarSaldar.Visible = False - ' LnkSaldar.Visible = False - 'Else - 'LnkHabilitarSaldar.Visible = True - ''End If - 'If LnkSaldar.Visible Then - ' HabilitarCheckbox() - 'End If - Tipo = -1 End Sub - Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click - CargaDatos() - End Sub + Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click 'GenerarPDF("EXCEL") @@ -173,80 +259,7 @@ Partial Public Class General_SaldosMenores 'GenerarPDF("PDF") End Sub - 'Protected Sub GenerarPDF(Opcion As String) - ' Dim FechaI As String - ' If txtFechaI.Text = "" OrElse txtFechaI.Text = "__/__/____" Then - ' FechaI = "-1" - ' Else - ' FechaI = $" Fecha Inicial: {txtFechaI.Text}" - ' End If - ' Dim FechaF As String - ' If txtFechaF.Text = "" OrElse txtFechaF.Text = "__/__/____" Then - ' FechaF = "-1" - ' Else - ' FechaF = $" Fecha Final: {txtFechaF.Text}" - ' End If - - ' Dim FechaICorte As String - ' If TxtFechaICorte.Text = "" OrElse TxtFechaICorte.Text = "__/__/____" Then - ' FechaICorte = "" - ' Else - ' FechaICorte = $" Fecha Inicial Corte: {TxtFechaICorte.Text}" - ' End If - - ' Dim FechaFCorte As String - ' If TxtFechaFCorte.Text = "" OrElse TxtFechaFCorte.Text = "__/__/____" Then - ' FechaFCorte = "" - ' Else - ' FechaFCorte = $" Fecha Final Corte: {TxtFechaFCorte.Text}" - ' End If - - ' Dim Sucursal As String - ' If DdlSucursal.SelectedValue <> "-1" Then - ' Sucursal = $" Sucursal: {DdlSucursal.SelectedItem.Text}" - ' Else - ' Sucursal = "" - ' End If - - ' Dim Cliente As String = "" - - ' Dim ConSaldo As String - ' If DdlConSaldo.SelectedValue <> "-1" Then - ' ConSaldo = $" Con Saldo: {DdlConSaldo.SelectedItem.Text}" - ' Else - ' ConSaldo = "" - ' End If - - ' Dim Tipo2 As String - ' If DdlTipo.SelectedValue <> "-1" Then - ' Tipo2 = $" Tipo: {DdlTipo.SelectedItem.Text}" - ' Else - ' Tipo2 = "" - ' End If - - ' If DtDatos.Rows.Count > 0 Then - ' Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - ' 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 New List(Of ReportParameter) From { - ' New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa), - ' New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre), - ' New ReportParameter("FechaImpresion", NowADS().ToString()), - ' New ReportParameter("Tipo", Tipo.ToString()), - ' New ReportParameter("AgrupadoPor", $"Agrupado Por: {Cliente}{Sucursal}{ConSaldo}{Tipo2}{FechaI}{FechaF}{FechaICorte}{FechaFCorte}") - ' } - - ' If Imagen.Exists Then - ' para.Add(New ReportParameter("LogoPath", logouri)) - ' Else - ' para.Add(New ReportParameter("LogoPath", "")) - ' End If - - ' ImprimirPDF("Empresas/Grales/Formatos/RepAnt-NC-IXCDetalle.rdlc", DtDatos, para, "Reporte de Anticipos - NCXAplicar - IXC Detalle", Opcion) - ' Else - ' Alert("No hay datos consultados", ModExtensiones.TipoMensaje.MsgAdvertencia) - ' End If - 'End Sub Protected Sub GvDatosIXC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosIXC.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -338,120 +351,10 @@ Partial Public Class General_SaldosMenores RegistraScript("$('#DivModalSaldar').modal();") End Sub - Protected Sub BtnSaldar_Click(sender As Object, e As EventArgs) Handles BtnSaldar.Click - Dim ObjConta As New ClsContabilidad() - ObjConta.IniciaTransacSQL() - Dim CvePrePoliza As Integer = 0, CveVenta As Integer = -1, CveIE As Integer = -1 - Dim Saldo As Decimal = 0 - Dim SaldoAdmin As Decimal = 0 - Dim ImporteTotalGasto As Decimal = 0 - Dim MsgError As String = "" - - CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepNCXAplicar", 6, 0, 0, 1, TxtFecha.Text.ToDate(), TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 3) - Dim tMovto As Boolean = True - Dim tConceptoSaldar As Integer = 78 - - If CvePrePoliza > 0 Then - For Each Gv As GridViewRow In GvDatosIXC.Rows - Dim ConPreP As New ConceptosTipoSaldo() - - If Gv.FCCheckBox("Chk").Checked Then - If Tipo = 2 Then - ConPreP = ClsPaginas.ObtenerCveConceptoPrePoliza(6, Gv.DataKey("CveMoneda").ToEntero(), False, 2) - ElseIf Tipo = 1 Then - ConPreP.CveConcepto = 3 - End If - - 'If Tipo = 1 OrElse Tipo = 2 Then - If Gv.DataKey("CveVenta").ToEntero() > 0 Then - CveVenta = Gv.DataKey("CveVenta").ToEntero() - Saldo = -Gv.DataKey("Saldo").ToDecimal() - SaldoAdmin = Saldo - - ElseIf Gv.DataKey("CveIE").ToEntero() > 0 Then - 'ElseIf Tipo = 3 Then - ConPreP = ClsPaginas.ObtenerCveConceptoPrePoliza(18, Gv.DataKey("CveMoneda").ToEntero(), True, 2) - CveIE = Gv.DataKey("CveIE").ToEntero() - Saldo = Gv.DataKey("Saldo").ToDecimal() - SaldoAdmin = Saldo - End If - - Saldo = -Saldo ' invertimos el saldo para que se haga negativo para que sea Abono - - ImporteTotalGasto += Saldo - - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tMovto, SaldoAdmin, Saldo, ConPreP.CveConcepto, Gv.DataKey("SerieFolio").ToString(), TxtConcepto.Text, CveIE, CveVenta, CveCliente:=Gv.DataKey("CveCliente").ToEntero()) Then - MsgError = "Ocurrio un error al saldar el movimiento" - Exit For - End If - - If Gv.DataKey("CveMoneda").ToEntero() > 1 Then - Dim ImporteMN As Decimal = (Saldo * Gv.DataKey("TipoCambio").ToDecimal() - Saldo).RoundSQL() - ImporteTotalGasto += ImporteMN - - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tMovto, Saldo, ImporteMN, ConPreP.CveConceptoComplementario, Gv.DataKey("SerieFolio").ToString(), TxtConcepto.Text, CveIE, CveVenta, CveCliente:=Gv.DataKey("CveCliente").ToEntero(), ImporteME:=Saldo, TipoCambio:=Gv.DataKey("TipoCambio").ToDecimal()) Then - MsgError = "Ocurrio un error al saldar el movimiento" - Exit For - End If - End If - End If - Next - - If ImporteTotalGasto <> 0 Then - ImporteTotalGasto *= -1 ' se invierte el valor, para cuadre de prepoliza - - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tMovto, ImporteTotalGasto, ImporteTotalGasto, tConceptoSaldar, "", TxtConcepto.Text, CveIE, CveVenta, CveSubProyecto:=DdlSubProyectoSaldar.SelectedValue.ToEntero()) Then - MsgError = "Ocurrio un error al saldar el movimiento" - End If - Else - MsgError = "Poliza no insertada" - End If - End If - - If MsgError = "" Then - ObjConta.Commit() - Dim Msg As String = "Los movimientos se saldaron correctamente." - Msg &= $"

Ver Póliza   " - Alert(Msg) - Else - ObjConta.RollBack() - Alert(MsgError, ModExtensiones.TipoMensaje.MsgError) - End If - - 'LnkSaldar.Visible = False - 'LnkHabilitarSaldar.Visible = True - CargaDatos() - 'UpLnkAgregar.Update() - ObjConta.Dispose() - 'RegistraScript("$('#DivModalSaldar').modal('hide');") - TxtFecha.Text = DateTime.Today.ToString() - Upsaldar.Update() - End Sub #End Region -#Region "TIPO DE CAMBIO" - Protected Sub BtnTipoCambio_Click(sender As Object, e As EventArgs) Handles BtnTipoCambio.Click - CargaDatos() - RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio")) - End Sub - - Protected Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged - TipoCambio = RblTipoCambio.SelectedValue.ToEntero() - - If TipoCambio = 3 Then - LiEspecifico.Visible = True - TCEspecifico = GlobalTipoCambio(NowADS()).ToString().ToDouble() - TxtEspecifico.Text = TCEspecifico.ToString() - Else - LiEspecifico.Visible = False - End If - - UpBodyTipoCambio.Update() - End Sub - -#End Region #End Region diff --git a/OC/OC.aspx b/OC/OC.aspx index a91d86f88..ad7107f52 100644 --- a/OC/OC.aspx +++ b/OC/OC.aspx @@ -272,7 +272,11 @@
- + + + + +
diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index ae9fcf415..ab662b500 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -629,6 +629,8 @@ Partial Class OC_OC TxtFecha.Enabled = False End If + CargarCentrosDeCosto(Nothing, DdlSubProyectoEntrega, Nothing, Nothing, "Seleccione") + 'CARGA YA REGISTRADO If Request("OC") IsNot Nothing AndAlso IsNumeric(Request("OC")) AndAlso Request("OC").ToEntero > 0 Then @@ -831,14 +833,21 @@ Partial Class OC_OC ' aqui tiene otras condiciones especiales If CveOrdenCompra <> Nothing AndAlso CveOrdenCompra > 0 Then DdlSubProyecto.DataSource = DtEstatusUsuarios.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) + 'DdlSubProyectoEntrega.DataSource = DtEstatusUsuarios.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) Else DdlSubProyecto.DataSource = DtEstatusUsuarios.FiltraParametros(" SPEstatus = 1 ", "", {"CveSubProyecto", "SubProyecto"}) + 'DdlSubProyectoEntrega.DataSource = DtEstatusUsuarios.FiltraParametros(" SPEstatus = 1 ", "", {"CveSubProyecto", "SubProyecto"}) End If + DdlSubProyecto.DataBind() DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + + 'DdlSubProyectoEntrega.DataBind() + 'DdlSubProyectoEntrega.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlSubProyectoContrato.Items.Clear() DdlSubProyectoContrato.DataSource = DtEstatusUsuarios.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) 'If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, CveEmpresaActual, -1, 1), GlobalDTSubProyectos(-1, -1, CveEmpresaActual, 1)) ' DtEstatusUsuarios.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) DdlSubProyectoContrato.DataBind() @@ -933,6 +942,11 @@ Partial Class OC_OC ' End If 'End If + + If UsuarioActual.CveRol = 1 Then + chkSubProyectoEntrega.Visible = True + End If + End If MostrarUsuarioAsignado() @@ -1359,6 +1373,19 @@ Partial Class OC_OC TieneInventario = CBool(objOC.DtResultados.Rows(0)("TieneInvOC")) DdlMetodoPago.SelectedValueExist(objOC.DtResultados.Rows(0)("MetodoPago")) + + If objOC.DtResultados.Rows(0)("CveSubProyectoEntrega").ToString.ToEntero > 0 Then + DdlSubProyectoEntrega.SelectedValueExist(objOC.DtResultados.Rows(0)("CveSubProyectoEntrega").ToString) + txtLugarEntrega.Visible = False + chkSubProyectoEntrega.Checked = True + DdlSubProyectoEntrega.Visible = True + + End If + + + + + 'PROMOCIONES TxtPromocion.Text = objOC.Promocion ChkPromocion.Checked = TxtPromocion.Text.Trim.Length > 0 @@ -1593,6 +1620,9 @@ Partial Class OC_OC EditarOC = False End Select + + + End If 'If objOC.TipoTermino = 2 Then @@ -2608,6 +2638,11 @@ Partial Class OC_OC TieneError = True End If + If chkSubProyectoEntrega.Checked AndAlso DdlSubProyectoEntrega.SelectedValue.ToEntero <= 0 Then + Alert("Debe seleccionar un lugar de entrega", TipoMensaje.MsgAdvertencia) + TieneError = True + End If + Return TieneError End Function @@ -2697,7 +2732,8 @@ Partial Class OC_OC LugarEntrega, UsuarioActual.CveUsuario, CveEmpresaActual, GvD.Rows(0).FCHiddenField("HdnCvePresupuestoEgreso").Value.ToString.ToEntero, pCveProveedor:=CveProveedor, pCveProveedorSucursal:=CveProveedorSucursal, RequiereCotizacion:=ChkCotizacion.Checked, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim, - IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto, NumRemision:=TxtNumRemision.Text.Trim(), MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero()) Then + IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto, NumRemision:=TxtNumRemision.Text.Trim(), MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(), + CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero) Then CveOrdenCompraPadre = OC.CveOrdenCompra If CveOrdenCompraPadre > 0 Then @@ -2738,7 +2774,7 @@ Partial Class OC_OC RequiereCotizacion:=ChkCotizacion.Checked, CveUsuarioAsignado:=DdlUsuariosAsignado.SelectedValue.ToEntero, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, - Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto, NumRemision:=TxtNumRemision.Text, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero()) Then + Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto, NumRemision:=TxtNumRemision.Text, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(), CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero) Then CveOrdenCompra = OC.CveOrdenCompra CveEstatus = CboE.SelectedValue.ToEntero @@ -2925,7 +2961,7 @@ Partial Class OC_OC LugarEntrega, DdlMoneda.SelectedValue.ToEntero, CveProveedor, CveOrdenCompra, UsuarioActual.CveUsuario, Ddlcliente.txtValue.Value.ToEntero, DdlVendedor.SelectedValue.ToEntero, txtobsprioridad.Text, IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveProveedorContacto:=CveProveedorContacto, - PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), NumRemision:=TxtNumRemision.Text, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero()) Then + PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), NumRemision:=TxtNumRemision.Text, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(), CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero) Then If CveProveedorOriginal <> CveProveedor Then If Not ObjConta.UpdateProveedorPoliza(CveOrdenCompra, CveProveedor, Proveedor) Then TieneError = True @@ -3395,8 +3431,9 @@ Partial Class OC_OC If (Not HuboError) AndAlso objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega, CveUsuario, CveEmpresaActual, 0, pCveProveedor:=CveProveedor, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, PorcentajeIVA:=PorIVA, IVA:=IVACot, RetIVA:=RetIVA.ToString.ToDecimal, RetISR:=RetISR.ToString.ToDecimal, IDPoliza:=IdPoliza, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, - EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, - CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, Promocion:=Promocion, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, NumRemision:=TxtNumRemision.Text.Trim, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero()) Then + EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, + CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, Promocion:=Promocion, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, NumRemision:=TxtNumRemision.Text.Trim, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(), + CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero) Then 'CREA POLIZA POR CADA PROVEEDOR @@ -3472,7 +3509,7 @@ Partial Class OC_OC CveUsuario, CveEmpresaActual, 0, pCveProveedor:=DdlProveedores.SelectedValue.ToEntero, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveUsuarioAsignado:=DdlUsuariosAsignado.SelectedValue.ToEntero(), CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, IDPoliza:=IDPolizaPresupuestal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, - Promocion:=Promocion, NumRemision:=TxtNumRemision.Text.Trim, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero()) Then + Promocion:=Promocion, NumRemision:=TxtNumRemision.Text.Trim, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(), CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero) Then 'USA AC @@ -9218,5 +9255,13 @@ Partial Class OC_OC + + Protected Sub chkSubProyectoEntrega_CheckedChanged(sender As Object, e As EventArgs) + + DdlSubProyectoEntrega.Visible = chkSubProyectoEntrega.Checked + txtLugarEntrega.Visible = Not chkSubProyectoEntrega.Checked + UPPEmp.Update() + + End Sub End Class diff --git a/Ventas/ClientesAbonar.aspx b/Ventas/ClientesAbonar.aspx index 1ac398413..349c86a99 100644 --- a/Ventas/ClientesAbonar.aspx +++ b/Ventas/ClientesAbonar.aspx @@ -346,7 +346,7 @@
Fecha Emisión: -
+
diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index a92c4e624..065f12ade 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -618,7 +618,7 @@ Partial Class Ventas_ClientesAbonar Dim FechaEmision As Date = MinFecha - If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then + If ChkComplementoPago.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" Then FechaEmision = TxtFechaEmision.Text.ToDate If FechaEmision <= MinFecha Then diff --git a/Ventas/RepRecuperacionDetalle.aspx b/Ventas/RepRecuperacionDetalle.aspx index 95a21f0dc..e4ee3e6ff 100644 --- a/Ventas/RepRecuperacionDetalle.aspx +++ b/Ventas/RepRecuperacionDetalle.aspx @@ -24,6 +24,16 @@
  • Ver Dlls en pesos
  • + + +
  • + Personalizar Columnas +
  • +
    +
    + + + @@ -210,7 +220,7 @@
    -
    +
    @@ -269,10 +279,13 @@
    + + + @@ -291,10 +304,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Contabilidad/CatCuentas.aspx.vb b/Contabilidad/CatCuentas.aspx.vb index 2fe4e638d..7d7b7887c 100644 --- a/Contabilidad/CatCuentas.aspx.vb +++ b/Contabilidad/CatCuentas.aspx.vb @@ -1,7 +1,8 @@ Imports System.Data Imports Extensiones Imports Microsoft.Reporting.WebForms -Partial Class Contabilidad_CatCuentas + +Partial Class Contabilidad2_CatCuentas Inherits ClsPaginas #Region "Propiedades" @@ -14,49 +15,127 @@ Partial Class Contabilidad_CatCuentas ViewState("DtDatos") = value End Set End Property + + Private Property DtConceptosconta As DataTable + Get + Return CType(ViewState("DtConceptosconta"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtConceptosconta") = value + End Set + End Property Private Property IDSelected As Integer Get - Return ViewState("idsel").ToString.ToEntero + Return ViewState("idsel").ToString.ToEntero() End Get Set(value As Integer) ViewState("idsel") = value End Set End Property + Private Property CvePadre As Integer + Get + Return ViewState("CvePadre").ToString.ToEntero() + End Get + Set(value As Integer) + ViewState("CvePadre") = value + End Set + End Property + + Private Property Afectable As Boolean + Get + Return CBool(ViewState("Afectable").ToString) + End Get + Set(value As Boolean) + ViewState("Afectable") = value + End Set + End Property +#Region "Contabilidadnew" + Private Property CveProveedor As Integer + Get + Return ViewState("CveProveedor").ToString.ToEntero() + End Get + Set(value As Integer) + ViewState("CveProveedor") = value + End Set + End Property + Private Property CveCliente As Integer + Get + Return ViewState("CveCliente").ToString.ToEntero() + End Get + Set(value As Integer) + ViewState("CveCliente") = value + End Set + End Property + Private Property CveClasificacion As Integer + Get + Return ViewState("CveClasificacion").ToString.ToEntero() + End Get + Set(value As Integer) + ViewState("CveClasificacion") = value + End Set + End Property + + Private Property CveBancoCuenta As Integer + Get + Return ViewState("CveBancoCuenta").ToString.ToEntero() + End Get + Set(value As Integer) + ViewState("CveBancoCuenta") = value + End Set + End Property + Private Property CveAlmacen As Integer + Get + Return ViewState("CveAlmacen").ToString.ToEntero() + End Get + Set(value As Integer) + ViewState("CveAlmacen") = value + End Set + End Property +#End Region #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - If UsuarioActual.Empresa.TipoContabilizacion = 1 Then - Response.Redirect("/Contabilidad2/CatCuentas.aspx") - Exit Sub - End If - - If UsuarioActual.Empresa.UsaContabilidad Then - CargaMonedas() - CargaAgrupadorSAT() - CargaDatos() - Else - Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia) - MEECuenta.Enabled = False - LnkPdf.Visible = False + DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + DdlAlmacen.DataBind() + DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1")) + CargaMonedas() + CargaAgrupadorSAT() + CargaDatos() + Using objconta As New ClsContabilidad + objconta.GetConta_ConceptosContables(1) + DtConceptosconta = objconta.DtResultados + End Using + Using ObjBancos As New ClsBancos + If ObjBancos.GetBancosCuentas(-1) Then + ddlBancos.DataSource = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) + ddlBancos.DataBind() + ddlBancos.Items.Insert(0, New ListItem("Seleccione", "-1")) End If + End Using - End If + + DdlConcepto.DataSource = DtConceptosconta + DdlConcepto.DataBind() + DdlConcepto.Items.Insert(0, New ListItem("Seleccione", "-1")) + 'Else + ' Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia) + ' MEECuenta.Enabled = False + 'End If + End If End Sub Private Sub CargaMonedas() - Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - If ObjConta.GetMonedas() Then - DdlMoneda.DataSource = ObjConta.DtResultados - End If - ObjConta.Dispose() + DdlMoneda.DataSource = GlobalDTMonedas DdlMoneda.DataBind() End Sub + Private Sub CargaAgrupadorSAT() - Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) + + Dim ObjConta As New ClsContabilidad If ObjConta.GetAgrupadoresSAT() Then DdlAgrupadorSAT.DataSource = ObjConta.DtResultados @@ -66,40 +145,49 @@ Partial Class Contabilidad_CatCuentas DdlAgrupadorSAT.DataBind() DdlAgrupadorSAT.Items.Insert(0, New ListItem("Seleccione", "-1")) End Sub - Private Sub CargaDatos() - Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - If ObjConta.GetCuentas(-1, "-1", -1) Then + Private Sub CargaDatos() + 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) + Dim ObjConta As New ClsContabilidad + If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then DtDatos = ObjConta.DtResultados End If - 'para obtener la mascara, tomo el primer dato y reemplazo los numeros por cero - Dim Mascara As String = "####-####-###" - If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 AndAlso DtDatos.FiltraParametros("CtaInicial>0").Rows.Count > 0 Then - Mascara = DtDatos.FiltraParametros("CtaInicial>0").Rows(0)("CuentaFormato").ToString.Replace("1", "0").Replace("2", "0").Replace("3", "0").Replace("4", "0").Replace("5", "0").Replace("6", "0").Replace("7", "0").Replace("8", "0").Replace("9", "0") - End If + ObjConta.Dispose() - MEECuenta.Mask = Mascara.Replace("0", "9") + 'para obtener la mascara, tomo el primer dato y reemplazo los numeros por cero + Dim Mascara As String = UsuarioActual.Empresa.ContaFormatoCuenta.Replace("X", "9") '"###-##-####" + 'If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then + ' Mascara = DtDatos.Rows(0)("Codigo").ToString.Replace("1", "0").Replace("2", "0").Replace("3", "0").Replace("4", "0").Replace("5", "0").Replace("6", "0").Replace("7", "0").Replace("8", "0").Replace("9", "0") + 'End If + + MEECuenta.Mask = Mascara '.Replace("0", "9") MEECuenta.AutoComplete = True MEECuenta.AutoCompleteValue = Mascara ArbolCuentas.DataSource = DtDatos ArbolCuentas.nivel = "CtaInicial" - ArbolCuentas.nodoid = "id" - ArbolCuentas.padre = "IdPadre" - ArbolCuentas.titulo = "CtaCodigo" - updatos.Update() - ObjConta.Dispose() + ArbolCuentas.nodoid = "CveCuenta" + ArbolCuentas.padre = "CvePadre" + ArbolCuentas.titulo = "CuentaFormatoNombre" + ArbolCuentas.DataBind() + + End Sub 'Private Function getNodosHijos(nodo As Integer) As DataTable ' Return DtDatos.FiltraParametros(String.Format("IdPadre = {0}", nodo)) 'End Function Private Function getNodospadreHijos(nodo As Integer) As DataTable - Return DtDatos.FiltraParametros(String.Format("Id = {0}", nodo)) + Return DtDatos.FiltraParametros(String.Format("CveCuenta = {0}", nodo)) End Function Protected Sub agregar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.addclick LimpiarCampos() + + Tsubcuenta.Visible = True + DdlCuentaContable.Visible = False + Dim dt As New DataTable + 'IDSelected = HdnID.Value.ToEntero() "ul" + itempadre.Cve; Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem) IDSelected = obj.Cve @@ -108,178 +196,453 @@ Partial Class Contabilidad_CatCuentas dt = getNodospadreHijos(IDSelected) If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then Dim dr As DataRow = dt.Rows(0) + 'TxtCuenta.Text = Trim(dr("CuentaFormato").ToString.Replace("-", "").ToString) + 'Tcuenta.Text = Trim(dr("CuentaFormato").ToString.Replace("-", "").ToString) Tsubcuenta.Text = dr("CuentaFormato").ToString() DTcuenta.SelectedValue = dr("Tipo").ToString() DcuentaMayor.SelectedValue = dr("CtaMayor").ToString LblSubCuenta.Text = dr("Nombre").ToString + Afectable = CBool(dr("Afectable").ToString) + CvePadre = dr("CvePadre").ToString.ToEntero End If - Tcuenta.Enabled = True + If Afectable Then + RegistraScript(String.Format("Afectable({0});", nuevacuenta.ClientID)) + Alert("Se va crear una subcuenta en una cuenta afectable", TipoMensaje.MsgAdvertencia) + Else + RegistraScript("NoAfectable();") + + End If + TxtCuenta.Enabled = True + + 'Tcuenta.Enabled = True nuevacuenta.Visible = True updatos.Visible = True updatos.Update() End Sub + Private Sub limpiavalorescontables() + + + DdlConcepto.SelectedValueExist(-1) + onconceptochange() + CveProveedor = -1 + DdlProveedores.SelectedText = "" + DdlProveedores.SelectedValue = CveProveedor.ToString + CveCliente = -1 + DdlClientesWS.SelectedText = "" + DdlClientesWS.SelectedValue = CveCliente.ToString + Dim PorcentajeImpuesto As Decimal = -1 + DdlClasificacion.SelectedValueExist(PorcentajeImpuesto) + CveClasificacion = -1 + DdlClasificacion.SelectedValueExist(CveClasificacion) + CveBancoCuenta = -1 + CveAlmacen = -1 + DdlAlmacen.SelectedValueExist(CveAlmacen) + End Sub Protected Sub editar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.editclick LimpiarCampos() + limpiavalorescontables() + CargaCuentasContables() + + Tsubcuenta.Visible = False + DdlCuentaContable.Visible = True + Dim dt As DataTable Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem) IDSelected = obj.Cve dt = getNodospadreHijos(IDSelected) If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then Dim dr As DataRow = dt.Rows(0) - Tcuenta.Text = dr("CuentaFormato").ToString.Replace("-", "") + TxtCuenta.Text = dr("CuentaFormato").ToString.Replace("-", "").ToString + 'Tcuenta.Text = dr("CuentaFormato").ToString.Replace("-", "").ToString Tnombre.Text = dr("Nombre").ToString() DTcuenta.SelectedValue = dr("Tipo").ToString() DcuentaMayor.SelectedValue = dr("CtaMayor").ToString - DdlMoneda.SelectedValueExist(dr("IdMoneda").ToString) + DdlMoneda.SelectedValue = If(dr("CveMoneda").ToString = "", "1", dr("CveMoneda").ToString) + Using objconta As New ClsContabilidad + objconta.GetConta_CuentasDataContabilidad(IDSelected, UsuarioActual.CveEmpresa) + If objconta.DtResultados.Rows.Count > 0 Then + Dim rowcc As DataRow = objconta.DtResultados.Rows(0) + DdlConcepto.SelectedValue = "-1" + DdlConcepto.SelectedValueExist(rowcc("CveConceptoAdmin").ToString().ToEntero()) + onconceptochange() + CveProveedor = rowcc("CveProveedor").ToString().ToEntero() + DdlProveedores.SelectedText = rowcc("Proveedor").ToString() + DdlProveedores.SelectedValue = CveProveedor.ToString + CveCliente = rowcc("CveCliente").ToString().ToEntero() + DdlClientesWS.SelectedText = rowcc("Cliente").ToString + DdlClientesWS.SelectedValue = CveCliente.ToString + Dim PorcentajeImpuesto As Decimal = rowcc("PorcentajeImpuesto").ToString().ToDecimal() * 100 + TxtPorcentaje.Text = PorcentajeImpuesto.ToString + CveClasificacion = rowcc("CveClasificacion").ToString().ToEntero() + DdlClasificacion.SelectedValueExist(CveClasificacion) + CveBancoCuenta = rowcc("CveBancoCuenta").ToString().ToEntero() + ddlBancos.SelectedValue = "-1" + ddlBancos.SelectedValueExist(CveBancoCuenta) + CveAlmacen = rowcc("CveAlmacen").ToString().ToEntero() + DdlAlmacen.SelectedValue = "-1" + DdlAlmacen.SelectedValueExist(CveAlmacen) + DdlPersonal.SelectedValueExist(rowcc("CvePersonal").ToString().ToEntero()) + End If - If dr("IdAgrupadorSAT").ToString.ToEntero = 0 Then + End Using + + If dr("CveAgrupadorSAT").ToString.ToEntero = 0 Then DdlAgrupadorSAT.SelectedValue = "-1" Else - DdlAgrupadorSAT.SelectedValue = dr("IdAgrupadorSAT").ToString + DdlAgrupadorSAT.SelectedValueExist(dr("CveAgrupadorSAT").ToString) End If TxtDigAgrup.Text = dr("DigAgrup").ToString TxtNomIngles.Text = dr("NomIdioma").ToString - Dim Hijos As Integer = DtDatos.FiltraParametros(String.Format("IdPadre = {0}", IDSelected)).Rows.Count + Dim Hijos As Integer = DtDatos.FiltraParametros(String.Format("CvePadre = {0}", IDSelected)).Rows.Count If Hijos = 0 Then BtnEliminar.Visible = True - dt = getNodospadreHijos(dr("IdPadre").ToString.ToEntero) + dt = getNodospadreHijos(dr("CvePadre").ToString.ToEntero) If dt.Rows.Count > 0 Then Dim drt As DataRow = dt.Rows(0) Tsubcuenta.Text = drt("Codigo").ToString + DdlCuentaContable.SelectedValueExist(drt("CveCuenta").ToString) LblSubCuenta.Text = drt("Nombre").ToString - HdnSubCuentaDe.Value = drt("Codigo").ToString - - Guardar.OnClientClick = $"ValidaGuardar('{drt("Codigo").ToString}');" - Guardar.Attributes.Add("data-toggle", "confirmation") - Guardar.Attributes.Add("data-popout", "true") - Guardar.Attributes.Add("data-original-title", "confirmar") - Guardar.Attributes.Add("data-btn-ok-label", "Guardar") - Guardar.Attributes.Add("data-html", "true") End If End If - + TxtCuenta.Enabled = True Guardar.Visible = True updatos.Visible = True updatos.Update() + End Sub + + Private Sub CargaCuentasContables() + + DdlCuentaContable.ClearSelection() + DdlCuentaContable.Items.Clear() + DdlCuentaContable.SelectedValue = Nothing + + Dim ObjConta As New ClsContabilidad + + If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then + DdlCuentaContable.DataSource = ObjConta.DtResultados + End If + + ObjConta.Dispose() + + DdlCuentaContable.DataBind() + DdlCuentaContable.Items.Insert(0, New ListItem("-", "-1")) + DdlCuentaContable.SelectedValueExist("-1") + End Sub Protected Sub Guardar_Click(sender As Object, e As EventArgs) Handles Guardar.Click If Tnombre.Text.Trim = "" Then Alert("Ingrese nombre de la cuenta", TipoMensaje.MsgError) : Exit Sub - Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) + Dim ObjConta As New ClsContabilidad - If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then + Dim CveConceptoAdmin As Integer = DdlConcepto.SelectedValue.ToEntero() + Dim CveProveedor As Integer = DdlProveedores.SelectedValue.ToEntero() + Dim CveCliente As Integer = DdlClientesWS.SelectedValue.ToEntero() + Dim CveClasificacion As Integer = DdlClasificacion.SelectedValue.ToEntero() + Dim PorcentajeImpuesto As Decimal = TxtPorcentaje.Text.ToDecimal() / 100 + Dim CveBancoCuenta As Integer = ddlBancos.SelectedValue.ToEntero + Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero() + + + If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then + If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, + TxtDigAgrup.Text.ToString.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin, + CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, + CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen, Codigo:=TxtCuenta.Text.Replace("-", ""), CvePadre:=DdlCuentaContable.SelectedValue.ToEntero) Then + + 'If UsuarioActual.Empresa.TipoContabilidad = 2 Then + ' Dim ObjContaEmpresa As New ClsContPAQi(UsuarioActual.Empresa) + ' If Not ObjContaEmpresa.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, + ' DdlMoneda.SelectedValue.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then + ' ObjContaEmpresa.Dispose() + ' ObjConta.Dispose() + ' Exit Sub + ' End If + 'End If + + 'Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") + + 'If UsuarioActual.Empresa.TipoContabilidad = 2 Then + + ' Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) + + ' If ObjConta2.GetCuentas(-1, "-1", -1) Then + ' Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero + ' Dim IdAgrupador As Integer + + ' If ObjConta2.GetAgrupadoresSAT() Then + ' IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero + ' End If + ' If Id > 0 Then + ' If ObjConta2.UpdateCuenta(Id, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, IdAgrupador, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then + ' End If + ' End If + ' End If + ' End Using + 'End If + + Dim customerRow As Data.DataRow + customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0) + customerRow("Nombre") = Tnombre.Text + DtDatos.AcceptChanges() + + CargaDatos() + ArbolCuentas.DataSource = DtDatos + + Dim item As CheckBox = DirectCast(ArbolCuentas.FindControl(String.Format("chk{0}", IDSelected)), CheckBox) + item.Text = String.Format("{0} - {1}", customerRow("CuentaFormato").ToString, Tnombre.Text) + 'updatos.Visible = False + 'Guardar.Visible = False + LimpiarCampos() + 'RegistraScript("$get('BtnCambiaAgrupadorSAT').click();") + updatos.Update() + GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing + Alert("La cuenta se guardo correctamente") + + End If + Else + Alert("Es necesario agregar el campo 'Agrupador SAT'", TipoMensaje.MsgError) End If + + ObjConta.Dispose() - - Dim customerRow As Data.DataRow - customerRow = DtDatos.Select(String.Format("Id = {0}", IDSelected))(0) - customerRow("Nombre") = Tnombre.Text - DtDatos.AcceptChanges() - - CargaDatos() - ArbolCuentas.DataSource = DtDatos - ArbolCuentas.DataBind() - - Dim item As CheckBox = DirectCast(ArbolCuentas.FindControl(String.Format("chk{0}", IDSelected)), CheckBox) - item.Text = String.Format("{0} - {1}", customerRow("CuentaFormato").ToString, Tnombre.Text) - 'updatos.Visible = False - 'Guardar.Visible = False - LimpiarCampos() - updatos.Update() - - Alert("La cuenta se guardo correctamente") - End Sub Protected Sub nuevacuenta_Click(sender As Object, e As EventArgs) Handles nuevacuenta.Click If Tnombre.Text.Trim = "" Then Alert("Ingrese nombre de la cuenta", TipoMensaje.MsgError) : Exit Sub - If Tcuenta.Text.Trim = "" Then Alert("Ingrese la cuenta", TipoMensaje.MsgError) : Exit Sub + If TxtCuenta.Text.Trim = "" Then Alert("Ingrese la cuenta", TipoMensaje.MsgError) : Exit Sub + 'If Tcuenta.Text.Trim = "" Then Alert("Ingrese la cuenta", TipoMensaje.MsgError) : Exit Sub - Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) + 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) + Dim ObjConta As New ClsContabilidad Dim CuentaEfectivo As Integer = 0 + 'Dim Afectable As Integer = 1 'If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable + TxtCuenta.Text.Replace("-", "") + Dim idnew As Integer = 0 + Dim CveConceptoContable As Integer = DdlConcepto.SelectedValue.ToEntero() + Dim row As DataRow = Nothing + Dim CveTipoSaldo As Integer = 0 + Dim PorcentajeIVA As Decimal = -1 + Dim drt As DataRow + Dim CveConceptoAdmin As Integer + Dim CveProveedor As Integer + Dim CveCliente As Integer + Dim CveClasificacion As Integer + Dim PorcentajeImpuesto As Decimal + Dim CveBancoCuenta As Integer + 'Dim CveAlmacen As Integer = -1 + 'Dim CvePersonal As Integer = -1 + Dim NombreCuenta As String + Dim TipoCuenta As String + Dim CuentaMayor As Integer + Dim CveMoneda As Integer + Dim DigAgrup As Integer + Dim CveAgrupadorSat As Integer + Dim NomIdioma As String + Dim TieneError As Boolean = False + If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then - ' [IPP] VIEJO | COMENTADO 9/MARZO/2018 - 'Dim Afectable As Integer = If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable - Dim Afectable = 1 - - Dim idnew = ObjConta.AddCuenta(Tcuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, CuentaEfectivo, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, TxtNomIngles.Text.Trim, Afectable, IDSelected.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero) - If idnew > 0 Then - - Dim dr As DataRow = DtDatos.NewRow - dr("id") = idnew - dr("CuentaFormato") = Tcuenta.Text - dr("Nombre") = Tnombre.Text - dr("CtaCodigo") = String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text) - dr("Tipo") = DTcuenta.SelectedValue.ToString - dr("CtaMayor") = DcuentaMayor.SelectedValue.ToString - dr("IdPadre") = IDSelected - dr("Codigo") = Tnombre.Text - dr("IdMoneda") = DdlMoneda.SelectedValue.ToEntero - dr("DigAgrup") = TxtDigAgrup.Text.Trim.ToEntero - dr("NomIdioma") = TxtNomIngles.Text.Trim - DtDatos.Rows.Add(dr) - ArbolCuentas.DataSource = DtDatos - '.Attributes.Add("data-hijos","0"); - Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem) - item.Attributes.Item("data-hijos") = (item.Attributes.Item("data-hijos").ToEntero + 1).ToString - Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", IDSelected)), ADServerControl.DragableUL) - If (IsNothing(objul)) Then - objul = New ADServerControl.DragableUL - objul.ID = String.Format("ul{0}", item.Cve) - item.Controls.Add(objul) + If CveConceptoContable > 0 Then + row = DtConceptosconta.FiltroPrimero(String.Format("CveConceptoContable={0}", CveConceptoContable)) + CveTipoSaldo = row("CveTipoSaldo").ToString.ToEntero() + End If + If Not IsNothing(row) Then + If CveTipoSaldo = 3 Then + PorcentajeIVA = TxtPorcentaje.Text.ToDecimal / 100D + End If + End If + ObjConta.IniciaTransacSQL() + If Afectable Then + If ObjConta.GetCuentas(IDSelected, "-1", -1, UsuarioActual.CveEmpresa) Then + drt = ObjConta.DtResultados.FiltroPrimero(String.Format("CveCuenta={0}", IDSelected)) + CveConceptoAdmin = If(drt("CveConceptoAdmin").ToString.ToEntero = 0, -1, drt("CveConceptoAdmin").ToString.ToEntero) + CveProveedor = If(drt("CveProveedor").ToString.ToEntero = 0, -1, drt("CveProveedor").ToString.ToEntero) + CveCliente = If(drt("CveCliente").ToString.ToEntero = 0, -1, drt("CveCliente").ToString.ToEntero) + CveClasificacion = If(drt("CveClasificacion").ToString.ToEntero = 0, -1, drt("CveClasificacion").ToString.ToEntero) + PorcentajeImpuesto = If(drt("PorcentajeImpuesto").ToString.ToEntero = 0, -1, drt("PorcentajeImpuesto").ToString.ToEntero) + CveBancoCuenta = If(drt("CveBancoCuenta").ToString.ToEntero = 0, -1, drt("CveBancoCuenta").ToString.ToEntero) + 'CveAlmacen = IIf(drt("CveAlmacen").ToString.ToEntero = 0, -1, drt("CveAlmacen").ToString.ToEntero) + 'CvePersonal = IIf(drt("CvePersonal").ToString.ToEntero = 0, -1, drt("CvePersonal").ToString.ToEntero) + NombreCuenta = If(drt("Nombre").ToString = "", "", drt("Nombre").ToString) + TipoCuenta = If(drt("Tipo").ToString = "", "", drt("Tipo").ToString) + CuentaMayor = If(drt("CtaMayor").ToString.ToEntero = 0, 0, drt("CtaMayor").ToString.ToEntero) + CveMoneda = If(drt("CveMoneda").ToString.ToEntero = -1, -1, drt("CveMoneda").ToString.ToEntero) + DigAgrup = If(drt("DigAgrup").ToString.ToEntero = -1, -1, drt("DigAgrup").ToString.ToEntero) + CveAgrupadorSat = If(drt("CveAgrupadorSAT").ToString.ToEntero = 0, -1, drt("CveAgrupadorSAT").ToString.ToEntero) + NomIdioma = If(drt("NomIdioma").ToString = "", "", drt("NomIdioma").ToString) + idnew = ObjConta.AddCuenta(CvePadre, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, + DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente, + CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta) + If idnew > 0 Then + If ObjConta.UpdateTraspasoPrepoliza(UsuarioActual.CveEmpresa, IDSelected, idnew) Then + If Not ObjConta.UpdateCuenta(IDSelected.ToEntero, NombreCuenta, TipoCuenta, CuentaMayor, CveMoneda, + DigAgrup, CveAgrupadorSat, NomIdioma) Then + TieneError = True + ObjConta.RollBack() + ObjConta.Dispose() + Exit Sub + End If + Else + Alert("El traspaso de movimientos en la cuenta tuvo un error.", TipoMensaje.MsgError) + TieneError = True + ObjConta.RollBack() + ObjConta.Dispose() + End If + End If + End If + Else + idnew = ObjConta.AddCuenta(IDSelected, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, + DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, PorcentajeImpuesto:=PorcentajeIVA) End If - ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text)) - 'updatos.Visible = False - 'nuevacuenta.Visible = False - LimpiarCampos() - updatos.Update() - CargaDatos() - Alert("La cuenta se guardo correctamente") + Else + Alert("Es necesario agregar el campo 'Agrupador SAT'", TipoMensaje.MsgError) End If + If idnew > 0 Then + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) + Dim codigoPadre As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text + If ObjConta2.GetCuentas(-1, "-1", -1) Then + Dim IdPadre As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero + Dim IdAgrupador As Integer + + If ObjConta2.GetAgrupadoresSAT() Then + IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero + End If + + + codigoPadre = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + ObjConta2 = New ClsContPAQi(UsuarioActual.Empresa) + ObjConta2.IniciaTransacSQL() + If ObjConta2.GetCuentas(-1, "-1", -1) Then + IdPadre = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero + If ObjConta2.GetAgrupadoresSAT() Then + IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero + End If + + If IdPadre > 0 Then + Dim idnew2 As Integer = ObjConta2.AddCuenta(TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, CuentaEfectivo, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, TxtNomIngles.Text.Trim, 1, IdPadre, IdAgrupador) + + If idnew2 > 0 Then + If Not ObjConta.UpdateCuentaCompaq(idnew, idnew2, UsuarioActual.CveEmpresa) Then + TieneError = True + ObjConta2.RollBack() + ObjConta.RollBack() + Alert("Ocurrio un error al vincultar la cuenta con SIG y Compaq", TipoMensaje.MsgError) + Else + ObjConta2.Commit() + End If + + Else + TieneError = True + ObjConta2.RollBack() + Alert("Ocurrio un error al crear la cuenta en Compaq", TipoMensaje.MsgError) + End If + End If + End If + ObjConta2.Dispose() + End If + If Not TieneError Then + Dim dr As DataRow = DtDatos.NewRow + dr("CveCuenta") = idnew + dr("CuentaFormato") = TxtCuenta.Text + 'dr("CuentaFormato") = Tcuenta.Text + dr("Nombre") = Tnombre.Text + dr("CuentaFormatoNombre") = String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text) + dr("Tipo") = DTcuenta.SelectedValue.ToString + dr("CtaMayor") = DcuentaMayor.SelectedValue.ToString + dr("CvePadre") = IDSelected + dr("Codigo") = Tnombre.Text + dr("CveMoneda") = DdlMoneda.SelectedValue.ToEntero + dr("DigAgrup") = TxtDigAgrup.Text.Trim.ToEntero + dr("NomIdioma") = TxtNomIngles.Text.Trim + DtDatos.Rows.Add(dr) + ArbolCuentas.DataSource = DtDatos + '.Attributes.Add("data-hijos","0"); + Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem) + item.Attributes.Item("data-hijos") = (item.Attributes.Item("data-hijos").ToEntero + 1).ToString + Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", IDSelected)), ADServerControl.DragableUL) + If (IsNothing(objul)) Then + objul = New ADServerControl.DragableUL + objul.ID = String.Format("ul{0}", item.Cve) + item.Controls.Add(objul) + End If + ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text)) + + End If + End If + If ObjConta2 IsNot Nothing Then ObjConta2.Dispose() + + End If + + Else + TieneError = True + ObjConta.RollBack() + Alert("Ocurrio un error al crear la cuenta", TipoMensaje.MsgError) + End If + + If Not TieneError Then + ObjConta.Commit() + GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing + CargaDatos() + LimpiarCampos() + updatos.Update() + Alert("La cuenta se guardo correctamente", TipoMensaje.MsgInformacion) + End If ObjConta.Dispose() + + + End Sub Private Sub LimpiarCampos() - Tcuenta.Text = "" + TxtCuenta.Text = "" + 'Tcuenta.Text = "" Tnombre.Text = "" DTcuenta.SelectedValue = "-1" DcuentaMayor.SelectedValue = "-1" DdlAgrupadorSAT.SelectedValue = "-1" Tsubcuenta.Text = "" + TxtDigAgrup.Text = "" Guardar.Visible = False nuevacuenta.Visible = False - Tcuenta.Enabled = False + TxtCuenta.Enabled = False + 'Tcuenta.Enabled = False + DdlCuentaContable.SelectedValueExist(-1) + DdlCuentaContable.Visible = False + Tsubcuenta.Visible = True BtnEliminar.Visible = False End Sub + Protected Sub borrar_Click(sender As Object, e As EventArgs) Handles borrar.Click End Sub + Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click - Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - ObjConta.IniciaTransacSQL() + 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) + Dim ObjConta As New ClsContabilidad + 'ObjConta.IniciaTransacSQL() If ObjConta.RemoveCuenta(IDSelected.ToEntero) Then - ObjConta.Commit() Dim customerRow As Data.DataRow - customerRow = DtDatos.Select(String.Format("Id = {0}", IDSelected))(0) - customerRow("IdPadre") = "-5" + customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0) + customerRow("CvePadre") = "-5" DtDatos.AcceptChanges() ArbolCuentas.DataSource = DtDatos @@ -289,30 +652,98 @@ Partial Class Contabilidad_CatCuentas ArbolCuentas.Controls.Remove(item) RegistraScript(String.Format("$('#{0}').click();", editar.ClientID)) - 'getNodospadreHijos(IDSelected).Rows(0).Delete() - 'RegistraScript(String.Format("$('li#{0}').remove();", IDSelected)) LimpiarCampos() upcuentas.Update() Alert("La Cuenta ha sido eliminada", TipoMensaje.MsgInformacion) + + Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") + + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) + If ObjConta2.GetCuentas(-1, "-1", -1) Then + Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero + + If Id > 0 Then + If ObjConta2.RemoveCuenta(Id) Then + End If + End If + End If + ObjConta2.Dispose() + + End If + GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing + Else Alert("La Cuenta no pudo ser eliminada", TipoMensaje.MsgError) - ObjConta.RollBack() + ' ObjConta.RollBack() End If ObjConta.Dispose() End Sub - Private Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click - Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") + 'Protected Sub BtnCambiaAgrupadorSAT_Click(sender As Object, e As EventArgs) + ' CargaAgrupadorSAT() + 'End Sub + Protected Sub DdlConcepto_SelectedIndexChanged(sender As Object, e As EventArgs) + onconceptochange() + End Sub + Private Sub onconceptochange(Optional CveCuenta As Integer = -1) + PnlOpcion1.Visible = False + pnlOpcion2.Visible = False + pnlOpcion3.Visible = False + pnlOpcion4.Visible = False + pnlOpcion5.Visible = False + pnlOpcion6.Visible = False + Dim CveConceptoContable As Integer = DdlConcepto.SelectedValue.ToEntero() + Dim row As DataRow = Nothing + Dim CveTipoSaldo As Integer = 0 + Dim CveParejaContable As Integer = 0 + If CveConceptoContable > 0 Then + row = DtConceptosconta.FiltroPrimero(String.Format("CveConceptoContable={0}", CveConceptoContable)) + CveTipoSaldo = row("CveTipoSaldo").ToString.ToEntero() + CveParejaContable = row("CveParejaContable").ToString().ToEntero() + End If + If Not IsNothing(row) Then + Select Case CveTipoSaldo + Case 1 + PnlOpcion1.Visible = True + Case 2 + pnlOpcion2.Visible = True + Case 3 + pnlOpcion2.Visible = True + pnlOpcion3.Visible = True + 'If DdlClasificacion.Items.Count < 2 Then + DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) + DdlClasificacion.DataBind() + 'End If + Case 4 + pnlOpcion4.Visible = True + Case 5 + pnlOpcion5.Visible = True + Case 6 + pnlOpcion6.Visible = True + Case 8 + pnlOpcion8.Visible = True + DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa) + DdlPersonal.DataBind() - Dim params As New List(Of ReportParameter) - params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) + End Select + End If + End Sub + Protected Sub LnkImprimirExcel_Click(sender As Object, e As EventArgs) + Imprime("Excel") + End Sub + Private Sub Imprime(Formato As String) + If DtDatos IsNot Nothing Then - params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) + Dim params As New List(Of ReportParameter) + params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) + params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - ImprimirPDF("Empresas/Grales/Formatos/CatCuentas.rdlc", DtDatos.FiltraParametros("", "Orden ASC"), params, String.Format("Catalogo Cuentas-{0}", NowADS().ToDateTime.ToShortDateString)) + ImprimirPDF("Empresas/Grales/Formatos/Cuentas.rdlc", DtDatos, params, "Cuentas", Formato) + Else + Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) + End If End Sub End Class \ No newline at end of file diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx b/Contabilidad/CatCuentasAsignaciones.aspx similarity index 100% rename from Contabilidad2/CatCuentasAsignaciones.aspx rename to Contabilidad/CatCuentasAsignaciones.aspx diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx.vb b/Contabilidad/CatCuentasAsignaciones.aspx.vb similarity index 98% rename from Contabilidad2/CatCuentasAsignaciones.aspx.vb rename to Contabilidad/CatCuentasAsignaciones.aspx.vb index 6d2ceedfb..e428c921d 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx.vb +++ b/Contabilidad/CatCuentasAsignaciones.aspx.vb @@ -11,34 +11,34 @@ Partial Class Contabilidad2_CatCuentasAsignaciones Set ViewState("CveConceptoAsignacion") = Value End Set - End Property - - Public Property OpAgregar As Boolean - Get - If ViewState("OpAgregar") Is Nothing Then - ViewState("OpAgregar") = False - End If - Return Boolean.Parse(ViewState("OpAgregar").ToString) - End Get - Set(value As Boolean) - ViewState("OpAgregar") = value - End Set - End Property - + End Property + + Public Property OpAgregar As Boolean + Get + If ViewState("OpAgregar") Is Nothing Then + ViewState("OpAgregar") = False + End If + Return Boolean.Parse(ViewState("OpAgregar").ToString) + End Get + Set(value As Boolean) + ViewState("OpAgregar") = value + End Set + End Property + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - If Not Page.IsPostBack Then - HttpContext.Current.Application("GlobalDTContaConceptosContables") = Nothing - DdlConceptos.DataSource = GlobalDTContaConceptosContables(-1) - DdlConceptos.DataBind() - DdlConceptos.Items.Insert(0, New ListItem("Todos", "-1")) - + If Not Page.IsPostBack Then + HttpContext.Current.Application("GlobalDTContaConceptosContables") = Nothing + DdlConceptos.DataSource = GlobalDTContaConceptosContables(-1) + DdlConceptos.DataBind() + DdlConceptos.Items.Insert(0, New ListItem("Todos", "-1")) + CargaDatosModal() End If - End Sub - - Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) - CargaDatosSistema() - + End Sub + + Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) + CargaDatosSistema() + End Sub 'Private Sub CargaDatos() @@ -48,38 +48,38 @@ Partial Class Contabilidad2_CatCuentasAsignaciones ' End If ' ObjConta.Dispose() ' GvDatos.DataBind() - 'End Sub - + 'End Sub + Private Sub CargaDatosSistema() Dim ObjConta As New ClsContabilidad If ObjConta.GetCuentasAsignacionesSistema(UsuarioActual.CveEmpresa, DdlTipo.SelectedValue.ToEntero, DdlOpcion.SelectedValue.ToEntero, DdlConceptos.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjConta.DtResultados - End If - GvDatos.Columns(4).Visible = ObjConta.DtResultados.MAX("CveSubProyecto").ToEntero > 0 - GvDatos.Columns(5).Visible = ObjConta.DtResultados.MAX("PorcentajeIVA").ToDecimal > 0 - GvDatos.Columns(6).Visible = ObjConta.DtResultados.MAX("TipoGasto") <> "" - + End If + GvDatos.Columns(4).Visible = ObjConta.DtResultados.MAX("CveSubProyecto").ToEntero > 0 + GvDatos.Columns(5).Visible = ObjConta.DtResultados.MAX("PorcentajeIVA").ToDecimal > 0 + GvDatos.Columns(6).Visible = ObjConta.DtResultados.MAX("TipoGasto") <> "" + If ObjConta.GetCuentasGlobales(UsuarioActual.CveEmpresa) Then GvGlobal.DataSource = ObjConta.DtResultados - End If - + End If + ObjConta.Dispose() GvDatos.DataBind() - GvGlobal.DataBind() - UpDatos.Update() - + GvGlobal.DataBind() + UpDatos.Update() + End Sub Private Sub CargaDatosModal() DdlConceptoNomina.DataSource = GlobalDTNomConceptos(UsuarioActual.CveEmpresa) - DdlConceptoNomina.DataBind() - - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - Dim Con As New ClsContPAQi(UsuarioActual.Empresa) - Con.SincronizaCuentas(UsuarioActual.CveEmpresa) - Con.Dispose() - End If - + DdlConceptoNomina.DataBind() + + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + Dim Con As New ClsContPAQi(UsuarioActual.Empresa) + Con.SincronizaCuentas(UsuarioActual.CveEmpresa) + Con.Dispose() + End If + Dim ObjConta As New ClsContabilidad If ObjConta.GetConta_ConceptosContables() Then @@ -91,40 +91,40 @@ Partial Class Contabilidad2_CatCuentasAsignaciones DdlCuenta.DataSource = ObjConta.DtResultados DdlCuentaGlobal.DataSource = ObjConta.DtResultados End If - ObjConta.Dispose() - - DdlProveedor.setEsWebService(True) 'GlobalDTCompProveedores(UsuarioActual.CveEmpresa) - + ObjConta.Dispose() + + DdlProveedor.setEsWebService(True) 'GlobalDTCompProveedores(UsuarioActual.CveEmpresa) + DdlClientes.setEsWebService(True) DdlPersonal.setEsWebService(True) DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) - DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa) - - DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa) - - DdlSubProyectos.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=-1) - DdlSubProyectos.Items.Insert(0, New ListItem("-", "0")) - + DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa) + + DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa) + + DdlSubProyectos.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=-1) + DdlSubProyectos.Items.Insert(0, New ListItem("-", "0")) + Dim ObjBancos As New ClsBancos If ObjBancos.GetBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) Then DdlCuentaBancaria.DataSource = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) End If - ObjBancos.Dispose() - + ObjBancos.Dispose() + DdlCuentaBancaria.DataBind() DdlCconceptosContables.DataBind() - DdlConceptoGlobal.DataBind() + DdlConceptoGlobal.DataBind() DdlCuenta.DataBind() DdlCuentaGlobal.DataBind() DdlProveedor.DataBind() 'DdlPersonal.DataBind() DdlClasificacion.DataBind() - DdlAlmacen.DataBind() - DdlSubProyectos.DataBind() - + DdlAlmacen.DataBind() + DdlSubProyectos.DataBind() + DdlCuentaBancaria.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlConceptoNomina.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlCconceptosContables.Items.Insert(0, New ListItem("Seleccione", "-1")) @@ -134,153 +134,153 @@ Partial Class Contabilidad2_CatCuentasAsignaciones DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1")) End Sub - Protected Sub ActualizaModulo(sender As Object, e As EventArgs) - OpAgregar = False - LimpiarDatos() - Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim Dr As DataRow = GlobalDTContaConceptosContables(GvRow.DataKey("CveConceptoContable").ToEntero).FiltroPrimero("") - Dim CveConceptoContable As Integer = GvRow.DataKey("CveConceptoContable").ToString.ToEntero - HdnCveCuentaAsignacion.Value = GvRow.DataKey("CveCuentaAsignacion").ToString - - If Dr IsNot Nothing Then - DdlCconceptosContables.Enabled = False - DdlSubProyectos.Enabled = False - DdlClasificacion.Enabled = False - DdlPersonal.Enabled = False - RecargaConcepto(CveConceptoContable) - - CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero - DdlCconceptosContables.SelectedValueExist(GvRow.DataKey("CveConceptoContable")) - DdlCuenta.SelectedValueExist(GvRow.DataKey("CveCuenta")) - DdlConceptoNomina.SelectedValueExist(GvRow.DataKey("CveConceptoNomina").ToEntero) - If GvRow.DataKey("CveProveedor").ToEntero > 0 Then - DdlProveedor.ddl.Items.Clear() - DdlProveedor.ddl.ClearSelection() - Dim NomProv As String = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, CveProveedor:=GvRow.DataKey("CveProveedor").ToEntero).FiltroPrimeroValor("NombreComercial") - DdlProveedor.ddl.Items.Add(New ListItem(NomProv, GvRow.DataKey("CveProveedor"))) - DdlProveedor.SelectedValue = GvRow.DataKey("CveProveedor") - End If - DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion")) - DdlAlmacen.SelectedValueExist(GvRow.DataKey("CveAlmacen")) - TxtPorcentajeIVA.Text = GvRow.DataKey("PorcentajeIVA") - DdlCuentaBancaria.SelectedValueExist(GvRow.DataKey("CveBancoCuenta")) - DdlSubProyectos.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero) - DdlTipoGasto.SelectedValueExist(GvRow.DataKey("CveTipoGasto").ToEntero) - DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo").ToEntero) - DdlActivoFijo.Enabled = False - Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero - Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero - DdlColectivas.SelectedValueExist(GvRow.DataKey("CveColectiva").ToEntero) - - If CveCliente > 0 Then - Dim drp As String = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre") - DdlClientes.ddl.Items.Insert(0, New ListItem(drp, CveCliente.ToString)) - DdlClientes.SelectedValue = CveCliente.ToString - DdlClientes.SelectedText = drp - End If - - If CvePersonal > 0 Then - Dim drp As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal).FiltroPrimeroValor("NombreCompleto") - DdlPersonal.ddl.Items.Insert(0, New ListItem(drp, CvePersonal.ToString)) - DdlPersonal.SelectedValue = CvePersonal.ToString - DdlPersonal.SelectedText = drp - End If - - If GvRow.DataKey("CveCredito").ToEntero > 0 Then - DdlCreditos.Items.Clear() - DdlCreditos.ClearSelection() - Dim ObjCreditos As New ClsBancos - If ObjCreditos.GetCreditos(-1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then - DdlCreditos.DataSource = ObjCreditos.DtResultados.FiltraParametros("", DistinctColumns:={"CveCredito", "Referencia"}) - End If - ObjCreditos.Dispose() - DdlCreditos.DataBind() - DdlCreditos.SelectedValue = GvRow.DataKey("CveCredito") - End If - - LbAgregar.Text = "Actualizar" - UpModalModulos.Update() - RegistraScript("$('#ModalCat').modal();") - End If - - + Protected Sub ActualizaModulo(sender As Object, e As EventArgs) + OpAgregar = False + LimpiarDatos() + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + Dim Dr As DataRow = GlobalDTContaConceptosContables(GvRow.DataKey("CveConceptoContable").ToEntero).FiltroPrimero("") + Dim CveConceptoContable As Integer = GvRow.DataKey("CveConceptoContable").ToString.ToEntero + HdnCveCuentaAsignacion.Value = GvRow.DataKey("CveCuentaAsignacion").ToString + + If Dr IsNot Nothing Then + DdlCconceptosContables.Enabled = False + DdlSubProyectos.Enabled = False + DdlClasificacion.Enabled = False + DdlPersonal.Enabled = False + RecargaConcepto(CveConceptoContable) + + CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero + DdlCconceptosContables.SelectedValueExist(GvRow.DataKey("CveConceptoContable")) + DdlCuenta.SelectedValueExist(GvRow.DataKey("CveCuenta")) + DdlConceptoNomina.SelectedValueExist(GvRow.DataKey("CveConceptoNomina").ToEntero) + If GvRow.DataKey("CveProveedor").ToEntero > 0 Then + DdlProveedor.ddl.Items.Clear() + DdlProveedor.ddl.ClearSelection() + Dim NomProv As String = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, CveProveedor:=GvRow.DataKey("CveProveedor").ToEntero).FiltroPrimeroValor("NombreComercial") + DdlProveedor.ddl.Items.Add(New ListItem(NomProv, GvRow.DataKey("CveProveedor"))) + DdlProveedor.SelectedValue = GvRow.DataKey("CveProveedor") + End If + DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion")) + DdlAlmacen.SelectedValueExist(GvRow.DataKey("CveAlmacen")) + TxtPorcentajeIVA.Text = GvRow.DataKey("PorcentajeIVA") + DdlCuentaBancaria.SelectedValueExist(GvRow.DataKey("CveBancoCuenta")) + DdlSubProyectos.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero) + DdlTipoGasto.SelectedValueExist(GvRow.DataKey("CveTipoGasto").ToEntero) + DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo").ToEntero) + DdlActivoFijo.Enabled = False + Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero + Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero + DdlColectivas.SelectedValueExist(GvRow.DataKey("CveColectiva").ToEntero) + + If CveCliente > 0 Then + Dim drp As String = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre") + DdlClientes.ddl.Items.Insert(0, New ListItem(drp, CveCliente.ToString)) + DdlClientes.SelectedValue = CveCliente.ToString + DdlClientes.SelectedText = drp + End If + + If CvePersonal > 0 Then + Dim drp As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal).FiltroPrimeroValor("NombreCompleto") + DdlPersonal.ddl.Items.Insert(0, New ListItem(drp, CvePersonal.ToString)) + DdlPersonal.SelectedValue = CvePersonal.ToString + DdlPersonal.SelectedText = drp + End If + + If GvRow.DataKey("CveCredito").ToEntero > 0 Then + DdlCreditos.Items.Clear() + DdlCreditos.ClearSelection() + Dim ObjCreditos As New ClsBancos + If ObjCreditos.GetCreditos(-1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then + DdlCreditos.DataSource = ObjCreditos.DtResultados.FiltraParametros("", DistinctColumns:={"CveCredito", "Referencia"}) + End If + ObjCreditos.Dispose() + DdlCreditos.DataBind() + DdlCreditos.SelectedValue = GvRow.DataKey("CveCredito") + End If + + LbAgregar.Text = "Actualizar" + UpModalModulos.Update() + RegistraScript("$('#ModalCat').modal();") + End If + + End Sub - Private Sub RecargaConcepto(CveConceptoContable As Integer) - Dim Dr As DataRow = GlobalDTContaConceptosContables(CveConceptoContable).FiltroPrimero("") - - If Dr IsNot Nothing Then - - divCliente.Visible = Boolean.Parse(Dr("AplicaCliente").ToString) - divProveedor.Visible = Boolean.Parse(Dr("AplicaProveedor").ToString) - divPersonal.Visible = Boolean.Parse(Dr("AplicaPersonal").ToString) - divPorcentajeIVA.Visible = Boolean.Parse(Dr("AplicaImpuesto").ToString) - divClasificacion.Visible = Boolean.Parse(Dr("AplicaClasificacion").ToString) - divBancos.Visible = Boolean.Parse(Dr("AplicaBancos").ToString) - divAlmacen.Visible = Boolean.Parse(Dr("AplicaAlmacen").ToString) - divSubProyectos.Visible = Boolean.Parse(Dr("AplicaSubProyecto").ToString) - divActivoFijo.Visible = Boolean.Parse(Dr("AplicaActivoFijo").ToString) - divCredito.Visible = Boolean.Parse(Dr("AplicaCredito").ToString) - divColectivas.Visible = Boolean.Parse(Dr("AplicaColectiva").ToString) - - DdlActivoFijo.Enabled = False - - If Dr("AplicaActivoFijo").ToString = "True" Then - DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa) - DdlActivoFijo.DataBind() ' DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo")) - - If OpAgregar Then - DdlActivoFijo.Enabled = True - Else - DdlActivoFijo.Enabled = False - End If - End If - - divConceptoNomina.Visible = Dr("AplicaNomina").ToString = "True" - - If CveConceptoContable = 51 Then - divTipoGasto.Visible = True - DdlTipoGasto.Items.Clear() - DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa) - DdlTipoGasto.DataBind() - DdlTipoGasto.Items.Add(New ListItem("-", "-1")) - End If - If Dr("CveTipoSaldo").ToString = "1" Then - divRegeneraCuenta.Visible = True - End If - - If Dr("AplicaCredito").ToString = "True" Then - Dim ObjCreditos As New ClsBancos - If ObjCreditos.GetCreditos(-1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then - DdlCreditos.DataSource = ObjCreditos.DtResultados.FiltraParametros("", DistinctColumns:={"CveCredito", "Referencia"}) - End If - ObjCreditos.Dispose() - DdlCreditos.DataBind() - - If OpAgregar Then - DdlCreditos.Enabled = True - Else - DdlCreditos.Enabled = False - End If - End If - - If Dr("AplicaColectiva").ToString = "True" Then - Dim ObjG As New ClsGenerales - If ObjG.GetColectivas(UsuarioActual.CveEmpresa, CveConceptoContable:=DdlCconceptosContables.SelectedValue.ToEntero) Then - DdlColectivas.DataSource = ObjG.DtResultados - End If - ObjG.Dispose() - DdlColectivas.DataBind() - DdlColectivas.Items.Insert(0, New ListItem("-", "-1")) - - If OpAgregar Then - DdlColectivas.Enabled = True - Else - DdlColectivas.Enabled = False - End If - End If - End If - + Private Sub RecargaConcepto(CveConceptoContable As Integer) + Dim Dr As DataRow = GlobalDTContaConceptosContables(CveConceptoContable).FiltroPrimero("") + + If Dr IsNot Nothing Then + + divCliente.Visible = Boolean.Parse(Dr("AplicaCliente").ToString) + divProveedor.Visible = Boolean.Parse(Dr("AplicaProveedor").ToString) + divPersonal.Visible = Boolean.Parse(Dr("AplicaPersonal").ToString) + divPorcentajeIVA.Visible = Boolean.Parse(Dr("AplicaImpuesto").ToString) + divClasificacion.Visible = Boolean.Parse(Dr("AplicaClasificacion").ToString) + divBancos.Visible = Boolean.Parse(Dr("AplicaBancos").ToString) + divAlmacen.Visible = Boolean.Parse(Dr("AplicaAlmacen").ToString) + divSubProyectos.Visible = Boolean.Parse(Dr("AplicaSubProyecto").ToString) + divActivoFijo.Visible = Boolean.Parse(Dr("AplicaActivoFijo").ToString) + divCredito.Visible = Boolean.Parse(Dr("AplicaCredito").ToString) + divColectivas.Visible = Boolean.Parse(Dr("AplicaColectiva").ToString) + + DdlActivoFijo.Enabled = False + + If Dr("AplicaActivoFijo").ToString = "True" Then + DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa) + DdlActivoFijo.DataBind() ' DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo")) + + If OpAgregar Then + DdlActivoFijo.Enabled = True + Else + DdlActivoFijo.Enabled = False + End If + End If + + divConceptoNomina.Visible = Dr("AplicaNomina").ToString = "True" + + If CveConceptoContable = 51 Then + divTipoGasto.Visible = True + DdlTipoGasto.Items.Clear() + DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa) + DdlTipoGasto.DataBind() + DdlTipoGasto.Items.Add(New ListItem("-", "-1")) + End If + If Dr("CveTipoSaldo").ToString = "1" Then + divRegeneraCuenta.Visible = True + End If + + If Dr("AplicaCredito").ToString = "True" Then + Dim ObjCreditos As New ClsBancos + If ObjCreditos.GetCreditos(-1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then + DdlCreditos.DataSource = ObjCreditos.DtResultados.FiltraParametros("", DistinctColumns:={"CveCredito", "Referencia"}) + End If + ObjCreditos.Dispose() + DdlCreditos.DataBind() + + If OpAgregar Then + DdlCreditos.Enabled = True + Else + DdlCreditos.Enabled = False + End If + End If + + If Dr("AplicaColectiva").ToString = "True" Then + Dim ObjG As New ClsGenerales + If ObjG.GetColectivas(UsuarioActual.CveEmpresa, CveConceptoContable:=DdlCconceptosContables.SelectedValue.ToEntero) Then + DdlColectivas.DataSource = ObjG.DtResultados + End If + ObjG.Dispose() + DdlColectivas.DataBind() + DdlColectivas.Items.Insert(0, New ListItem("-", "-1")) + + If OpAgregar Then + DdlColectivas.Enabled = True + Else + DdlColectivas.Enabled = False + End If + End If + End If + End Sub Protected Sub EliminarRow(sender As Object, e As EventArgs) @@ -294,12 +294,12 @@ Partial Class Contabilidad2_CatCuentasAsignaciones ObjConta.Dispose() End Sub - Protected Sub BtnAgregarGlobal_Click(sender As Object, e As EventArgs) Handles BtnAgregarGlobal.Click - + Protected Sub BtnAgregarGlobal_Click(sender As Object, e As EventArgs) Handles BtnAgregarGlobal.Click + UppModalGlobal.Update() RegistraScript("$('#ModalGlobal').modal();") - End Sub - + End Sub + Protected Sub EliminarRowGlobal(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim ObjConta As New ClsContabilidad @@ -309,55 +309,55 @@ Partial Class Contabilidad2_CatCuentasAsignaciones CargaDatosSistema() UpDatos.Update() ObjConta.Dispose() - End Sub - - Protected Sub BtnAgregarAsignacion_Click(sender As Object, e As EventArgs) Handles BtnAgregarAsignacion.Click - OpAgregar = True - + End Sub + + Protected Sub BtnAgregarAsignacion_Click(sender As Object, e As EventArgs) Handles BtnAgregarAsignacion.Click + OpAgregar = True + LimpiarDatos() DdlCconceptosContables.Enabled = True - DdlSubProyectos.Enabled = True - DdlClasificacion.Enabled = True - DdlPersonal.Enabled = True + DdlSubProyectos.Enabled = True + DdlClasificacion.Enabled = True + DdlPersonal.Enabled = True LbAgregar.Text = "Agregar" UpModalModulos.Update() RegistraScript("$('#ModalCat').modal();") End Sub - Private Sub LimpiarDatos() + Private Sub LimpiarDatos() CveConceptoAsignacion = -1 DdlCconceptosContables.SelectedValue = "-1" DdlCuenta.SelectedValue = "-1" DdlProveedor.SelectedValue = "-1" DdlClasificacion.SelectedValue = "-1" DdlAlmacen.SelectedValue = "-1" - DdlConceptoNomina.SelectedValue = "-1" - DdlCuentaBancaria.SelectedValueExist("-1") + DdlConceptoNomina.SelectedValue = "-1" + DdlCuentaBancaria.SelectedValueExist("-1") TxtPorcentajeIVA.Text = "" DdlClientes.ddl.DataSource = "" DdlClientes.ddl.DataBind() DdlClientes.setEsWebService(True) DdlPersonal.ddl.DataSource = "" DdlPersonal.ddl.DataBind() - DdlPersonal.setEsWebService(True) - HdnCveCuentaAsignacion.Value = "" - - If OpAgregar Then - divCliente.Visible = False - divProveedor.Visible = False - divPersonal.Visible = False - divPorcentajeIVA.Visible = False - divClasificacion.Visible = False - divBancos.Visible = False - divAlmacen.Visible = False - divSubProyectos.Visible = False - divActivoFijo.Visible = False - End If - - - - - + DdlPersonal.setEsWebService(True) + HdnCveCuentaAsignacion.Value = "" + + If OpAgregar Then + divCliente.Visible = False + divProveedor.Visible = False + divPersonal.Visible = False + divPorcentajeIVA.Visible = False + divClasificacion.Visible = False + divBancos.Visible = False + divAlmacen.Visible = False + divSubProyectos.Visible = False + divActivoFijo.Visible = False + End If + + + + + End Sub Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click @@ -365,23 +365,23 @@ Partial Class Contabilidad2_CatCuentasAsignaciones ObjConta.IniciaTransacSQL() Dim ErrorString As String = "" If HdnCveCuentaAsignacion.Value.ToEntero <= 0 Then - If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, + If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, - DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), - CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveColectiva:=DdlColectivas.SelectedValue.ToEntero, + DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), + CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveColectiva:=DdlColectivas.SelectedValue.ToEntero, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then ErrorString = "Error al agregar" End If ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then - If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, + If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, - DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), - CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveColectiva:=DdlColectivas.SelectedValue.ToEntero, + DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), + CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveColectiva:=DdlColectivas.SelectedValue.ToEntero, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then ErrorString = "Error al actualizar" End If - End If - + End If + If Not ChkSeguirRegistrando.Checked Then RegistraScript("$('#ModalCat').modal('hide');") If ErrorString.Length > 0 Then @@ -390,46 +390,46 @@ Partial Class Contabilidad2_CatCuentasAsignaciones Else ObjConta.Commit() Alert("Agregado correctamente") - End If + End If ObjConta.Dispose() CargaDatosSistema() UpDatos.Update() End Sub - - Protected Sub LBAgregaGlobal_Click(sender As Object, e As EventArgs) - - Dim ErrorString As String = "" - Dim ObjConta As New ClsContabilidad - If Not ObjConta.AddCuentasGlobales(DdlConceptoGlobal.SelectedValue.ToEntero, DdlCuentaGlobal.SelectedValue.ToEntero, DdlTipoGlobal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then - ErrorString = "Error al agregar" - End If - ObjConta.Dispose() - + + Protected Sub LBAgregaGlobal_Click(sender As Object, e As EventArgs) + + Dim ErrorString As String = "" + Dim ObjConta As New ClsContabilidad + If Not ObjConta.AddCuentasGlobales(DdlConceptoGlobal.SelectedValue.ToEntero, DdlCuentaGlobal.SelectedValue.ToEntero, DdlTipoGlobal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + ErrorString = "Error al agregar" + End If + ObjConta.Dispose() + If ErrorString.Length > 0 Then Alert(ErrorString) Else Alert("Agregado correctamente") End If CargaDatosSistema() - UpDatos.Update() - End Sub - - Private Sub DdlCconceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCconceptosContables.SelectedIndexChanged - RecargaConcepto(DdlCconceptosContables.SelectedValue.ToEntero) - End Sub - - Private Sub DdlTipoGlobal_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoGlobal.SelectedIndexChanged - Dim Afectables As Integer = 1 - If DdlTipoGlobal.SelectedValue = "2" Then 'cuando es detallado, que de la opción de seleccionar una de mayor y/o no afectable - Afectables = -1 - End If - - Dim ObjConta As New ClsContabilidad - If ObjConta.GetCuentas(-1, "-1", Afectables, UsuarioActual.CveEmpresa) Then + UpDatos.Update() + End Sub + + Private Sub DdlCconceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCconceptosContables.SelectedIndexChanged + RecargaConcepto(DdlCconceptosContables.SelectedValue.ToEntero) + End Sub + + Private Sub DdlTipoGlobal_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoGlobal.SelectedIndexChanged + Dim Afectables As Integer = 1 + If DdlTipoGlobal.SelectedValue = "2" Then 'cuando es detallado, que de la opción de seleccionar una de mayor y/o no afectable + Afectables = -1 + End If + + Dim ObjConta As New ClsContabilidad + If ObjConta.GetCuentas(-1, "-1", Afectables, UsuarioActual.CveEmpresa) Then DdlCuentaGlobal.DataSource = ObjConta.DtResultados.FiltraParametros("", Orderby:="Codigo") - End If - ObjConta.Dispose() - DdlCuentaGlobal.DataBind() - End Sub + End If + ObjConta.Dispose() + DdlCuentaGlobal.DataBind() + End Sub End Class diff --git a/Contabilidad2/CatCuentas.aspx b/Contabilidad/CatCuentasCI.aspx similarity index 57% rename from Contabilidad2/CatCuentas.aspx rename to Contabilidad/CatCuentasCI.aspx index f309b5bc1..160eee558 100644 --- a/Contabilidad2/CatCuentas.aspx +++ b/Contabilidad/CatCuentasCI.aspx @@ -1,4 +1,4 @@ -<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatCuentas.aspx.vb" Inherits="Contabilidad2_CatCuentas" %> +<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatCuentasCI.aspx.vb" Inherits="Contabilidad_CatCuentas" %> @@ -47,28 +47,26 @@ font-size: 9px !important; content: "\f040"; } - - #select2-C_DdlCuentaContable-results{ - max-width:300px!important - } - +
  • + Generar PDF +
  • Catálogo de Cuentas Contables -
  • - Imprimir Cuentas -
  • + + +
    @@ -83,8 +81,6 @@
    - <%--
    SubTotales: -
    - + -
    @@ -235,9 +232,7 @@ - - - + @@ -245,22 +240,6 @@ - - - - - - - - - - - - - - - - @@ -277,52 +256,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Contabilidad/RepOrigenAplicacion.aspx.vb b/Contabilidad/RepOrigenAplicacion.aspx.vb index d52d018a1..f13ef4a3b 100644 --- a/Contabilidad/RepOrigenAplicacion.aspx.vb +++ b/Contabilidad/RepOrigenAplicacion.aspx.vb @@ -4,7 +4,7 @@ Option Strict On Imports System.Data Imports Extensiones Imports Microsoft.Reporting.WebForms -Partial Class Contabilidad_RepOrigenAplicacion +Partial Class Contabilidad2_RepOrigenAplicacion Inherits ClsPaginas @@ -64,12 +64,12 @@ Partial Class Contabilidad_RepOrigenAplicacion Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - If UsuarioActual.Empresa.UsaAC Then - TipoReporte = -1 - Else - TipoReporte = 1 - tdTipoReporte.Visible = True - End If + 'If UsuarioActual.Empresa.UsaAC Then + ' TipoReporte = -1 + 'Else + TipoReporte = 1 + tdTipoReporte.Visible = True + 'End If 'Normal TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString @@ -77,23 +77,20 @@ Partial Class Contabilidad_RepOrigenAplicacion 'Anual Anos = 0 + Dim ClsConta As New ClsContabilidad + If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then + DdlEjercicio.DataSource = ClsConta.DtResultados + Else + DdlEjercicio.DataSource = Nothing + End If + + DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1) + DdlSubproyecto.DataBind() + DdlEjercicio.SelectedValue = NowADS().Year.ToString TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty) - - If UsuarioActual.Empresa.TipoContabilidad = 1 Then - - TabMensual.Visible = False - TabAnual.Visible = False - TdFI.Visible = False - tdTipoReporte.Visible = False - - GvOrigenAplicacionSIG.Visible = True - GvDatos.Visible = False - - End If - End If End Sub @@ -152,63 +149,32 @@ Partial Class Contabilidad_RepOrigenAplicacion #Region " NORMAL " Private Sub CargaDatos() + 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) + Dim ObjConta As New ClsContabilidad + ' Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, "0"c), Anio) + ' Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy") - LnkExcel.Visible = False - - - - - If UsuarioActual.Empresa.TipoContabilidad = 1 Then - - Dim AnioActual As Integer = TxtFechaAl.Text.ToDate.Year - Dim AnioAnteior As Integer = AnioActual - 1 - - - GvOrigenAplicacionSIG.Columns(1).Visible = True - GvOrigenAplicacionSIG.Columns(2).Visible = True - - GvOrigenAplicacionSIG.Columns(1).HeaderText = AnioAnteior.ToString - GvOrigenAplicacionSIG.Columns(2).HeaderText = AnioActual.ToString - - Dim ObjConta As New ClsContabilidad - 'GvOrigenAplicacionSIG - If ObjConta.GetRepOrigenAplicacion(TxtFechaAl.Text.ToDate, UsuarioActual.CveEmpresa) Then - GvOrigenAplicacionSIG.DataSource = ObjConta.DtResultados - - If ObjConta.DtResultados.Rows.Count > 0 Then - LnkExcel.Visible = True - End If - Else - GvOrigenAplicacionSIG.DataSource = Nothing - End If - ObjConta.Dispose() - GvOrigenAplicacionSIG.DataBind() + Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) + TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) + Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString + Dim FechaI = String.Format("{0}/{1}/{2}", FechaInicio.Day, FechaInicio.Month, FechaInicio.Year) + Dim FechaF = String.Format("{0}/{1}/{2}", FechaFin.Day, FechaFin.Month, FechaFin.Year) + If ObjConta.GetOrigenAplicacion(FechaI, FechaF, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then + DtDatos = ObjConta.DtResultados Else - - Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - - Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) - Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) - - If ObjConta.GetOrigenAplicacion(FechaInicio, FechaFin) Then - DtDatos = ObjConta.DtResultados - - - Else - DtDatos = Nothing - Alert("Ocurrio un error al cargar los datos de origen y aplicación", TipoMensaje.MsgError) - End If - ObjConta.Dispose() - - - If DtDatos IsNot Nothing Then - CargaGrid() - End If + DtDatos = Nothing + Alert("Ocurrio un error al cargar los datos de origen y aplicación", TipoMensaje.MsgError) End If + ObjConta.Dispose() + + If DtDatos IsNot Nothing Then + CargaGrid() + End If End Sub Private Sub CargaGrid() @@ -220,15 +186,15 @@ Partial Class Contabilidad_RepOrigenAplicacion Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - 'Titulo y Sumatoria de cambios - If e.Row.DBCampo("Orden3").ToString.ToEntero = 10 Or e.Row.DBCampo("Orden3").ToString.ToEntero = 30 Then - e.Row.FCLabel("LbNombre").Font.Bold = True - End If + ''Titulo y Sumatoria de cambios + 'If e.Row.DBCampo("Orden3").ToString.ToEntero = 10 Or e.Row.DBCampo("Orden3").ToString.ToEntero = 30 Then + ' e.Row.FCLabel("LbNombre").Font.Bold = True + 'End If - 'CUENTAS - If e.Row.DBCampo("Orden3").ToString.ToEntero = 20 Then - e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;") - End If + ''CUENTAS + 'If e.Row.DBCampo("Orden3").ToString.ToEntero = 20 Then + ' e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;") + 'End If 'TOTAL If e.Row.DBCampo("Nombre").ToString.Trim = "" Then @@ -240,62 +206,17 @@ Partial Class Contabilidad_RepOrigenAplicacion End If End Sub - - - Protected Sub GvOrigenAplicacionSIG_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOrigenAplicacionSIG.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - - 'Titulo y Sumatoria de cambios - If e.Row.DBCampo("Orden3").ToString.ToEntero = 10 Or e.Row.DBCampo("Orden3").ToString.ToEntero = 30 Then - e.Row.FCLabel("LbNombre").Font.Bold = True - End If - - 'CUENTAS - If e.Row.DBCampo("Orden3").ToString.ToEntero = 20 Then - e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;") - End If - - 'TOTAL - If e.Row.DBCampo("Nombre").ToString.Trim = "" Then - e.Row.Attributes.Add("style", "border-top: 1px solid; margin-top:10px;") - e.Row.FCLabel("LbNombre").Font.Bold = True - e.Row.FCLabel("LbNombre").Font.Italic = True - e.Row.FCLabel("LbNombre").Text = "TOTAL" - End If - - - If UsuarioActual.Empresa.TipoContabilidad = 1 Then - - 'Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta=55274&FF=31/12/2021 - Dim FechaFinBase As Date = New Date(TxtFechaAl.Text.ToDate.Year - 1, 12, 31) - - If e.Row.DataKey("CveCuenta").ToEntero > 0 Then - e.Row.FCHyperLink("HLlImporteBase").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={e.Row.DataKey("CveCuenta")}&FF={FechaFinBase.ToString("dd/MM/yyyy")}" - e.Row.FCHyperLink("HLImporteActual").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={e.Row.DataKey("CveCuenta")}&FF={TxtFechaAl.Text}" - e.Row.FCHyperLink("HLOrigen").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={e.Row.DataKey("CveCuenta")}&FF={TxtFechaAl.Text}" - e.Row.FCHyperLink("HLAplicacion").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={e.Row.DataKey("CveCuenta")}&FF={TxtFechaAl.Text}" - End If - - End If - - End If - End Sub - - - - - - #End Region #Region " MENSUAL " Private Sub CargaDatosMensual() - Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) + ''Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) + Dim ObjConta As New ClsContabilidad TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) - - If ObjConta.GetOrigenAplicacionMensual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte) Then + Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString + If ObjConta.GetOrigenAplicacionMensual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then DtDatosMensual = ObjConta.DtResultados Else DtDatosMensual = Nothing @@ -370,11 +291,14 @@ Partial Class Contabilidad_RepOrigenAplicacion #Region " ANUAL " Private Sub CargaDatosAnual() - Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) + 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) + Dim ObjConta As New ClsContabilidad TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) + Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 - If ObjConta.GetOrigenAplicacionAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte) Then + If ObjConta.GetOrigenAplicacionAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then DtDatosAnual = ObjConta.DtResultados Else DtDatosAnual = Nothing @@ -382,7 +306,7 @@ Partial Class Contabilidad_RepOrigenAplicacion End If ObjConta.Dispose() - Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 + If DtDatosAnual IsNot Nothing Then CargaGridAnual() @@ -433,7 +357,4 @@ Partial Class Contabilidad_RepOrigenAplicacion #End Region - Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) - GvDatos.ExportToExcel2("RepOrigenAplicacion.xlsx") - End Sub End Class diff --git a/Contabilidad2/RepSituacionFinanciera.aspx.vb_old b/Contabilidad/RepSituacionFinanciera.aspx.vb_old similarity index 96% rename from Contabilidad2/RepSituacionFinanciera.aspx.vb_old rename to Contabilidad/RepSituacionFinanciera.aspx.vb_old index b5aa278b7..133e975d5 100644 --- a/Contabilidad2/RepSituacionFinanciera.aspx.vb_old +++ b/Contabilidad/RepSituacionFinanciera.aspx.vb_old @@ -487,8 +487,8 @@ Partial Class AC2_SituacionFinanciera e.Row.FCLabel("LbNombre").Font.Bold = True e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;") Else - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte) + e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte) + e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte) End If If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then @@ -519,8 +519,8 @@ Partial Class AC2_SituacionFinanciera e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;") 'Cuentas Else - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString) + e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString) + e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString) End If @@ -553,8 +553,8 @@ Partial Class AC2_SituacionFinanciera 'e.Row.ControlStyle.ForeColor = Drawing.Color.White 'e.Row.ControlStyle.Font.Bold = True ElseIf e.Row.DBCampo("CveCuenta") <> "55276" Then - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString) + e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString) + e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString) End If If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then diff --git a/Contabilidad2/RepSituacionFinancieraSAT.aspx.exclude b/Contabilidad/RepSituacionFinancieraSAT.aspx.exclude similarity index 100% rename from Contabilidad2/RepSituacionFinancieraSAT.aspx.exclude rename to Contabilidad/RepSituacionFinancieraSAT.aspx.exclude diff --git a/Contabilidad2/RepSituacionFinancieraSAT.aspx.vb.exclude b/Contabilidad/RepSituacionFinancieraSAT.aspx.vb.exclude similarity index 97% rename from Contabilidad2/RepSituacionFinancieraSAT.aspx.vb.exclude rename to Contabilidad/RepSituacionFinancieraSAT.aspx.vb.exclude index 909c79d1e..751a8a35e 100644 --- a/Contabilidad2/RepSituacionFinancieraSAT.aspx.vb.exclude +++ b/Contabilidad/RepSituacionFinancieraSAT.aspx.vb.exclude @@ -485,8 +485,8 @@ Partial Class AC2_SituacionFinanciera e.Row.FCLabel("LbNombre").Font.Bold = True e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;") Else - ' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte) - ' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte) + ' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte) + ' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte) End If If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then @@ -517,8 +517,8 @@ Partial Class AC2_SituacionFinanciera e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;") 'Cuentas Else - 'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString) - 'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString) + 'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString) + 'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString) End If @@ -551,8 +551,8 @@ Partial Class AC2_SituacionFinanciera 'e.Row.ControlStyle.ForeColor = Drawing.Color.White 'e.Row.ControlStyle.Font.Bold = True Else - ' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString) - ' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString) + ' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString) + ' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString) End If If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then diff --git a/Contabilidad2/RepVariacionHaciendaPublica.aspx b/Contabilidad/RepVariacionHaciendaPublica.aspx similarity index 100% rename from Contabilidad2/RepVariacionHaciendaPublica.aspx rename to Contabilidad/RepVariacionHaciendaPublica.aspx diff --git a/Contabilidad2/RepVariacionHaciendaPublica.aspx.vb b/Contabilidad/RepVariacionHaciendaPublica.aspx.vb similarity index 100% rename from Contabilidad2/RepVariacionHaciendaPublica.aspx.vb rename to Contabilidad/RepVariacionHaciendaPublica.aspx.vb diff --git a/Contabilidad2/CatCuentas.aspx.vb b/Contabilidad2/CatCuentas.aspx.vb deleted file mode 100644 index 7d7b7887c..000000000 --- a/Contabilidad2/CatCuentas.aspx.vb +++ /dev/null @@ -1,749 +0,0 @@ -Imports System.Data -Imports Extensiones -Imports Microsoft.Reporting.WebForms - -Partial Class Contabilidad2_CatCuentas - Inherits ClsPaginas - -#Region "Propiedades" - - Private Property DtDatos As DataTable - Get - Return CType(ViewState("DtDatos"), DataTable) - End Get - Set(value As DataTable) - ViewState("DtDatos") = value - End Set - End Property - - Private Property DtConceptosconta As DataTable - Get - Return CType(ViewState("DtConceptosconta"), DataTable) - End Get - Set(value As DataTable) - ViewState("DtConceptosconta") = value - End Set - End Property - Private Property IDSelected As Integer - Get - Return ViewState("idsel").ToString.ToEntero() - End Get - Set(value As Integer) - ViewState("idsel") = value - End Set - End Property - - Private Property CvePadre As Integer - Get - Return ViewState("CvePadre").ToString.ToEntero() - End Get - Set(value As Integer) - ViewState("CvePadre") = value - End Set - End Property - - Private Property Afectable As Boolean - Get - Return CBool(ViewState("Afectable").ToString) - End Get - Set(value As Boolean) - ViewState("Afectable") = value - End Set - End Property -#Region "Contabilidadnew" - Private Property CveProveedor As Integer - Get - Return ViewState("CveProveedor").ToString.ToEntero() - End Get - Set(value As Integer) - ViewState("CveProveedor") = value - End Set - End Property - Private Property CveCliente As Integer - Get - Return ViewState("CveCliente").ToString.ToEntero() - End Get - Set(value As Integer) - ViewState("CveCliente") = value - End Set - End Property - Private Property CveClasificacion As Integer - Get - Return ViewState("CveClasificacion").ToString.ToEntero() - End Get - Set(value As Integer) - ViewState("CveClasificacion") = value - End Set - End Property - - Private Property CveBancoCuenta As Integer - Get - Return ViewState("CveBancoCuenta").ToString.ToEntero() - End Get - Set(value As Integer) - ViewState("CveBancoCuenta") = value - End Set - End Property - Private Property CveAlmacen As Integer - Get - Return ViewState("CveAlmacen").ToString.ToEntero() - End Get - Set(value As Integer) - ViewState("CveAlmacen") = value - End Set - End Property -#End Region -#End Region - - Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - If Not Page.IsPostBack Then - - DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - DdlAlmacen.DataBind() - DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1")) - CargaMonedas() - CargaAgrupadorSAT() - CargaDatos() - Using objconta As New ClsContabilidad - objconta.GetConta_ConceptosContables(1) - DtConceptosconta = objconta.DtResultados - End Using - Using ObjBancos As New ClsBancos - If ObjBancos.GetBancosCuentas(-1) Then - ddlBancos.DataSource = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) - ddlBancos.DataBind() - ddlBancos.Items.Insert(0, New ListItem("Seleccione", "-1")) - End If - End Using - - - DdlConcepto.DataSource = DtConceptosconta - DdlConcepto.DataBind() - DdlConcepto.Items.Insert(0, New ListItem("Seleccione", "-1")) - 'Else - ' Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia) - ' MEECuenta.Enabled = False - 'End If - End If - End Sub - - Private Sub CargaMonedas() - - DdlMoneda.DataSource = GlobalDTMonedas - DdlMoneda.DataBind() - End Sub - - Private Sub CargaAgrupadorSAT() - - Dim ObjConta As New ClsContabilidad - - If ObjConta.GetAgrupadoresSAT() Then - DdlAgrupadorSAT.DataSource = ObjConta.DtResultados - End If - - ObjConta.Dispose() - DdlAgrupadorSAT.DataBind() - DdlAgrupadorSAT.Items.Insert(0, New ListItem("Seleccione", "-1")) - End Sub - - Private Sub CargaDatos() - 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim ObjConta As New ClsContabilidad - If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then - DtDatos = ObjConta.DtResultados - End If - ObjConta.Dispose() - - 'para obtener la mascara, tomo el primer dato y reemplazo los numeros por cero - Dim Mascara As String = UsuarioActual.Empresa.ContaFormatoCuenta.Replace("X", "9") '"###-##-####" - 'If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then - ' Mascara = DtDatos.Rows(0)("Codigo").ToString.Replace("1", "0").Replace("2", "0").Replace("3", "0").Replace("4", "0").Replace("5", "0").Replace("6", "0").Replace("7", "0").Replace("8", "0").Replace("9", "0") - 'End If - - MEECuenta.Mask = Mascara '.Replace("0", "9") - MEECuenta.AutoComplete = True - MEECuenta.AutoCompleteValue = Mascara - - ArbolCuentas.DataSource = DtDatos - ArbolCuentas.nivel = "CtaInicial" - ArbolCuentas.nodoid = "CveCuenta" - ArbolCuentas.padre = "CvePadre" - ArbolCuentas.titulo = "CuentaFormatoNombre" - ArbolCuentas.DataBind() - - - End Sub - - 'Private Function getNodosHijos(nodo As Integer) As DataTable - ' Return DtDatos.FiltraParametros(String.Format("IdPadre = {0}", nodo)) - 'End Function - Private Function getNodospadreHijos(nodo As Integer) As DataTable - Return DtDatos.FiltraParametros(String.Format("CveCuenta = {0}", nodo)) - End Function - Protected Sub agregar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.addclick - LimpiarCampos() - - Tsubcuenta.Visible = True - DdlCuentaContable.Visible = False - - Dim dt As New DataTable - - 'IDSelected = HdnID.Value.ToEntero() "ul" + itempadre.Cve; - Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem) - IDSelected = obj.Cve - 'obj.FindControl(String.Format("ul{0}", obj.Cve)) - 'obj.Controls.Add(New TextBox()) - dt = getNodospadreHijos(IDSelected) - If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then - Dim dr As DataRow = dt.Rows(0) - 'TxtCuenta.Text = Trim(dr("CuentaFormato").ToString.Replace("-", "").ToString) - 'Tcuenta.Text = Trim(dr("CuentaFormato").ToString.Replace("-", "").ToString) - Tsubcuenta.Text = dr("CuentaFormato").ToString() - DTcuenta.SelectedValue = dr("Tipo").ToString() - DcuentaMayor.SelectedValue = dr("CtaMayor").ToString - LblSubCuenta.Text = dr("Nombre").ToString - Afectable = CBool(dr("Afectable").ToString) - CvePadre = dr("CvePadre").ToString.ToEntero - End If - - If Afectable Then - RegistraScript(String.Format("Afectable({0});", nuevacuenta.ClientID)) - Alert("Se va crear una subcuenta en una cuenta afectable", TipoMensaje.MsgAdvertencia) - Else - RegistraScript("NoAfectable();") - - End If - TxtCuenta.Enabled = True - - 'Tcuenta.Enabled = True - nuevacuenta.Visible = True - updatos.Visible = True - updatos.Update() - - End Sub - Private Sub limpiavalorescontables() - - - DdlConcepto.SelectedValueExist(-1) - onconceptochange() - CveProveedor = -1 - DdlProveedores.SelectedText = "" - DdlProveedores.SelectedValue = CveProveedor.ToString - CveCliente = -1 - DdlClientesWS.SelectedText = "" - DdlClientesWS.SelectedValue = CveCliente.ToString - Dim PorcentajeImpuesto As Decimal = -1 - DdlClasificacion.SelectedValueExist(PorcentajeImpuesto) - CveClasificacion = -1 - DdlClasificacion.SelectedValueExist(CveClasificacion) - CveBancoCuenta = -1 - CveAlmacen = -1 - DdlAlmacen.SelectedValueExist(CveAlmacen) - End Sub - Protected Sub editar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.editclick - LimpiarCampos() - limpiavalorescontables() - CargaCuentasContables() - - Tsubcuenta.Visible = False - DdlCuentaContable.Visible = True - - Dim dt As DataTable - Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem) - IDSelected = obj.Cve - dt = getNodospadreHijos(IDSelected) - If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then - Dim dr As DataRow = dt.Rows(0) - TxtCuenta.Text = dr("CuentaFormato").ToString.Replace("-", "").ToString - 'Tcuenta.Text = dr("CuentaFormato").ToString.Replace("-", "").ToString - Tnombre.Text = dr("Nombre").ToString() - DTcuenta.SelectedValue = dr("Tipo").ToString() - DcuentaMayor.SelectedValue = dr("CtaMayor").ToString - DdlMoneda.SelectedValue = If(dr("CveMoneda").ToString = "", "1", dr("CveMoneda").ToString) - Using objconta As New ClsContabilidad - objconta.GetConta_CuentasDataContabilidad(IDSelected, UsuarioActual.CveEmpresa) - If objconta.DtResultados.Rows.Count > 0 Then - Dim rowcc As DataRow = objconta.DtResultados.Rows(0) - DdlConcepto.SelectedValue = "-1" - DdlConcepto.SelectedValueExist(rowcc("CveConceptoAdmin").ToString().ToEntero()) - onconceptochange() - CveProveedor = rowcc("CveProveedor").ToString().ToEntero() - DdlProveedores.SelectedText = rowcc("Proveedor").ToString() - DdlProveedores.SelectedValue = CveProveedor.ToString - CveCliente = rowcc("CveCliente").ToString().ToEntero() - DdlClientesWS.SelectedText = rowcc("Cliente").ToString - DdlClientesWS.SelectedValue = CveCliente.ToString - Dim PorcentajeImpuesto As Decimal = rowcc("PorcentajeImpuesto").ToString().ToDecimal() * 100 - TxtPorcentaje.Text = PorcentajeImpuesto.ToString - CveClasificacion = rowcc("CveClasificacion").ToString().ToEntero() - DdlClasificacion.SelectedValueExist(CveClasificacion) - CveBancoCuenta = rowcc("CveBancoCuenta").ToString().ToEntero() - ddlBancos.SelectedValue = "-1" - ddlBancos.SelectedValueExist(CveBancoCuenta) - CveAlmacen = rowcc("CveAlmacen").ToString().ToEntero() - DdlAlmacen.SelectedValue = "-1" - DdlAlmacen.SelectedValueExist(CveAlmacen) - DdlPersonal.SelectedValueExist(rowcc("CvePersonal").ToString().ToEntero()) - End If - - End Using - - If dr("CveAgrupadorSAT").ToString.ToEntero = 0 Then - DdlAgrupadorSAT.SelectedValue = "-1" - Else - DdlAgrupadorSAT.SelectedValueExist(dr("CveAgrupadorSAT").ToString) - End If - - - TxtDigAgrup.Text = dr("DigAgrup").ToString - TxtNomIngles.Text = dr("NomIdioma").ToString - - Dim Hijos As Integer = DtDatos.FiltraParametros(String.Format("CvePadre = {0}", IDSelected)).Rows.Count - - If Hijos = 0 Then BtnEliminar.Visible = True - - dt = getNodospadreHijos(dr("CvePadre").ToString.ToEntero) - If dt.Rows.Count > 0 Then - Dim drt As DataRow = dt.Rows(0) - Tsubcuenta.Text = drt("Codigo").ToString - DdlCuentaContable.SelectedValueExist(drt("CveCuenta").ToString) - LblSubCuenta.Text = drt("Nombre").ToString - End If - - End If - - TxtCuenta.Enabled = True - Guardar.Visible = True - updatos.Visible = True - updatos.Update() - - End Sub - - Private Sub CargaCuentasContables() - - DdlCuentaContable.ClearSelection() - DdlCuentaContable.Items.Clear() - DdlCuentaContable.SelectedValue = Nothing - - Dim ObjConta As New ClsContabilidad - - If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then - DdlCuentaContable.DataSource = ObjConta.DtResultados - End If - - ObjConta.Dispose() - - DdlCuentaContable.DataBind() - DdlCuentaContable.Items.Insert(0, New ListItem("-", "-1")) - DdlCuentaContable.SelectedValueExist("-1") - - End Sub - Protected Sub Guardar_Click(sender As Object, e As EventArgs) Handles Guardar.Click - - If Tnombre.Text.Trim = "" Then Alert("Ingrese nombre de la cuenta", TipoMensaje.MsgError) : Exit Sub - - Dim ObjConta As New ClsContabilidad - - Dim CveConceptoAdmin As Integer = DdlConcepto.SelectedValue.ToEntero() - Dim CveProveedor As Integer = DdlProveedores.SelectedValue.ToEntero() - Dim CveCliente As Integer = DdlClientesWS.SelectedValue.ToEntero() - Dim CveClasificacion As Integer = DdlClasificacion.SelectedValue.ToEntero() - Dim PorcentajeImpuesto As Decimal = TxtPorcentaje.Text.ToDecimal() / 100 - Dim CveBancoCuenta As Integer = ddlBancos.SelectedValue.ToEntero - Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero() - - - - If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then - If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, - TxtDigAgrup.Text.ToString.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin, - CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, - CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen, Codigo:=TxtCuenta.Text.Replace("-", ""), CvePadre:=DdlCuentaContable.SelectedValue.ToEntero) Then - - 'If UsuarioActual.Empresa.TipoContabilidad = 2 Then - ' Dim ObjContaEmpresa As New ClsContPAQi(UsuarioActual.Empresa) - ' If Not ObjContaEmpresa.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, - ' DdlMoneda.SelectedValue.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then - ' ObjContaEmpresa.Dispose() - ' ObjConta.Dispose() - ' Exit Sub - ' End If - 'End If - - 'Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") - - 'If UsuarioActual.Empresa.TipoContabilidad = 2 Then - - ' Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) - - ' If ObjConta2.GetCuentas(-1, "-1", -1) Then - ' Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero - ' Dim IdAgrupador As Integer - - ' If ObjConta2.GetAgrupadoresSAT() Then - ' IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero - ' End If - ' If Id > 0 Then - ' If ObjConta2.UpdateCuenta(Id, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, IdAgrupador, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then - ' End If - ' End If - ' End If - ' End Using - 'End If - - Dim customerRow As Data.DataRow - customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0) - customerRow("Nombre") = Tnombre.Text - DtDatos.AcceptChanges() - - CargaDatos() - ArbolCuentas.DataSource = DtDatos - - Dim item As CheckBox = DirectCast(ArbolCuentas.FindControl(String.Format("chk{0}", IDSelected)), CheckBox) - item.Text = String.Format("{0} - {1}", customerRow("CuentaFormato").ToString, Tnombre.Text) - 'updatos.Visible = False - 'Guardar.Visible = False - LimpiarCampos() - 'RegistraScript("$get('BtnCambiaAgrupadorSAT').click();") - updatos.Update() - GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing - Alert("La cuenta se guardo correctamente") - - End If - Else - Alert("Es necesario agregar el campo 'Agrupador SAT'", TipoMensaje.MsgError) - End If - - - ObjConta.Dispose() - - End Sub - Protected Sub nuevacuenta_Click(sender As Object, e As EventArgs) Handles nuevacuenta.Click - - If Tnombre.Text.Trim = "" Then Alert("Ingrese nombre de la cuenta", TipoMensaje.MsgError) : Exit Sub - - If TxtCuenta.Text.Trim = "" Then Alert("Ingrese la cuenta", TipoMensaje.MsgError) : Exit Sub - 'If Tcuenta.Text.Trim = "" Then Alert("Ingrese la cuenta", TipoMensaje.MsgError) : Exit Sub - - - 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim ObjConta As New ClsContabilidad - Dim CuentaEfectivo As Integer = 0 - 'Dim Afectable As Integer = 1 'If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable - TxtCuenta.Text.Replace("-", "") - Dim idnew As Integer = 0 - - Dim CveConceptoContable As Integer = DdlConcepto.SelectedValue.ToEntero() - Dim row As DataRow = Nothing - Dim CveTipoSaldo As Integer = 0 - Dim PorcentajeIVA As Decimal = -1 - Dim drt As DataRow - Dim CveConceptoAdmin As Integer - Dim CveProveedor As Integer - Dim CveCliente As Integer - Dim CveClasificacion As Integer - Dim PorcentajeImpuesto As Decimal - Dim CveBancoCuenta As Integer - 'Dim CveAlmacen As Integer = -1 - 'Dim CvePersonal As Integer = -1 - Dim NombreCuenta As String - Dim TipoCuenta As String - Dim CuentaMayor As Integer - Dim CveMoneda As Integer - Dim DigAgrup As Integer - Dim CveAgrupadorSat As Integer - Dim NomIdioma As String - Dim TieneError As Boolean = False - If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then - - If CveConceptoContable > 0 Then - row = DtConceptosconta.FiltroPrimero(String.Format("CveConceptoContable={0}", CveConceptoContable)) - CveTipoSaldo = row("CveTipoSaldo").ToString.ToEntero() - End If - If Not IsNothing(row) Then - If CveTipoSaldo = 3 Then - PorcentajeIVA = TxtPorcentaje.Text.ToDecimal / 100D - End If - End If - ObjConta.IniciaTransacSQL() - If Afectable Then - If ObjConta.GetCuentas(IDSelected, "-1", -1, UsuarioActual.CveEmpresa) Then - drt = ObjConta.DtResultados.FiltroPrimero(String.Format("CveCuenta={0}", IDSelected)) - CveConceptoAdmin = If(drt("CveConceptoAdmin").ToString.ToEntero = 0, -1, drt("CveConceptoAdmin").ToString.ToEntero) - CveProveedor = If(drt("CveProveedor").ToString.ToEntero = 0, -1, drt("CveProveedor").ToString.ToEntero) - CveCliente = If(drt("CveCliente").ToString.ToEntero = 0, -1, drt("CveCliente").ToString.ToEntero) - CveClasificacion = If(drt("CveClasificacion").ToString.ToEntero = 0, -1, drt("CveClasificacion").ToString.ToEntero) - PorcentajeImpuesto = If(drt("PorcentajeImpuesto").ToString.ToEntero = 0, -1, drt("PorcentajeImpuesto").ToString.ToEntero) - CveBancoCuenta = If(drt("CveBancoCuenta").ToString.ToEntero = 0, -1, drt("CveBancoCuenta").ToString.ToEntero) - 'CveAlmacen = IIf(drt("CveAlmacen").ToString.ToEntero = 0, -1, drt("CveAlmacen").ToString.ToEntero) - 'CvePersonal = IIf(drt("CvePersonal").ToString.ToEntero = 0, -1, drt("CvePersonal").ToString.ToEntero) - NombreCuenta = If(drt("Nombre").ToString = "", "", drt("Nombre").ToString) - TipoCuenta = If(drt("Tipo").ToString = "", "", drt("Tipo").ToString) - CuentaMayor = If(drt("CtaMayor").ToString.ToEntero = 0, 0, drt("CtaMayor").ToString.ToEntero) - CveMoneda = If(drt("CveMoneda").ToString.ToEntero = -1, -1, drt("CveMoneda").ToString.ToEntero) - DigAgrup = If(drt("DigAgrup").ToString.ToEntero = -1, -1, drt("DigAgrup").ToString.ToEntero) - CveAgrupadorSat = If(drt("CveAgrupadorSAT").ToString.ToEntero = 0, -1, drt("CveAgrupadorSAT").ToString.ToEntero) - NomIdioma = If(drt("NomIdioma").ToString = "", "", drt("NomIdioma").ToString) - idnew = ObjConta.AddCuenta(CvePadre, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, - DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente, - CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta) - If idnew > 0 Then - If ObjConta.UpdateTraspasoPrepoliza(UsuarioActual.CveEmpresa, IDSelected, idnew) Then - If Not ObjConta.UpdateCuenta(IDSelected.ToEntero, NombreCuenta, TipoCuenta, CuentaMayor, CveMoneda, - DigAgrup, CveAgrupadorSat, NomIdioma) Then - TieneError = True - ObjConta.RollBack() - ObjConta.Dispose() - Exit Sub - End If - Else - Alert("El traspaso de movimientos en la cuenta tuvo un error.", TipoMensaje.MsgError) - TieneError = True - ObjConta.RollBack() - ObjConta.Dispose() - End If - End If - End If - Else - idnew = ObjConta.AddCuenta(IDSelected, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, - DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, PorcentajeImpuesto:=PorcentajeIVA) - End If - - Else - Alert("Es necesario agregar el campo 'Agrupador SAT'", TipoMensaje.MsgError) - End If - - If idnew > 0 Then - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) - Dim codigoPadre As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text - If ObjConta2.GetCuentas(-1, "-1", -1) Then - Dim IdPadre As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero - Dim IdAgrupador As Integer - - If ObjConta2.GetAgrupadoresSAT() Then - IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero - End If - - - codigoPadre = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - ObjConta2 = New ClsContPAQi(UsuarioActual.Empresa) - ObjConta2.IniciaTransacSQL() - If ObjConta2.GetCuentas(-1, "-1", -1) Then - IdPadre = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero - If ObjConta2.GetAgrupadoresSAT() Then - IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero - End If - - If IdPadre > 0 Then - Dim idnew2 As Integer = ObjConta2.AddCuenta(TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, CuentaEfectivo, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, TxtNomIngles.Text.Trim, 1, IdPadre, IdAgrupador) - - If idnew2 > 0 Then - If Not ObjConta.UpdateCuentaCompaq(idnew, idnew2, UsuarioActual.CveEmpresa) Then - TieneError = True - ObjConta2.RollBack() - ObjConta.RollBack() - Alert("Ocurrio un error al vincultar la cuenta con SIG y Compaq", TipoMensaje.MsgError) - Else - ObjConta2.Commit() - End If - - Else - TieneError = True - ObjConta2.RollBack() - Alert("Ocurrio un error al crear la cuenta en Compaq", TipoMensaje.MsgError) - End If - End If - End If - ObjConta2.Dispose() - End If - If Not TieneError Then - Dim dr As DataRow = DtDatos.NewRow - dr("CveCuenta") = idnew - dr("CuentaFormato") = TxtCuenta.Text - 'dr("CuentaFormato") = Tcuenta.Text - dr("Nombre") = Tnombre.Text - dr("CuentaFormatoNombre") = String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text) - dr("Tipo") = DTcuenta.SelectedValue.ToString - dr("CtaMayor") = DcuentaMayor.SelectedValue.ToString - dr("CvePadre") = IDSelected - dr("Codigo") = Tnombre.Text - dr("CveMoneda") = DdlMoneda.SelectedValue.ToEntero - dr("DigAgrup") = TxtDigAgrup.Text.Trim.ToEntero - dr("NomIdioma") = TxtNomIngles.Text.Trim - DtDatos.Rows.Add(dr) - ArbolCuentas.DataSource = DtDatos - '.Attributes.Add("data-hijos","0"); - Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem) - item.Attributes.Item("data-hijos") = (item.Attributes.Item("data-hijos").ToEntero + 1).ToString - Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", IDSelected)), ADServerControl.DragableUL) - If (IsNothing(objul)) Then - objul = New ADServerControl.DragableUL - objul.ID = String.Format("ul{0}", item.Cve) - item.Controls.Add(objul) - End If - ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text)) - - End If - End If - If ObjConta2 IsNot Nothing Then ObjConta2.Dispose() - - End If - - Else - TieneError = True - ObjConta.RollBack() - Alert("Ocurrio un error al crear la cuenta", TipoMensaje.MsgError) - End If - - If Not TieneError Then - ObjConta.Commit() - GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing - CargaDatos() - LimpiarCampos() - updatos.Update() - Alert("La cuenta se guardo correctamente", TipoMensaje.MsgInformacion) - End If - ObjConta.Dispose() - - - - End Sub - Private Sub LimpiarCampos() - TxtCuenta.Text = "" - 'Tcuenta.Text = "" - Tnombre.Text = "" - DTcuenta.SelectedValue = "-1" - DcuentaMayor.SelectedValue = "-1" - DdlAgrupadorSAT.SelectedValue = "-1" - Tsubcuenta.Text = "" - TxtDigAgrup.Text = "" - Guardar.Visible = False - nuevacuenta.Visible = False - TxtCuenta.Enabled = False - 'Tcuenta.Enabled = False - DdlCuentaContable.SelectedValueExist(-1) - DdlCuentaContable.Visible = False - Tsubcuenta.Visible = True - BtnEliminar.Visible = False - End Sub - - Protected Sub borrar_Click(sender As Object, e As EventArgs) Handles borrar.Click - - End Sub - - Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click - 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim ObjConta As New ClsContabilidad - 'ObjConta.IniciaTransacSQL() - - If ObjConta.RemoveCuenta(IDSelected.ToEntero) Then - - Dim customerRow As Data.DataRow - customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0) - customerRow("CvePadre") = "-5" - DtDatos.AcceptChanges() - - ArbolCuentas.DataSource = DtDatos - Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem) - Dim padre As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", item.CvePadre)), ADServerControl.DragableItem) - padre.Attributes.Item("data-hijos") = (padre.Attributes.Item("data-hijos").ToEntero - 1).ToString - ArbolCuentas.Controls.Remove(item) - RegistraScript(String.Format("$('#{0}').click();", editar.ClientID)) - - LimpiarCampos() - upcuentas.Update() - Alert("La Cuenta ha sido eliminada", TipoMensaje.MsgInformacion) - - Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") - - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) - If ObjConta2.GetCuentas(-1, "-1", -1) Then - Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero - - If Id > 0 Then - If ObjConta2.RemoveCuenta(Id) Then - End If - End If - End If - ObjConta2.Dispose() - - End If - GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing - - Else - Alert("La Cuenta no pudo ser eliminada", TipoMensaje.MsgError) - ' ObjConta.RollBack() - End If - - ObjConta.Dispose() - - End Sub - 'Protected Sub BtnCambiaAgrupadorSAT_Click(sender As Object, e As EventArgs) - ' CargaAgrupadorSAT() - 'End Sub - Protected Sub DdlConcepto_SelectedIndexChanged(sender As Object, e As EventArgs) - onconceptochange() - End Sub - Private Sub onconceptochange(Optional CveCuenta As Integer = -1) - PnlOpcion1.Visible = False - pnlOpcion2.Visible = False - pnlOpcion3.Visible = False - pnlOpcion4.Visible = False - pnlOpcion5.Visible = False - pnlOpcion6.Visible = False - Dim CveConceptoContable As Integer = DdlConcepto.SelectedValue.ToEntero() - Dim row As DataRow = Nothing - Dim CveTipoSaldo As Integer = 0 - Dim CveParejaContable As Integer = 0 - If CveConceptoContable > 0 Then - row = DtConceptosconta.FiltroPrimero(String.Format("CveConceptoContable={0}", CveConceptoContable)) - CveTipoSaldo = row("CveTipoSaldo").ToString.ToEntero() - CveParejaContable = row("CveParejaContable").ToString().ToEntero() - End If - If Not IsNothing(row) Then - Select Case CveTipoSaldo - Case 1 - PnlOpcion1.Visible = True - Case 2 - pnlOpcion2.Visible = True - Case 3 - pnlOpcion2.Visible = True - pnlOpcion3.Visible = True - 'If DdlClasificacion.Items.Count < 2 Then - DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) - DdlClasificacion.DataBind() - 'End If - Case 4 - pnlOpcion4.Visible = True - Case 5 - pnlOpcion5.Visible = True - - Case 6 - pnlOpcion6.Visible = True - Case 8 - pnlOpcion8.Visible = True - DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa) - DdlPersonal.DataBind() - - End Select - End If - End Sub - Protected Sub LnkImprimirExcel_Click(sender As Object, e As EventArgs) - Imprime("Excel") - End Sub - Private Sub Imprime(Formato As String) - If DtDatos IsNot Nothing Then - - Dim params As New List(Of ReportParameter) - params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - - ImprimirPDF("Empresas/Grales/Formatos/Cuentas.rdlc", DtDatos, params, "Cuentas", Formato) - Else - Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) - End If - End Sub -End Class \ No newline at end of file diff --git a/Contabilidad2/RepAnexoCatalogo.aspx b/Contabilidad2/RepAnexoCatalogo.aspx deleted file mode 100644 index 26ea0ee59..000000000 --- a/Contabilidad2/RepAnexoCatalogo.aspx +++ /dev/null @@ -1,311 +0,0 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogo.aspx.vb" Inherits="AC2_RepAnexoCatalogo" EnableEventValidation="false" %> - - - - - - - - - - - - - -
  • - Excel -
  • -
  • - PDF -
  • - -
    - - - - -
    -
    -
    - - "><%--class="expand"--%> - -
    -
    - <%--
    --%> -
    -
    - Cuenta -
    -
    - - - - - - -
    - -
    - Fecha Inicio: -
    -
    -
    - - - - -
    - - - - - - -
    -
    - Fecha Fin: -
    -
    -
    - - - - -
    - - - - - - -
    -
    -
    -
    -
    > -
    -
    - Tipo Movto -
    -
    - - - - - - - -
    -
    - Tipo -
    -
    - - - - - -
    -
    - Proyecto: -
    -
    - - -
    - SubProyecto: -
    - - -
    -
    -
    -
    -
    -
    - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Saldos Iniciales
    DeudorAcreedor
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - -
    Saldos Actuales
    DeudorAcreedor
    -
    - - - <%----%> - - - -
    -
    - -
    - -
    -
    - - - - - - - diff --git a/Contabilidad2/RepAnexoCatalogo.aspx.vb b/Contabilidad2/RepAnexoCatalogo.aspx.vb deleted file mode 100644 index 14d6a8d8c..000000000 --- a/Contabilidad2/RepAnexoCatalogo.aspx.vb +++ /dev/null @@ -1,315 +0,0 @@ -Option Explicit On -Option Strict On - -Imports System.Data -Imports Extensiones -Imports Microsoft.Reporting.WebForms - -Partial Class AC2_RepAnexoCatalogo - Inherits ClsPaginas - - -#Region "PROPIEDADES" - Private Property DtDatos As DataTable - Get - DtDatos = DirectCast(ViewState("DtDatos"), DataTable) - End Get - - Set(ByVal value As DataTable) - ViewState("DtDatos") = value - End Set - End Property - Private Property FechaInicio As Date - Get - FechaInicio = ViewState("FechaInicio").ToString.ToDate - End Get - Set(value As Date) - ViewState("FechaInicio") = value - End Set - End Property - - Private Property FechaFin As Date - Get - FechaFin = ViewState("FechaFin").ToString.ToDate - End Get - Set(value As Date) - ViewState("FechaFin") = value - End Set - End Property - Private Property IdCuenta As Integer - Get - IdCuenta = ViewState("CveCuenta").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("CveCuenta") = value - End Set - End Property - 'Private Property DTCuentas As DataTable - ' Get - ' Return CType(ViewState("DTCuentas"), DataTable) - ' End Get - ' Set(value As DataTable) - ' ViewState("DTCuentas") = value - ' End Set - 'End Property - Private Property CveProyecto As String - Get - CveProyecto = ViewState("CveProyecto").ToString - End Get - Set(value As String) - ViewState("CveProyecto") = value - End Set - End Property - Private Property CveSubProyecto As String - Get - CveSubProyecto = ViewState("CveSubProyecto").ToString - End Get - Set(value As String) - ViewState("CveSubProyecto") = value - End Set - End Property - - Private Property TipoReporte As Integer - Get - TipoReporte = ViewState("TP").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("TP") = value - End Set - End Property -#End Region - - Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load - If Not Page.IsPostBack Then - - 'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.CveEmpresa <> 119 Then - ' Response.Redirect($"/Contabilidad/RepAnexoCatalogo.aspx") - 'End If - - Dim ErrorParametros = True - DtDatos = Nothing - CargaTipoCuentas() - - FechaInicio = NowADS().FirstDayOfMonth - FechaFin = NowADS() - - 'If UsuarioActual.Empresa.UsaAC Then - ' TipoReporte = -1 - 'Else - ' TipoReporte = 1 - ' tdTipoReporte.Visible = True - ' tdTipoReporte2.Visible = True - 'End If - - - If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then - 'If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then - If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then - IdCuenta = Request("CveCuenta").ToEntero - 'FechaInicio = Request("FI").ToDate - FechaFin = Request("FF").ToDate - DdlCuentas.SelectedValueExist(IdCuenta) - - If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then - FechaInicio = Request("FI").ToDate - Else - If Request("ER") IsNot Nothing AndAlso Request("ER").ToString = "1" Then - FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1) - Else - FechaInicio = ("1900/01/01").ToDate - End If - End If - - - If Request("CM") IsNot Nothing AndAlso IsNumeric(Request("CM")) AndAlso Request("CM").ToEntero > 0 Then - DdlCuenta.SelectedValueExist(Request("CM").ToString) - End If - - If Request("CveProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveProyecto")) Then - CveProyecto = Request("CveProyecto").ToString - DdlProyecto.SelectedValueExist(CveProyecto) - DdlProyecto_SelectedIndexChanged(Nothing, Nothing) - End If - - If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then - CveSubProyecto = Request("CveSubProyecto").ToString - DdlSubproyecto.SelectedValueExist(CveSubProyecto) - End If - - ErrorParametros = False - - If Request("TP") IsNot Nothing AndAlso IsNumeric(Request("TP")) AndAlso Request("TP").ToEntero > 0 Then - TipoReporte = Request("TP").ToEntero - - DdlTipoReporte.SelectedValue = TipoReporte.ToString - End If - End If - 'End If - End If - - - txtFechaI.Text = FechaInicio.ToShortDateString - txtFechaF.Text = FechaFin.ToShortDateString - - If Not ErrorParametros Then - CargaDatos() - End If - - End If - End Sub - -#Region "CARGA DATOS Y GRID" - - Private Sub CargaTipoCuentas() - 'Dim ObjTipoCuenta As New ClsContPAQi(UsuarioActual.Empresa) - Dim ObjTipoCuenta As New ClsContabilidad - Dim strGlobal As String = "" - - If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then - - DdlCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')") - ' DdlCuentas.DataSource = ObjTipoCuenta.DtResultados - End If - ObjTipoCuenta.Dispose() - - DdlCuentas.DataBind() - - CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto) - - End Sub - - Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged - CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos") - End Sub - - Private Sub CargaDatos() - 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim ObjConta As New ClsContabilidad - - If Request("TipoReporte") IsNot Nothing Then - TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) - Else - TipoReporte = DdlTipoReporte.SelectedValue.ToEntero - End If - 'Dim CveSubProyecto As String - - CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero.ToString - CveProyecto = DdlProyecto.SelectedValue.ToEntero.ToString - - If ObjConta.GetAnexoCatalogo(IdCuenta, FechaInicio, FechaFin, DdlCuenta.SelectedValue.ToEntero, CveProyecto.ToEntero, CveSubProyecto.ToEntero, UsuarioActual.CveEmpresa, TipoReporte) Then - - If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then - DtDatos = ObjConta.DtResultados.FiltraParametros(" SaldoInicial <> 0 OR Cargos <> 0 OR Abonos <> 0") - Else - DtDatos = ObjConta.DtResultados - End If - - CargaGrid() - Else - DtDatos = Nothing - Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo.", TipoMensaje.MsgError) - End If - - ObjConta.Dispose() - End Sub - Private Sub CargaGrid() - GvDatos.DataSource = DtDatos - 'GvDatos.Dispose() - GvDatos.DataBind() - UpDatos.Update() - If DtDatos.Rows.Count > 0 Then - RegistraScript("Scroll();") - End If - - End Sub -#End Region - - Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs) - If e.Row.RowType = DataControlRowType.DataRow Then - - If e.Row.DBCampo("CveCuenta").ToEntero = IdCuenta Then - e.Row.ControlStyle.Font.Bold = True - 'e.Row.ControlStyle.Font.Size = 9 - 'e.Row.ControlStyle.Height = 30 - Else - e.Row.ControlStyle.Font.Bold = False - End If - - 'If e.Row.DBCampo("CtaMayor") = "4" Or e.Row.DBCampo("CtaMayor") = "1" Then - ' e.Row.ControlStyle.Font.Bold = True - 'End If - - 'Acomoda Deudor y Acreedor - If e.Row.DBCampo("Tipo") <> "D" Then - 'e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0}{1}", e.Row.DBCampo("SaldoInicial").FormatoNumero, "          ") - e.Row.FCLabel("LbSaldoInicial2").Visible = True - e.Row.FCLabel("LbSaldoActual").Visible = True - End If - - 'Colorea NEGATIVOS - If e.Row.DBCampo("SaldoInicial").ToString.ToDouble < 0 Then - e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red - End If - If e.Row.DBCampo("Cargos").ToString.ToDouble < 0 Then - e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red - End If - If e.Row.DBCampo("Abonos").ToString.ToDouble < 0 Then - e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red - End If - If e.Row.DBCampo("SaldoActual").ToString.ToDouble < 0 Then - e.Row.FCHyperLink("HLSaldoActual").ForeColor = Drawing.Color.Red - End If - - e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveProyecto={3}&CveSubProyecto={4}&TP={5}", e.Row.DBCampo("CveCuenta"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveProyecto, CveSubProyecto, TipoReporte) - End If - End Sub - - Protected Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click - If Not IsNothing(DtDatos) Then - ImprimirReporte() - End If - End Sub - - Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click - If Not IsNothing(DtDatos) Then - ImprimirReporte("Excel") - 'GvDatos.ExportToExcelG("AnexoCatalogo" & NowADS().ToShortDateString & ".xlsx") - 'GvDatos.ExportToExcelG("ExistenciasHorizontal.xlsx", "Anexo Catalogo", UsuarioActual, "".ToString, 100, 200) - End If - End Sub - Private Sub ImprimirReporte(Optional Formato As String = "PDF") - 'ubicacion del rdlc - Dim reportpath As String = "Contabilidad/Reportes/RepAnexoCatalogo.rdlc" - 'nombre del reporte - Dim fileName As String = "AnexoCatalogo" - 'parametros a enviar al reporte - Dim params As New List(Of ReportParameter) - params.Add(New ReportParameter("IdCuenta", IdCuenta.ToString)) - params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("usuarioImprimio", UsuarioActual.Nombre)) - Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy"))) - params.Add(New ReportParameter("pFechaInicio", FechaInicio.ToString("dd/MM/yyyy"))) - - ImprimirPDF(reportpath, DtDatos, params, fileName, Formato) - End Sub - Public Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click - - If DdlCuentas.SelectedValue.ToEntero = -1 Then - Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) - Else - FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate) - FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate) - IdCuenta = DdlCuentas.SelectedValue.ToEntero - CargaDatos() - End If - 'RegistraScript("Enable();") - End Sub - - - Public Overrides Sub VerifyRenderingInServerForm(control As Control) - - End Sub - -End Class diff --git a/Contabilidad2/RepBalanzaComprobacion.aspx b/Contabilidad2/RepBalanzaComprobacion.aspx deleted file mode 100644 index 4decf3c06..000000000 --- a/Contabilidad2/RepBalanzaComprobacion.aspx +++ /dev/null @@ -1,213 +0,0 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepBalanzaComprobacion.aspx.vb" Inherits="Contabilidad2_RepBalanzaComprobacion" %> - - - -
  • - Exporta Excel - <%--   --%> -
  • -
  • - Imprimir - <%--  --%> -
  • - -
    - - Balanza de Comprobación - - - - - - -
    -
    -
    - - -
    -
    -
    - -
    -
    - - - - - - - - - -
    -
    - -
    -
    - - - - - - - - - -
    -
    - -
    - - - - - - - - - - - -
    - -
    -
    -
    - -
    -
    -
    - -
    - - -
    - - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Saldos Iniciales
    DeudorAcreedor
    -
    - - - - -
    - - - - - - - - - - - - - - - - - - - - - - -
    Saldos Actuales
    DeudorAcreedor
    -
    - - - - - -
    -
    - -
    -
    -
    -
    -
    - - - -
    - diff --git a/Contabilidad2/RepBalanzaComprobacion.aspx.vb b/Contabilidad2/RepBalanzaComprobacion.aspx.vb deleted file mode 100644 index b68186834..000000000 --- a/Contabilidad2/RepBalanzaComprobacion.aspx.vb +++ /dev/null @@ -1,252 +0,0 @@ -Option Explicit On -Option Strict On - -Imports System -Imports System.Data -Imports Extensiones -Imports Microsoft.Reporting.WebForms - -Partial Class Contabilidad2_RepBalanzaComprobacion - Inherits ClsPaginas - - -#Region "PROPIEDADES" - Private Property DtDatos As DataTable - Get - DtDatos = DirectCast(ViewState("DtDatos"), DataTable) - End Get - - Set(ByVal value As DataTable) - ViewState("DtDatos") = value - End Set - End Property - Private Property FechaInicio As Date - Get - FechaInicio = ViewState("FechaInicio").ToString.ToDate - End Get - Set(value As Date) - ViewState("FechaInicio") = value - End Set - End Property - Private Property FechaFin As Date - Get - FechaFin = ViewState("FechaFin").ToString.ToDate - End Get - Set(value As Date) - ViewState("FechaFin") = value - End Set - End Property - Private Property IdCuenta As Integer - Get - IdCuenta = ViewState("IdCuenta").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("IdCuenta") = value - End Set - End Property - - Private Property ModoImpresion As Boolean - Get - ModoImpresion = CType(ViewState("ModoImpresion"), Boolean) - End Get - Set(value As Boolean) - ViewState("ModoImpresion") = value - End Set - End Property - - Private Property CveProyecto As Integer - Get - CveProyecto = ViewState("CveProyecto").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("CveProyecto") = value - End Set - End Property - Private Property CveSubProyecto As Integer - Get - CveSubProyecto = ViewState("CveSubProyecto").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("CveSubProyecto") = value - End Set - End Property - -#End Region - - Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load - If Not Page.IsPostBack Then - - 'If UsuarioActual.Empresa.TipoContabilidad = 2 Then - ' Response.Redirect($"/Contabilidad/RepBalanzaComprobacion.aspx") - 'End If - - Dim ErrorParametros = True - ModoImpresion = False - TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString - TxtFechaAl.Text = NowADS().ToShortDateString - - - If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then - 'If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then - If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then - IdCuenta = Request("CveCuenta").ToEntero - 'FechaInicio = Request("FI").ToDate - FechaFin = Request("FF").ToDate - FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1) - ErrorParametros = False - End If - 'End If - End If - DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1) - DdlSubproyecto.DataBind() - - If Not ErrorParametros Then - CargaDatos() - End If - - CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto) - End If - End Sub - - Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged - CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos") - End Sub - -#Region "CARGA DATOS Y GRID" - Private Sub CargaDatos() - ' Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - - Dim ObjConta As New ClsContabilidad - - CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero.ToEntero - CveProyecto = DdlProyecto.SelectedValue.ToEntero.ToEntero - - Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero - - If TipoReporte = 1 Then - 'mostrar cuales son las cuentas que no tienen asignado el agrupador que sean afectables - - If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then - Dim dtt As DataTable = ObjConta.DtResultados.FiltraParametros("CveAgrupadorSAT is null and not Codigo like '_%'") - If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then - Dim str As New StringBuilder - For Each dr As DataRow In dtt.Rows - str.AppendFormat(" - {0}
    ", dr("CtaCodigo")) - Next - Alert(str.ToString) - End If - End If - - End If - - If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, DdlTipoCuentas.SelectedValue.ToEntero, TipoReporte, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, DdlVista.SelectedValue.ToEntero, DdlNivel.SelectedValue.ToEntero) Then - DtDatos = ObjConta.DtResultados - Else - DtDatos = Nothing - Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError) - End If - - ObjConta.Dispose() - CargaGrid() - End Sub - Private Sub CargaGrid() - GvDatos.DataSource = DtDatos - GvDatos.DataBind() - UpDatos.Update() - End Sub -#End Region - - Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) - - CargaDatos() - - RegistraScript("Enable();") - End Sub - - Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs) - If e.Row.RowType = DataControlRowType.DataRow Then - - If e.Row.DBCampo("CtaMayor") = "1" OrElse e.Row.DBCampo("CtaMayor") = "3" OrElse e.Row.DBCampo("CtaMayor") = "4" Then - e.Row.ControlStyle.Font.Bold = True - End If - - 'Acomoda Deudor y Acreedor - If e.Row.DBCampo("CveTipo") = "1" Then - e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0} ", e.Row.DBCampo("SaldoInicial").FormatoNumero) - e.Row.FCLabel("LbSaldoActual").Text = " " - End If - - 'Colorea NEGATIVOS - If e.Row.DBCampo("SaldoInicial").ToString.ToDouble < 0 Then - e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red - End If - If e.Row.DBCampo("Cargos").ToString.ToDouble < 0 Then - e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red - End If - If e.Row.DBCampo("Abonos").ToString.ToDouble < 0 Then - e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red - End If - If e.Row.DBCampo("SaldoActual").ToString.ToDouble < 0 Then - e.Row.FCHyperLink("HLSaldoActual").ForeColor = Drawing.Color.Red - End If - - 'Total general - If e.Row.DBCampo("Id") = "" Then - - e.Row.ControlStyle.Font.Bold = True - e.Row.ControlStyle.Font.Size = 9 - e.Row.ControlStyle.Height = 30 - e.Row.FCLabel("LbNombre").Text = "Sumas Iguales" - e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0}
    {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}
    {1}", e.Row.DBCampo("SaldoAD").FormatoNumero, e.Row.DBCampo("SaldoAA").FormatoNumero) - Else - If ModoImpresion Then e.Row.Cells(5).Text = e.Row.FCHyperLink("HLSaldoActual").Text Else e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("ID"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveProyecto, CveSubProyecto) - End If - End If - End Sub - - - Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click - ModoImpresion = True - - CargaDatos() - - ImprimirReporte() - - - End Sub - 'No quitar porque no funciona el exporta PDF - Public Overrides Sub VerifyRenderingInServerForm(control As Control) - ' Verifies that the control is rendered - End Sub - - - Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - - ImprimirReporte("Excel") - End Sub - - Private Sub ImprimirReporte(Optional Formato As String = "PDF") - 'ubicacion del rdlc - Dim reportpath As String = "Contabilidad/Reportes/RepBalanzaComprobacion.rdlc" - 'nombre del reporte - Dim fileName As String = "BalanzaComprobacion" - 'parametros a enviar al reporte - Dim params As New List(Of ReportParameter) - params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa)) - Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy"))) - params.Add(New ReportParameter("pFechaIni", FechaInicio.ToString("dd/MM/yyyy"))) - params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - - ImprimirPDF(reportpath, DtDatos, params, fileName, Formato) - End Sub - -End Class diff --git a/Contabilidad2/RepEstadoResultados.aspx b/Contabilidad2/RepEstadoResultados.aspx deleted file mode 100644 index 18760d8f5..000000000 --- a/Contabilidad2/RepEstadoResultados.aspx +++ /dev/null @@ -1,563 +0,0 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoResultados.aspx.vb" Inherits="Contabilidad2_RepEstadoResultados" %> - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - -
    -
    -
    - -
    - - -
    -
    -
    - -
    - - - - - - - - - - - - - - -
    -
    -
    - -
    - - - -
    -
    -
    - -
    - - - - - -
    -
    -
    - -
    -
    - -
    - - - - - -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    - - - - - - - <%--NORMAL--%> - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - <%----%> - - - - - - - - <%----%> - - - - - - <%-- --%> - -
    -
    - - - - - - - - - - - - - - - - <%----%> - - - - - - - - <%----%> - - - - - - <%-- --%> - -
    -
    -
    - - - - - - - - - -
    -

    Resultados del Ejercicio (Ahorro/Desahorro):

    -
    - - - -
    -
    -
    - -
    -
    - -
    -
    - - <%--MENSUAL--%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%--ANUAL--%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    - diff --git a/Contabilidad2/RepEstadoResultados.aspx.vb b/Contabilidad2/RepEstadoResultados.aspx.vb deleted file mode 100644 index 8f64e7627..000000000 --- a/Contabilidad2/RepEstadoResultados.aspx.vb +++ /dev/null @@ -1,664 +0,0 @@ -Option Explicit On -Option Strict On - -Imports System.Data -Imports Extensiones -Imports Microsoft.Reporting.WebForms -Partial Class Contabilidad2_RepEstadoResultados - Inherits ClsPaginas - - -#Region " PROPIEDADES NORMAL " - Private Property DtDatos As DataTable - Get - DtDatos = DirectCast(ViewState("DtDatos"), DataTable) - End Get - - Set(ByVal value As DataTable) - ViewState("DtDatos") = value - End Set - End Property - Private Property DtIngresos As DataTable - Get - DtIngresos = DirectCast(ViewState("DtIngresos"), DataTable) - End Get - - Set(ByVal value As DataTable) - ViewState("DtIngresos") = value - End Set - End Property - Private Property DtGastos As DataTable - Get - DtGastos = DirectCast(ViewState("DtGastos"), DataTable) - End Get - - Set(ByVal value As DataTable) - ViewState("DtGastos") = value - End Set - End Property - Private Property TotalActual As Double - Get - TotalActual = ViewState("TotalActual").ToString.ToDouble - End Get - Set(value As Double) - ViewState("TotalActual") = value - End Set - End Property - Private Property TotalAnterior As Double - Get - TotalAnterior = ViewState("TotalAnterior").ToString.ToDouble - End Get - Set(value As Double) - ViewState("TotalAnterior") = value - End Set - End Property - Private Property FechaI As String - Get - Return ViewState("FechaI").ToString - End Get - Set(value As String) - ViewState("FechaI") = value - End Set - End Property - Private Property FechaF As String - Get - Return ViewState("FechaF").ToString - End Get - Set(value As String) - ViewState("FechaF") = value - End Set - End Property - Private Property ReporteComplementario As Boolean - Get - ReporteComplementario = CBool(ViewState("ReporteComplementario").ToString) - End Get - Set(value As Boolean) - ViewState("ReporteComplementario") = value - End Set - End Property -#End Region - -#Region " PROPIEDADES MENSUAL " - Private Property DtDatosMensual As DataTable - Get - DtDatosMensual = DirectCast(ViewState("DtDatosMensual"), DataTable) - End Get - - Set(ByVal value As DataTable) - ViewState("DtDatosMensual") = value - End Set - End Property - -#End Region - -#Region " PROPIEDADES ANUAL " - Private Property DtDatosAnual As DataTable - Get - DtDatosAnual = DirectCast(ViewState("DtDatosAnual"), DataTable) - End Get - - Set(ByVal value As DataTable) - ViewState("DtDatosAnual") = value - End Set - End Property - - Private Property Anos As Integer - Get - Anos = ViewState("Anos").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("Anos") = value - End Set - End Property -#End Region - -#Region " PROPIEDADES" - Private Property TipoReporte As Integer - Get - TipoReporte = ViewState("TipoReporte").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("TipoReporte") = value - End Set - End Property -#End Region - - - Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load - If Not Page.IsPostBack Then - - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - Response.Redirect($"/Contabilidad/RepEstadoResultados.aspx") - End If - - 'tdTipoReporte.Visible = True - TipoReporte = 1 - - - CargaDatosGenerales() - - DdlEjercicio.SelectedValue = NowADS().Year.ToString - - Anos = 0 - - 'Normal - TotalActual = 0 - TotalAnterior = 0 - DdlPeriodo.SelectedValue = NowADS().Month.ToString - - TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty) - End If - End Sub - - Private Sub CargaDatosGenerales() - 'Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim ClsConta As New ClsContabilidad - - If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then - DdlEjercicio.DataSource = ClsConta.DtResultados - Else - DdlEjercicio.DataSource = Nothing - End If - - DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1) - DdlSubproyecto.DataBind() - - - ClsConta.Dispose() - - DdlEjercicio.DataBind() - End Sub - -#Region " NORMAL " - - Private Sub CargaDatos() - FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue) - FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy") - TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) - - 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero - - Dim ObjConta As New ClsContabilidad - If ObjConta.GetEstadoActividades(FechaI.ToDate, FechaF.ToDate, TipoReporte, -1, CveSubProyecto, UsuarioActual.CveEmpresa) Then - DtDatos = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)") - Else - DtDatos = Nothing - Alert("Ocurrio un error al cargar los datos del Estado de Actividades", TipoMensaje.MsgError) - End If - ObjConta.Dispose() - - If DtDatos IsNot Nothing Then - CargaGrids() - SumaTotales() - End If - - End Sub - Private Sub CargaGrids() - DtIngresos = DtDatos.FiltraParametros("Orden Like '0004%' OR Tipo = 'H'") - DtGastos = DtDatos.FiltraParametros("Orden Like '0005%' OR Tipo = 'G'") - Dim Row As DataRow = DtIngresos.NewRow - - - Dim TotalActualLocal = 0.0, TotalAnteriorLocal = 0.0 - - - If DtIngresos.Rows.Count > 0 Then - - For Each dr As DataRow In DtIngresos.FiltraParametros("CtaMayor = 1").Rows - TotalActualLocal += dr("ImporteActual").ToString.ToDouble - TotalAnteriorLocal += dr("ImporteAcumulado").ToString.ToDouble - Next - - Row.Item("Nombre") = "TOTAL INGRESOS " - Row.Item("ImporteActual") = TotalActualLocal.ToString - Row.Item("PorcentajeActual") = "100" - Row.Item("ImporteAcumulado") = TotalAnteriorLocal.ToString - Row.Item("PorcentajeAcumulado") = "100" - Row.Item("CtaMayor") = -1 - DtIngresos.Rows.Add(Row) - Else - Row.Item("Nombre") = "TOTAL INGRESOS " - Row.Item("ImporteActual") = "0.00" - Row.Item("ImporteAcumulado") = "0.00" - Row.Item("CtaMayor") = -1 - DtIngresos.Rows.Add(Row) - End If - - Dim T1 = TotalActualLocal, T2 = TotalAnteriorLocal - - TotalActual = TotalActualLocal - TotalAnterior = TotalAnteriorLocal - - TotalActualLocal = 0 - TotalAnteriorLocal = 0 - - Row = DtGastos.NewRow - If DtGastos.Rows.Count > 0 Then - - For Each dr As DataRow In DtGastos.FiltraParametros("CtaMayor = 1").Rows - TotalActualLocal += dr("ImporteActual").ToString.ToDouble - TotalAnteriorLocal += dr("ImporteAcumulado").ToString.ToDouble - Next - - Row.Item("Nombre") = "TOTAL GASTOS" - Row.Item("ImporteActual") = TotalActualLocal - Row.Item("PorcentajeActual") = If(T1 > 0, (TotalActualLocal * 100 / T1).ToString, "0").FormatoNumero - Row.Item("ImporteAcumulado") = TotalAnteriorLocal.ToString - Row.Item("PorcentajeAcumulado") = If(T2 > 0, (TotalAnteriorLocal * 100 / T2).ToString, "0").FormatoNumero - Row.Item("CtaMayor") = -1 - DtGastos.Rows.Add(Row) - Else - Row.Item("Nombre") = "TOTAL GASTOS" - Row.Item("ImporteActual") = "0.00" - Row.Item("ImporteAcumulado") = "0.00" - Row.Item("CtaMayor") = -1 - DtGastos.Rows.Add(Row) - End If - - TotalActual -= TotalActualLocal - TotalAnterior -= TotalAnteriorLocal - - 'INSERTA UTILIDAD - Row = DtGastos.NewRow - Row.Item("Nombre") = "Utilidad (o Pérdida)" - Row.Item("ImporteActual") = TotalActual - Row.Item("PorcentajeActual") = If(T1 > 0, (TotalActual * 100 / T1).ToString, "0").FormatoNumero - Row.Item("ImporteAcumulado") = TotalAnterior.ToString - Row.Item("PorcentajeAcumulado") = If(T2 > 0, (TotalAnterior * 100 / T2).ToString, "0").FormatoNumero - Row.Item("CtaMayor") = -2 - DtGastos.Rows.Add(Row) - - - - GvIngresos.DataSource = DtIngresos - GvIngresos.DataBind() - - GvGastos.DataSource = DtGastos - GvGastos.DataBind() - - UpDatos.Update() - - End Sub - - Private Sub SumaTotales() - 'Llena Lb´s Totales - LbTotalActual.Text = TotalActual.ToString.FormatoNumero - LbTotalAnterior.Text = TotalAnterior.ToString.FormatoNumero - - LbTotalActual.ForeColor = If(TotalActual < 0, Drawing.Color.Red, Drawing.Color.Black) - LbTotalAnterior.ForeColor = If(TotalAnterior < 0, Drawing.Color.Red, Drawing.Color.Black) - - - End Sub - - -#Region "GV´S ROW DATA BOUND" - - Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs) - If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then - - 'METODO ANTERIOR - 'TotalActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble - 'TotalAnterior += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble - - 'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray - 'e.Row.ControlStyle.ForeColor = Drawing.Color.White - e.Row.ControlStyle.Font.Bold = True - ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then - 'e.Row.CssClass = "SubTotales3" - e.Row.ControlStyle.Font.Bold = True - End If - - If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) - End If - - - - If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then - e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red - End If - If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then - e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red - End If - End If - End Sub - - Protected Sub GvGastos_RowDataBound(sender As Object, e As GridViewRowEventArgs) - If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then - - - 'METODO ANTERIOR - 'TotalActual -= e.Row.DBCampo("ImporteActual").ToString.ToDouble - 'TotalAnterior -= e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble - - - 'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray - 'e.Row.ControlStyle.ForeColor = Drawing.Color.White - e.Row.ControlStyle.Font.Bold = True - - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = -2 Then - 'e.Row.CssClass = "SubTotales" - e.Row.ControlStyle.BackColor = Drawing.Color.LightGray - End If - - ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then - 'e.Row.CssClass = "SubTotales" - e.Row.ControlStyle.Font.Bold = True - End If - - If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) - End If - - If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then - e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red - End If - If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then - e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red - End If - End If - End Sub - -#End Region - -#End Region - - -#Region " MENSUAL " - - Private Sub CargaDatosMensual() - 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim ObjConta As New ClsContabilidad - TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) - Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString - If ObjConta.GetEstadoResultadosMensual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then - DtDatosMensual = ObjConta.DtResultados - Else - DtDatosMensual = Nothing - Alert("Ocurrio un error al cargar los datos del estado de resultados", TipoMensaje.MsgError) - End If - ObjConta.Dispose() - - EscondeSubtotales() - - If DtDatosMensual IsNot Nothing Then - CargaGridMensual() - End If - End Sub - Private Sub EscondeSubtotales() - - 'Esconde Trimestral - GvDatosMensual.Columns(7).Visible = False - GvDatosMensual.Columns(8).Visible = False - GvDatosMensual.Columns(17).Visible = False - GvDatosMensual.Columns(18).Visible = False - GvDatosMensual.Columns(27).Visible = False - GvDatosMensual.Columns(28).Visible = False - GvDatosMensual.Columns(35).Visible = False - GvDatosMensual.Columns(36).Visible = False - - 'Esconde Cuatrimestral - GvDatosMensual.Columns(11).Visible = False - GvDatosMensual.Columns(12).Visible = False - GvDatosMensual.Columns(23).Visible = False - GvDatosMensual.Columns(24).Visible = False - GvDatosMensual.Columns(37).Visible = False - GvDatosMensual.Columns(38).Visible = False - - If DdlSubtotales.SelectedValue = "2" Then - GvDatosMensual.Columns(7).Visible = True - GvDatosMensual.Columns(8).Visible = True - GvDatosMensual.Columns(17).Visible = True - GvDatosMensual.Columns(18).Visible = True - GvDatosMensual.Columns(27).Visible = True - GvDatosMensual.Columns(28).Visible = True - GvDatosMensual.Columns(35).Visible = True - GvDatosMensual.Columns(36).Visible = True - ElseIf DdlSubtotales.SelectedValue = "3" Then - GvDatosMensual.Columns(11).Visible = True - GvDatosMensual.Columns(12).Visible = True - GvDatosMensual.Columns(23).Visible = True - GvDatosMensual.Columns(24).Visible = True - GvDatosMensual.Columns(37).Visible = True - GvDatosMensual.Columns(38).Visible = True - End If - - End Sub - Private Sub CargaGridMensual() - GvDatosMensual.DataSource = DtDatosMensual - GvDatosMensual.DataBind() - UpDatosMensual.Update() - End Sub - - Protected Sub GvDatosMensual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosMensual.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then - e.Row.FCHyperLink("HLEnero").Text = "" - e.Row.FCHyperLink("HLFebrero").Text = "" - e.Row.FCHyperLink("HLMarzo").Text = "" - e.Row.FCHyperLink("HLAbril").Text = "" - e.Row.FCHyperLink("HLMayo").Text = "" - e.Row.FCHyperLink("HLJunio").Text = "" - e.Row.FCHyperLink("HLJulio").Text = "" - e.Row.FCHyperLink("HLAgosto").Text = "" - e.Row.FCHyperLink("HLSeptiembre").Text = "" - e.Row.FCHyperLink("HLOctubre").Text = "" - e.Row.FCHyperLink("HLNoviembre").Text = "" - e.Row.FCHyperLink("HLDiciembre").Text = "" - e.Row.Cells(2).Text = "" - e.Row.Cells(4).Text = "" - e.Row.Cells(6).Text = "" - e.Row.Cells(8).Text = "" - e.Row.Cells(10).Text = "" - e.Row.Cells(12).Text = "" - e.Row.Cells(14).Text = "" - e.Row.Cells(16).Text = "" - e.Row.Cells(18).Text = "" - e.Row.Cells(20).Text = "" - e.Row.Cells(22).Text = "" - e.Row.Cells(24).Text = "" - End If - - 'AGRUPADOR DE CUENTAS - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then - e.Row.FCLabel("LbNombre").Font.Bold = True - End If - - 'TITULO DE CUENTAS - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then - e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 10px;") - End If - - 'CUENTAS - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Then - e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;") - End If - - - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Or e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then - e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/02/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("09/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/11/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - - e.Row.FCHyperLink("HLTrimestral1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLTrimestral2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLTrimestral3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLTrimestral4").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - - e.Row.FCHyperLink("HLCuatrimestral1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLCuatrimestral2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLCuatrimestral3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - - End If - - 'TOTALES - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 5 Then - e.Row.Attributes.Add("style", "border-top: 1px solid;") - e.Row.FCLabel("LbNombre").Font.Italic = True - End If - - End If - End Sub - -#End Region - - -#Region " ANUAL " - - Private Sub CargaDatosAnual() - 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim ObjConta As New ClsContabilidad - TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) - - Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString - If ObjConta.GetEstadoResultadosAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then - DtDatosAnual = ObjConta.DtResultados - Else - DtDatosAnual = Nothing - Alert("Ocurrio un error al cargar los datos del balance general anual", TipoMensaje.MsgError) - End If - ObjConta.Dispose() - - Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 - - 'Esconde todo - For index = 1 To 40 Step 2 - GvDatosAnual.Columns(index).Visible = False - GvDatosAnual.Columns(index + 1).Visible = False - Next - - Dim i = 0 - For index = 1 To Anos * 2 Step 2 - GvDatosAnual.Columns(index).Visible = True - GvDatosAnual.Columns(index + 1).Visible = True - GvDatosAnual.Columns(index).HeaderText = (DdlEjercicio.SelectedValue.ToEntero + i).ToString - i = i + 1 - Next - - If DtDatosAnual IsNot Nothing Then - CargaGridAnual() - End If - End Sub - - Private Sub CargaGridAnual() - GvDatosAnual.DataSource = DtDatosAnual - GvDatosAnual.DataBind() - UpDatosAnual.Update() - End Sub - - - Protected Sub GvDatosAnual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosAnual.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then - For index = 1 To Anos - e.Row.FCHyperLink("HLAno" + index.ToString).Text = "" - e.Row.Cells(index + index).Text = "" - Next - End If - - 'AGRUPADOR DE CUENTAS - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then - e.Row.FCLabel("LbNombre").Font.Bold = True - End If - - 'TITULO DE CUENTAS - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then - e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 10px;") - e.Row.FCLabel("LbNombre").Font.Italic = True - End If - - 'CUENTAS - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Then - e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;") - End If - - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Or e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then - For index = 1 To Anos - e.Row.FCHyperLink("HLAno" + index.ToString).NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), String.Format("31/12/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), TipoReporte, DdlSubproyecto.SelectedValue) - Next - End If - - 'TOTALES - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 5 Then - e.Row.Attributes.Add("style", "border-top: 1px solid;") - e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 10px;") - e.Row.FCLabel("LbNombre").Font.Italic = True - End If - - 'SUMAS - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 6 Then - e.Row.FCLabel("LbNombre").Font.Bold = True - End If - - End If - End Sub - -#End Region - - - Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - - 'Nota: - ' 0 = Normal - ' 1 = Mensual - ' 2 = Anual - - If TabContainer.ActiveTabIndex = 0 Then - - CargaDatos() - - ElseIf TabContainer.ActiveTabIndex = 1 Then - - CargaDatosMensual() - - ElseIf TabContainer.ActiveTabIndex = 2 Then - - CargaDatosAnual() - - End If - - End Sub - - Protected Sub TabContainer_ActiveTabChanged(sender As Object, e As EventArgs) - - 'Nota: - ' 0 = Normal - ' 1 = Mensual - ' 2 = Anual - - 'Esconde Todo de lo variable de Filtros - TdSubTotales.Visible = False - TdPeriodo.Visible = False - - If TabContainer.ActiveTabIndex = 0 Then - TdPeriodo.Visible = True - ElseIf TabContainer.ActiveTabIndex = 1 Then - TdSubTotales.Visible = True - ElseIf TabContainer.ActiveTabIndex = 2 Then - - End If - - UpFiltros.Update() - - BtnConsultar_Click(BtnConsultar, EventArgs.Empty) - - End Sub - -End Class \ No newline at end of file diff --git a/Contabilidad2/RepFlujoEfectivo.aspx b/Contabilidad2/RepFlujoEfectivo.aspx deleted file mode 100644 index 63d08f881..000000000 --- a/Contabilidad2/RepFlujoEfectivo.aspx +++ /dev/null @@ -1,154 +0,0 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepFlujoEfectivo.aspx.vb" Inherits="AC2_RepFlujoEfectivo" %> - - - - - - - - - Estado de Flujo de Efectivo - - - -
  • - Exporta Excel -
  • -
  • - Imprimir -
  • - - <%-- --%> - <%--  -   -   -  --%> -
    - - - - -
    -
    -
    - -
    -
    -
    -
    Fecha Inicio:
    -
    -
    - - - - - - -
    -
    -
    Fecha Fin:
    -
    -
    - - - - - - -
    -
    -
    Divisor:
    -
    - - - - - -
    - -
    - - - -
    -
    -
    - -
    - - - - - -
    -
    -
    - -
    -
    -
    -
    -
    -
    - -
    -
    - - - - - - - -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - <%-- - - --%> -
    - <%----%> -
    -
    -
    - -
    -
    -
    - -
    - - - - - - - - -
    - - - diff --git a/Contabilidad2/RepFlujoEfectivo.aspx.vb b/Contabilidad2/RepFlujoEfectivo.aspx.vb deleted file mode 100644 index ea01c9228..000000000 --- a/Contabilidad2/RepFlujoEfectivo.aspx.vb +++ /dev/null @@ -1,235 +0,0 @@ -Option Explicit On -Option Strict On - -Imports System.Data -Imports Extensiones -Imports Microsoft.Reporting.WebForms -Imports System.IO -Imports iTextSharp.text -Imports iTextSharp.text.html.simpleparser -Imports iTextSharp.text.pdf - -Partial Class AC2_RepFlujoEfectivo - Inherits ClsPaginas - -#Region "PROPIEDADES" - Private Property DtDatos As DataTable - Get - DtDatos = DirectCast(ViewState("DtDatos"), DataTable) - End Get - - Set(ByVal value As DataTable) - ViewState("DtDatos") = value - End Set - End Property - Private Property TotalActual As Double - Get - TotalActual = ViewState("TotalActual").ToString.ToDouble - End Get - Set(value As Double) - ViewState("TotalActual") = value - End Set - End Property - Private Property TotalAnterior As Double - Get - TotalAnterior = ViewState("TotalAnterior").ToString.ToDouble - End Get - Set(value As Double) - ViewState("TotalAnterior") = value - End Set - End Property - - Private Property FechaAl As String - Get - FechaAl = ViewState("FechaAl").ToString - End Get - Set(value As String) - ViewState("FechaAl") = value - End Set - End Property -#End Region - - Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load - If Not Page.IsPostBack Then - - TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString - TxtFechaAl.Text = NowADS().ToShortDateString - - CargaDatos() - End If - End Sub - -#Region "CARGA DATOS Y GRID" - Private Sub CargaDatos() - 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim ObjConta As New ClsContabilidad - - DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1) - DdlSubproyecto.DataBind() - - Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) - Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) - FechaAl = TxtFechaAl.Text - Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString - Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero - If ObjConta.GetFlujoEfectivo(FechaInicio, FechaFin, DdlUnidad.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then - DtDatos = ObjConta.DtResultados - Else - DtDatos = Nothing - Alert("Ocurrio un error al cargar los datos del Estado de Flujo de Efectivo", TipoMensaje.MsgError) - End If - - ObjConta.Dispose() - - 'OBTENEMOS TOTALES NETOS DE OPERACIONES PARA INSERTAR DIRECTO - If DtDatos IsNot Nothing Then - If UsuarioActual.CveEmpresa.Contiene(120) Then - TotalActual = DtDatos.FiltraParametros("Codigo = '040000000000000000'").Rows(0)("ImporteActual").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '050000000000000000'").Rows(0)("ImporteActual").ToString.ToDouble - TotalAnterior = DtDatos.FiltraParametros("Codigo = '040000000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '050000000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble - Else - TotalActual = DtDatos.FiltraParametros("Codigo = '000040000000000000'").Rows(0)("ImporteActual").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '000050000000000000'").Rows(0)("ImporteActual").ToString.ToDouble - TotalAnterior = DtDatos.FiltraParametros("Codigo = '000040000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '000050000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble - End If - End If - - CargaGrid() - - End Sub - Private Sub CargaGrid() - GvDatos.DataSource = DtDatos - GvDatos.DataBind() - UpDatos.Update() - - ' GvDatos.Caption = String.Format("
    {0}
    Estado de Flujo de Efectivo
    Al {1}
    ", UsuarioActual.Empresa.Empresa, TxtFechaAl.Text) - - End Sub -#End Region - - Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - CargaDatos() - End Sub - - - Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) - If e.Row.RowType = DataControlRowType.DataRow Then - - 'PARA PONER AÑO EN HEADER - If e.Row.RowIndex = 0 Then - GvDatos.HeaderRow.FCLabel("LbPeriodoActual").Text = e.Row.DBCampo("Actual") - GvDatos.HeaderRow.FCLabel("LbPeriodoAnterior").Text = e.Row.DBCampo("Anterior") - End If - - 'TITULO DE BLOQUE (CABECERAS Y TOTALES) - If e.Row.DBCampo("Level") = "-1" Then - CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-top:20px; ") - e.Row.Font.Bold = True - - 'CABCERA - If e.Row.DBCampo("CveCuenta") = "12" Then - e.Row.FCLabel("LbActual").Text = "" - e.Row.FCLabel("LbAnterior").Text = "" - End If - - 'TOTAL OPERACIONES - If e.Row.DBCampo("CveCuenta") = "123" Then - e.Row.FCLabel("LbActual").Text = TotalActual.ToString.FormatoNumero - e.Row.FCLabel("LbAnterior").Text = TotalAnterior.ToString.FormatoNumero - End If - - End If - - 'ORIGEN Y APLICACION - If e.Row.DBCampo("Level") = "0" Then - CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-left:30px; margin-top:15px") - e.Row.Font.Bold = True - End If - - 'PAPAS - If e.Row.DBCampo("Level") = "2" Then - CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-left: 60px; margin-top:5px;") - End If - - 'HIJOS - If e.Row.DBCampo("Level") = "3" Then - CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-left:90px;") - End If - - 'INGRESOS -> ORIGEN - If e.Row.DBCampo("Codigo").ToString.Substring(0, 5) = "00004" Then e.Row.FCLiteral("LtNombre").Text = "ORIGEN" - - 'GASTOS -> APLICACION - If e.Row.DBCampo("Codigo").ToString.Substring(0, 5) = "00005" Then e.Row.FCLiteral("LtNombre").Text = "APLICACION" - - - - 'ACTIVIDADES DE OPERACION - If e.Row.DBCampo("Sup").ToString <> "" Then - If e.Row.DBCampo("ImporteAnterior").ToString.ToDecimal = 0 Then - e.Row.FCLabel("LbAnterior").Text = "" - End If - If e.Row.DBCampo("ImporteActual").ToString.ToDecimal = 0 Then - e.Row.FCLabel("LbActual").Text = "" - End If - End If - - - End If - End Sub - - Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click - ImprimirReporte() - End Sub - 'No quitar porque no funciona el exporta PDF - Public Overrides Sub VerifyRenderingInServerForm(control As Control) - ' Verifies that the control is rendered - End Sub - - 'Protected Sub GvDatos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowCreated - ' If (e.Row.RowType = DataControlRowType.Header) Then - ' Dim HeaderGrid As GridView = DirectCast(sender, GridView) - ' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert) - ' Dim HeaderCell As TableCell = New TableCell() - ' HeaderCell.Text = String.Format("
    {0}
    Estado de Flujo de Efectivo
    Al {1}
    ", UsuarioActual.Empresa.Empresa, FechaAl) - ' HeaderCell.ColumnSpan = GvDatos.Columns.Count - ' HeaderCell.HorizontalAlign = HorizontalAlign.Center - ' HeaderGridRow.Cells.Add(HeaderCell) - - - ' GvDatos.Controls(0).Controls.AddAt(0, HeaderGridRow) - ' End If - - ' If (e.Row.RowType = DataControlRowType.Footer) Then - ' Dim HeaderGrid As GridView = DirectCast(sender, GridView) - ' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Footer, DataControlRowState.Insert) - ' Dim HeaderCell As TableCell = New TableCell() - ' HeaderCell.Text = "




    _________________________________
    C.P. Izelda Angulo Peraza
    _________________________________
    Lic. Juan Fortino Leon Robinson
    Subdirector de Contabilidad Director General
    " - ' HeaderCell.ColumnSpan = GvDatos.Columns.Count - ' HeaderCell.HorizontalAlign = HorizontalAlign.Center - ' HeaderGridRow.Cells.Add(HeaderCell) - - ' e.Row.Cells.Clear() - ' e.Row.Cells.Add(HeaderCell) - - ' End If - - 'End Sub - - Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'GvDatos.ExportToExcel("ReporteFlujoEfectivo" & NowADS().ToShortDateString) - ImprimirReporte("Excel") - End Sub - - Private Sub ImprimirReporte(Optional Formato As String = "PDF") - Dim params As New List(Of ReportParameter) - params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa)) - Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - params.Add(New ReportParameter("pAl", FechaAl)) - params.Add(New ReportParameter("pTotalActual", TotalActual.ToString.FormatoNumero)) - params.Add(New ReportParameter("pTotalAnterior", TotalAnterior.ToString.FormatoNumero)) - params.Add(New ReportParameter("pFirma1", String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de Contabilidad", vbCrLf))) - params.Add(New ReportParameter("pFirma2", String.Format("Lic. Juan Fortino Leon Robinson{0} Director General", vbCrLf))) - ImprimirPDF("AC/Reportes/RepFlujoEfectivo.rdlc", DtDatos, params, "EdoFlujoEfectivo", Formato) - End Sub - -End Class diff --git a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx deleted file mode 100644 index 353caed37..000000000 --- a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx +++ /dev/null @@ -1,246 +0,0 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepMovimientosAuxiliaresCatalogo.aspx.vb" Inherits="Conta_RepMovimientosAuxiliaresCatalogo" EnableEventValidation="false" %> - - - - - - -
  • - Generar EXCEL -
  • -
  • - Imprimir -
  • - -
    - - Movimientos Auxiliares del Catálogo - - - - - -
    -
    -
    - - "><%--class="expand"--%> - -
    -
    -
    -
    - Cuenta: -
    -
    - - - - - -
    -
    - Fecha Inicio: -
    -
    -
    - - - - -
    - - - - - - -
    -
    - Fecha Fin: -
    -
    -
    - - - - -
    - - - - - - -
    -
    -
    -
    -
    > -
    -
    - Tipo Movto -
    -
    - - - - - - - -
    -
    - Tipo -
    -
    - - - - - -
    -
    - Proyecto: -
    -
    - - -
    - SubProyecto: -
    - - -
    - -
    -
    -
    -
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    CuentaNombreSaldo Inicial
    FechaTipoNúmeroConceptoReferenciaReferencia MovtoSubProyectoCargosAbonosSaldo
    -
    - - - - - - - - - - - - - - - - - - - - - - -
    - - - - Saldo Inicial: - - -
    - - - - - - -
    - -
    -
    - - - - - - - - - - - -
    -
    - -
    -
    -
    - -
    -
    - - - - - -
    - - - - - diff --git a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb deleted file mode 100644 index 876464b03..000000000 --- a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb +++ /dev/null @@ -1,456 +0,0 @@ -Option Explicit On -Option Strict On - -Imports System.Data -Imports Extensiones -Imports Microsoft.Reporting.WebForms - -Partial Class Conta_RepMovimientosAuxiliaresCatalogo - Inherits ClsPaginas - - -#Region "PROPIEDADES" - Private Property DtDatos As DataTable - Get - DtDatos = DirectCast(ViewState("DtDatos"), DataTable) - End Get - - Set(ByVal value As DataTable) - ViewState("DtDatos") = value - End Set - End Property - Private Property DtTotales As DataTable - Get - DtTotales = DirectCast(ViewState("DtTotales"), DataTable) - End Get - - Set(ByVal value As DataTable) - ViewState("DtTotales") = value - End Set - End Property - Private Property FechaInicio As Date - Get - FechaInicio = ViewState("FechaInicio").ToString.ToDate - End Get - Set(value As Date) - ViewState("FechaInicio") = value - End Set - End Property - Private Property FechaFin As Date - Get - FechaFin = ViewState("FechaFin").ToString.ToDate - End Get - Set(value As Date) - ViewState("FechaFin") = value - End Set - End Property - - Private Property TotalPadre As Boolean - Get - TotalPadre = CBool(ViewState("TotalPadre")) - End Get - Set(value As Boolean) - ViewState("TotalPadre") = value - End Set - End Property - Private Property DTCuentas As DataTable - Get - Return CType(ViewState("DTCuentas"), DataTable) - End Get - Set(value As DataTable) - ViewState("DTCuentas") = value - End Set - End Property - Private Property TipoReporte As String - Get - TipoReporte = ViewState("TP").ToString - End Get - Set(value As String) - ViewState("TP") = value - End Set - End Property - Private Property Cuenta As String - Get - Return ViewState("Cuenta").ToString - End Get - Set(value As String) - ViewState("Cuenta") = value - End Set - End Property -#End Region - - Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load - If Not Page.IsPostBack Then - - 'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.CveEmpresa <> 119 Then - ' Response.Redirect($"/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx") - 'End If - - Dim ErrorParametros As Boolean = True - - CargaTipoCuentas() - 'TxtCuenta.Enabled = False - - txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString - txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString - - - If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then - If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then - - FechaFin = Request("FF").ToDate - txtFechaF.Text = FechaFin.ToShortDateString - - DdlCuentas.SelectedValueExist(Request("CveCuenta").ToEntero) - - - If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then - FechaInicio = Request("FI").ToDate - txtFechaI.Text = FechaInicio.ToShortDateString - Else - FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1) - TxtFechaF.Text = FechaInicio.ToShortDateString - End If - - If Request("CveProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveProyecto")) Then - DdlProyecto.SelectedValueExist(Request("CveProyecto")) - DdlProyecto_SelectedIndexChanged(Nothing, Nothing) - End If - - If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then - DdlSubproyecto.SelectedValueExist(Request("CveSubProyecto")) - End If - - ErrorParametros = False - - If Request("TP") IsNot Nothing AndAlso IsNumeric(Request("TP")) AndAlso Request("TP").ToEntero > 0 Then - TipoReporte = Request("TP").ToString - - ' DdlTipoReporte.SelectedValue = TipoReporte.ToString - End If - - - ''If DdlTipoCuentas.Items.FindByValue(IdCuenta.ToString) IsNot Nothing Then - '' DdlTipoCuentas.SelectedValue = IdCuenta.ToString - ''Else - '' DdlTipoCuentas.SelectedValue = "-2" - '' TxtCuenta.Enabled = True - - '' If DTCuentas.FiltraParametros(String.Format("Cvecuenta = {0}", IdCuenta)).Rows.Count > 0 Then - '' TxtCuenta.Text = DTCuentas.FiltraParametros(String.Format("CveCuenta = {0}", IdCuenta)).Rows(0)("Codigo").ToString - '' End If - ''End If - - End If - End If - - - If Not ErrorParametros Then - TotalPadre = True - TipoReporte = "1" - CargaDatos() - End If - - End If - End Sub - - Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - If DdlCuentas.SelectedValue.ToEntero = -1 Then - Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) - Else - FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate) - FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate) - - CargaDatos() - End If - ' Imprimir_click(sender, e) - 'RegistraScript("Enable();") - End Sub - -#Region "C A R G A - D A T O S" - Public Function WSCuentas() As String - Dim Str As New StringBuilder - Dim i As Integer = 0 - Dim dt As DataTable = DTCuentas - - For Each dr As DataRow In dt.Rows - i += 1 - Str.AppendFormat("{{value:""{0}"",label:""{1}""}}{2}", dr("CveCuenta"), dr("Codigo").ToString.Replace("""", ""), If(i < dt.Rows.Count, ",", "")) - Next - - Return Str.ToString - End Function - Private Sub CargaTipoCuentas() - - Dim ObjTipoCuenta As New ClsContabilidad - DdlCuentas.Enabled = True - - If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then - DTCuentas = ObjTipoCuenta.DtResultados - DdlCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')") - - End If - ObjTipoCuenta.Dispose() - DdlCuentas.DataBind() - - CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto) - - End Sub - - Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged - CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos") - End Sub - Private Sub CargaDatos() - - Dim CveProyecto As Integer = DdlProyecto.SelectedValue.ToEntero - Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero - TipoReporte = DdlTipoReporte.SelectedValue.ToString - If TipoReporte = "1" And DdlCuentas.SelectedValue.ToEntero < 0 Then - Alert("No ha seleccionado cuenta, Favor de especificar una", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - Cuenta = DdlCuentas.SelectedItem.ToString - Dim ObjConta As New ClsContabilidad - If ObjConta.GetMovimientosAuxiliaresCatalogo(DdlCuentas.SelectedValue.ToEntero, FechaInicio, FechaFin, -1, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte, DdlOpcionCuentas.SelectedValue.ToEntero) Then - DtDatos = ObjConta.DtResultados - DtTotales = DtDatos.Clone - - CargaGrid() - Else - DtDatos = Nothing - End If - - ObjConta.Dispose() - End Sub -#End Region - - Private Sub InsertaTotales() - Dim i As Integer = 0 - Dim Aumento As Integer = 0 - Dim Row As DataRow - Dim Row2 As DataRow - - 'Llena DtTotales - For Each dr As DataRow In DtDatos.Rows - If dr("Concepto").ToString = "" Then - - Row = DtTotales.NewRow - - Row("CveCuenta") = -1 - Row("CargosMovto") = If("1" = "1", dr("Cargos"), dr("CargosME")) - Row("AbonosMovto") = If("1" = "1", dr("Abonos"), dr("AbonosME")) - Row("Saldo") = dr("SaldoActual") - Row("CtaMayor") = dr("CtaMayor") - Row("Concepto") = String.Format("Total {0}:", dr("Nombre")) - Row("Nombre") = dr("Nombre") - DtTotales.Rows.Add(Row) - Row("Clasificacion") = i - End If - - i += 1 - Next - - 'Inserta Totales en DtDatos - For Each dr As DataRow In DtTotales.Rows - i = 0 - - If dr("CtaMayor").ToString = "1" Then - DtDatos.ImportRow(dr) - End If - - If dr("CtaMayor").ToString = "2" Then - For index As Integer = dr("Clasificacion").ToString.ToEntero + Aumento To DtDatos.Rows.Count - If DtDatos.Rows(index)("Nombre").ToString <> dr("Nombre").ToString Then - i = index - Exit For - End If - Next - - Row2 = DtDatos.NewRow - Row2.ItemArray = dr.ItemArray - - DtDatos.Rows.InsertAt(Row2, i + Aumento) - Aumento += 1 - End If - - Next - - End Sub - - -#Region "G R I D - GV DATOS" - Private Sub CargaGrid() - GvDatos.DataSource = DtDatos - 'GvDatos.Dispose() - GvDatos.DataBind() - UpDatos.Update() - End Sub - Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) - If e.Row.RowType = DataControlRowType.DataRow Then - - If e.Row.DBCampo("Concepto") = "" Then - e.Row.ControlStyle.Font.Bold = True - e.Row.ControlStyle.Height = 35 - - 'Cuando es Titulo - If e.Row.DBCampo("SaldoActual") = "" Then - CType(e.Row.FindControl("tr2"), HtmlTableRow).Visible = False - - - 'Cuando Es Total - Else - CType(e.Row.FindControl("tr1"), HtmlTableRow).Visible = False - - 'Anterior para TotalPadre - 'If e.Row.DBCampo("CtaMayor").ToString = "2" And (e.Row.DBCampo("Nivel3").ToString <> "" Xor e.Row.DBCampo("Orden").ToString.Length = 18) Then - ' e.Row.FCLabel("LbReferencia").Text = "Total:" - 'Else - ' e.Row.FCLabel("LbConcepto").Text = String.Format("Total {0}:", e.Row.DBCampo("Nombre").ToString) - 'End If - - If TotalPadre Then - CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3).Width = "1px" - 'CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells.Remove(CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3)) - CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3).Align = "Right" - CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3).Width = "400px" - If e.Row.RowIndex + 1 = DtDatos.Rows.Count Then - CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(4).Attributes.Add("style", "border-top: 1px solid black;") - CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(5).Attributes.Add("style", "border-top: 1px solid black;") - CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(6).Attributes.Add("style", "border-top: 1px solid black;") - End If - e.Row.FCLabel("LbReferencia").Text = String.Format("Total {0}:", e.Row.DBCampo("Nombre").ToString) - - - Else - TotalPadre = True - e.Row.FCLabel("LbReferencia").Font.Bold = False - e.Row.FCLabel("LbReferencia").Text = "Total:" - CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(4).Align = "Right" - End If - - 'e.Row.FCLabel("LbReferencia").Text = String.Format("Total {0}:", If(e.Row.DBCampo("CtaMayor").ToString = "2", "", e.Row.DBCampo("Nombre").ToString)) - e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("Cargos").ToString.FormatoNumero(If("1" = "1", 2, 4)) - e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("Abonos").ToString.FormatoNumero(If("1" = "1", 2, 4)) - e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("SaldoActual").ToString.FormatoNumero(If("1" = "1", 2, 4)) - End If - - Else - TotalPadre = False - e.Row.ControlStyle.Font.Bold = False - CType(e.Row.FindControl("tr1"), HtmlTableRow).Visible = False - e.Row.FCHyperLink("HLPoliza").NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", e.Row.DBCampo("CvePoliza")) - - If e.Row.DBCampo("CargosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("CargosMovto").ToString.FormatoNumero(If("1" = "1", 2, 4)) - If e.Row.DBCampo("AbonosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("AbonosMovto").ToString.FormatoNumero(If("1" = "1", 2, 4)) - If e.Row.DBCampo("Saldo").ToDouble <> 0 Then e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("Saldo").ToString.FormatoNumero(If("1" = "1", 2, 4)) - - End If - - - 'COLOREA NEGATIVOS - If e.Row.FCLabel("LbCargos").Text.ToDouble < 0 Then - e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red - Else - e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Black - End If - - If e.Row.FCLabel("LbAbonos").Text.ToDouble < 0 Then - e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red - Else - e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Black - End If - - If e.Row.FCLabel("LbSaldo").Text.ToDouble < 0 Then - e.Row.FCLabel("LbSaldo").ForeColor = Drawing.Color.Red - Else - e.Row.FCLabel("LbSaldo").ForeColor = Drawing.Color.Black - End If - - If e.Row.FCLabel("LbSaldoInicial").Text.ToDouble < 0 Then - e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red - Else - e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Black - End If - - End If - End Sub - -#End Region - - Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click - If DdlCuentas.SelectedValue.ToEntero = -1 Then - Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) - Else - FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate) - FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate) - - DtDatos = DtDatos - ImprimirReporte() - End If - End Sub - - Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - ImprimirReporte("Excel") - - 'Dim htmlTabe As New HtmlTable - 'Dim RutaLogo As String = $"{UsuarioActual.Empresa.Ruta}Logo.png" - 'Dim strinLiteral As String = "" - - 'Dim EncabezadoLiteral As New LiteralControl - - - - 'If System.IO.File.Exists(RutaLogo) Then - ' RutaLogo = $"http://{Request.Url.Host }/Empresas/{UsuarioActual.CveEmpresa}/Logo.png" - - ' strinLiteral = $" - ' - ' - ' - ' - ' - ' - '

    {UsuarioActual.Empresa.Empresa}
    Movimientos Auxiliares del Catálogo

    Fecha:{NowADS().ToString("dd/MM/yyyy")}
    - ' Filtros Cuenta: {DdlCuentas.SelectedItem.Text} Fecha inicio: { TxtFechaDel.Text} Fecha Fin: {TxtFechaAl.Text} - ' - '
    " - 'Else - ' strinLiteral = $" - ' - ' - ' - ' - ' - ' - '

    {UsuarioActual.Empresa.Empresa}
    Movimientos Auxiliares del Catálogo

    Fecha:{NowADS().ToString("dd/MM/yyyy")}
    - ' Filtros Cuenta: {DdlCuentas.SelectedItem.Text} Fecha inicio: { TxtFechaDel.Text} Fecha Fin: {TxtFechaAl.Text} - ' - - '
    " - 'End If - - 'EncabezadoLiteral.Text = strinLiteral - 'GvDatos.ExportToExcel($"MovimientosAuxiliares_{NowADS().ToString("yyyyMMddmmss")}", Encabezado2:=EncabezadoLiteral) - - End Sub - - Private Sub ImprimirReporte(Optional Formato As String = "PDF") - - Dim params As New List(Of ReportParameter) - params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa)) - Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy"))) - params.Add(New ReportParameter("pFechaInicio", FechaInicio.ToString("dd/MM/yyyy"))) - params.Add(New ReportParameter("CveMoneda", "1")) - params.Add(New ReportParameter("Cuenta", Cuenta)) - ImprimirPDF("Empresas/Grales/Formatos/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato) - - End Sub - Public Overrides Sub VerifyRenderingInServerForm(control As Control) - - End Sub - - -End Class diff --git a/Contabilidad2/RepOrigenAplicacion.aspx b/Contabilidad2/RepOrigenAplicacion.aspx deleted file mode 100644 index 680357f29..000000000 --- a/Contabilidad2/RepOrigenAplicacion.aspx +++ /dev/null @@ -1,1139 +0,0 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepOrigenAplicacion.aspx.vb" Inherits="Contabilidad2_RepOrigenAplicacion" %> - - - - - - - - - - - Origen y Aplicación de Recursos - - - - - - - - - - - -
    -
    -
    - -
    -
    -
      -
    • - - - - - -
      Fecha Inicio: -
      - - - - - - -
      -
      -
    • -
    • - - - - - -
      Fecha Fin: -
      - - - - - - -
      -
      -
    • -
    • -<%-- -
      - - - -
      --%> - - - - - -
      Ejercicio: - - - - - -<%-- - --%> -
      -
    • -
    • - -
      - - - -
      -
    • -
    • - - - - - -
      Tipo: - - - - - -
      -
    • -
    • - - - - - -
      SubTotales: - - - - - -
      -
    • -
    -
    -
    -
    -
    -
    - - <%-- - - - - - - - - - - -
    Fecha Inicio: - -   - - - Fecha Fin: - -   - - - Ejercicio: - - - - - - - - - Tipo: - - - - - - SubTotales: - - - - - - - -
    -
    -
    --%> -
    - - - - - - - <%--NORMAL--%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%--MENSUAL--%> - - - - - - - - - - - - - - - - - - - - - - - - - -
    Enero
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Febrero
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Marzo
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Subtotal 1er Trimestre
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Abril
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Subtotal 1er Cuatrimestre
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Mayo
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Junio
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Subtotal 2do Trimestre
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Julio
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Agosto
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Subtotal 2do Cuatrimestre
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Septiembre
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Subtotal 3er Trimestre
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Octubre
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Noviembre
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Diciembre
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Subtotal 4to Trimestre
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    Subtotal 3er Cuatrimestre
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - -
    - -
    - -
    -
    - -
    -
    - - <%--ANUAL--%> - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    -
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    -
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    -
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    -
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    -
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    -
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    -
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    -
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    -
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    -
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    - - - - - - - - - - -
    -
    OrigenAplicación
    -
    - - - - - - -
    - - - -
    -
    - -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    -
    -
    - diff --git a/Contabilidad2/RepOrigenAplicacion.aspx.vb b/Contabilidad2/RepOrigenAplicacion.aspx.vb deleted file mode 100644 index f13ef4a3b..000000000 --- a/Contabilidad2/RepOrigenAplicacion.aspx.vb +++ /dev/null @@ -1,360 +0,0 @@ -Option Explicit On -Option Strict On - -Imports System.Data -Imports Extensiones -Imports Microsoft.Reporting.WebForms -Partial Class Contabilidad2_RepOrigenAplicacion - Inherits ClsPaginas - - -#Region " PROPIEDADES NORMAL " - Private Property DtDatos As DataTable - Get - DtDatos = DirectCast(ViewState("DtDatos"), DataTable) - End Get - - Set(ByVal value As DataTable) - ViewState("DtDatos") = value - End Set - End Property -#End Region - - -#Region " PROPIEDADES ANUAL " - Private Property DtDatosAnual As DataTable - Get - DtDatosAnual = DirectCast(ViewState("DtDatosAnual"), DataTable) - End Get - - Set(ByVal value As DataTable) - ViewState("DtDatosAnual") = value - End Set - End Property - Private Property Anos As Integer - Get - Anos = ViewState("Anos").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("Anos") = value - End Set - End Property -#End Region - -#Region " PROPIEDADES " - Private Property TipoReporte As Integer - Get - TipoReporte = ViewState("TipoReporte").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("TipoReporte") = value - End Set - End Property - Private Property DtDatosMensual As DataTable - Get - DtDatosMensual = DirectCast(ViewState("DtDatosMensual"), DataTable) - End Get - - Set(ByVal value As DataTable) - ViewState("DtDatosMensual") = value - End Set - End Property -#End Region - - Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load - If Not Page.IsPostBack Then - - 'If UsuarioActual.Empresa.UsaAC Then - ' TipoReporte = -1 - 'Else - TipoReporte = 1 - tdTipoReporte.Visible = True - 'End If - - 'Normal - TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString - TxtFechaAl.Text = NowADS().ToShortDateString - - 'Anual - Anos = 0 - Dim ClsConta As New ClsContabilidad - If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then - DdlEjercicio.DataSource = ClsConta.DtResultados - Else - DdlEjercicio.DataSource = Nothing - End If - - DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1) - DdlSubproyecto.DataBind() - - DdlEjercicio.SelectedValue = NowADS().Year.ToString - - TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty) - - End If - End Sub - - Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - - 'Nota: - ' 0 = Normal - ' 1 = Mensual - ' 2 = Anual - - If TabContainer.ActiveTabIndex = 0 Then - - CargaDatos() - - ElseIf TabContainer.ActiveTabIndex = 1 Then - - CargaDatosMensual() - - ElseIf TabContainer.ActiveTabIndex = 2 Then - - CargaDatosAnual() - - End If - - End Sub - - Protected Sub TabContainer_ActiveTabChanged(sender As Object, e As EventArgs) - - 'Nota: - ' 0 = Normal - ' 1 = Mensual - ' 2 = Anual - - 'Esconde Todo de lo variable de Filtros - TdSubTotales.Visible = False - TdEjercicio.Visible = False - TdFI.Visible = False - TdFF.Visible = False - - If TabContainer.ActiveTabIndex = 0 Then - TdFI.Visible = True - TdFF.Visible = True - ElseIf TabContainer.ActiveTabIndex = 1 Then - TdEjercicio.Visible = True - TdSubTotales.Visible = True - ElseIf TabContainer.ActiveTabIndex = 2 Then - TdEjercicio.Visible = True - End If - - UpFiltros.Update() - - BtnConsultar_Click(BtnConsultar, EventArgs.Empty) - - End Sub - - -#Region " NORMAL " - Private Sub CargaDatos() - 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim ObjConta As New ClsContabilidad - - ' Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, "0"c), Anio) - ' Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy") - - Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) - Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) - TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) - Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString - - Dim FechaI = String.Format("{0}/{1}/{2}", FechaInicio.Day, FechaInicio.Month, FechaInicio.Year) - Dim FechaF = String.Format("{0}/{1}/{2}", FechaFin.Day, FechaFin.Month, FechaFin.Year) - - If ObjConta.GetOrigenAplicacion(FechaI, FechaF, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then - DtDatos = ObjConta.DtResultados - Else - DtDatos = Nothing - Alert("Ocurrio un error al cargar los datos de origen y aplicación", TipoMensaje.MsgError) - End If - ObjConta.Dispose() - - - If DtDatos IsNot Nothing Then - CargaGrid() - End If - End Sub - - Private Sub CargaGrid() - GvDatos.DataSource = DtDatos - GvDatos.DataBind() - UpDatos.Update() - End Sub - - Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - - ''Titulo y Sumatoria de cambios - 'If e.Row.DBCampo("Orden3").ToString.ToEntero = 10 Or e.Row.DBCampo("Orden3").ToString.ToEntero = 30 Then - ' e.Row.FCLabel("LbNombre").Font.Bold = True - 'End If - - ''CUENTAS - 'If e.Row.DBCampo("Orden3").ToString.ToEntero = 20 Then - ' e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;") - 'End If - - 'TOTAL - If e.Row.DBCampo("Nombre").ToString.Trim = "" Then - e.Row.Attributes.Add("style", "border-top: 1px solid; margin-top:10px;") - e.Row.FCLabel("LbNombre").Font.Bold = True - e.Row.FCLabel("LbNombre").Font.Italic = True - e.Row.FCLabel("LbNombre").Text = "TOTAL" - End If - - End If - End Sub -#End Region - - -#Region " MENSUAL " - Private Sub CargaDatosMensual() - ''Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim ObjConta As New ClsContabilidad - - TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) - Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString - If ObjConta.GetOrigenAplicacionMensual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then - DtDatosMensual = ObjConta.DtResultados - Else - DtDatosMensual = Nothing - Alert("Ocurrio un error al cargar los datos del estado de origen y aplicación de recursos", TipoMensaje.MsgError) - End If - ObjConta.Dispose() - - - EscondeSubtotales() - - - If DtDatosMensual IsNot Nothing Then - CargaGridMensual() - End If - End Sub - Private Sub EscondeSubtotales() - - 'Esconde Trimestral - GvDatosMensual.Columns(4).Visible = False - GvDatosMensual.Columns(9).Visible = False - GvDatosMensual.Columns(14).Visible = False - GvDatosMensual.Columns(18).Visible = False - - 'Esconde Cuatrimestral - GvDatosMensual.Columns(6).Visible = False - GvDatosMensual.Columns(12).Visible = False - GvDatosMensual.Columns(19).Visible = False - - If DdlSubtotales.SelectedValue = "2" Then - GvDatosMensual.Columns(4).Visible = True - GvDatosMensual.Columns(9).Visible = True - GvDatosMensual.Columns(14).Visible = True - GvDatosMensual.Columns(18).Visible = True - ElseIf DdlSubtotales.SelectedValue = "3" Then - GvDatosMensual.Columns(6).Visible = True - GvDatosMensual.Columns(12).Visible = True - GvDatosMensual.Columns(19).Visible = True - End If - - End Sub - Private Sub CargaGridMensual() - GvDatosMensual.DataSource = DtDatosMensual - GvDatosMensual.DataBind() - UpDatosMensual.Update() - End Sub - - Protected Sub GvDatosMensual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosMensual.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - - 'AGRUPADOR DE CUENTAS - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 2 Then - e.Row.FCLabel("LbNombre").Font.Bold = True - End If - - - 'CUENTAS - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Then - e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;") - End If - - 'TOTALES - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then - e.Row.Attributes.Add("style", "border-top: 1px solid;") - e.Row.FCLabel("LbNombre").Font.Bold = True - e.Row.FCLabel("LbNombre").Font.Italic = True - End If - - End If - End Sub -#End Region - - -#Region " ANUAL " - Private Sub CargaDatosAnual() - 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim ObjConta As New ClsContabilidad - - TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) - Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString - Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 - - If ObjConta.GetOrigenAplicacionAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then - DtDatosAnual = ObjConta.DtResultados - Else - DtDatosAnual = Nothing - Alert("Ocurrio un error al cargar los datos del estado de origen y aplicación de recursos", TipoMensaje.MsgError) - End If - ObjConta.Dispose() - - - - If DtDatosAnual IsNot Nothing Then - CargaGridAnual() - End If - - 'Esconde todo - For index = 1 To 12 - GvDatosAnual.Columns(index).Visible = False - Next - - For index = 1 To Anos - GvDatosAnual.Columns(index).Visible = True - GvDatosAnual.HeaderRow.FCLabel("LbAno" + index.ToString).Text = (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString - Next - - - End Sub - - Private Sub CargaGridAnual() - GvDatosAnual.DataSource = DtDatosAnual - GvDatosAnual.DataBind() - UpDatosAnual.Update() - End Sub - - Protected Sub GvDatosAnual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosAnual.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - - 'AGRUPADOR DE CUENTAS - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 2 Then - e.Row.FCLabel("LbNombre").Font.Bold = True - End If - - - 'CUENTAS - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Then - e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;") - End If - - 'TOTALES - If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then - e.Row.Attributes.Add("style", "border-top: 1px solid;") - e.Row.FCLabel("LbNombre").Font.Bold = True - e.Row.FCLabel("LbNombre").Font.Italic = True - End If - - End If - End Sub -#End Region - - -End Class diff --git a/Contabilidad2/RepSituacionFinanciera.aspx b/Contabilidad2/RepSituacionFinanciera.aspx deleted file mode 100644 index d24c26634..000000000 --- a/Contabilidad2/RepSituacionFinanciera.aspx +++ /dev/null @@ -1,631 +0,0 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepSituacionFinanciera.aspx.vb" Inherits="AC2_SituacionFinanciera" %> - - - - - - - - - - - - -
  • - Exporta Excel - <%-- --%> -
  • -
  • - Imprimir - <%-- --%> -
  • -
  • - Cerrar Ejercicio -
  • -
    - - - -
    -
    -
    - - "><%--class="expand"--%> - -
    -
    -
    - -
    - - -
    - -
    - - - - - - - - - - - - - - -
    - - - - -
    - - Normal - Consolidado - -
    - -
    -
    -
    -
    > -
    -
    -
    - -
    - - - - - -
    -
    -
    - -
    - -
    - -
    - -
    -
    -
    -
    -
    -
    -
    - - - - - - - -
    - -
    - - - - -
    -
    -

    ACTIVO

    - - - - - - - - - - - - - - - - - - - - <%----%> - - - - - - - <%----%> - - - - - <%----%> - - <%----%> - -
    -
    - - - - - - - - - - - - - - - - <%----%> - - - - - - - <%----%> - - - - - <%----%> - - <%----%> - -
    -
    - - - - - - - - - - - - - - - - <%----%> - - - - - - - <%----%> - - - - - <%----%> - - <%----%> - -
    -
    - -
    -
    -
    - -
    - - - - - - - - - - - - - -
    -
    -

    PASIVO

    - - - - - - - - - - - - - - - - - - - <%----%> - - - - - - - <%----%> - - - - - <%----%> - - <%----%> - -
    -
    - - - - - - - - - - - - - - - - <%----%> - - - - - - - <%----%> - - - - - <%----%> - - <%----%> - -
    -
    - - - - - - - - - - - - - - - - <%----%> - - - - - - - <%----%> - - - - - <%----%> - - <%----%> - - -
    -
    -
    - -
    - - - - - - - - -
    -

    Total del Pasivo:

    -
    - - - -
    -
    -
    -
    - -
    -

    - -

    - - - - - - - - - - - - - - - - - - - - <%----%> - - - - - - - <%----%> - - - - - <%----%> - - <%----%> - - - - - - - - - - - - - <%----%> - - - - - - - <%----%> - - - - - <%----%> - - <%----%> - -
    -
    - - - - - - - - - - - - - - - - <%----%> - - - - - - - <%----%> - - - - - <%----%> - - <%----%> - -
    -
    - - - - - - - - - - - - - - - - <%----%> - - - - - - - <%----%> - - - - - <%----%> - - <%----%> - - -
    -
    -
    - -
    - - - - - - - - -
    -

    - -

    -
    - - - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    - - -
    - - - - - - -
    -

    Total del Activo:

    -
    - - - -
    -
    -
    -
    -
    - -
    - - -
    - - - - - - -
    -

    - -

    -
    - - - -
    -
    -
    -
    -
    -
    -
    - -
    - -
    - - -
    - - -
    -
    - - -
    - - diff --git a/Contabilidad2/RepSituacionFinanciera.aspx.vb b/Contabilidad2/RepSituacionFinanciera.aspx.vb deleted file mode 100644 index 0cd4a90b7..000000000 --- a/Contabilidad2/RepSituacionFinanciera.aspx.vb +++ /dev/null @@ -1,645 +0,0 @@ -Option Explicit On -Option Strict On - -Imports System.Data -Imports Extensiones -Imports Microsoft.Reporting.WebForms -Partial Class AC2_SituacionFinanciera - Inherits ClsPaginas - -#Region "PROPIEDADES" - Private Property DtDatos As DataTable - Get - DtDatos = DirectCast(ViewState("DtDatos"), DataTable) - End Get - - Set(ByVal value As DataTable) - ViewState("DtDatos") = value - End Set - End Property - Private Property TotalActivoActual As Double - Get - TotalActivoActual = ViewState("TotalActivoActual").ToString.ToDouble - End Get - Set(value As Double) - ViewState("TotalActivoActual") = value - End Set - End Property - Private Property TotalActivoAnterior As Double - Get - TotalActivoAnterior = ViewState("TotalActivoAnterior").ToString.ToDouble - End Get - Set(value As Double) - ViewState("TotalActivoAnterior") = value - End Set - End Property - Private Property TotalPasivoActual As Double - Get - TotalPasivoActual = ViewState("TotalPasivoActual").ToString.ToDouble - End Get - Set(value As Double) - ViewState("TotalPasivoActual") = value - End Set - End Property - Private Property TotalPasivoAnterior As Double - Get - TotalPasivoAnterior = ViewState("TotalPasivoAnterior").ToString.ToDouble - End Get - Set(value As Double) - ViewState("TotalPasivoAnterior") = value - End Set - End Property - Private Property TotalPatrimonioActual As Double - Get - TotalPatrimonioActual = ViewState("TotalPatrimonioActual").ToString.ToDouble - End Get - Set(value As Double) - ViewState("TotalPatrimonioActual") = value - End Set - End Property - Private Property TotalPatrimonioAnterior As Double - Get - TotalPatrimonioAnterior = ViewState("TotalPatrimonioAnterior").ToString.ToDouble - End Get - Set(value As Double) - ViewState("TotalPatrimonioAnterior") = value - End Set - End Property - Private Property TotalPasivoPatrimonioActual As Double - Get - TotalPasivoPatrimonioActual = ViewState("TotalPasivoPatrimonioActual").ToString.ToDouble - End Get - Set(value As Double) - ViewState("TotalPasivoPatrimonioActual") = value - End Set - End Property - Private Property TotalPasivoPatrimonioAnterior As Double - Get - TotalPasivoPatrimonioAnterior = ViewState("TotalPasivoPatrimonioAnterior").ToString.ToDouble - End Get - Set(value As Double) - ViewState("TotalPasivoPatrimonioAnterior") = value - End Set - End Property - - Private Property FechaInicioActual As Date - Get - FechaInicioActual = ViewState("FechaInicioActual").ToString.ToDate - End Get - Set(value As Date) - ViewState("FechaInicioActual") = value - End Set - End Property - Private Property FechaFinActual As Date - Get - FechaFinActual = ViewState("FechaFinActual").ToString.ToDate - End Get - Set(value As Date) - ViewState("FechaFinActual") = value - End Set - End Property - Private Property FechaInicioAnterior As Date - Get - FechaInicioAnterior = ViewState("FechaInicioAnterior").ToString.ToDate - End Get - Set(value As Date) - ViewState("FechaInicioAnterior") = value - End Set - End Property - Private Property FechaFinAnterior As Date - Get - FechaFinAnterior = ViewState("FechaFinAnterior").ToString.ToDate - End Get - Set(value As Date) - ViewState("FechaFinAnterior") = value - End Set - End Property - Private Property TipoReporte As Integer - Get - TipoReporte = ViewState("TipoReporte").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("TipoReporte") = value - End Set - End Property -#End Region - - Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load - If Not Page.IsPostBack Then - - If UsuarioActual.Empresa.UsaAC Then - TipoReporte = -1 - Else - TipoReporte = 1 - tdTipoReporte.Visible = True - LtTitulo.Text = "Balance General" - End If - - TotalActivoActual = 0 - TotalActivoAnterior = 0 - TotalPasivoActual = 0 - TotalPasivoAnterior = 0 - TotalPatrimonioActual = 0 - TotalPatrimonioAnterior = 0 - TotalPasivoPatrimonioActual = 0 - TotalPasivoPatrimonioAnterior = 0 - - 'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString - 'TxtFechaFin.Text = NowADS().ToShortDateString - - CargaEjercicios() - - If UsuarioActual.Empresa.GrupoEmpresa > 0 And UsuarioActual.CveRol = 1 Then - DVConsolidado1.Visible = True - DVConsolidado2.Visible = True - End If - - 'CargaDatos() - End If - End Sub - - Private Sub CargaEjercicios() - 'Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim Clsconta As New ClsContabilidad - If Clsconta.GetEjercicios(UsuarioActual.CveEmpresa) Then - DdlEjercicio.DataSource = Clsconta.DtResultados - DdlEjercicioCierre.DataSource = Clsconta.DtResultados - Else - DdlEjercicio.DataSource = Nothing - DdlEjercicioCierre.DataSource = Nothing - End If - Clsconta.Dispose() - DdlEjercicioCierre.DataBind() - DdlEjercicioCierre.SelectedValue = NowADS().Year.ToString - - DdlEjercicio.DataBind() - DdlEjercicio.SelectedValue = NowADS().Year.ToString - - DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1) - DdlSubproyecto.DataBind() - - If UsuarioActual.TienePermisoProceso(346) Then LnkCerrar.Visible = True - - 'DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) - DdlPeriodo.SelectedValue = NowADS().Month.ToString - End Sub - - Private Sub CargaDatos() - ''Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim ObjConta As New ClsContabilidad - - Dim FechaI As String = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue) - Dim FechaF As String = FechaI.ToDate.LastDayOfMonth.ToShortDateString - TipoReporte = DdlTipoReporte.SelectedValue.ToEntero - - GvActivo.Columns(1).HeaderText = DdlEjercicio.SelectedValue - GvActivo.Columns(2).HeaderText = (DdlEjercicio.SelectedValue.ToEntero - 1).ToString - - GvPasivo.Columns(1).HeaderText = DdlEjercicio.SelectedValue - GvPasivo.Columns(2).HeaderText = (DdlEjercicio.SelectedValue.ToEntero - 1).ToString - - Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString - - If ObjConta.GetSituacionFinanciera("01/01/1900".ToDate, FechaF.ToDate, UsuarioActual.CveEmpresa, CveSubProyecto, TipoReporte, Opcion:=DdlOpcion.SelectedValue.ToEntero) Then - DtDatos = ObjConta.DtResultados - - CargaGrids() - - If GvPatrimonio.HeaderRow IsNot Nothing Then - GvPatrimonio.HeaderRow.FCLabel("LbTitulo").Text = "CAPITAL CONTABLE" - End If - - SumaTotales() - Else - DtDatos = Nothing - Alert("Ocurrio un error al cargar los datos del estado de situación financiera", TipoMensaje.MsgError) - End If - - ObjConta.Dispose() - End Sub - Private Sub CargaGrids() - - If Not ChkNivel.Checked Then - DtDatos = DtDatos.FiltraParametros("Level < 3") - End If - - Dim DtActivoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND TipoCuenta=1") - Dim DtActivoNoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND TipoCuenta=2 ") - Dim DtActivoDiferido As DataTable = DtDatos.FiltraParametros(" TipoCuenta=9 ") - - ' Dim DtActivoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND Orden LIKE '%/00011%' ") - ' Dim DtActivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND Orden LIKE '%/00012%' ") - Dim Row As DataRow = DtActivoCirculante.NewRow - - If DtActivoCirculante.Rows.Count > 0 Then - Row.Item("Nombre") = "   TOTAL ACTIVO CIRCULANTE" - Row.Item("ImporteActual") = DtActivoCirculante.SUM("ImporteActual").ToString - Row.Item("ImporteAnterior") = DtActivoCirculante.SUM("ImporteAnterior").ToString - Row.Item("CtaMayor") = -1 - 'DtActivoCirculante.Rows.RemoveAt(0) - Else - Row.Item("Nombre") = "   TOTAL ACTIVO CIRCULANTE" - Row.Item("ImporteActual") = "0.00" - Row.Item("ImporteAnterior") = "0.00" - Row.Item("CtaMayor") = -1 - End If - DtActivoCirculante.Rows.Add(Row) - - - Row = DtActivoNoCirculante.NewRow - If DtActivoNoCirculante.Rows.Count > 0 Then - Row.Item("Nombre") = "   TOTAL ACTIVO NO CIRCULANTE" - Row.Item("ImporteActual") = DtActivoNoCirculante.SUM("ImporteActual").ToString - Row.Item("ImporteAnterior") = DtActivoNoCirculante.SUM("ImporteAnterior").ToString - Row.Item("CtaMayor") = -1 - 'DtActivoNoCirculante.Rows.RemoveAt(0) - Else - Row.Item("Nombre") = "   TOTAL ACTIVO NO CIRCULANTE" - Row.Item("ImporteActual") = "0.00" - Row.Item("ImporteAnterior") = "0.00" - Row.Item("CtaMayor") = -1 - End If - DtActivoNoCirculante.Rows.Add(Row) - - Row = DtActivoDiferido.NewRow - If DtActivoDiferido.Rows.Count > 0 Then - Row.Item("Nombre") = "   TOTAL ACTIVO DIFERIDO" - Row.Item("ImporteActual") = DtActivoDiferido.SUM("ImporteActual").ToString - Row.Item("ImporteAnterior") = DtActivoDiferido.SUM("ImporteAnterior").ToString - Row.Item("CtaMayor") = -1 - 'DtActivoDiferido.Rows.RemoveAt(0) - Else - Row.Item("Nombre") = "   TOTAL ACTIVO DIFERIDO" - Row.Item("ImporteActual") = "0.00" - Row.Item("ImporteAnterior") = "0.00" - Row.Item("CtaMayor") = -1 - End If - DtActivoDiferido.Rows.Add(Row) - - GvActivo.DataSource = DtActivoCirculante - GvActivo.DataBind() - GvActivoNoCirculante.DataSource = DtActivoNoCirculante - GvActivoNoCirculante.DataBind() - - GvActivoDiferido.DataSource = DtActivoDiferido - GvActivoDiferido.DataBind() - UpActivo.Update() - - - 'PASIVO - Dim DtPasivoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('D') AND TipoCuenta=3") - Dim DtPasivoNoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('D') AND TipoCuenta=4") - - 'Dim DtPasivoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND Orden LIKE '%/00021%' ") - 'Dim DtPasivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND Orden LIKE '%/00022%' ") - - Row = DtPasivoCirculante.NewRow - If DtPasivoCirculante.Rows.Count > 0 Then - Row.Item("Nombre") = "   TOTAL PASIVO CIRCULANTE" - Row.Item("ImporteActual") = DtPasivoCirculante.SUM("ImporteActual").ToString - Row.Item("ImporteAnterior") = DtPasivoCirculante.SUM("ImporteAnterior").ToString - Row.Item("CtaMayor") = -1 - 'DtPasivoCirculante.Rows.RemoveAt(0) - Else - Row.Item("Nombre") = "   TOTAL PASIVO CIRCULANTE" - Row.Item("ImporteActual") = "0.00" - Row.Item("ImporteAnterior") = "0.00" - Row.Item("CtaMayor") = -1 - End If - DtPasivoCirculante.Rows.Add(Row) - - Row = DtPasivoNoCirculante.NewRow - If DtPasivoNoCirculante.Rows.Count > 0 Then - Row.Item("Nombre") = "   TOTAL PASIVO NO CIRCULANTE" - Row.Item("ImporteActual") = DtPasivoNoCirculante.SUM("ImporteActual").ToString - Row.Item("ImporteAnterior") = DtPasivoNoCirculante.SUM("ImporteAnterior").ToString - Row.Item("CtaMayor") = -1 - 'DtPasivoNoCirculante.Rows.RemoveAt(0) - Else - Row.Item("Nombre") = "   TOTAL PASIVO NO CIRCULANTE" - Row.Item("ImporteActual") = "0.00" - Row.Item("ImporteAnterior") = "0.00" - Row.Item("CtaMayor") = -1 - End If - DtPasivoNoCirculante.Rows.Add(Row) - - - GvPasivo.DataSource = DtPasivoCirculante - GvPasivo.DataBind() - GvPasivoNoCirculante.DataSource = DtPasivoNoCirculante - GvPasivoNoCirculante.DataBind() - UpPasivo.Update() - - - 'PATRIMONIO - Dim DtPatrimonioContribuido As DataTable = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (5,6,8,7)") - 'Dim DtPatrimonioGenerado = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (6,8)") - 'Dim DtPatrimonioActualizacion = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=7") - 'Dim DtUtilidad = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=5") - - 'Dim DtPatrimonioContribuido = DtDatos.FiltraParametros("Tipo in ('F') AND Orden LIKE '%/00031%' ") - 'Dim DtPatrimonioGenerado = DtDatos.FiltraParametros("Tipo in ('F') AND Orden LIKE '%/00032%' ") - 'Dim DtPatrimonioActualizacion = DtDatos.FiltraParametros("Tipo in ('F') AND Orden LIKE '%/00033%' ") - - Row = DtPatrimonioContribuido.NewRow - If DtPatrimonioContribuido.Rows.Count > 0 Then - Row.Item("Nombre") = "   TOTAL CAPITAL" - Row.Item("ImporteActual") = DtPatrimonioContribuido.SUM("ImporteActual").ToString - Row.Item("ImporteAnterior") = DtPatrimonioContribuido.SUM("ImporteAnterior").ToString - Row.Item("CtaMayor") = -1 - 'DtPatrimonioContribuido.Rows.RemoveAt(0) - Else - Row.Item("Nombre") = "   TOTAL CAPITAL" - Row.Item("ImporteActual") = "0.00" - Row.Item("ImporteAnterior") = "0.00" - Row.Item("CtaMayor") = -1 - End If - DtPatrimonioContribuido.Rows.Add(Row) - - ''Row = DtPatrimonioGenerado.NewRow - ''If DtPatrimonioGenerado.Rows.Count > 0 Then - '' Row.Item("Nombre") = "   TOTAL PATRIMONIO GENERADO" - '' 'El id = 87 es el id de la cuenta "RESULTADOS DEL EJERCICIO:(AHORRO/DESAHORRO)" - '' Row.Item("ImporteActual") = DtPatrimonioGenerado.SUM("ImporteActual").ToString - '' Row.Item("ImporteAnterior") = DtPatrimonioGenerado.SUM("ImporteAnterior").ToString - '' Row.Item("CtaMayor") = -1 - '' 'DtPatrimonioGenerado.Rows.RemoveAt(0) - ''Else - '' Row.Item("Nombre") = "   TOTAL PATRIMONIO GENERADO" - '' Row.Item("ImporteActual") = "0.00" - '' Row.Item("ImporteAnterior") = "0.00" - '' Row.Item("CtaMayor") = -1 - ''End If - ''DtPatrimonioGenerado.Rows.Add(Row) - - ''Row = DtPatrimonioActualizacion.NewRow - ''If DtPatrimonioActualizacion.Rows.Count > 0 Then - '' Row.Item("Nombre") = "   TOTAL EXCESO O INSUFICIENCIA EN LA ACTUALIZACION" - '' Row.Item("ImporteActual") = DtPatrimonioActualizacion.SUM("ImporteActual").ToString - '' Row.Item("ImporteAnterior") = DtPatrimonioActualizacion.SUM("ImporteAnterior").ToString - '' Row.Item("CtaMayor") = -1 - '' 'DtPatrimonioActualizacion.Rows.RemoveAt(0) - ''Else - '' Row.Item("Nombre") = "   TOTAL EXCESO O INSUFICIENCIA EN LA ACTUALIZACION" - '' Row.Item("ImporteActual") = "0.00" - '' Row.Item("ImporteAnterior") = "0.00" - '' Row.Item("CtaMayor") = -1 - ''End If - ''DtPatrimonioActualizacion.Rows.Add(Row) - - - GvPatrimonio.DataSource = DtPatrimonioContribuido - GvPatrimonio.DataBind() - 'GvPatrimonioGenerado.DataSource = DtPatrimonioGenerado - 'GvPatrimonioGenerado.DataBind() - 'GvPatrimonioActualizacion.DataSource = DtPatrimonioActualizacion - 'GvPatrimonioActualizacion.DataBind() - - 'GvUtilidad.DataSource = DtUtilidad - 'GvUtilidad.DataBind() - - UpPatrimonio.Update() - End Sub - Private Sub SumaTotales() - TotalPasivoPatrimonioActual = TotalPasivoActual + TotalPatrimonioActual - TotalPasivoPatrimonioAnterior = TotalPasivoAnterior + TotalPatrimonioAnterior - - 'Llena Lb´s Totales - LbTotalActivoActual.Text = TotalActivoActual.ToString.FormatoNumero - LbTotalActivoAnterior.Text = TotalActivoAnterior.ToString.FormatoNumero - - LbTotalPasivoActual.Text = TotalPasivoActual.ToString.FormatoNumero - LbTotalPasivoAnterior.Text = TotalPasivoAnterior.ToString.FormatoNumero - - LbTotalPatrimonioActual.Text = TotalPatrimonioActual.ToString.FormatoNumero - LbTotalPatrimonioAnterior.Text = TotalPatrimonioAnterior.ToString.FormatoNumero - - LbTotalPasivoPatrimonioActual.Text = TotalPasivoPatrimonioActual.ToString.FormatoNumero - LbTotalPasivoPatrimonioAnterior.Text = TotalPasivoPatrimonioAnterior.ToString.FormatoNumero - - - Dim Descuadre As Boolean = False - 'COLOREA ROJO SI NO CUADRAN TOTALES - If Math.Round(TotalActivoActual, 2) <> Math.Round(TotalPasivoPatrimonioActual, 2) Then - LbTotalActivoActual.ForeColor = Drawing.Color.Red - LbTotalPasivoPatrimonioActual.ForeColor = Drawing.Color.Red - Descuadre = True - Else - LbTotalActivoActual.ForeColor = Drawing.Color.Black - LbTotalPasivoPatrimonioActual.ForeColor = Drawing.Color.Black - End If - - 'If Math.Round(TotalActivoAnterior, 2) <> Math.Round(TotalPasivoPatrimonioAnterior, 2) Then - ' LbTotalActivoAnterior.ForeColor = Drawing.Color.Red - ' LbTotalPasivoPatrimonioAnterior.ForeColor = Drawing.Color.Red - ' Descuadre = True - 'Else - ' LbTotalActivoAnterior.ForeColor = Drawing.Color.Black - ' LbTotalPasivoPatrimonioAnterior.ForeColor = Drawing.Color.Black - 'End If - - If Descuadre Then - LbDescuadre.Text = "Las sumas de los totales están descuadradas." - Else - LbDescuadre.Text = "" - End If - - - End Sub - - Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click - 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - 'Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue) - 'Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy") - - 'If ObjConta.GetSituacionFinanciera("01/01/2000".ToDate, FechaF.ToDate, DdlTipoReporte.SelectedValue.ToEntero) Then - ' DtDatos = ObjConta.DtResultados - ' 'If ChkFirma.Checked = True Then - - ' ' Dim Row As DataRow = DtDatos.NewRow - ' ' Row.Item("Nombre") = String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de contabilidad", "") - ' ' Row.Item("Sup") = String.Format("Lic. Juan Fortino Leon Robinson{0} Director General", "") - ' ' Row.Item("ImporteActual") = "0" - ' ' Row.Item("ImporteAnterior") = "0" - ' ' Row.Item("Tipo") = "Firma" - ' ' DtDatos.Rows.Add(Row) - ' 'End If - 'End If - 'ObjConta.Dispose() - - ImprimirReporte() - - End Sub - - - Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - TotalActivoActual = 0 - TotalActivoAnterior = 0 - TotalPasivoActual = 0 - TotalPasivoAnterior = 0 - TotalPatrimonioActual = 0 - TotalPatrimonioAnterior = 0 - TotalPasivoPatrimonioActual = 0 - TotalPasivoPatrimonioAnterior = 0 - - CargaDatos() - End Sub - - -#Region "GV´S ROW DATA BOUND" - - Protected Sub GvActivo_RowDataBound(sender As Object, e As GridViewRowEventArgs) - If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then - TotalActivoActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble - TotalActivoAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble - e.Row.FCLabel("LbNombre").Font.Italic = True - e.Row.FCLabel("LbNombre").Font.Bold = True - e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;") - Else - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte) - End If - - If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then - e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red - End If - If e.Row.DBCampo("ImporteAnterior").ToString.ToDouble < 0 Then - e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red - End If - - If e.Row.DBCampo("Level").ToString = "2" Then - e.Row.FCLabel("LbNombre").Text = String.Format("   {0}", e.Row.DBCampo("Nombre").ToString) - ElseIf e.Row.DBCampo("Level").ToString = "1" Then - e.Row.FCLabel("LbNombre").Font.Bold = True - End If - - End If - End Sub - - Protected Sub GvPasivo_RowDataBound(sender As Object, e As GridViewRowEventArgs) - If e.Row.RowType = DataControlRowType.DataRow Then - - 'Totales - If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then - TotalPasivoActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble - TotalPasivoAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble - e.Row.FCLabel("LbNombre").Font.Italic = True - e.Row.FCLabel("LbNombre").Font.Bold = True - e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;") - 'Cuentas - Else - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte) - 'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString) - 'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString) - End If - - - 'Colorea NEGATIVOS - If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then - e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red - End If - If e.Row.DBCampo("ImporteAnterior").ToString.ToDouble < 0 Then - e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red - End If - - If e.Row.DBCampo("Level").ToString = "2" Then - e.Row.FCLabel("LbNombre").Text = String.Format("   {0}", e.Row.DBCampo("Nombre").ToString) - ElseIf e.Row.DBCampo("Level").ToString = "1" Then - e.Row.FCLabel("LbNombre").Font.Bold = True - End If - - End If - End Sub - - Protected Sub GvPatrimonio_RowDataBound(sender As Object, e As GridViewRowEventArgs) - If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then - TotalPatrimonioActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble - TotalPatrimonioAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble - e.Row.FCLabel("LbNombre").Font.Italic = True - e.Row.FCLabel("LbNombre").Font.Bold = True - e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;") - 'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray - 'e.Row.ControlStyle.ForeColor = Drawing.Color.White - 'e.Row.ControlStyle.Font.Bold = True - ElseIf e.Row.DBCampo("CveCuenta") <> "55276" Then - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte) - 'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString) - 'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString) - End If - - If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then - e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red - End If - If e.Row.DBCampo("ImporteAnterior").ToString.ToDouble < 0 Then - e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red - End If - - If e.Row.DBCampo("Level").ToString = "2" Then - e.Row.FCLabel("LbNombre").Text = String.Format("   {0}", e.Row.DBCampo("Nombre").ToString) - ElseIf e.Row.DBCampo("Level").ToString = "1" Then - e.Row.FCLabel("LbNombre").Font.Bold = True - End If - - End If - End Sub - -#End Region - - Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - ImprimirReporte("Excel") - End Sub - - - Private Sub ImprimirReporte(Optional Formato As String = "PDF") - Dim FechaI As String = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue) - Dim FechaF As String = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy") - - Dim fileName As String = "EdoSituacionFinanciera" - Dim reportpath As String = "Contabilidad2/Reportes/RepSituacionFinanciera.rdlc" - Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - - Dim params As New List(Of ReportParameter) - params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - params.Add(New ReportParameter("pFirma1", If(ChkFirma.Checked, String.Format("{0}", vbCrLf), ""))) - params.Add(New ReportParameter("pFirma2", If(ChkFirma.Checked, String.Format("{0}l", vbCrLf), ""))) - params.Add(New ReportParameter("pFechaFin", FechaF)) - - params.Add(New ReportParameter("periodo", String.Format("de {0} {1}", DdlPeriodo.SelectedItem.ToString, DdlEjercicio.SelectedItem.ToString))) - ImprimirPDF(reportpath, DtDatos, params, fileName, Formato) - End Sub - - Protected Sub LnkCerrar_Click(sender As Object, e As EventArgs) Handles LnkCerrar.Click - RegistraScript("$('#ModalCierre').modal()") - CargaCtaContableE() - End Sub - - Protected Sub BtnCierre_Click(sender As Object, e As EventArgs) Handles BtnCierre.Click - Dim objConta As New ClsContabilidad - Dim FechaIncio As String = String.Format("{0}/01/01", DdlEjercicioCierre.SelectedValue.ToString) - Dim FechaFin As String = String.Format("{0}/12/31", DdlEjercicioCierre.SelectedValue.ToString) - Dim CvePrepoliza As Integer = objConta.CierreEjercicio(UsuarioActual.CveEmpresa, DdlEjercicioCierre.SelectedValue.ToEntero, DdlCuentas.SelectedValue.ToEntero, FechaIncio, FechaFin, UsuarioActual.CveUsuario) - If CvePrepoliza > 0 Then - Alert(String.Format("Se realizo el cierre correctamente:
    Poliza: {0}", CvePrepoliza), TipoMensaje.MsgInformacion) - objConta.Commit() - Else - Alert("Ocurrio un error al realizar el cierre", TipoMensaje.MsgError) - objConta.RollBack() - End If - objConta.Dispose() - End Sub - - Private Sub CargaCtaContableE() - Dim ObjConta As New ClsContabilidad - If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then - DdlCuentas.DataSource = ObjConta.DtResultados.FiltraParametros("Tipo = 'F' or Tipo = 'E' ", "") - End If - ObjConta.Dispose() - DdlCuentas.DataBind() - DdlCuentas.Items.Insert(0, New ListItem("Seleccionar", "-1")) - End Sub -End Class From d1ad0a53dd386f0920f1d0001d9506f95460e83a Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 17 Jun 2024 08:36:31 -0700 Subject: [PATCH 24/59] =?UTF-8?q?--=20unificaci=C3=B3n=20a=20una=20sola=20?= =?UTF-8?q?carpeta=20de=20contabilidad?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Finanzas/RepBalanceGeneral.aspx.vb | 60 +++++++++---------- Finanzas/RepBalanceGeneralHorizontal.aspx.vb | 6 +- Finanzas/RepBalanceGeneralVertical.aspx.vb | 2 +- Finanzas/RepEstadoResultados.aspx.vb | 48 +++++++-------- .../RepEstadoResultadosHorizontal.aspx.vb | 6 +- Finanzas/RepEstadoResultadosVertical.aspx | 2 +- Finanzas/RepEstadoResultadosVertical.aspx.vb | 2 +- 7 files changed, 63 insertions(+), 63 deletions(-) diff --git a/Finanzas/RepBalanceGeneral.aspx.vb b/Finanzas/RepBalanceGeneral.aspx.vb index 5e5d791d0..dfd82d825 100644 --- a/Finanzas/RepBalanceGeneral.aspx.vb +++ b/Finanzas/RepBalanceGeneral.aspx.vb @@ -523,8 +523,8 @@ Partial Class Contabilidad2_RepBalanceGeneral TotalActivoAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble e.Row.FCLabel("LbNombre").Font.Italic = True Else - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) End If If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then @@ -547,11 +547,11 @@ Partial Class Contabilidad2_RepBalanceGeneral 'Cuentas Else - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - 'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString) - 'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString) + 'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString) + 'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString) End If @@ -579,11 +579,11 @@ Partial Class Contabilidad2_RepBalanceGeneral 'e.Row.ControlStyle.ForeColor = Drawing.Color.White 'e.Row.ControlStyle.Font.Bold = True Else - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - 'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString) - 'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString) + 'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString) + 'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString) End If If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then @@ -687,27 +687,27 @@ Partial Class Contabilidad2_RepBalanceGeneral ' If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Then ' e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;") - ' e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/02/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("09/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/11/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/02/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("09/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/11/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLTrimestral1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLTrimestral2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLTrimestral3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLTrimestral4").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLTrimestral1").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLTrimestral2").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLTrimestral3").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLTrimestral4").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLCuatrimestral1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLCuatrimestral2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - ' e.Row.FCHyperLink("HLCuatrimestral3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLCuatrimestral1").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLCuatrimestral2").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLCuatrimestral3").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) ' End If @@ -793,7 +793,7 @@ Partial Class Contabilidad2_RepBalanceGeneral ' e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;") ' For index = 1 To Anos - ' e.Row.FCHyperLink("HLAno" + index.ToString).NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), String.Format("31/12/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), TipoReporte, DdlSubproyecto.SelectedValue) + ' e.Row.FCHyperLink("HLAno" + index.ToString).NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), String.Format("31/12/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), TipoReporte, DdlSubproyecto.SelectedValue) ' Next ' End If diff --git a/Finanzas/RepBalanceGeneralHorizontal.aspx.vb b/Finanzas/RepBalanceGeneralHorizontal.aspx.vb index 2de2c782b..145bdb3ca 100644 --- a/Finanzas/RepBalanceGeneralHorizontal.aspx.vb +++ b/Finanzas/RepBalanceGeneralHorizontal.aspx.vb @@ -279,7 +279,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal 'LIGA SOLO EN DETALLE POR CAMPO CVECUENTA - TEMPORAL If e.Row.DBCampo("CtaMayor").ToString = "1" Then - ' e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogoMensual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}" + ' e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad/RepAnexoCatalogoMensual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}" End If @@ -365,7 +365,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal 'LIGA SOLO EN DETALLE POR CAMPO CVECUENTA - TEMPORAL If e.Row.DBCampo("CtaMayor").ToString = "1" Then - e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogoAnual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}" + e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad/RepAnexoCatalogoAnual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}" End If @@ -419,7 +419,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal 'LIGA SOLO EN DETALLE POR CAMPO CVECUENTA - TEMPORAL If e.Row.DBCampo("CtaMayor").ToString = "1" Then - e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogoCC.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}" + e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad/RepAnexoCatalogoCC.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}" End If diff --git a/Finanzas/RepBalanceGeneralVertical.aspx.vb b/Finanzas/RepBalanceGeneralVertical.aspx.vb index 1cf5ec828..679344c37 100644 --- a/Finanzas/RepBalanceGeneralVertical.aspx.vb +++ b/Finanzas/RepBalanceGeneralVertical.aspx.vb @@ -296,7 +296,7 @@ Partial Class Contabilidad_RepBalanceGeneralVertical 'LIGA SOLO EN DETALLE POR CAMPO CVECUENTA - TEMPORAL If e.Row.DBCampo("CtaMayor").ToString = "1" Then - e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogoAnual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}&V=1" + e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad/RepAnexoCatalogoAnual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}&V=1" End If diff --git a/Finanzas/RepEstadoResultados.aspx.vb b/Finanzas/RepEstadoResultados.aspx.vb index 7d3cc1125..e35c5215c 100644 --- a/Finanzas/RepEstadoResultados.aspx.vb +++ b/Finanzas/RepEstadoResultados.aspx.vb @@ -308,8 +308,8 @@ Partial Class Contabilidad2_RepEstadoResultados End If If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) End If @@ -348,8 +348,8 @@ Partial Class Contabilidad2_RepEstadoResultados End If If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) End If If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then @@ -479,27 +479,27 @@ Partial Class Contabilidad2_RepEstadoResultados If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Or e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then - e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/02/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("09/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/11/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/02/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("09/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/11/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLTrimestral1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLTrimestral2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLTrimestral3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLTrimestral4").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLTrimestral1").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLTrimestral2").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLTrimestral3").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLTrimestral4").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLCuatrimestral1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLCuatrimestral2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) - e.Row.FCHyperLink("HLCuatrimestral3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLCuatrimestral1").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLCuatrimestral2").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLCuatrimestral3").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue) End If @@ -587,7 +587,7 @@ Partial Class Contabilidad2_RepEstadoResultados If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Or e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then For index = 1 To Anos - e.Row.FCHyperLink("HLAno" + index.ToString).NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), String.Format("31/12/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), TipoReporte, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLAno" + index.ToString).NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), String.Format("31/12/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), TipoReporte, DdlSubproyecto.SelectedValue) Next End If diff --git a/Finanzas/RepEstadoResultadosHorizontal.aspx.vb b/Finanzas/RepEstadoResultadosHorizontal.aspx.vb index 44afda65d..f4613355d 100644 --- a/Finanzas/RepEstadoResultadosHorizontal.aspx.vb +++ b/Finanzas/RepEstadoResultadosHorizontal.aspx.vb @@ -224,7 +224,7 @@ Partial Class Contabilidad2_RepEstadoResultadosHorizontal 'LIGA SOLO EN DETALLE POR CAMPO CVECUENTA - TEMPORAL If e.Row.DBCampo("CtaMayor").ToString = "1" Then - e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogoMensual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}" + e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad/RepAnexoCatalogoMensual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}" End If @@ -311,7 +311,7 @@ Partial Class Contabilidad2_RepEstadoResultadosHorizontal 'LIGA SOLO EN DETALLE POR CAMPO CVECUENTA - TEMPORAL If e.Row.DBCampo("CtaMayor").ToString = "1" Then - e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogoAnual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}" + e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad/RepAnexoCatalogoAnual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}" End If @@ -367,7 +367,7 @@ Partial Class Contabilidad2_RepEstadoResultadosHorizontal 'LIGA SOLO EN DETALLE POR CAMPO CVECUENTA - TEMPORAL If e.Row.DBCampo("CtaMayor").ToString = "1" Then - e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogoCC.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}" + e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad/RepAnexoCatalogoCC.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}" End If 'TOTAL diff --git a/Finanzas/RepEstadoResultadosVertical.aspx b/Finanzas/RepEstadoResultadosVertical.aspx index 8b11c8c1b..aab7dd649 100644 --- a/Finanzas/RepEstadoResultadosVertical.aspx +++ b/Finanzas/RepEstadoResultadosVertical.aspx @@ -128,7 +128,7 @@ - + diff --git a/Finanzas/RepEstadoResultadosVertical.aspx.vb b/Finanzas/RepEstadoResultadosVertical.aspx.vb index 58ba6fe22..727839c58 100644 --- a/Finanzas/RepEstadoResultadosVertical.aspx.vb +++ b/Finanzas/RepEstadoResultadosVertical.aspx.vb @@ -327,7 +327,7 @@ Partial Class Finanzas_RepEstadoResultadosVertical 'LIGA SOLO EN DETALLE POR CAMPO CVECUENTA - TEMPORAL If e.Row.DBCampo("CtaMayor").ToString = "1" Then - e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogoAnual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}&V=1" + e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad/RepAnexoCatalogoAnual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}&V=1" End If From c3c8a6754dbeff5149a1e0bdda0af5e12a3aaa18 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 17 Jun 2024 09:45:03 -0700 Subject: [PATCH 25/59] --Cortes con subproyectos --Fix varios --- App_Code/ClsPuntoVenta.vb | 5 +-- Ventas/Ventas.aspx | 11 +++++- Ventas/Ventas.aspx.vb | 73 ++++++++++++++++++++++++++++++--------- 3 files changed, 69 insertions(+), 20 deletions(-) diff --git a/App_Code/ClsPuntoVenta.vb b/App_Code/ClsPuntoVenta.vb index 7ae142533..fca55c651 100644 --- a/App_Code/ClsPuntoVenta.vb +++ b/App_Code/ClsPuntoVenta.vb @@ -269,7 +269,7 @@ Public Class ClsPuntoVenta Return Retorno End Function - Public Function AddVtaCortes(FechaInicial As DateTime, ImporteInicial As Decimal, CveUsuario As Integer, Descripcion As String, CveEmpresa As Integer) As Boolean + Public Function AddVtaCortes(FechaInicial As DateTime, ImporteInicial As Decimal, CveUsuario As Integer, Descripcion As String, CveEmpresa As Integer, CveSubProyecto As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_CortesAdd") @@ -278,7 +278,8 @@ Public Class ClsPuntoVenta .Add("@ImporteInicial", SqlDbType.Money).Value = ImporteInicial .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@Descripcion", SqlDbType.VarChar).Value = Descripcion - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveCorte", SqlDbType.Int).Direction = ParameterDirection.Output End With diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index a8e8d57fa..b7032f1dd 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -4932,6 +4932,15 @@     + + + Sucursal: + + + + + + @@ -8930,7 +8939,7 @@
    <%-- MODAL PS ADICIONALES --%> - +
    +
    +
    +
    + Es Filial: + +
    +
    +

    diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index effedfe05..997d09f0c 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1584,6 +1584,7 @@ Partial Class Clientes ChkCargoUsado.Checked = ObjClientes.CargoUsados ChkBonificacionUsado.Checked = ObjClientes.BonificacionUsado ChkProductoAlterno.Checked = ObjClientes.UsaProductoAlterno + ChkEsFilial.Checked = ObjClientes.EsFilial DdlAlmacenAsignado.SelectedValueExist(ObjClientes.CveAlmacenAsignado) DdlAlmacenAlterno.SelectedValueExist(ObjClientes.CveAlmacenAlterno) DdlAlmacenConsignacion.SelectedValueExist(ObjClientes.CveAlmacenConsignacion) @@ -2594,7 +2595,7 @@ Partial Class Clientes CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()), - CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito, Genero:=GeneroCliente, CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked) Then + CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito, Genero:=GeneroCliente, CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked, EsFilial:=ChkEsFilial.Checked) Then CveClienteNuevo = ObjClientes.CveCliente @@ -2679,7 +2680,7 @@ Partial Class Clientes CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()), NoDesglosaIVA:=Not ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito, Genero:=GeneroCliente, CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked, - EnQuebranto:=ChkEnQuebranto.Checked, EnDemanda:=ChkEnDemanda.Checked, CreditoRegistroFirmas:=TxtNombreFirmas.Text.Trim) Then + EnQuebranto:=ChkEnQuebranto.Checked, EnDemanda:=ChkEnDemanda.Checked, CreditoRegistroFirmas:=TxtNombreFirmas.Text.Trim, EsFilial:=ChkEsFilial.Checked) Then If Not ObjClientes.LimpiaImpuestosLocales(Me.CveCliente) Then ErrorProceso = True diff --git a/Ventas/RepVentaDetalle.aspx b/Ventas/RepVentaDetalle.aspx index 4a72af537..b5cf45358 100644 --- a/Ventas/RepVentaDetalle.aspx +++ b/Ventas/RepVentaDetalle.aspx @@ -308,6 +308,14 @@
    + +
    + + + + + +
    diff --git a/Ventas/RepVentaDetalle.aspx.vb b/Ventas/RepVentaDetalle.aspx.vb index 94dac0555..0fb8625fc 100644 --- a/Ventas/RepVentaDetalle.aspx.vb +++ b/Ventas/RepVentaDetalle.aspx.vb @@ -439,7 +439,7 @@ Partial Class RepVentaDetalle CveCorte.ToEntero, TipoComprobante, DdlSubProyectoEjecucion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaIEjec, FechaFEjec, CveProyecto, Sucursales, TipoCambio, TCEspecifico, CveMoneda, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=Not ChkLecturaAdmin.Checked, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), - ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero) Then + ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero) Then DtVentas = AddRows(ObjVentas.DtResultados) ImgImprimir.Enabled = True GvDatos.DataSource = AddRows(ObjVentas.DtResultados) diff --git a/Ventas/RepVentas.aspx b/Ventas/RepVentas.aspx index 148775ebf..c1232922e 100644 --- a/Ventas/RepVentas.aspx +++ b/Ventas/RepVentas.aspx @@ -318,6 +318,14 @@
    + +
    + + + + + +
    diff --git a/Ventas/RepVentas.aspx.vb b/Ventas/RepVentas.aspx.vb index 5939e44d1..c5313733e 100644 --- a/Ventas/RepVentas.aspx.vb +++ b/Ventas/RepVentas.aspx.vb @@ -277,7 +277,7 @@ Partial Class Ventas_RepVentas If ObjVentas.GetRepVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente, DdlSubProyectoEjecucion.SelectedValue.ToEntero, Vendedores, DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable, - EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero) Then + EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados Else diff --git a/Ventas/RepVentasUtilidadPadre.aspx b/Ventas/RepVentasUtilidadPadre.aspx index c3d496d27..090bb6638 100644 --- a/Ventas/RepVentasUtilidadPadre.aspx +++ b/Ventas/RepVentasUtilidadPadre.aspx @@ -179,6 +179,14 @@
    + +
    + + + + + +
    Garantía?:
    diff --git a/Ventas/RepVentasUtilidadPadre.aspx.vb b/Ventas/RepVentasUtilidadPadre.aspx.vb index 2e58d4ef0..1fe681f16 100644 --- a/Ventas/RepVentasUtilidadPadre.aspx.vb +++ b/Ventas/RepVentasUtilidadPadre.aspx.vb @@ -132,7 +132,7 @@ Partial Class Ventas_RepVentasUtilidadPadre If ObjVentas.GetReportePadreVentasUtilidad(If(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM), DdlClientesWS.SelectedValue.ToEntero, If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM), txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, - DdlMarcas.SelectedValue.ToEntero, DdlGarantia.SelectedValue.ToEntero) Then + DdlMarcas.SelectedValue.ToEntero, DdlGarantia.SelectedValue.ToEntero, DdlFilial.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjVentas.DtResultados DtDatos = ObjVentas.DtResultados End If From 4a6a1e88f4b1e2e3d61550419275a73460d45bac Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 17 Jun 2024 22:07:30 -0700 Subject: [PATCH 33/59] =?UTF-8?q?-=20se=20reemplaz=C3=B3=20el=20archivo=20?= =?UTF-8?q?de=20regprepolizaS.aspx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contabilidad/RegPrePoliza.aspx | 1238 ++++++----- Contabilidad/RegPrePoliza.aspx.vb | 3164 +++++++++++++++++------------ 2 files changed, 2552 insertions(+), 1850 deletions(-) diff --git a/Contabilidad/RegPrePoliza.aspx b/Contabilidad/RegPrePoliza.aspx index 172b43029..82c77e45a 100644 --- a/Contabilidad/RegPrePoliza.aspx +++ b/Contabilidad/RegPrePoliza.aspx @@ -1,9 +1,12 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegPrePoliza.aspx.vb" Inherits="ContabilidadC_RegPrePoliza" %> +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegPrePoliza.aspx.vb" Inherits="ContabilidadC_RegPrePoliza" EnableEventValidation="false" %>