-- globales con %Imp y colectiva
This commit is contained in:
@@ -103,7 +103,7 @@
|
|||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
<br />
|
<br />
|
||||||
<asp:GridView runat="server" ID="GvGlobal" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover ScrollAD"
|
<asp:GridView runat="server" ID="GvGlobal" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover ScrollAD"
|
||||||
DataKeyNames="CveEmpresa,CveCuenta,CveConceptoContable,CveCuentaAsignacion,CveConceptoNomina, CveProveedor,CveClasificacion,CveAlmacen, IdCuenta, PorcentajeIVA, CveBancoCuenta, CveCliente, CvePersonal" AutoGenerateColumns="False"
|
DataKeyNames="CveCuentaGlobal, CveEmpresa,CveCuenta,CveConceptoContable,CveCuentaAsignacion,CveConceptoNomina, CveProveedor,CveClasificacion,CveAlmacen, IdCuenta, PorcentajeIVA, CveBancoCuenta, CveCliente, CvePersonal" AutoGenerateColumns="False"
|
||||||
Style=" width:100%" GridLines="None" Caption="Globales">
|
Style=" width:100%" GridLines="None" Caption="Globales">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-Width="250px" HeaderText="Concepto Contable" />
|
<asp:BoundField DataField="ConceptoContable" ItemStyle-Width="250px" HeaderText="Concepto Contable" />
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
<asp:BoundField DataField="CuentaCodigo" ItemStyle-Width="100px" HeaderText="Código Cuenta" />
|
<asp:BoundField DataField="CuentaCodigo" ItemStyle-Width="100px" HeaderText="Código Cuenta" />
|
||||||
<asp:BoundField DataField="CuentaNombre" HeaderText="Nombre Cuenta" />
|
<asp:BoundField DataField="CuentaNombre" HeaderText="Nombre Cuenta" />
|
||||||
<asp:BoundField DataField="PorcentajeImpuesto" HeaderText="%" />
|
<asp:BoundField DataField="PorcentajeImpuesto" HeaderText="%" />
|
||||||
|
<asp:BoundField DataField="Colectiva" HeaderText="-" />
|
||||||
<asp:TemplateField ItemStyle-Width="49px">
|
<asp:TemplateField ItemStyle-Width="49px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="ImgEliminar" runat="server" AlternateText="Eliminar" CausesValidation="False" OnClick="EliminarRowGlobal" CommandName="Delete" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
<asp:LinkButton ID="ImgEliminar" runat="server" AlternateText="Eliminar" CausesValidation="False" OnClick="EliminarRowGlobal" CommandName="Delete" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||||
@@ -238,7 +238,7 @@
|
|||||||
<div class="col-md-1" style="width:50%;text-align:left">
|
<div class="col-md-1" style="width:50%;text-align:left">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:HiddenField ID="HiddenField1" runat="server" />
|
<asp:HiddenField ID="HiddenField1" runat="server" />
|
||||||
<asp:DropDownList ID="DdlConceptoGlobal" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="240px" ValidationGroup="GrpModulo2" ></asp:DropDownList>
|
<asp:DropDownList ID="DdlConceptoGlobal" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="240px" ValidationGroup="GrpModulo2" OnSelectedIndexChanged="DdlConceptoGlobal_SelectedIndexChanged" ></asp:DropDownList>
|
||||||
<label for="<%= DdlConceptoGlobal.ClientID.ToString()%>">Concepto Contable: </label>
|
<label for="<%= DdlConceptoGlobal.ClientID.ToString()%>">Concepto Contable: </label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -262,6 +262,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6" style="width:50%;text-align:left">
|
||||||
|
<div class="form-group form-md-line-input input-iconright" id="divGlobalColectiva" runat="server" visible="false">
|
||||||
|
<asp:DropDownList ID="DdlGlobalColectiva" 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>
|
||||||
|
<div class="col-md-6" style="width:50%;text-align:left">
|
||||||
|
<div class="form-group form-md-line-input input-iconright" id="divGlobalPorcentajeIVA" runat="server" visible="false">
|
||||||
|
<asp:TextBox ID="TxtGlobalPorcentajeIVA" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true" style="width:100%"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtGlobalPorcentajeIVA" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'¨PorcentajeIVA''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModulo" Enabled="false"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtGlobalPorcentajeIVA.ClientID.ToString()%>">PorcentajeIVA:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<asp:LinkButton ID="LBAgregaGlobal" runat="server" class="btn btn-success" Text="Agregar" OnClick="LBAgregaGlobal_Click" ValidationGroup="GrpModulo2" />
|
<asp:LinkButton ID="LBAgregaGlobal" runat="server" class="btn btn-success" Text="Agregar" OnClick="LBAgregaGlobal_Click" ValidationGroup="GrpModulo2" />
|
||||||
|
|||||||
@@ -203,7 +203,6 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
RegistraScript("$('#ModalCat').modal();")
|
RegistraScript("$('#ModalCat').modal();")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub RecargaConcepto(CveConceptoContable As Integer)
|
Private Sub RecargaConcepto(CveConceptoContable As Integer)
|
||||||
@@ -268,10 +267,13 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
Dim ObjG As New ClsGenerales
|
Dim ObjG As New ClsGenerales
|
||||||
If ObjG.GetColectivas(UsuarioActual.CveEmpresa, CveConceptoContable:=DdlCconceptosContables.SelectedValue.ToEntero) Then
|
If ObjG.GetColectivas(UsuarioActual.CveEmpresa, CveConceptoContable:=DdlCconceptosContables.SelectedValue.ToEntero) Then
|
||||||
DdlColectivas.DataSource = ObjG.DtResultados
|
DdlColectivas.DataSource = ObjG.DtResultados
|
||||||
|
DdlGlobalColectiva.DataSource = ObjG.DtResultados
|
||||||
End If
|
End If
|
||||||
ObjG.Dispose()
|
ObjG.Dispose()
|
||||||
DdlColectivas.DataBind()
|
DdlColectivas.DataBind()
|
||||||
|
DdlGlobalColectiva.DataBind()
|
||||||
DdlColectivas.Items.Insert(0, New ListItem("-", "-1"))
|
DdlColectivas.Items.Insert(0, New ListItem("-", "-1"))
|
||||||
|
DdlGlobalColectiva.Items.Insert(0, New ListItem("-", "-1"))
|
||||||
|
|
||||||
If OpAgregar Then
|
If OpAgregar Then
|
||||||
DdlColectivas.Enabled = True
|
DdlColectivas.Enabled = True
|
||||||
@@ -303,8 +305,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
Protected Sub EliminarRowGlobal(sender As Object, e As EventArgs)
|
Protected Sub EliminarRowGlobal(sender As Object, e As EventArgs)
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
If ObjConta.RemoveCuentasGlobales(GvRow.DataKey("CveConceptoContable").ToEntero, GvRow.DataKey("CveEmpresa").ToEntero) Then
|
If ObjConta.RemoveCuentasGlobales(GvRow.DataKey("CveCuentaGlobal").ToEntero, GvRow.DataKey("CveEmpresa").ToEntero) Then
|
||||||
Alert("se elimino correctamente")
|
Alert("Se elimino correctamente")
|
||||||
End If
|
End If
|
||||||
CargaDatosSistema()
|
CargaDatosSistema()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
@@ -401,7 +403,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
|
|
||||||
Dim ErrorString As String = ""
|
Dim ErrorString As String = ""
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
If Not ObjConta.AddCuentasGlobales(DdlConceptoGlobal.SelectedValue.ToEntero, DdlCuentaGlobal.SelectedValue.ToEntero, DdlTipoGlobal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
If Not ObjConta.AddCuentasGlobales(DdlConceptoGlobal.SelectedValue.ToEntero, DdlCuentaGlobal.SelectedValue.ToEntero, DdlTipoGlobal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, TxtGlobalPorcentajeIVA.Text.ToDecimal, DdlGlobalColectiva.SelectedValue.ToEntero) Then
|
||||||
ErrorString = "Error al agregar"
|
ErrorString = "Error al agregar"
|
||||||
End If
|
End If
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
@@ -432,4 +434,46 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
DdlCuentaGlobal.DataBind()
|
DdlCuentaGlobal.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub DdlConceptoGlobal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
RecargaConceptoGlobal(DdlConceptoGlobal.SelectedValue.ToEntero)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RecargaConceptoGlobal(CveConceptoContable As Integer)
|
||||||
|
Dim Dr As DataRow = GlobalDTContaConceptosContables(CveConceptoContable).FiltroPrimero("")
|
||||||
|
|
||||||
|
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)
|
||||||
|
divGlobalPorcentajeIVA.Visible = Boolean.Parse(Dr("AplicaImpuesto").ToString)
|
||||||
|
'divClasificacion.Visible = Boolean.Parse(Dr("AplicaClasificacion").ToString)
|
||||||
|
'divBancos.Visible = Boolean.Parse(Dr("AplicaBancos").ToString)
|
||||||
|
'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)
|
||||||
|
divGlobalColectiva.Visible = Boolean.Parse(Dr("AplicaColectiva").ToString)
|
||||||
|
|
||||||
|
If Dr("AplicaColectiva").ToString = "True" Then
|
||||||
|
Dim dtt As DataTable = Nothing
|
||||||
|
Dim ObjG As New ClsGenerales
|
||||||
|
If ObjG.GetColectivas(UsuarioActual.CveEmpresa, CveConceptoContable:=DdlCconceptosContables.SelectedValue.ToEntero) Then
|
||||||
|
dtt = ObjG.DtResultados
|
||||||
|
End If
|
||||||
|
If ObjG.GetColectivas(0, CveConceptoContable:=DdlCconceptosContables.SelectedValue.ToEntero) Then
|
||||||
|
dtt.Merge(ObjG.DtResultados)
|
||||||
|
End If
|
||||||
|
DdlGlobalColectiva.DataSource = dtt
|
||||||
|
ObjG.Dispose()
|
||||||
|
|
||||||
|
DdlGlobalColectiva.DataBind()
|
||||||
|
DdlGlobalColectiva.Items.Insert(0, New ListItem("-", "-1"))
|
||||||
|
DdlGlobalColectiva.Enabled = True
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user