Unificacion de centro de costos en reportes

This commit is contained in:
RPimienta
2023-02-08 21:54:59 -06:00
parent 006d94145e
commit 4dcd1d4b89
7 changed files with 112 additions and 57 deletions

View File

@@ -52,6 +52,14 @@ Partial Class AC2_RepAnexoCatalogo
' 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
@@ -121,6 +129,12 @@ Partial Class AC2_RepAnexoCatalogo
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)
@@ -187,9 +201,14 @@ Partial Class AC2_RepAnexoCatalogo
DdlCuentas.DataBind()
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
DdlSubproyecto.DataBind()
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, Nothing, LblSubProyecto)
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
@@ -206,7 +225,13 @@ Partial Class AC2_RepAnexoCatalogo
CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero.ToString
End If
If ObjConta.GetAnexoCatalogo(IdCuenta, FechaInicio, FechaFin, DdlCuenta.SelectedValue.ToEntero, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte) Then
If Request("CveProyecto") IsNot Nothing Then
CveProyecto = Request("CveProyecto").ToString
Else
CveProyecto = DdlProyecto.SelectedValue.ToEntero.ToString
End If
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")
@@ -270,7 +295,7 @@ Partial Class AC2_RepAnexoCatalogo
e.Row.FCHyperLink("HLSaldoActual").ForeColor = Drawing.Color.Red
End If
e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveSubProyecto={3}&TP={4}", e.Row.DBCampo("CveCuenta"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveSubProyecto, TipoReporte)
e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/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