This commit is contained in:
Oscar Irigoyen
2023-05-11 09:31:12 -07:00
41 changed files with 2628 additions and 2697 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

View File

@@ -137,26 +137,18 @@
<div class="col-md-2">
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
</asp:DropDownList>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
</asp:UpdatePanel>
<div class="row" style="margin-right: 10px; margin-top: 8px;" align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False"
EmptyDataText="No se encontrarios movimientos."