cambios, para activación de cuentas de crédito

This commit is contained in:
2023-05-04 18:18:40 -07:00
parent e733e6db82
commit be36ad1b2b
5 changed files with 43 additions and 10 deletions

View File

@@ -74,7 +74,7 @@
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
<ContentTemplate>
<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,CveTipoGasto" AutoGenerateColumns="False"
DataKeyNames="CveCuentaAsignacion,CveConceptoContable,CveCuenta,IdCuenta,CveProveedor,CveCliente,CvePersonal,CveClasificacion,CveAlmacen,PorcentajeIVA,CveConceptoNomina,CveBancoCuenta,CveActivoFijo,CveSubProyecto,CveTipoGasto,CveCredito" AutoGenerateColumns="False"
Style=" width:100%" GridLines="None">
<Columns>
<asp:BoundField DataField="ConceptoContable" ItemStyle-Width="150px" HeaderText="Concepto Contable" ItemStyle-HorizontalAlign="Left"/>
@@ -186,6 +186,10 @@
<asp:DropDownList ID="DdlActivoFijo" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="Descripcion" DataValueField="CveActivoFijo" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlActivoFijo.ClientID.ToString()%>">Activo Fijo: </label>
</div>
<div class="form-group form-md-line-input input-iconright" id="divCredito" runat="server" visible="false">
<asp:DropDownList ID="DdlCreditos" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="Referencia" DataValueField="CveCredito" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlCreditos.ClientID.ToString()%>">Crédito: </label>
</div>
<div class="form-group form-md-line-input input-iconright" id="divSubProyectos" runat="server" visible="false">
<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>

View File

@@ -180,6 +180,18 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlPersonal.SelectedText = drp
End If
If GvRow.DataKey("CveCredito").ToEntero > 0 Then
DdlCreditos.Items.Clear()
DdlCreditos.ClearSelection()
Dim ObjCreditos As New ClsBancos
If ObjCreditos.GetCreditos(-1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
DdlCreditos.DataSource = ObjCreditos.DtResultados.FiltraParametros("", DistinctColumns:={"CveCredito", "Referencia"})
End If
ObjCreditos.Dispose()
DdlCreditos.DataBind()
DdlCreditos.SelectedValue = GvRow.DataKey("CveCredito")
End If
LbAgregar.Text = "Actualizar"
UpModalModulos.Update()
RegistraScript("$('#ModalCat').modal();")
@@ -203,6 +215,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
divAlmacen.Visible = Boolean.Parse(Dr("AplicaAlmacen").ToString)
divSubProyectos.Visible = Boolean.Parse(Dr("AplicaSubProyecto").ToString)
divActivoFijo.Visible = Boolean.Parse(Dr("AplicaActivoFijo").ToString)
divCredito.Visible = Boolean.Parse(Dr("AplicaCredito").ToString)
DdlActivoFijo.Enabled = False
@@ -215,10 +228,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
Else
DdlActivoFijo.Enabled = False
End If
End If
divConceptoNomina.Visible = Dr("AplicaNomina").ToString = "True"
If CveConceptoContable = 51 Then
@@ -231,6 +242,21 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
If Dr("CveTipoSaldo").ToString = "1" Then
divRegeneraCuenta.Visible = True
End If
If Dr("AplicaCredito").ToString = "True" Then
Dim ObjCreditos As New ClsBancos
If ObjCreditos.GetCreditos(-1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
DdlCreditos.DataSource = ObjCreditos.DtResultados.FiltraParametros("", DistinctColumns:={"CveCredito", "Referencia"})
End If
ObjCreditos.Dispose()
DdlCreditos.DataBind()
If OpAgregar Then
DdlCreditos.Enabled = True
Else
DdlCreditos.Enabled = False
End If
End If
End If
End Sub
@@ -322,7 +348,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.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,
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
ErrorString = "Error al agregar"
End If
ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then
@@ -330,7 +356,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.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,
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
ErrorString = "Error al actualizar"
End If
End If