Asignacion de cuentas bancarias en catalgo de cuentas contables
This commit is contained in:
@@ -5726,7 +5726,7 @@ Public Class ClsContabilidad
|
||||
|
||||
Public Function AddCuentasAsignaciones(Optional CveConceptoContable As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCuenta As Integer = -1, Optional IdCtaContable As Integer = -1,
|
||||
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1,
|
||||
Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1) As Boolean
|
||||
Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Conta_CuentasAsignacionesAdd")
|
||||
@@ -5743,6 +5743,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@PorcentajeIVA", SqlDbType.Decimal).Value = PorcentajeIVA
|
||||
.Add("@CveConceptoNomina", SqlDbType.Decimal).Value = CveConceptoNomina
|
||||
.Add("@CveBancoCuenta", SqlDbType.Int).Value = CveBancoCuenta
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -5777,7 +5778,7 @@ Public Class ClsContabilidad
|
||||
Public Function UpdateCuentasAsignaciones(CveConceptoAsignacion As Integer, Optional CveConceptoContable As Integer = -1, Optional CveCuenta As Integer = -1,
|
||||
Optional IdCtaContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1,
|
||||
Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveAlmacen As Integer = -1,
|
||||
Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1) As Boolean
|
||||
Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Conta_CuentasAsignacionesUpdate")
|
||||
@@ -5794,6 +5795,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@PorcentajeIVA", SqlDbType.Decimal).Value = PorcentajeIVA
|
||||
.Add("@CveConceptoNomina", SqlDbType.Decimal).Value = CveConceptoNomina
|
||||
.Add("@CveBancoCuenta", SqlDbType.Int).Value = CveBancoCuenta
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView runat="server" ID="GvDatos" EmptyDataText="No se encontraron Motivo de Baja Registrados" ToolTip="Listado de Motivo de Baja" CssClass="table table-striped table-advance table-hover ScrollAD"
|
||||
DataKeyNames="CveCuentaAsignacion,CveConceptoContable,CveCuenta,IdCuenta,CveProveedor,CveCliente,CvePersonal,CveClasificacion,CveAlmacen,PorcentajeIVA,CveConceptoNomina" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveCuentaAsignacion,CveConceptoContable,CveCuenta,IdCuenta,CveProveedor,CveCliente,CvePersonal,CveClasificacion,CveAlmacen,PorcentajeIVA,CveConceptoNomina,CveBancoCuenta" AutoGenerateColumns="False"
|
||||
Style="margin-top: -10px; text-align: center;width:100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" HeaderText="Concepto Contable" ItemStyle-HorizontalAlign="Left"/>
|
||||
@@ -87,6 +87,10 @@
|
||||
<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>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlCuentaBancaria" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList>
|
||||
<label for="<%= DdlCuentaBancaria.ClientID.ToString()%>">Cuenta Bancaria: </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1" style="width:50%;text-align:left">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
@@ -42,7 +42,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCuenta.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlClientes.setEsWebService(True)
|
||||
@@ -51,17 +51,25 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
|
||||
Dim ObjBancos As New ClsBancos
|
||||
If ObjBancos.GetBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||
DdlCuentaBancaria.DataSource = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
|
||||
DdlCuentaBancaria.DataBind()
|
||||
DdlCconceptosContables.DataBind()
|
||||
DdlCuenta.DataBind()
|
||||
DdlProveedor.DataBind()
|
||||
'DdlPersonal.DataBind()
|
||||
DdlClasificacion.DataBind()
|
||||
DdlAlmacen.DataBind()
|
||||
|
||||
DdlAlmacen.DataBind()
|
||||
|
||||
DdlCuentaBancaria.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlConceptoNomina.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlCconceptosContables.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
@@ -71,16 +79,20 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
End Sub
|
||||
|
||||
Protected Sub ActualizaModulo(sender As Object, e As EventArgs)
|
||||
LimpiarDatos()
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero
|
||||
DdlCconceptosContables.SelectedValue = GvRow.DataKey("CveConceptoContable").ToEntero
|
||||
DdlCuenta.SelectedValue = GvRow.DataKey("CveCuenta").ToEntero
|
||||
DdlConceptoNomina.SelectedValueexist(GvRow.DataKey("CveConceptoNomina").ToEntero)
|
||||
DdlConceptoNomina.SelectedValueExist(GvRow.DataKey("CveConceptoNomina").ToEntero)
|
||||
DdlProveedor.SelectedValue = GvRow.DataKey("CveProveedor").ToEntero
|
||||
DdlClasificacion.SelectedValue = GvRow.DataKey("CveClasificacion").ToEntero
|
||||
DdlAlmacen.SelectedValue = GvRow.DataKey("CveAlmacen").ToEntero
|
||||
TxtIdCuentaContable.Text = GvRow.DataKey("IdCuenta")
|
||||
TxtPorcentajeIVA.Text = GvRow.DataKey("PorcentajeIVA")
|
||||
DdlCuentaBancaria.SelectedValueExist(GvRow.DataKey("CveBancoCuenta"))
|
||||
|
||||
Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero
|
||||
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
|
||||
|
||||
@@ -120,14 +132,23 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarMotivoD_Click(sender As Object, e As EventArgs) Handles BtnAgregarMotivoD.Click
|
||||
Protected Sub BtnAgregarMotivoD_Click(sender As Object, e As EventArgs) Handles BtnAgregarMotivoD.Click
|
||||
LimpiarDatos()
|
||||
|
||||
LbAgregar.Text = "Agregar"
|
||||
UpModalModulos.Update()
|
||||
RegistraScript("$('#ModalCat').modal();")
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiarDatos()
|
||||
CveConceptoAsignacion = -1
|
||||
DdlCconceptosContables.SelectedValue = -1
|
||||
DdlCuenta.SelectedValue = -1
|
||||
DdlProveedor.SelectedValue = -1
|
||||
DdlClasificacion.SelectedValue = -1
|
||||
DdlAlmacen.SelectedValue = -1
|
||||
DdlConceptoNomina.SelectedValue = -1
|
||||
DdlConceptoNomina.SelectedValue = -1
|
||||
DdlCuentaBancaria.SelectedValueExist("-1")
|
||||
TxtIdCuentaContable.Text = ""
|
||||
TxtPorcentajeIVA.Text = ""
|
||||
DdlClientes.ddl.DataSource = ""
|
||||
@@ -135,10 +156,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
DdlClientes.setEsWebService(True)
|
||||
DdlPersonal.ddl.DataSource = ""
|
||||
DdlPersonal.ddl.DataBind()
|
||||
DdlPersonal.setEsWebService(True)
|
||||
LbAgregar.Text = "Agregar"
|
||||
UpModalModulos.Update()
|
||||
RegistraScript("$('#ModalCat').modal();")
|
||||
DdlPersonal.setEsWebService(True)
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||
@@ -147,13 +165,13 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
If LbAgregar.Text = "Agregar" Then
|
||||
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
|
||||
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal) Then
|
||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero) Then
|
||||
ErrorString = "Error al agregar"
|
||||
End If
|
||||
ElseIf LbAgregar.Text = "Actualizar" Then
|
||||
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
|
||||
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal) Then
|
||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero) Then
|
||||
ErrorString = "Error al actualizar"
|
||||
End If
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user