-- manejo de nueva columna de cvecolectiva, para asignación e cuentas

This commit is contained in:
2023-10-12 19:44:47 -07:00
parent 008d4a5818
commit e337e502e8
7 changed files with 70 additions and 42 deletions

View File

@@ -181,6 +181,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="divColectivas" runat="server" visible="false">
<asp:DropDownList ID="DdlColectivas" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="Colectiva" DataValueField="CveColectiva" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlColectivas.ClientID.ToString()%>">Colectivas: </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>

View File

@@ -202,7 +202,6 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
If Dr IsNot Nothing Then
divCliente.Visible = Boolean.Parse(Dr("AplicaCliente").ToString)
divProveedor.Visible = Boolean.Parse(Dr("AplicaProveedor").ToString)
divPersonal.Visible = Boolean.Parse(Dr("AplicaPersonal").ToString)
@@ -213,6 +212,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
divSubProyectos.Visible = Boolean.Parse(Dr("AplicaSubProyecto").ToString)
divActivoFijo.Visible = Boolean.Parse(Dr("AplicaActivoFijo").ToString)
divCredito.Visible = Boolean.Parse(Dr("AplicaCredito").ToString)
divColectivas.Visible = Boolean.Parse(Dr("AplicaColectiva").ToString)
DdlActivoFijo.Enabled = False
@@ -254,6 +254,21 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlCreditos.Enabled = False
End If
End If
If Dr("AplicaColectiva").ToString = "True" Then
Dim ObjG As New ClsGenerales
If ObjG.GetColectivas(UsuarioActual.CveEmpresa, CveConceptoContable:=DdlCconceptosContables.SelectedValue.ToEntero) Then
DdlColectivas.DataSource = ObjG.DtResultados
End If
ObjG.Dispose()
DdlColectivas.DataBind()
If OpAgregar Then
DdlColectivas.Enabled = True
Else
DdlColectivas.Enabled = False
End If
End If
End If
End Sub
@@ -343,7 +358,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero,
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,
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveColectiva:=DdlColectivas.SelectedValue.ToEntero,
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
ErrorString = "Error al agregar"
End If
@@ -351,7 +366,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero,
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,
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveColectiva:=DdlColectivas.SelectedValue.ToEntero,
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
ErrorString = "Error al actualizar"
End If