-acomodo de filtros, y filtro por opción movto
This commit is contained in:
@@ -101,17 +101,17 @@
|
||||
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" id="tdTipoReporte" visible="true">
|
||||
<div class="col-md-1 truncate" id="tdTipoReporte" visible="false" runat="server">
|
||||
Tipo
|
||||
</div>
|
||||
<div class="col-md-2" id="tdTipoReporte2" visible="true">
|
||||
<div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="col-md-1" id="divProyecto" runat="server">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
@@ -123,10 +123,7 @@
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList Visible="false" CssClass="form-control input-sm" Width="150px" ID="DdlTipoCuentas" ClientIDMode="Static" runat="server" DataTextField="Nombre" DataValueField="CveCuenta" TabIndex="4" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -109,10 +109,6 @@ Partial Class AC2_RepAnexoCatalogo
|
||||
'FechaInicio = Request("FI").ToDate
|
||||
FechaFin = Request("FF").ToDate
|
||||
DdlCuentas.SelectedValueExist(IdCuenta)
|
||||
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
|
||||
FechaInicio = Request("FI").ToDate
|
||||
@@ -189,19 +185,13 @@ Partial Class AC2_RepAnexoCatalogo
|
||||
Dim dr As DataRow = ObjTipoCuenta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
|
||||
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
|
||||
'DTCuentas = ObjTipoCuenta.DtResultados '.FiltraParametros("Afectable = 1")
|
||||
DdlTipoCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo IN ('_ACTIVO', '_BPASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
DdlCuentas.DataSource = ObjTipoCuenta.DtResultados
|
||||
End If
|
||||
ObjTipoCuenta.Dispose()
|
||||
DdlTipoCuentas.DataBind()
|
||||
'If strGlobal.Length > 0 Then DdlTipoCuentas.Items.Insert(0, New ListItem("Todas", strGlobal))
|
||||
DdlTipoCuentas.Items.Insert(0, New ListItem("Todas las Cuentas", "-1"))
|
||||
DdlTipoCuentas.Items.Add(New ListItem("Algun específico", "-2"))
|
||||
DdlTipoCuentas.SelectedValue = "-2"
|
||||
|
||||
DdlCuentas.DataBind()
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto)
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -323,25 +313,17 @@ Partial Class AC2_RepAnexoCatalogo
|
||||
End Sub
|
||||
Public Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.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)
|
||||
Else
|
||||
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", Date.Now, txtFechaI.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)
|
||||
|
||||
IdCuenta = DdlCuentas.SelectedValue.ToEntero
|
||||
CargaDatos()
|
||||
End If
|
||||
'RegistraScript("Enable();")
|
||||
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)
|
||||
|
||||
|
||||
@@ -44,11 +44,22 @@
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" CssClass="btn btn-default" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" ValidationGroup="GrpConsulta" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" ValidationGroup="Valida" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
Cuenta:
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
@@ -87,29 +98,35 @@
|
||||
<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 class="col-md-1">
|
||||
Cuenta:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<label class="col-md-1">Moneda:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlMoneda" CssClass="form-control input-sm select2me" runat="server" DataTextField="Moneda" DataValueField="CveMoneda" TabIndex="5" ClientIDMode="Static" Width="100%">
|
||||
<div class="col-md-1 truncate">
|
||||
Tipo Movto
|
||||
</div>
|
||||
<div class="col-md-2 truncate">
|
||||
<asp:DropDownList ID="DdlOpcionCuentas" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos y saldo no igual a cero" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="col-md-1 truncate" id="tdTipoReporte" visible="false" runat="server">
|
||||
Tipo
|
||||
</div>
|
||||
<div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1" id="divProyecto" runat="server">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
@@ -121,18 +138,7 @@
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="tdTipoReporte" visible="true">
|
||||
<div class="row">
|
||||
<label class="col-md-3">Tipo:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -105,9 +105,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
|
||||
CargaTipoCuentas()
|
||||
'TxtCuenta.Enabled = False
|
||||
DdlMoneda.DataSource = GlobalDTMonedas
|
||||
'DdlMoneda.Dispose()
|
||||
DdlMoneda.DataBind()
|
||||
|
||||
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
|
||||
@@ -228,7 +226,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
ObjTipoCuenta.Dispose()
|
||||
DdlCuentas.DataBind()
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto)
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -248,7 +246,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, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte) Then
|
||||
If ObjConta.GetMovimientosAuxiliaresCatalogo(IdCuenta, FechaInicio, FechaFin, -1, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte, DdlOpcionCuentas.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
DtTotales = DtDatos.Clone
|
||||
|
||||
@@ -275,8 +273,8 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
Row = DtTotales.NewRow
|
||||
|
||||
Row("CveCuenta") = -1
|
||||
Row("CargosMovto") = If(DdlMoneda.SelectedValue = "1", dr("Cargos"), dr("CargosME"))
|
||||
Row("AbonosMovto") = If(DdlMoneda.SelectedValue = "1", dr("Abonos"), dr("AbonosME"))
|
||||
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"))
|
||||
@@ -367,9 +365,9 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
End If
|
||||
|
||||
'e.Row.FCLabel("LbReferencia").Text = String.Format("Total {0}:", If(e.Row.DBCampo("CtaMayor").ToString = "2", "", e.Row.DBCampo("Nombre").ToString))
|
||||
e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("Cargos").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("Abonos").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("SaldoActual").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
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
|
||||
@@ -378,9 +376,9 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
CType(e.Row.FindControl("tr1"), HtmlTableRow).Visible = False
|
||||
e.Row.FCHyperLink("HLPoliza").NavigateUrl = String.Format("/Contabilidad/RegPrePoliza.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(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
If e.Row.DBCampo("AbonosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("AbonosMovto").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
If e.Row.DBCampo("Saldo").ToDouble <> 0 Then e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("Saldo").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
|
||||
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
|
||||
|
||||
@@ -485,7 +483,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
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", DdlMoneda.SelectedValue))
|
||||
params.Add(New ReportParameter("CveMoneda", "1"))
|
||||
params.Add(New ReportParameter("Cuenta", Cuenta))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user