-- mejora en acomodo con conta = 1
This commit is contained in:
@@ -176,7 +176,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Cuenta Contable">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCtaContable" runat="server" Text='<%# Eval("NombreCuenta") %>'>></asp:Literal>
|
||||
<asp:Literal ID="LtlCtaContable" runat="server" Text='<%# Eval("CodigoNombreCuenta") %>'>></asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -244,8 +244,8 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
|
||||
Public Sub updatatos()
|
||||
|
||||
Dim ObjPlantillaPolizaDetalle As New ClsContabilidad
|
||||
If ObjPlantillaPolizaDetalle.GetConta_PlantillasPolizasDetalle(-1, UsuarioActual.CveEmpresa) Then
|
||||
ViewState("DTPlantillaPolizaDetalle") = ObjPlantillaPolizaDetalle.DtResultados.FiltraParametros(String.Format(" CvePlantillaPoliza={0} AND CveEmpresa = {1}", CvePlantillaPoliza, UsuarioActual.CveEmpresa))
|
||||
If ObjPlantillaPolizaDetalle.GetConta_PlantillasPolizasDetalle(CvePlantillaPoliza, UsuarioActual.CveEmpresa) Then
|
||||
ViewState("DTPlantillaPolizaDetalle") = ObjPlantillaPolizaDetalle.DtResultados
|
||||
' GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantillaPoliza) = ObjPlantillaPolizaDetalle.DtResultados
|
||||
End If
|
||||
ObjPlantillaPolizaDetalle.Dispose()
|
||||
|
||||
@@ -325,24 +325,7 @@
|
||||
</div>
|
||||
|
||||
<input id="HdnCveCuenta" runat="server" type="hidden" value="-1" clientidmode="Static" />
|
||||
<table style="width: 100%;" class="table GvSize table-striped table-advance table-hover">
|
||||
<tr class="Titulos">
|
||||
<th>Cuenta</th>
|
||||
<th>Referencia</th>
|
||||
<th>Descripción</th>
|
||||
<th>SubProyecto
|
||||
<br />
|
||||
<asp:DropDownList ID="DdlSubProyectoFiltroMov" Width="150px" AutoPostBack="true" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSubProyectoFiltroMov_SelectedIndexChanged" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AppendDataBoundItems="true"></asp:DropDownList></br/>
|
||||
<th id="ThTipoGasto" runat="server" visible="false">Tipo Gasto</th>
|
||||
<th>Ref. Bancaria</th>
|
||||
<th>Cargo</th>
|
||||
<th>Abono</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
||||
|
||||
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
||||
|
||||
<div class="portlet light xspadding bordered " id="pnldl2">
|
||||
<div class="portlet-title">
|
||||
@@ -365,7 +348,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False"
|
||||
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="True"
|
||||
DataKeyNames="IdMov,Cargo,Abono,TipoMovto,CveConceptoContable,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,CveCuenta, ContadoTipoTransaccion, ContadoCuenta, ContadoNumeroFolio, ContadoImporte, ContadoBeneficiario, ContadoObservaciones,EsComplementaria, EsMonedaExtranjera,ImporteME, PorcentajeImpuesto"
|
||||
Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
@@ -373,7 +356,7 @@
|
||||
<HeaderTemplate>Cuenta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCuenta" runat="server" Text='<%# Eval("Cuenta") %>'></asp:Literal><br />
|
||||
<asp:Label ID="LblCuentaCon" Font-Italic="true" Font-Size="7pt" runat="server" Text='<%# Eval("CodigoCuenta") %>'></asp:Label>
|
||||
<asp:Label ID="LblCuentaCon" Font-Italic="true" Font-Size="7pt" runat="server" Text='<%# Eval("CodigoNombreCuenta") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
@@ -387,7 +370,7 @@
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Concepto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" Text='<%# Eval("Concepto")%>'></asp:TextBox>
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" Text='<%# Eval("Concepto")%>' Width="100%"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
@@ -398,14 +381,14 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>TipoGasto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="150px"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Ref. Bancaria</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSaldos" CssClass="select2me" runat="server" DataValueField="CveIE" DataTextField="RazonSocialSaldo" Visible="false" Style="width: 150px;"></asp:DropDownList>
|
||||
@@ -420,7 +403,7 @@
|
||||
TC:<asp:TextBox ID="TxtTC" CssClass="" runat="server" Style="text-align: right" Width="55px"></asp:TextBox>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
<ItemStyle HorizontalAlign="Right" Width="100px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Abono</HeaderTemplate>
|
||||
@@ -428,10 +411,10 @@
|
||||
<asp:TextBox ID="TxtAbono" CssClass="txtabono" runat="server" Style="text-align: right" Width="65px" Visible="False" Text='<%# If(String.IsNullOrEmpty(Eval("Abono").ToString), "", Eval("Abono", "{0:0.00}")) %>' ></asp:TextBox>
|
||||
<div id="divAbonoME" runat="server" Visible="False">ME:<asp:TextBox ID="TxtAbonoME" CssClass="" runat="server" Style="text-align: right" Width="55px" ></asp:TextBox></div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
<ItemStyle HorizontalAlign="Right" Width="100px"/>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton Visible="false" ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" OnClientClick="javascript:return C();" />
|
||||
@@ -439,7 +422,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgBancos" runat="server" CausesValidation="False" CssClass="btn btn-circle btn-sm btn-warning" OnClick="Bancos_Click" Text="<i class='fa fa-money'></i>" Visible="false" />
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -279,7 +279,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
If IfNull(Request("Tipo"), "").ToString = "NOMPROV" Then
|
||||
DivTipoGasto.Visible = True
|
||||
ThTipoGasto.Visible = True
|
||||
CargaTiposGasto()
|
||||
End If
|
||||
|
||||
@@ -377,7 +376,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DtMovimientos = New DataTable("Movimientos")
|
||||
Dim IDMov As DataColumn = DtMovimientos.Columns.Add("IdMov", Type.GetType("System.Int32")) : IDMov.AutoIncrement = True
|
||||
With DtMovimientos.Columns
|
||||
.Add("CodigoCuenta", Type.GetType("System.String"))
|
||||
.Add("Cuenta", Type.GetType("System.String"))
|
||||
.Add("Referencia", Type.GetType("System.String"))
|
||||
.Add("Concepto", Type.GetType("System.String"))
|
||||
@@ -662,9 +660,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
DdlSubProyectoFiltroMov.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyectoFiltroMov.DataBind()
|
||||
DdlSubProyectoFiltroMov.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentasContables()
|
||||
@@ -790,27 +786,15 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden")
|
||||
|
||||
'Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla, UsuarioActual.CveEmpresa)
|
||||
Dim Cuenta As String = ""
|
||||
Dim IdCuenta As Integer = 0
|
||||
Dim CodigoCuenta As String = ""
|
||||
Dim NombreCuenta As String = ""
|
||||
Dim EsComodin As Integer = 0
|
||||
DtMovimientos.Clear()
|
||||
|
||||
For Each drt As DataRow In Dt.Rows
|
||||
|
||||
Cuenta = drt("ConceptoContable").ToString
|
||||
IdCuenta = 0
|
||||
CodigoCuenta = ""
|
||||
NombreCuenta = ""
|
||||
|
||||
|
||||
Dim dr As DataRow = DtMovimientos.NewRow
|
||||
|
||||
dr("CodigoCuenta") = drt("Codigo").ToString & "<br>" & drt("Nombre").ToString
|
||||
dr("CodigoNombreCuenta") = drt("Codigo").ToString & "<br>" & drt("Nombre").ToString
|
||||
dr("Cuenta") = Cuenta 'TxtCuentaContable.Text
|
||||
dr("Cuenta") = drt("ConceptoContable").ToString
|
||||
dr("Referencia") = If(drt("CveConceptoContable").ToString.Contiene("29", "130"), drt("Personal"), drt("RazonSocial"))
|
||||
dr("Concepto") = TxtConcepto.Text
|
||||
dr("TipoMovto") = If(drt("TipoMovto").ToString = "False", 0, 1)
|
||||
@@ -826,6 +810,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("CveCuenta") = drt("CveCuenta")
|
||||
dr("EsComplementaria") = drt("EsComplementaria")
|
||||
dr("EsMonedaExtranjera") = drt("EsMonedaExtranjera")
|
||||
dr("PorcentajeImpuesto") = drt("PorcentajeImpuesto")
|
||||
|
||||
DtMovimientos.Rows.Add(dr)
|
||||
Next
|
||||
@@ -1736,7 +1721,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim dr As DataRow = DtMovimientos.NewRow
|
||||
dr("IdCtaContable") = IdCtaContable
|
||||
dr("CveCuenta") = DdlCuentaContableE.SelectedValue
|
||||
'dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
||||
dr("CodigoNombreCuenta") = DdlCuentaContableE.SelectedItem.Text
|
||||
dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text
|
||||
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
|
||||
@@ -1913,7 +1897,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
End If
|
||||
|
||||
dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
||||
dr("CodigoNombreCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
||||
dr("Cuenta") = DdlConceptosContables.SelectedItem
|
||||
dr("Referencia") = TxtReferencia.Text
|
||||
dr("Concepto") = TxtConcepto.Text
|
||||
@@ -1984,7 +1968,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
End If
|
||||
|
||||
dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
||||
dr("CodigoNombreCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
||||
dr("Cuenta") = DdlConceptosContables.SelectedItem.Text
|
||||
dr("Referencia") = TxtReferencia.Text
|
||||
dr("Concepto") = TxtConcepto.Text
|
||||
@@ -2172,23 +2156,23 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
RegistraScript("calculateCargo()", "abono")
|
||||
RegistraScript("comparar()", "compara")
|
||||
End Sub
|
||||
Protected Sub DdlSubProyectoFiltroMov_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
For Each Gvr As GridViewRow In GvMov.Rows
|
||||
If DdlSubProyectoFiltroMov.SelectedValue.ToEntero > 0 Then
|
||||
If Gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero = DdlSubProyectoFiltroMov.SelectedValue.ToEntero Or Not Gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero > 0 Then
|
||||
Gvr.Visible = True
|
||||
Else
|
||||
Gvr.Visible = False
|
||||
End If
|
||||
Else
|
||||
Gvr.Visible = True
|
||||
End If
|
||||
Next
|
||||
UpPrePoliza.Update()
|
||||
RegistraScript("calculateAbono()", "cargo")
|
||||
RegistraScript("calculateCargo()", "abono")
|
||||
RegistraScript("comparar()", "compara")
|
||||
End Sub
|
||||
'Protected Sub DdlSubProyectoFiltroMov_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' For Each Gvr As GridViewRow In GvMov.Rows
|
||||
' If DdlSubProyectoFiltroMov.SelectedValue.ToEntero > 0 Then
|
||||
' If Gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero = DdlSubProyectoFiltroMov.SelectedValue.ToEntero Or Not Gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero > 0 Then
|
||||
' Gvr.Visible = True
|
||||
' Else
|
||||
' Gvr.Visible = False
|
||||
' End If
|
||||
' Else
|
||||
' Gvr.Visible = True
|
||||
' End If
|
||||
' Next
|
||||
' UpPrePoliza.Update()
|
||||
' RegistraScript("calculateAbono()", "cargo")
|
||||
' RegistraScript("calculateCargo()", "abono")
|
||||
' RegistraScript("comparar()", "compara")
|
||||
'End Sub
|
||||
|
||||
Private Sub GvMov_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvMov.RowEditing
|
||||
Actualizar = True
|
||||
@@ -2552,9 +2536,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
|
||||
Dim dr As DataRow = DtMovimientos.NewRow
|
||||
Dim CodigoCuenta As String = ""
|
||||
|
||||
dr("CodigoCuenta") = NombreCuenta
|
||||
dr("CodigoNombreCuenta") = NombreCuenta
|
||||
dr("Cuenta") = ConceptoAdministrativo
|
||||
dr("Referencia") = Row("Referencia").ToString
|
||||
|
||||
Reference in New Issue
Block a user