-- en el listado de cuentas, no mostrar las cuentas que inician con _global, _activo....
This commit is contained in:
@@ -182,10 +182,9 @@ Partial Class AC2_RepAnexoCatalogo
|
|||||||
Dim strGlobal As String = ""
|
Dim strGlobal As String = ""
|
||||||
|
|
||||||
If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||||
Dim dr As DataRow = ObjTipoCuenta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
|
|
||||||
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
|
DdlCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||||
'DTCuentas = ObjTipoCuenta.DtResultados '.FiltraParametros("Afectable = 1")
|
' DdlCuentas.DataSource = ObjTipoCuenta.DtResultados
|
||||||
DdlCuentas.DataSource = ObjTipoCuenta.DtResultados
|
|
||||||
End If
|
End If
|
||||||
ObjTipoCuenta.Dispose()
|
ObjTipoCuenta.Dispose()
|
||||||
|
|
||||||
|
|||||||
@@ -94,11 +94,6 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
<label class="col-md-1" style="display: none;">Tipo de Cuentas:</label>
|
|
||||||
<div class="col-md-2" style="display: none;">
|
|
||||||
<asp:DropDownList ID="DdlTipoCuentas" CssClass="form-control input-sm" runat="server" DataTextField="Nombre" DataValueField="CveCuenta" TabIndex="4" AutoPostBack="true" ClientIDMode="Static">
|
|
||||||
</asp:DropDownList>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -138,7 +133,7 @@
|
|||||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|||||||
@@ -44,22 +44,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
|||||||
ViewState("FechaFin") = value
|
ViewState("FechaFin") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
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 IdCuenta As Integer
|
|
||||||
Get
|
|
||||||
IdCuenta = ViewState("IdCuenta").ToString.ToEntero
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
ViewState("IdCuenta") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Private Property TotalPadre As Boolean
|
Private Property TotalPadre As Boolean
|
||||||
Get
|
Get
|
||||||
TotalPadre = CBool(ViewState("TotalPadre"))
|
TotalPadre = CBool(ViewState("TotalPadre"))
|
||||||
@@ -113,17 +98,11 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
|||||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
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
|
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||||
|
|
||||||
IdCuenta = Request("CveCuenta").ToEntero
|
|
||||||
'HdnCveCuenta.Value = IdCuenta.ToString
|
|
||||||
|
|
||||||
FechaFin = Request("FF").ToDate
|
FechaFin = Request("FF").ToDate
|
||||||
txtFechaF.Text = FechaFin.ToShortDateString
|
txtFechaF.Text = FechaFin.ToShortDateString
|
||||||
|
|
||||||
DdlCuentas.SelectedValueExist(IdCuenta)
|
DdlCuentas.SelectedValueExist(Request("CveCuenta").ToEntero)
|
||||||
If DdlCuentas.SelectedValue.ToEntero <> -1 Then
|
|
||||||
'RegistraScript("Enable();")
|
|
||||||
DdlTipoCuentas.SelectedValueExist(-2)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||||
FechaInicio = Request("FI").ToDate
|
FechaInicio = Request("FI").ToDate
|
||||||
@@ -176,12 +155,11 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||||
If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso DdlCuentas.SelectedValue.ToEntero = -1 Then
|
If DdlCuentas.SelectedValue.ToEntero = -1 Then
|
||||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||||
Else
|
Else
|
||||||
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", Date.Now, txtFechaI.Text.ToDate)
|
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", Date.Now, txtFechaI.Text.ToDate)
|
||||||
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", Date.Now, txtFechaF.Text.ToDate)
|
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", Date.Now, txtFechaF.Text.ToDate)
|
||||||
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, DdlCuentas.SelectedValue.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero)
|
|
||||||
|
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
End If
|
End If
|
||||||
@@ -203,25 +181,14 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
|||||||
Return Str.ToString
|
Return Str.ToString
|
||||||
End Function
|
End Function
|
||||||
Private Sub CargaTipoCuentas()
|
Private Sub CargaTipoCuentas()
|
||||||
' Dim ObjTipoCuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
|
||||||
Dim ObjTipoCuenta As New ClsContabilidad '(UsuarioActual.Empresa)
|
|
||||||
Dim strGlobal As String = ""
|
|
||||||
|
|
||||||
If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa, 1, -1) Then
|
Dim ObjTipoCuenta As New ClsContabilidad
|
||||||
Dim dr As DataRow = ObjTipoCuenta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
|
|
||||||
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
|
|
||||||
DTCuentas = ObjTipoCuenta.DtResultados
|
|
||||||
DdlTipoCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo IN ('_ACTIVO', '_BPASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
|
||||||
End If
|
|
||||||
DdlTipoCuentas.DataBind()
|
|
||||||
'If strGlobal.Length > 0 Then DdlTipoCuentas.Items.Insert(0, New ListItem("Todas", strGlobal))
|
|
||||||
DdlTipoCuentas.Items.Insert(0, New ListItem("Todas las Cuentas", "1"))
|
|
||||||
DdlTipoCuentas.Items.Add(New ListItem("Algun específico", "-2"))
|
|
||||||
DdlTipoCuentas.SelectedIndex = 1
|
|
||||||
DdlCuentas.Enabled = True
|
DdlCuentas.Enabled = True
|
||||||
|
|
||||||
If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||||
DdlCuentas.DataSource = ObjTipoCuenta.DtResultados
|
DTCuentas = ObjTipoCuenta.DtResultados
|
||||||
|
DdlCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||||
|
|
||||||
End If
|
End If
|
||||||
ObjTipoCuenta.Dispose()
|
ObjTipoCuenta.Dispose()
|
||||||
DdlCuentas.DataBind()
|
DdlCuentas.DataBind()
|
||||||
@@ -234,7 +201,6 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
|||||||
CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos")
|
CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos")
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
|
||||||
|
|
||||||
Dim CveProyecto As Integer = DdlProyecto.SelectedValue.ToEntero
|
Dim CveProyecto As Integer = DdlProyecto.SelectedValue.ToEntero
|
||||||
Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
|
Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
|
||||||
@@ -243,14 +209,13 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
|||||||
Alert("No ha seleccionado cuenta, Favor de especificar una", TipoMensaje.MsgAdvertencia)
|
Alert("No ha seleccionado cuenta, Favor de especificar una", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
IdCuenta = DdlCuentas.SelectedValue.ToEntero
|
|
||||||
Cuenta = DdlCuentas.SelectedItem.ToString
|
Cuenta = DdlCuentas.SelectedItem.ToString
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
If ObjConta.GetMovimientosAuxiliaresCatalogo(IdCuenta, FechaInicio, FechaFin, -1, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte, DdlOpcionCuentas.SelectedValue.ToEntero) Then
|
If ObjConta.GetMovimientosAuxiliaresCatalogo(DdlCuentas.SelectedValue.ToEntero, FechaInicio, FechaFin, -1, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte, DdlOpcionCuentas.SelectedValue.ToEntero) Then
|
||||||
DtDatos = ObjConta.DtResultados
|
DtDatos = ObjConta.DtResultados
|
||||||
DtTotales = DtDatos.Clone
|
DtTotales = DtDatos.Clone
|
||||||
|
|
||||||
'InsertaTotales()
|
|
||||||
CargaGrid()
|
CargaGrid()
|
||||||
Else
|
Else
|
||||||
DtDatos = Nothing
|
DtDatos = Nothing
|
||||||
@@ -414,17 +379,12 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||||
If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso DdlCuentas.SelectedValue.ToEntero = -1 Then
|
If DdlCuentas.SelectedValue.ToEntero = -1 Then
|
||||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||||
Else
|
Else
|
||||||
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", Date.Now, txtFechaI.Text.ToDate)
|
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", Date.Now, txtFechaI.Text.ToDate)
|
||||||
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", Date.Now, txtFechaF.Text.ToDate)
|
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", Date.Now, txtFechaF.Text.ToDate)
|
||||||
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, DdlCuentas.SelectedValue.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero)
|
|
||||||
|
|
||||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
|
||||||
|
|
||||||
'If ObjConta.GetAnexoCatalogo(IdCuenta, FechaInicio, FechaFin) Then
|
|
||||||
'DtDatos = ObjConta.DtResultados
|
|
||||||
DtDatos = DtDatos
|
DtDatos = DtDatos
|
||||||
ImprimirReporte()
|
ImprimirReporte()
|
||||||
End If
|
End If
|
||||||
@@ -488,21 +448,9 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
|||||||
ImprimirPDF("Empresas/Grales/Formatos/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato)
|
ImprimirPDF("Empresas/Grales/Formatos/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub DdlTipoCuentas_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoCuentas.SelectedIndexChanged
|
|
||||||
If DdlTipoCuentas.SelectedValue.ToEntero = -2 Then
|
|
||||||
DdlCuentas.Enabled = True
|
|
||||||
Else
|
|
||||||
DdlCuentas.Enabled = False
|
|
||||||
DdlCuentas.SelectedValueExist(-1)
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user