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

@@ -135,12 +135,14 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
TxtFechaF.Text = FechaInicio.ToShortDateString
End If
If Request("CveSubProyecto") IsNot Nothing Then
If IsNumeric(Request("CveSubProyecto")) Then
DdlSubproyecto.SelectedValueExist(Request("CveSubProyecto").ToString)
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
@@ -207,9 +209,6 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
Dim ObjTipoCuenta As New ClsContabilidad '(UsuarioActual.Empresa)
Dim strGlobal As String = ""
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
DdlSubproyecto.DataBind()
If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa, 1, -1) Then
Dim dr As DataRow = ObjTipoCuenta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
@@ -228,11 +227,19 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
End If
ObjTipoCuenta.Dispose()
DdlCuentas.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 CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
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)
@@ -241,7 +248,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
IdCuenta = DdlCuentas.SelectedValue.ToEntero
Cuenta = DdlCuentas.SelectedItem.ToString
Dim ObjConta As New ClsContabilidad
If ObjConta.GetMovimientosAuxiliaresCatalogo(IdCuenta, FechaInicio, FechaFin, DdlMoneda.SelectedValue.ToEntero, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte) Then
If ObjConta.GetMovimientosAuxiliaresCatalogo(IdCuenta, FechaInicio, FechaFin, DdlMoneda.SelectedValue.ToEntero, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte) Then
DtDatos = ObjConta.DtResultados
DtTotales = DtDatos.Clone