-- mejoras en agregar nueva asignación
This commit is contained in:
@@ -130,7 +130,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="HdnCveCuentaAsignacion" runat="server" />
|
<asp:HiddenField ID="HdnCveCuentaAsignacion" runat="server" />
|
||||||
<asp:DropDownList ID="DdlCconceptosContables" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
<asp:DropDownList ID="DdlCconceptosContables" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="240px" ValidationGroup="GrpModulo" AutoPostBack="true"></asp:DropDownList>
|
||||||
<label for="<%= DdlCconceptosContables.ClientID.ToString()%>">Concepto Contable: </label>
|
<label for="<%= DdlCconceptosContables.ClientID.ToString()%>">Concepto Contable: </label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright" id="divCliente" runat="server" visible="false">
|
<div class="form-group form-md-line-input input-iconright" id="divCliente" runat="server" visible="false">
|
||||||
<label for="<%= DdlClientes.ClientID.ToString()%>">Cliente: </label><br />
|
<label for="<%= DdlClientes.ClientID.ToString()%>">Cliente: </label><br />
|
||||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="90%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="90%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright" id="divBancos" runat="server" visible="false">
|
<div class="form-group form-md-line-input input-iconright" id="divBancos" runat="server" visible="false">
|
||||||
<asp:DropDownList ID="DdlCuentaBancaria" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
<asp:DropDownList ID="DdlCuentaBancaria" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
||||||
@@ -181,6 +181,10 @@
|
|||||||
<asp:DropDownList ID="DdlActivoFijo" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="Descripcion" DataValueField="CveActivoFijo" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
<asp:DropDownList ID="DdlActivoFijo" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="Descripcion" DataValueField="CveActivoFijo" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
||||||
<label for="<%= DdlActivoFijo.ClientID.ToString()%>">Activo Fijo: </label>
|
<label for="<%= DdlActivoFijo.ClientID.ToString()%>">Activo Fijo: </label>
|
||||||
</div>
|
</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>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -79,6 +79,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
|
|
||||||
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
DdlSubProyectos.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
If ObjBancos.GetBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
If ObjBancos.GetBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||||
DdlCuentaBancaria.DataSource = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
DdlCuentaBancaria.DataSource = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
@@ -94,6 +96,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
'DdlPersonal.DataBind()
|
'DdlPersonal.DataBind()
|
||||||
DdlClasificacion.DataBind()
|
DdlClasificacion.DataBind()
|
||||||
DdlAlmacen.DataBind()
|
DdlAlmacen.DataBind()
|
||||||
|
DdlSubProyectos.DataBind()
|
||||||
|
|
||||||
DdlCuentaBancaria.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlCuentaBancaria.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
DdlConceptoNomina.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlConceptoNomina.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
@@ -112,6 +115,10 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
HdnCveCuentaAsignacion.Value = GvRow.DataKey("CveCuentaAsignacion").ToString
|
HdnCveCuentaAsignacion.Value = GvRow.DataKey("CveCuentaAsignacion").ToString
|
||||||
|
|
||||||
If Dr IsNot Nothing Then
|
If Dr IsNot Nothing Then
|
||||||
|
DdlCconceptosContables.Enabled = False
|
||||||
|
DdlSubProyectos.Enabled = False
|
||||||
|
DdlClasificacion.Enabled = False
|
||||||
|
DdlPersonal.Enabled = False
|
||||||
CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero
|
CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero
|
||||||
DdlCconceptosContables.SelectedValueExist(GvRow.DataKey("CveConceptoContable"))
|
DdlCconceptosContables.SelectedValueExist(GvRow.DataKey("CveConceptoContable"))
|
||||||
DdlCuenta.SelectedValueExist(GvRow.DataKey("CveCuenta"))
|
DdlCuenta.SelectedValueExist(GvRow.DataKey("CveCuenta"))
|
||||||
@@ -126,33 +133,37 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero
|
Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero
|
||||||
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
|
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
|
||||||
|
|
||||||
|
RecargaConcepto(CveConceptoContable)
|
||||||
|
|
||||||
|
DdlClientes.ddl.SelectedValueExist(CveCliente)
|
||||||
|
DdlPersonal.ddl.SelectedValueExist(CvePersonal)
|
||||||
|
|
||||||
|
LbAgregar.Text = "Actualizar"
|
||||||
|
UpModalModulos.Update()
|
||||||
|
RegistraScript("$('#ModalCat').modal();")
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RecargaConcepto(CveConceptoContable As Integer)
|
||||||
|
Dim Dr As DataRow = GlobalDTContaConceptosContables(CveConceptoContable).FiltroPrimero("")
|
||||||
|
|
||||||
|
If Dr IsNot Nothing Then
|
||||||
|
|
||||||
If Dr("AplicaCliente").ToString = "True" Then
|
If Dr("AplicaCliente").ToString = "True" Then
|
||||||
divCliente.Visible = True
|
divCliente.Visible = True
|
||||||
If CveCliente > 0 Then
|
DdlClientes.setEsWebService(True)
|
||||||
DdlClientes.setEsWebService(False)
|
|
||||||
Dim ObjCliente As New ClsClientes
|
|
||||||
If ObjCliente.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
DdlClientes.ddl.DataSource = ObjCliente.DtResultados
|
|
||||||
End If
|
|
||||||
DdlClientes.ddl.DataBind()
|
|
||||||
DdlClientes.ddl.SelectedValue = CveCliente
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Dr("AplicaProveedor").ToString = "True" Then
|
If Dr("AplicaProveedor").ToString = "True" Then
|
||||||
divProveedor.Visible = True
|
divProveedor.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Dr("AplicaPersonal").ToString = "True" Then
|
If Dr("AplicaPersonal").ToString = "True" Then
|
||||||
divPersonal.Visible = True
|
divPersonal.Visible = True
|
||||||
If CvePersonal > 0 Then
|
DdlPersonal.setEsWebService(True)
|
||||||
DdlPersonal.setEsWebService(False)
|
|
||||||
Dim ObjPersonal As New ClsRH
|
|
||||||
If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
DdlPersonal.ddl.DataSource = ObjPersonal.DtResultados
|
|
||||||
End If
|
|
||||||
DdlPersonal.ddl.DataBind()
|
|
||||||
DdlPersonal.ddl.SelectedValueExist(CvePersonal)
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Dr("AplicaImpuesto").ToString = "True" Then
|
If Dr("AplicaImpuesto").ToString = "True" Then
|
||||||
@@ -172,23 +183,22 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
divAlmacen.Visible = True
|
divAlmacen.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Dr("AplicaSubProyecto").ToString = "True" Then
|
||||||
|
divSubProyectos.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
If Dr("AplicaActivoFijo").ToString = "True" Then
|
If Dr("AplicaActivoFijo").ToString = "True" Then
|
||||||
divActivoFijo.Visible = True
|
divActivoFijo.Visible = True
|
||||||
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
||||||
DdlActivoFijo.DataBind()
|
DdlActivoFijo.DataBind()
|
||||||
DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo"))
|
' DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Dr("AplicaNomina").ToString = "True" Then
|
If Dr("AplicaNomina").ToString = "True" Then
|
||||||
divConceptoNomina.Visible = True
|
divConceptoNomina.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
LbAgregar.Text = "Actualizar"
|
|
||||||
UpModalModulos.Update()
|
|
||||||
RegistraScript("$('#ModalCat').modal();")
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub EliminarRow(sender As Object, e As EventArgs)
|
Protected Sub EliminarRow(sender As Object, e As EventArgs)
|
||||||
@@ -221,7 +231,10 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
|
|
||||||
Protected Sub BtnAgregarAsignacion_Click(sender As Object, e As EventArgs) Handles BtnAgregarAsignacion.Click
|
Protected Sub BtnAgregarAsignacion_Click(sender As Object, e As EventArgs) Handles BtnAgregarAsignacion.Click
|
||||||
LimpiarDatos()
|
LimpiarDatos()
|
||||||
|
DdlCconceptosContables.Enabled = True
|
||||||
|
DdlSubProyectos.Enabled = True
|
||||||
|
DdlClasificacion.Enabled = True
|
||||||
|
DdlPersonal.Enabled = True
|
||||||
LbAgregar.Text = "Agregar"
|
LbAgregar.Text = "Agregar"
|
||||||
UpModalModulos.Update()
|
UpModalModulos.Update()
|
||||||
RegistraScript("$('#ModalCat').modal();")
|
RegistraScript("$('#ModalCat').modal();")
|
||||||
@@ -253,14 +266,14 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
|
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
|
||||||
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
||||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero) Then
|
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero) Then
|
||||||
ErrorString = "Error al agregar"
|
ErrorString = "Error al agregar"
|
||||||
End If
|
End If
|
||||||
ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then
|
ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then
|
||||||
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
|
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
|
||||||
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
||||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero) Then
|
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero) Then
|
||||||
ErrorString = "Error al actualizar"
|
ErrorString = "Error al actualizar"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -293,4 +306,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
CargaDatosSistema()
|
CargaDatosSistema()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub DdlCconceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCconceptosContables.SelectedIndexChanged
|
||||||
|
RecargaConcepto(DdlCconceptosContables.SelectedValue.ToEntero)
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user