CatCuentas
This commit is contained in:
@@ -47,6 +47,11 @@
|
||||
font-size: 9px !important;
|
||||
content: "\f040";
|
||||
}
|
||||
|
||||
#select2-C_DdlCuentaContable-results{
|
||||
max-width:300px!important
|
||||
}
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
@@ -110,6 +115,9 @@
|
||||
<div class="catcuentas left">Subcuenta de</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="Tsubcuenta" runat="server" Enabled="False" Width="140px" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:DropDownList ID="DdlCuentaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="false" DataTextField="CtaCodigo" style="max-width:160px"
|
||||
DataValueField="Id" Width="160px" Visible="false">
|
||||
</asp:DropDownList>
|
||||
<br />
|
||||
<asp:Label ID="LblSubCuenta" runat="server" Text="" Font-Italic="True" Font-Size="7pt" ClientIDMode="Static"></asp:Label>
|
||||
</div>
|
||||
|
||||
@@ -186,6 +186,10 @@ Partial Class Contabilidad2_CatCuentas
|
||||
End Function
|
||||
Protected Sub agregar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.addclick
|
||||
LimpiarCampos()
|
||||
|
||||
Tsubcuenta.Visible = True
|
||||
DdlCuentaContable.Visible = False
|
||||
|
||||
Dim dt As New DataTable
|
||||
|
||||
'IDSelected = HdnID.Value.ToEntero() "ul" + itempadre.Cve;
|
||||
@@ -243,6 +247,11 @@ Partial Class Contabilidad2_CatCuentas
|
||||
Protected Sub editar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.editclick
|
||||
LimpiarCampos()
|
||||
limpiavalorescontables()
|
||||
CargaCuentasContables()
|
||||
|
||||
Tsubcuenta.Visible = False
|
||||
DdlCuentaContable.Visible = True
|
||||
|
||||
Dim dt As DataTable
|
||||
Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem)
|
||||
IDSelected = obj.Cve
|
||||
@@ -301,6 +310,7 @@ Partial Class Contabilidad2_CatCuentas
|
||||
If dt.Rows.Count > 0 Then
|
||||
Dim drt As DataRow = dt.Rows(0)
|
||||
Tsubcuenta.Text = drt("Codigo").ToString
|
||||
DdlCuentaContable.SelectedValueExist(drt("CveCuenta").ToString)
|
||||
LblSubCuenta.Text = drt("Nombre").ToString
|
||||
End If
|
||||
|
||||
@@ -313,6 +323,25 @@ Partial Class Contabilidad2_CatCuentas
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentasContables()
|
||||
|
||||
DdlCuentaContable.ClearSelection()
|
||||
DdlCuentaContable.Items.Clear()
|
||||
DdlCuentaContable.SelectedValue = Nothing
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCuentaContable.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
DdlCuentaContable.DataBind()
|
||||
DdlCuentaContable.Items.Insert(0, New ListItem("-", "-1"))
|
||||
DdlCuentaContable.SelectedValueExist("-1")
|
||||
|
||||
End Sub
|
||||
Protected Sub Guardar_Click(sender As Object, e As EventArgs) Handles Guardar.Click
|
||||
|
||||
If Tnombre.Text.Trim = "" Then Alert("Ingrese nombre de la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
@@ -328,11 +357,13 @@ Partial Class Contabilidad2_CatCuentas
|
||||
Dim CveBancoCuenta As Integer = ddlBancos.SelectedValue.ToEntero
|
||||
Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero()
|
||||
|
||||
|
||||
|
||||
If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then
|
||||
If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero,
|
||||
TxtDigAgrup.Text.ToString.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin,
|
||||
CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto,
|
||||
CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen, Codigo:=TxtCuenta.Text.Replace("-", "")) Then
|
||||
CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen, Codigo:=TxtCuenta.Text.Replace("-", ""), CvePadre:=DdlCuentaContable.SelectedValue.ToEntero) Then
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Dim ObjContaEmpresa As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
@@ -592,6 +623,9 @@ Partial Class Contabilidad2_CatCuentas
|
||||
nuevacuenta.Visible = False
|
||||
TxtCuenta.Enabled = False
|
||||
'Tcuenta.Enabled = False
|
||||
DdlCuentaContable.SelectedValueExist(-1)
|
||||
DdlCuentaContable.Visible = False
|
||||
Tsubcuenta.Visible = True
|
||||
BtnEliminar.Visible = False
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user