- mejoras de tipogasto

This commit is contained in:
2022-03-12 14:56:23 -07:00
parent 68e7bf1080
commit 73785e5051
2 changed files with 25 additions and 10 deletions

View File

@@ -69,15 +69,16 @@
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView runat="server" ID="GvDatos" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover ScrollAD" <asp:GridView runat="server" ID="GvDatos" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover ScrollAD"
DataKeyNames="CveCuentaAsignacion,CveConceptoContable,CveCuenta,IdCuenta,CveProveedor,CveCliente,CvePersonal,CveClasificacion,CveAlmacen,PorcentajeIVA,CveConceptoNomina,CveBancoCuenta,CveActivoFijo,CveSubProyecto" AutoGenerateColumns="False" DataKeyNames="CveCuentaAsignacion,CveConceptoContable,CveCuenta,IdCuenta,CveProveedor,CveCliente,CvePersonal,CveClasificacion,CveAlmacen,PorcentajeIVA,CveConceptoNomina,CveBancoCuenta,CveActivoFijo,CveSubProyecto,CveTipoGasto" AutoGenerateColumns="False"
Style=" width:100%" GridLines="None"> Style=" width:100%" GridLines="None">
<Columns> <Columns>
<asp:BoundField DataField="ConceptoContable" ItemStyle-Width="150px" HeaderText="Concepto Contable" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="ConceptoContable" ItemStyle-Width="150px" HeaderText="Concepto Contable" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="Referencia" HeaderText="Referencia" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="Referencia" HeaderText="Referencia" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="CuentaCodigo" ItemStyle-Width="100px" HeaderText="Código Cuenta" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="CuentaCodigo" ItemStyle-Width="100px" HeaderText="Código Cuenta" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="CuentaNombre" HeaderText="Nombre Cuenta" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="CuentaNombre" HeaderText="Nombre Cuenta" />
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" />
<asp:BoundField DataField="PorcentajeIVA" HeaderText="PorcentajeIVA" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="PorcentajeIVA" HeaderText="PorcentajeIVA" />
<asp:BoundField DataField="TipoGasto" HeaderText="TipoGasto" Visible="false" />
<asp:TemplateField ItemStyle-Width="49px"> <asp:TemplateField ItemStyle-Width="49px">
<ItemTemplate> <ItemTemplate>
@@ -182,6 +183,10 @@
<asp:DropDownList ID="DdlSubProyectos" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList> <asp:DropDownList ID="DdlSubProyectos" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlSubProyectos.ClientID.ToString()%>">Sub Proyectos: </label> <label for="<%= DdlSubProyectos.ClientID.ToString()%>">Sub Proyectos: </label>
</div> </div>
<div class="form-group form-md-line-input input-iconright" id="divTipoGasto" runat="server" visible="false">
<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="240px" ValidationGroup="GrpModulo" ></asp:DropDownList>
<label for="<%= DdlTipoGasto.ClientID.ToString()%>">Tipo Gasto: </label>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -42,6 +42,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
End If End If
GvDatos.Columns(4).Visible = ObjConta.DtResultados.MAX("CveSubProyecto").ToEntero > 0 GvDatos.Columns(4).Visible = ObjConta.DtResultados.MAX("CveSubProyecto").ToEntero > 0
GvDatos.Columns(5).Visible = ObjConta.DtResultados.MAX("PorcentajeIVA").ToDecimal > 0 GvDatos.Columns(5).Visible = ObjConta.DtResultados.MAX("PorcentajeIVA").ToDecimal > 0
GvDatos.Columns(6).Visible = ObjConta.DtResultados.MAX("TipoGasto") <> ""
If ObjConta.GetCuentasGlobales(UsuarioActual.CveEmpresa) Then If ObjConta.GetCuentasGlobales(UsuarioActual.CveEmpresa) Then
GvGlobal.DataSource = ObjConta.DtResultados GvGlobal.DataSource = ObjConta.DtResultados
@@ -125,6 +127,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlSubProyectos.Enabled = False DdlSubProyectos.Enabled = False
DdlClasificacion.Enabled = False DdlClasificacion.Enabled = False
DdlPersonal.Enabled = False DdlPersonal.Enabled = False
RecargaConcepto(CveConceptoContable)
CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero
DdlCconceptosContables.SelectedValueExist(GvRow.DataKey("CveConceptoContable")) DdlCconceptosContables.SelectedValueExist(GvRow.DataKey("CveConceptoContable"))
DdlCuenta.SelectedValueExist(GvRow.DataKey("CveCuenta")) DdlCuenta.SelectedValueExist(GvRow.DataKey("CveCuenta"))
@@ -136,12 +140,11 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
TxtPorcentajeIVA.Text = GvRow.DataKey("PorcentajeIVA") TxtPorcentajeIVA.Text = GvRow.DataKey("PorcentajeIVA")
DdlCuentaBancaria.SelectedValueExist(GvRow.DataKey("CveBancoCuenta")) DdlCuentaBancaria.SelectedValueExist(GvRow.DataKey("CveBancoCuenta"))
DdlSubProyectos.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero) DdlSubProyectos.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero)
DdlTipoGasto.SelectedValueExist(GvRow.DataKey("CveTipoGasto").ToEntero)
Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
RecargaConcepto(CveConceptoContable)
DdlClientes.ddl.SelectedValueExist(CveCliente) DdlClientes.ddl.SelectedValueExist(CveCliente)
DdlPersonal.ddl.SelectedValueExist(CvePersonal) DdlPersonal.ddl.SelectedValueExist(CvePersonal)
@@ -183,6 +186,13 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
End If End If
divConceptoNomina.Visible = Dr("AplicaNomina").ToString = "True" divConceptoNomina.Visible = Dr("AplicaNomina").ToString = "True"
If CveConceptoContable = 51 Then
divTipoGasto.Visible = True
DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
DdlTipoGasto.DataBind()
' DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo"))
End If
End If End If
End Sub End Sub
@@ -253,14 +263,14 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero, If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero) Then CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero) Then
ErrorString = "Error al agregar" ErrorString = "Error al agregar"
End If End If
ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero, If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero) Then CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero) Then
ErrorString = "Error al actualizar" ErrorString = "Error al actualizar"
End If End If
End If End If